File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -493,22 +493,38 @@ bool SymbolFromAddressExact(duint address, SYMBOLINFO* info)
493493 }
494494 }
495495
496+ // module entry point pseudo-symbol
496497 if (modInfo->entry != 0 && modInfo->entrySymbol .rva == rva)
497498 {
498499 modInfo->entrySymbol .convertToGuiSymbol (base, info);
499500 return true ;
500501 }
501502
502- // search in module imports
503+ // search in module imports (iat)
503504 {
504505 auto modImport = modInfo->findImport (rva);
505506 if (modImport != nullptr )
506507 {
508+ // for imports by ordinal, try to resolve the real symbol
509+ if (modImport->ordinal != -1 )
510+ {
511+ duint exportAddress = 0 ;
512+ if (DbgMemRead (address, &exportAddress, sizeof (exportAddress)) && exportAddress != 0 )
513+ {
514+ if (SymbolFromAddressExact (exportAddress, info))
515+ {
516+ // override the address of the export symbol with the IAT address
517+ info->addr = address;
518+ return true ;
519+ }
520+ }
521+ }
522+
523+ // fall back to the import symbol itself
507524 modImport->copyToGuiSymbol (base, info);
508525 return true ;
509526 }
510527 }
511-
512528 return false ;
513529}
514530
You can’t perform that action at this time.
0 commit comments