#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    Norwich, UK
    Posts
    2
    Rep Power
    0

    Question Ripping source code from .exe


    Howdy,

    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.

    Cheers
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    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).
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    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.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    21
    Rep Power
    0

    ...


    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.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    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.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    Norwich, UK
    Posts
    2
    Rep Power
    0
    Ah well, guess I'm actually going to have to do my coursework properly :(

    Cheers for getting back so fast though peeps!

    Fenris
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    UK
    Posts
    50
    Rep Power
    14

    Its possible


    As people can and have ripped all the source code from Windows, added in some bits, and then recompiled it.

    I believe.

    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.
  14. #8
  15. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    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.

IMN logo majestic logo threadwatch logo seochat tools logo