Thread: how to open exe files

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    494

    how to open exe files

    if i have a exe file, how do i open it to see the code? i mean how do i decompile it?
    When no one helps you out. Call google();

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Get a disassembler.

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    A disassembler will give you assembly-language code, NOT C++ code. You might be able to understand the assembly code for "Hello World", but the assembly code for a real-world program is going to be tough to understand. (There won't be any comments.)

    Last time I did a quick Internet search, I found a decompiler, but it was very expensive... over $1000, I think.

    Compilation is basically an irreversable process. Different compilers will give you different exe files, and you can write different C++ code that will give you the same exe file. For example, if you change a variable name, the exe code will not change. There's more than one way to make a loop. The decompiler won't know what type of loop was in the source code. The decompiler won't know if there were several cpp files, or one big cpp file...

    The machine code (exe file) doesn't need comments, variable names, or function names. Thse are lost during linking/compilation. A decompiler will generate its own variable & function names... meaningless names like Variable1 and Function1().

    There is LOTS of information lost diring compilation! A decompiler can generate C++ source code, but it cannot regenerate the original source code!

    Assembly language is reversable, (except for variable names, etc.) because there is a one-to-one relationship between assembly language and machine language. That is, every line of assembly language code corresonds precisely to a single line of machine language code.

    An exe file is machine language... just a series of binary numbers which represent processor-instructions, values, and addresses.

    The bottom line is: Sometimes disassembly is useful. Decompilation is rarely useful. It's usually easier to re-write the code!

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Check out W32DAsm.

    Kuphryn

  5. #5
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Lol Bubba...
    Get a disassembler.





    __________________
    Some assembly required...
    I love puns.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  2. exe files in -c- language
    By enjoy in forum C Programming
    Replies: 6
    Last Post: 05-18-2004, 04:36 PM
  3. Dos commands hehe
    By Carp in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-17-2003, 02:51 PM
  4. Including files in exe
    By b0bd0d in forum C Programming
    Replies: 2
    Last Post: 11-12-2002, 08:10 PM
  5. Ghost in the CD Drive
    By Natase in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 10-12-2001, 05:38 PM