1

My company has a small number of .exe that were written in the '80s that are performing some minorly important tasks. Source code is gone and documentation is scarce. In order to run them we need to use DOSBox. My team wants to get the process into a modern language so we can maintain the code and if possible see how the program functions. Previous attempts to reserve engineer have failed, I believe because not enough time was allotted to work on the problem. I've doing some exploration to see what is possible. Thus far this is what I think I have found:

  1. Using IDA PRO 5.0 I can get the code back to assembly. The code looks functional.
  2. From the above, it appears the original code was either Pascal or Delphi.
  3. It looks like I can see what compiler (Borland) was used to create the .exe files.

My question is if I know the compiler was Borland, can I use that information to get back to a relatively correct source code? I know the variable names will be bad and it might have other issue that need to be debugged, but just getting back to the basic structure of the code with loops and defined function calls and methods would be great. If not, am I stuck trying to learn assembly to get a better idea of what is going on?

3

For most languages -- especially ones that are compiled directly into machine code -- the answer to whether knowing the compiler makes it easier to decompile them is "no". I wrote a post a while ago explaining the difficulties that machine code decompilers face; none of them are made easier by knowing the compiler.

However, your question doesn't mention any of the specific machine code decompilers such as Ghidra. It has the potential to make your life a lot easier, by giving you a reasonably-good approximation of the source code that is interactive (i.e., allows you to change names and types, add comments, etc). I'd recommend giving it a look. Regardless, assembly language will be involved in the process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.