Results 1 to 15 of 15

Thread: Decomplieing EXE ???

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2001
    Posts
    41

    Decomplieing EXE ???

    Hi

    Can any one plz Help me out. My friend was working on a project at school. He finished all he programing in C++ but after he complie the program into EXE the C++ file (His program ) got corrupted. He was very angry as he told me it not possible but it happen to him anyway. I know he been workin very hard so i wanted to help him. As my other friend told me, he can use a Decomplier to decomplie EXE back into C++ lang. So can anyone give me a link to a program that can decompile EXE back to C++.

    I know nothing about C++ as i have just started lol but my friend do and he don't know about decompliing.

    Thanks in Advance for all those that read and helped me. Thanks

  2. #2
    denniswrenn
    Guest
    There are several good Disassemblers, which take an executable, then turn it into Assembly Language(A very low level programming language), you can then turn the Assembly language into C++. But this is a whole lot of trouble (Assembler's hard ).

    You can not decompile a C++ executable and get C++ code back(unless you have some sort of ASM to C++ converter).

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Yes i also know about disassemblers but never used one. I am just curious, does the disassembler tranlate the whole C++ code into ASM. I don't think so but if it is so then wouldn't it be better to disassemble some C++ or other language EXE (with some optimizations) and then compile it in some assembler to make the exe faster.

    As i said i know nothing about asm.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4
    Lively Member ExciteMouse's Avatar
    Join Date
    Jul 2000
    Location
    Dallas, TX
    Posts
    78
    http://members.home.net/w32dasm/

    thats the best disassembler on the market. I have disassembled alot of things and taken the ASM out and used it in my own programs. In C++ there is a _asm scope. this method is used to make KeyGens and what not.

    I have also just taken other peoples DLLs, disassembled them and rewrote them in C++, so i have thier DLLs functionality.

    i love reverse engineering.

    here is an example, this is something where i was just testing a function that was in a DLL to see if i nailed it right:

    Code:
    #include <windows.h>
    
    char poo[1000];
    void* glob = &poo[0];
    
    void main(){
    	//glob = malloc(500);
    
    	_asm{
    		mov		eax, glob
    		mov		word ptr [eax + 0x00000180], 0x0000 //holds version
    		mov		ecx, glob
    		mov		dword ptr [ecx + 0x0000016C], 0x00000000 // tracking options
    		mov		edx, glob
    		mov		dword ptr [edx + 0x00000170], 0x00000000
    		mov		eax, glob
    		mov		dword ptr [eax + 0x00000174], 0x00000000
    		mov		ecx, glob
    		mov		dword ptr [ecx + 0x00000178], 0x00000000
    		mov		edx, glob
    		mov		dword ptr [edx + 0x0000017C], 0xFFFFFFFF //data block options
    	}
    
    	int temp = 0x0;
    
    	_asm{ // set all the enablespys to false
    		jmp		DIANE
    ADDONE:
    		mov		eax, temp
    		add		eax, 0x00000001
    		mov		temp, eax
    DIANE:
    		cmp		temp, 0x00000054
    		jge		ANDY
    		mov		ecx, temp
    		mov		edx, glob
    		mov		dword ptr [edx + 0x04 * ecx + 0x1C], 0x00000000
    		jmp		ADDONE
    	}
    
    ANDY:
    	//free(glob);
        return;
    	
    
    }

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2001
    Posts
    41
    Well that mean it impossible to change Exe Back to C++
    ASM is too hard for me to learn and I hate Maths lol

    I always thought if you convert one things to another it is possible to change back. But after looking at what you guys say it seems too hard to change back.

    well thanks anyway that alots of info you guys have given me

    thanks you^^

  6. #6
    Zaei
    Guest
    Decompilers are illegal, unless you are using it to debug you own program (thats why MSVC++ has one). As to why you can't decompile back to C++, when you take your C++ source, you dont turn that into an exe. First, the compiler turns your source into a binary .obj file. Before that, your code turns into ASM. Then, each ASM instruction is encoded in a binary form (the .obj). Then, its the Linker's job to turn that .obj file into an exe, by linking all of the .obj files in your project, with any libraries your program requires, and puts in the exe header file (so you can run it). So, when you have an EXE, all you have is a string of binary encoded ASM instructions, NOT C++.

    ASM is not hard. Learning it is about as hard as learning C++ for the first time. Its just another language (and one that is quite useful).

    Z.

  7. #7
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    What's the decompiler in MSVC++ called?
    Alcohol & calculus don't mix.
    Never drink & derive.

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It's not a decompiler, it's a disassembler, and it's built into the IDE (run your program through the debugger).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9
    Banned
    Join Date
    Feb 2001
    Location
    Back to sh*tland
    Posts
    294

    Question BTW

    Does Borland C++ Builder has the same sort of thing?
    I got it a few days ago. It's a big thing and I'm not used to it still.

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It has an integrated debugger, yes.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73

    Exclamation DMCA

    Decompilers/Disassemblers are now illegal under the Digital Millenium Copyright Act.....

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    .......but nobody pays any attention to things like that
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  13. #13
    Zaei
    Guest
    I just wanted to reply to Vlatko's question way up there.

    If you write a horrible C++ program, and copile it into Assembly, it's going to run slow. If you Decompiled that slow exe into assembly, all you are left with is sloppy ASM code. The reason ASM is fast is because the people who use it know how to write good ASM code. For example, there is no memory to memory "mov" operation. So, you could move the data in variable x into y like this:
    Code:
    mov eax, y
    mov x, eax
    or, like this:
    Code:
    push y
    pop x
    The second uses less memory space (and i believe is faster). SO, to answer your question, if the exe is slow to begin with, decompiling it and recompiling the ASM code will not speed it up (it wont for ANY exe).

    Z.

  14. #14
    Destined Soul
    Guest
    Somehow I doubt that they're illegal. If I compile a program, and I want to see what the compiler has created, am I not allowed to look at my own work? (Somehow I doubt someone else has copyrighted the exact same code that I would've just written.)

    Besides, isn't the DMCA mainly for the US? (I'm not sure how far the laws have extended into international territories.)

    Destined.

  15. #15
    Zaei
    Guest
    YOur code is copyrighted by you. You can use a dissassembler (eg, MSVC++'s), but using it on anyone elses program is very much illegal.

    Z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width