node/lib/metasm/metasm/exe_format/coff_decode.rb
# decodes COFF export table from directory
# mark exported names as encoded.export
decodes COFF export table from directory
mark exported names as encoded.export
decodes COFF export table from directory mark exported names as encoded . export
def decode_exports
		if @directory['export_table'] and sect_at_rva(@directory['export_table'][0])
			@export = ExportDirectory.decode(self)
			@export.exports.to_a.each { |e|
				if e.name and sect_at_rva(e.target)
					name = e.name
				elsif e.ordinal and sect_at_rva(e.target)
					name = "ord_#{@export.libname}_#{e.ordinal}"
				end
				e.target = curencoded.add_export new_label(name) if name
			}
		end
	end
def decode_exports if @directory [ 'export_table' ] and sect_at_rva ( @directory [ 'export_table' ] [ 0 ] ) @export = ExportDirectory . decode ( self ) @export . exports . to_a . each { | e | if e . name and sect_at_rva ( e . target ) name = e . name elsif e . ordinal and sect_at_rva ( e . target ) name = "ord_#{@export.libname}_#{e.ordinal}" end e . target = curencoded . add_export new_label ( name ) if name } end end
decodes COFF export table from directory
mark exported names as encoded.export
decodes COFF export table from directory mark exported names as encoded . export