Permalink
Browse files

Merge pull request #407 from serpilliere/ordinal_export

Loader/pe: Add ordinal export
  • Loading branch information...
commial committed Aug 10, 2016
2 parents ec147b3 + 96f4930 commit f2a9a353b32bf59a06b8738ab05e1d20109f71c9
Showing with 7 additions and 0 deletions.
  1. +7 −0 miasm2/jitter/loader/pe.py
@@ -98,6 +98,12 @@ def get_export_name_addr_list(e):
# hex(e.rva2virt(addr.rva))))
out.append(
(o.ordinal + e.DirExport.expdesc.base, e.rva2virt(addr.rva)))
+
+ for i, s in enumerate(e.DirExport.f_address):
+ if not s.rva:
+ continue
+ out.append((i + e.DirExport.expdesc.base, e.rva2virt(s.rva)))
+
return out
@@ -396,6 +402,7 @@ def add_export_lib(self, e, name):
c_name = canon_libname_libfunc(
name_inv[libad], imp_ord_or_name)
self.fad2cname[ad] = c_name
+ log.debug("Add func %s %s", hex(ad), c_name)
self.fad2info[ad] = libad, imp_ord_or_name
def gen_new_lib(self, target_pe, filter_import=lambda peobj, ad: True, **kwargs):

0 comments on commit f2a9a35

Please sign in to comment.