You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All PE files packed or unpacked by the UPX tool make it impossible for AsmResolver to read the import symbols, because the BadImageFormatException is thrown.
As with the official Mozilla Firefox installer, downloadable at this link: Firefox Installer.exe
How To Reproduce
A simple code which should normally list the imports:
IPEImage peImage = PEImage.FromFile("Firefox Installer.exe");
foreach (var import in peImage.Imports)
{
foreach (var symbol in import.Symbols) //The exception is here.
{
Console.WriteLine(import.Name + "!" + symbol.Name);
}
}
Expected Behavior
It should be possible to parse the import symbols for this type of PE. Secana's PeNet library does it, with this simple code:
PeNet.PeFile peFile = new PeNet.PeFile("Firefox Installer.exe");
foreach (var import in peFile.ImportedFunctions)
{
Console.WriteLine(import.DLL + "!" + import.Name);
}
The System.BadImageFormatException : 'Imported module "KERNEL32.DLL" has an invalid import lookup thunk table RVA.' is thrown as soon as the Symbols method of an ImportedModule is called.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Thanks for reporting. A potential fix has been pushed to PR #432. Could you please verify that this indeed solves your issue? You can download the build artifacts from AppVeyor once they're done.
AsmResolver Version
5.2.0
.NET Version
.NET 4.8
Operating System
Windows
Describe the Bug
All PE files packed or unpacked by the UPX tool make it impossible for AsmResolver to read the import symbols, because the BadImageFormatException is thrown.
As with the official Mozilla Firefox installer, downloadable at this link: Firefox Installer.exe
How To Reproduce
A simple code which should normally list the imports:
Expected Behavior
It should be possible to parse the import symbols for this type of PE. Secana's PeNet library does it, with this simple code:
The expected result:
Actual Behavior
The
System.BadImageFormatException : 'Imported module "KERNEL32.DLL" has an invalid import lookup thunk table RVA.'
is thrown as soon as the Symbols method of an ImportedModule is called.Additional Context
No response
The text was updated successfully, but these errors were encountered: