0

How to overcome the error message while trying to open the exe in ILSpy:

System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
   at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders(UInt16& subsystem, UInt16& dll_characteristics)
   at Mono.Cecil.PE.ImageReader.ReadImage()
   at Mono.Cecil.PE.ImageReader.ReadImage(Disposable`1 stream, String file_name)
   at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
   at ICSharpCode.ILSpy.LoadedAssembly.LoadAssembly(Object state)
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Is the executable packed or what to do?

Glorfindel
  • 230
  • 1
  • 2
  • 10
T.Todua
  • 643
  • 2
  • 9
  • 20

1 Answers1

1

If the program runs, it should be possible to dump the module from memory, after it was reconstructed to original state while loading it to memory.

MazeGen
  • 143
  • 8