node/lib/metasm/metasm/disassemble.rb
def split_block(block, address=nil, rebacktrace=false)
		if not address	# invoked as split_block(0x401012)
			return if not @decoded[block].kind_of? DecodedInstruction
			block, address = @decoded[block].block, block
		end
		return block if address == block.address
		new_b = block.split address
		if rebacktrace
			new_b.backtracked_for.dup.each { |btt|
				backtrace(btt.expr, btt.address,
					  :only_upto => block.list.last.address,
					  :include_start => !btt.exclude_instr, :from_subfuncret => btt.from_subfuncret,
					  :origin => btt.origin, :orig_expr => btt.orig_expr, :type => btt.type, :len => btt.len,
					  :detached => btt.detached, :maxdepth => btt.maxdepth)
			}
		end
		new_b
	end
# splits an InstructionBlock, updates the blocks backtracked_for
splits an InstructionBlock, updates the blocks backtracked_for
splits an InstructionBlock updates the blocks backtracked_for
def split_block(block, address=nil, rebacktrace=false)
		if not address	
			return if not @decoded[block].kind_of? DecodedInstruction
			block, address = @decoded[block].block, block
		end
		return block if address == block.address
		new_b = block.split address
		if rebacktrace
			new_b.backtracked_for.dup.each { |btt|
				backtrace(btt.expr, btt.address,
					  :only_upto => block.list.last.address,
					  :include_start => !btt.exclude_instr, :from_subfuncret => btt.from_subfuncret,
					  :origin => btt.origin, :orig_expr => btt.orig_expr, :type => btt.type, :len => btt.len,
					  :detached => btt.detached, :maxdepth => btt.maxdepth)
			}
		end
		new_b
	end
def split_block ( block , address = nil , rebacktrace = false ) if not address return if not @decoded [ block ] . kind_of? DecodedInstruction block , address = @decoded [ block ] . block , block end return block if address == block . address new_b = block . split address if rebacktrace new_b . backtracked_for . dup . each { | btt | backtrace ( btt . expr , btt . address , :only_upto => block . list . last . address , :include_start => ! btt . exclude_instr , :from_subfuncret => btt . from_subfuncret , :origin => btt . origin , :orig_expr => btt . orig_expr , :type => btt . type , :len => btt . len , :detached => btt . detached , :maxdepth => btt . maxdepth ) } end new_b end
splits an InstructionBlock, updates the blocks backtracked_for
splits an InstructionBlock updates the blocks backtracked_for
# invoked as split_block(0x401012)
block
address
rebacktrace