October 23rd, 2002, 01:32 PM
Ripping source code from .exe
I've got a .exe file that was composed in Borland C++ Builder 4, I was wondering if there is anyway of getting at the source code easily. It's not an especially big/complex program.
October 23rd, 2002, 02:05 PM
Not unless it was compiled with debug code. And then if it was, you would still need access to the source. So to make a long story short, no.
If you don't have the source, you have to contact the programmer/company that created it and get the source that way (assuming they release thier source).
October 23rd, 2002, 02:18 PM
easily? no. you could learn assembler and how to use a debugger like softice. then you have some kind of "source code". with some practise, you can even read parts the C code from it.
October 23rd, 2002, 02:23 PM
well i figure, when u compile a program it makes the .exe so if u can get a prog that decompiles u could probably get the source.
i know in JAVA u can get progs that get the source code from binary class files.
October 23rd, 2002, 02:36 PM
you cannot easily because
there is not that many assembler instructions. so many different c commands compile to much fewer instructions.
if the program was not compiled for debugging, all information that is somewhat "verbose" in a high-level language (like variables or function names) is lost.
and most compilers optimize the code after the first pass of only translating. thus the code can be modified for different reasons and the same C command can compile to different assembler code if used in different context.
there is probably some more reasons i can not think of right now.
October 23rd, 2002, 03:04 PM
Ah well, guess I'm actually going to have to do my coursework properly :(
Cheers for getting back so fast though peeps!
October 25th, 2002, 03:02 PM
As people can and have ripped all the source code from Windows, added in some bits, and then recompiled it.
They also had access to some very nice computers for a ong period of time (probably a cray).
Doing the coursework is probably the easiest way.
Unless it involves trees in haskell.
October 25th, 2002, 03:16 PM
The sourcecode that was seen by these people was assembly, not C.
It is possible to alter the code and recompile it but you have to know assembly to do this.