feature: correct dll function handling

This commit is contained in:
Dobin Rutishauser
2025-06-22 21:57:37 +02:00
parent 8fa1895cf6
commit f40161b206
5 changed files with 48 additions and 29 deletions
+10
View File
@@ -189,6 +189,16 @@ class SuperPe():
return exp.address
raise Exception("Cant find entry point for export {}".format(exportName))
def get_export_vaddr_by_name(self, exportName: str) -> Optional[int]:
d = [pefile.DIRECTORY_ENTRY["IMAGE_DIRECTORY_ENTRY_EXPORT"]]
self.pe.parse_data_directories(directories=d)
if self.pe.DIRECTORY_ENTRY_EXPORT.symbols == 0:
return None
for e in self.pe.DIRECTORY_ENTRY_EXPORT.symbols:
if e.name.decode() == exportName:
return e.address
return None
def get_exports(self) -> List[str]: