node/lib/metasm/metasm/disassemble.rb
def disassemble_fast_step(todo, &b)
		return if not x = todo.pop
		addr, from, from_subfuncret = x

		addr = normalize(addr)

		if di = @decoded[addr]
			if di.kind_of? DecodedInstruction
				split_block(di.block, di.address) if not di.block_head?
				di.block.add_from(from, from_subfuncret ? :subfuncret : :normal) if from and from != :default
			end
		elsif s = get_section_at(addr)
			block = InstructionBlock.new(normalize(addr), s[0])
			block.add_from(from, from_subfuncret ? :subfuncret : :normal) if from and from != :default
			todo.concat disassemble_fast_block(block, &b)
		elsif name = Expression[addr].reduce_rec and name.kind_of? ::String and not @function[addr]
			if c_parser and s = c_parser.toplevel.symbol[name] and s.type.untypedef.kind_of? C::Function
				@function[addr] = @cpu.decode_c_function_prototype(@c_parser, s)
				detect_function_thunk_noreturn(from) if @function[addr].noreturn
			elsif @function[:default]
				@function[addr] = @function[:default].dup
			end
		end

		disassemble_fast_checkfunc(addr)
	end
# disassembles one block from the ary, see disassemble_fast_block
disassembles one block from the ary, see disassemble_fast_block
disassembles one block from the ary see disassemble_fast_block
def disassemble_fast_step(todo, &b)
		return if not x = todo.pop
		addr, from, from_subfuncret = x
		addr = normalize(addr)
		if di = @decoded[addr]
			if di.kind_of? DecodedInstruction
				split_block(di.block, di.address) if not di.block_head?
				di.block.add_from(from, from_subfuncret ? :subfuncret : :normal) if from and from != :default
			end
		elsif s = get_section_at(addr)
			block = InstructionBlock.new(normalize(addr), s[0])
			block.add_from(from, from_subfuncret ? :subfuncret : :normal) if from and from != :default
			todo.concat disassemble_fast_block(block, &b)
		elsif name = Expression[addr].reduce_rec and name.kind_of? ::String and not @function[addr]
			if c_parser and s = c_parser.toplevel.symbol[name] and s.type.untypedef.kind_of? C::Function
				@function[addr] = @cpu.decode_c_function_prototype(@c_parser, s)
				detect_function_thunk_noreturn(from) if @function[addr].noreturn
			elsif @function[:default]
				@function[addr] = @function[:default].dup
			end
		end
		disassemble_fast_checkfunc(addr)
	end
def disassemble_fast_step ( todo , & b ) return if not x = todo . pop addr , from , from_subfuncret = x addr = normalize ( addr ) if di = @decoded [ addr ] if di . kind_of? DecodedInstruction split_block ( di . block , di . address ) if not di . block_head? di . block . add_from ( from , from_subfuncret ? :subfuncret : :normal ) if from and from != :default end elsif s = get_section_at ( addr ) block = InstructionBlock . new ( normalize ( addr ) , s [ 0 ] ) block . add_from ( from , from_subfuncret ? :subfuncret : :normal ) if from and from != :default todo . concat disassemble_fast_block ( block , & b ) elsif name = Expression [ addr ] . reduce_rec and name . kind_of? :: String and not @function [ addr ] if c_parser and s = c_parser . toplevel . symbol [ name ] and s . type . untypedef . kind_of? C :: Function @function [ addr ] = @cpu . decode_c_function_prototype ( @c_parser , s ) detect_function_thunk_noreturn ( from ) if @function [ addr ] . noreturn elsif @function [ :default ] @function [ addr ] = @function [ :default ] . dup end end disassemble_fast_checkfunc ( addr ) end
disassembles one block from the ary, see disassemble_fast_block
disassembles one block from the ary see disassemble_fast_block
todo
b