From: matthew DOT krause AT juno DOT com To: djgpp AT delorie DOT com Date: Wed, 29 Jul 1998 12:28:59 -0400 Subject: Re: exe to c Message-ID: <19980729.124006.16238.0.matthew.krause@juno.com> Precedence: bulk I've been following the discussion on decompilers, and followed the link to DCC that someone gave out. I decided to test DCC on DJGPP, and have discovered that no, DCC doesn't work with DJGPP. Here's how, in case you don't believe me My test program /*Test for DCC decompiler*/ #include int main() { printf("Can DCC decompile me??\n"); return 0; } The Output D:\djgpp\misc>dcctest Can DCC decompile me?? And Running DCC on it: D:\djgpp\misc>dcc -v dcctest.exe File type is EXE Signature = 4D5A File size % 512 = 0000 File size / 512 = 0004 pages # relocation items = 0000 Offset to load image = 0020 paras Minimum allocation = 0027 paras Maximum allocation = FFFF paras Load image size = 0600 Initial SS:SP = 0010:0760 Initial CS:IP = 0010:0054 Main could not be located! Model: x Warning - compiler not recognised Signature file: ./dccxxx.sig Warning: cannot open signature file ./dccxxx.sig dcc: Don't understand 80386 instruction 66 at location 000219 Intrigued by Mr. Henderson's comment "or any recently made compiler", I decided to experiment. I compiled the same code with Cygnus(B19) and LCCWin32, but DCC admitted that dcc: Don't understand new EXE format. I then tried to disassemble the Window$ 'Write' program, assuming that Micro$oft would use MSCV to compile their stuff. Again, no luck. Finally, I tried it on Dune, a pretty old (but still cool) game. It paritally worked, but bombed before it finished, and spat out some Assembler. *****Summary and Conclusion***** So as of now DCC is only of use for decompiling older programs. May I point out that this against the License of many programs, which prohibit the "decompilation or reverse engineering" of the program. However, DCC could be a useful tool for learning. It __may__ be possible to adapt dcc to read/decompile DJGPP programs. From what little of the documentation & accompianing thesis I've been able to read (some of it is in postscript, and I have no way of converting this to something I can read (pointers to ps>html; ps>text; etc. coverters wouild be greatly appreciated)), I **think **DCC uses 'signatures' which help it determine what compiler compiled the program, and how to dissassemble it. As one can grok from DCC's output, it lacks a suitable signutaure file for DJGPP. It __may__ be possible to write one. If anyone is interested in attempting this project, please contact me. I would be delighted to provide what little help I can, but think I lack sufficent skills to undertake this on my own. If you want to take a look at the dcc website, its http://www.csee.uq.edu.au/csm/dcc.html. Matthew Krause Orange, CT USA " And all dared to brave unknown terrors, to do mighty deeds, to boldly split infinitives that no man had split before -- and thus was the empire forged" --The Hichhiker's Guide to the Galaxy _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]