Hello,
I am attempting to reverse engineer an MSDOS executable: http://pulkomandy.tk/drop/CDISA80.EXE
I am using reko 0.12.0.0 (last release at the time of writing).
I have found some problems:
- There is a segment called "code" but it seems empty. The functions are in another segment called 0810
- 3 functions generate error during analysis: "An error occured while renaming variables. The given key 'l0810_1441' was not present in the dictionary.
- "Reconstruct data types" step gives two warnings for "Non-integral switch expression"
- A function at 0810:B3BF is not disassembled. It shows as hex dump in the disassembly view and as
<anonymous> <unnamed> = <code>; in the decompiled view
- "Structure editor" view in the GUI list no structures. I don't know if this is supposed to be filled automatically, if the previous errors are related to it being empty, or what is going on. The decompiled code uses various structures (named like Eq_52712) but I don't see where these are defined. In the files output of the disassembly they are in a .h file, so is it just missing support in the GUI currently? How would I go about renaming some structures if that's possible?
- I think the analysis process identified several constants in the 5C09 segment, and I can see them in the generated .h file. But I do not see them in the GUI (the segment is visible as a monolithic hex dump and there is no way to organize it or name things as far as I can see).
Some imprvovement suggestions:
- I can edit prototypes for methods to define the type and name of the parameters. However, when doing so, the parameter names are shown in the prototype of the function, but not in the decompiled body. So it is hard to keep track of which parameter is which after doing that, and it makes the code further from compiling.
- There seem to be no way to rename segments. In this case it's not too bad because there are only two segments in use, I can remember that one is the code and one is the constants data (the others are for variables, but they are not relevant for analysis of the code as they all contain 00).
- The C standard functions are not identified automatically (in this case I think they are from Microsoft C compiler judging from some strings in the executable). In this specific case I think a lot of the code in the executable is actually from the standard library: string handling, probably a printf implementation, memory allocation, file io. If there is a way to automatically recognize these, it would make my job investigating the other parts of the program a lot easier. Lokewise for the startup code before the main function (I saw this done automatically for Borland runtime in some other exe I have tested with?)
More generally I'm not sure how to set my expectations. In the past I have used disassemblers (not decompilers) where the process was iterative: run the tool, look at the output, modify a script file to hint the tool at what it got wrong, re-run the tool, and repeat (for example I do this with d52: https://github.com/jblang/d52, where I can not only name functions, but also add comments and annotations as I understand things). Is the workflow for reko somewhat similar to this? Or is it more a one-shot thing?
Hello,
I am attempting to reverse engineer an MSDOS executable: http://pulkomandy.tk/drop/CDISA80.EXE
I am using reko 0.12.0.0 (last release at the time of writing).
I have found some problems:
<anonymous> <unnamed> = <code>;in the decompiled viewSome imprvovement suggestions:
More generally I'm not sure how to set my expectations. In the past I have used disassemblers (not decompilers) where the process was iterative: run the tool, look at the output, modify a script file to hint the tool at what it got wrong, re-run the tool, and repeat (for example I do this with d52: https://github.com/jblang/d52, where I can not only name functions, but also add comments and annotations as I understand things). Is the workflow for reko somewhat similar to this? Or is it more a one-shot thing?