Decompile exe?

All questions regarding Windows programming, post here. API,COM, ActiveX, DirectX, OpenGL, MFC and so on...

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Decompile exe?

Postby outlaw » Sat Aug 30, 2008 5:21 pm

Hello im new in these forums. I were just wondering here that is it easy to decompile exe file?


Sorry if this was wrong section or if i did anything wrong.
outlaw
 
Posts: 3
Joined: Sat Aug 23, 2008 4:34 pm

Postby MXP » Sat Aug 30, 2008 6:12 pm

Decompiling into machine code is easy but not always very useful. Decompiling into source code edges towards impossibility for C and C++ programs.
Need information on a function I've posted? Chances are it's at the MSDN.
MXP
 
Posts: 6506
Joined: Mon Sep 22, 2003 5:27 pm

Postby outlaw » Sun Aug 31, 2008 4:13 am

Colin Jeanne wrote:Decompiling into machine code is easy but not always very useful. Decompiling into source code edges towards impossibility for C and C++ programs.


Okay, thanks for the reply.

I got another question:

Is it easy to modify some lines on the .exe? (Without decompiling everything).
outlaw
 
Posts: 3
Joined: Sat Aug 23, 2008 4:34 pm

Postby Gonbe » Sun Aug 31, 2008 4:42 am

Not sure what you mean with 'lines', but if you want to modify something like strings or variable names or some other stuff, often a HEX editor will do. For example if your code is like:
[syntax="cpp"]
#include <iostream>

int main()
{
std::cout << "hello world!\n";
return 0;
}
[/syntax]

And you compile it, you can open the executable file, with some hex editor and you will see something like this:

h t t p://img98.imageshack.us/img98/3189/hexeditorsr0.jpg

and you can simply replace the string that i highlighted there.
(not sure if you can 'insert' symbols, but you can make it longer than the original as long as there is room for it. (00's in HEX, and make sure you end your string with '0a' in HEX)

Another popular program to modify / analize programs with is "Ollydbg" (www . ollydbg . de) though that requires ASM knowledge so i can't help you with that..

-edit-
Still can't post images or URLs
User avatar
Gonbe
 
Posts: 89
Joined: Mon May 05, 2008 1:17 pm

Postby outlaw » Sun Aug 31, 2008 5:18 am

LudoSanders wrote:Not sure what you mean with 'lines', but if you want to modify something like strings or variable names or some other stuff, often a HEX editor will do. For example if your code is like:
[syntax="cpp"]
#include <iostream>

int main()
{
std::cout << "hello world!\n";
return 0;
}
[/syntax]

And you compile it, you can open the executable file, with some hex editor and you will see something like this:

h t t p://img98.imageshack.us/img98/3189/hexeditorsr0.jpg

and you can simply replace the string that i highlighted there.
(not sure if you can 'insert' symbols, but you can make it longer than the original as long as there is room for it. (00's in HEX, and make sure you end your string with '0a' in HEX)

Another popular program to modify / analize programs with is "Ollydbg" (www . ollydbg . de) though that requires ASM knowledge so i can't help you with that..

-edit-
Still can't post images or URLs


Thanks for the reply, i think its too advanched for me to edit the .exe. :S
outlaw
 
Posts: 3
Joined: Sat Aug 23, 2008 4:34 pm

Postby ventsyv » Tue Sep 02, 2008 12:45 pm

It is too advanced for most people. ASM knowledge is helpful somewhat but modifying decompiled exes is still extremely difficult.
User avatar
ventsyv
 
Posts: 2810
Joined: Mon Sep 22, 2003 5:25 pm
Location: MD USA


Return to Windows Programming

Who is online

Users browsing this forum: No registered users and 0 guests