Search code examples
delphireverse-engineeringdecompilingdisassembly

Outputting plain source code from


I have a application that spits out the same error each time i do something specific:

Exception EListError in module foo.exe at 000277CF.

List index out of bounds(0)
(Physical address: XXXXXXX)

As a programmer I would love it if there were a way I could open it up and pinpoint the orgin of the error to the developers.

Would that be possible? I know the language and it's a mix of .NET and with some old Delphi code.

Any want to point me in the right direction? Tutorials? Programs to use?


Solution

  • The EListError exception seems indicate which the executable is a delphi app, Now Is not possible retrieve the original source code from a Delphi Win32 application, because the variable names, methods, parameters and addtional elements are converted to memory address and are lost when the executable is created. So the original code cannot be recreated.

    You best option is use a decompiler like IDA to disassemble and debug the exe and determine the location of the issue and then you can create a patch to fix that, but this task is not easy and requiere a lot of knowledge about the pe structures, memory address location and assembly.

    Also in your question you mention the posibility which the application is a mix of .net code and delphi code, if that is the case you can use reflector or Telerik JustDecompile to retrieve the original source code.