Jump to content
Tuts 4 You

System.BadImageFormatException


Hassar

Recommended Posts

Hi, I used Scylla 0.9.7c to dump an exe and then fix it, however I'm having trouble getting the exe to work.

I'm using the Exception Logger tool by codecracker to identify the exception that's not allowing the exe to work. It appears to be a System.BadImageFormatException. The exception message is "Could not load file or assembly 'program.exe' or one of its dependencies. The module was expected to contain an assembly manifest.".

Any idea what's causing the error and how to fix it?

Edited by Hassar
Link to comment

Check if the PE and .NET headers are valid. If it's runnable, you can use dnSpy to debug it and see where the exception gets thrown. Also, you can use dnSpy to verify that it has an Assembly table with one valid row.

Edited by 0xd4d
  • Like 2
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...