|
|
|
|
![]() ![]() |
Jun 19 2007, 06:33 AM
Post
#1
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 2 Joined: 19-June 07 Member No.: 22,758 |
Hello Friends,
I am new on this site. Something about myself, I am Teri, a Software Developer with 7+ years of experience. Have worked on C++, Vb, .NET, Java & so on. I have a program's exe file which needs some changes to be done. I understand that I need to decompile it to translate to source code. But, how can I recognize that the program is written in which language. Which decompiler should be used. I mean if the prg is written in VB, C++, Java, .net the respective decompiler should be used. How do I recognize the programming language & which decompiler to use for it is my hot question of the day. I read about PE Explorer, which allows us to make changes in the EXE itself. I am not confident about how much will it allow me. Will it allow me to change the functionality of a file, add new file, update GUI etc? Will it provide me the Source code? Can't find the solution for this query. I believe experts sitting on this site will be able to asist me. Any suggestions, ideas, solutions are highly appreciated. You may find the same post in other forums of this site also. Please ignore if you have read this one. Thanks Teri |
|
|
|
Jun 19 2007, 04:00 PM
Post
#2
|
|
|
the Q Group: [HOSTED] Posts: 1,094 Joined: 13-July 05 From: Lithuania, Vilnius Member No.: 7,059 myCENTs:70.96 |
I could be wrong, but as I know, you can only decompile a normal .exe file to assembly code and not to the original source, more and more people don't know asm anymore.. and who knows it well is really a happy person (or maybe not) .. if anyone could decompile an .exe file to its original source code, why would closed source exist? or why would we need open-source software.. If you're experience is over 7 years in programming, I think you must have known this.. or maybe it is just me. Of course, some "compilers" can be decompiled, but that doesn't include such things like a compiled with gcc/minigw C/C++ source!
|
|
|
|
Jun 20 2007, 10:10 PM
Post
#3
|
|
|
Super Member Group: [HOSTED] Posts: 555 Joined: 25-April 05 Member No.: 4,374 myCENTs:68.76 |
It looks like Quatrux is pretty much right. The only way to decompile an EXE is to assembly. The entire purpose of a compiler is to convert information from one domain to another. In the case of programming a compiler converts from the human readable domain of a computer language to the hardware specific domain of a computer platform. During this conversion a lot of information is lost and a lot of assumptions are made. If you compile the same source code with two different compilers you will get completely different assembly. If you change even one compiler flag you will get completely different assembly.
Roughly speaking, the program language domain is larger than the assembly domain so when it is converted you lose information that you can not get back. In a way its like a MP3. The source is much bigger than the result and you can never get the exact source back form the result. If you want to pursue this avenue then I would suggest getting some debuggin tools. WinDBG (http://www.microsoft.com/whdc/devtools/debugging/default.mspx) is made by Microsoft and is free. There are plenty others. Bottom line is it is hard. P.S. .NET is unique and can be decompiled with fairly reliable results. .NET is based on an intermediate language which runs at runtime similar to Java. I have tried several tools that will spit out astonishing accurate results in either VB or C# (your choice). There is a downside as the better ones usually cost more than I would ever spend for them. |
|
|
|
Jan 14 2008, 01:07 PM
Post
#4
|
|
|
Member - Active Contributor Group: Members Posts: 87 Joined: 9-January 08 Member No.: 27,482 |
Yes its not that easy. Try studying Debug then assembly language then you'll know how codes work. And how to manipulate them.
|
|
|
|
Jan 14 2008, 01:42 PM
Post
#5
|
|
|
Member [ Level 1 ] Group: Members Posts: 30 Joined: 31-December 07 Member No.: 27,267 |
Hi,
Assembly language can be quite entertaining, but no serious developer nowadays doing general business programming would code in assembly (unless extreme optimization is needed). Still, mostly all development that needs high efficiency is done in C or C++ instead of assembly, or mostly in C or C++ with a few libraries in assembly (this is getting more and more scarce). Studying the assembly listing of a small executable is very rewarding, and it is also not very difficult to create a rudimentary Win32 application in assembly. However, for anything larger, it is simply not feasible. Do you really need to reverse-engineer the program? If this is not necessary (and you would just like to learn of its internals), why not study already established open-source projects? While the license these are released under (mostly GPL) may have some restrictions, it is still very useful and enlightening. |
|
|
|
Jan 14 2008, 08:18 PM
Post
#6
|
|
|
Advanced Member Group: [HOSTED] Posts: 177 Joined: 25-December 07 Member No.: 27,129 |
As others have said, decompilation completely is next to impossible. The only languages that I know can get just a bit decompiled are the .net languages and visual basic 6. Even then, the code is not compileable and dosen't make sense. Usually the result is some functions, most of the gui, and a few variables, if you are lucky. Most of it is pointers and assembly code.
Considering what you want decompiled may have been made in c++, I doubt it would be possible to get anything that isn't assembly out of a decompilation of it. |
|
|
|
Jan 15 2008, 05:08 AM
Post
#7
|
|
|
Advanced Member Group: Members Posts: 128 Joined: 12-February 05 From: St. Louis, MO Member No.: 2,612 |
additionally, what if a programmer prefers to dynamically create his or her GUI?
say, CODE CreateWindowEx(0, "ScrollBar", NULL, WS_CHILD | SBS_VERT | WS_VISIBLE, 0, 0, 20, 200, g_hWndMain, NULL, hThisInstance, NULL); and etc. for the various controls, possibly even loaded through classes... then the PE would lack resources for such GUI elements... |
|
|
|
Apr 10 2008, 02:24 PM
Post
#8
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
Decode exe fil
Decompile An Exe To Source Code Can I decode exe file to any other prog.Lang. Format if yes then Please. Tell me how ???????????? -question by Ravi |
|
|
|
Apr 11 2008, 12:57 AM
Post
#9
|
|
|
Sparkx Group: [HOSTED] Posts: 366 Joined: 11-October 06 From: Dana Point, CA, USA Member No.: 16,496 myCENTs:44.66 |
I think PE explorer is the only one that works as far as I am aware. I don't know if you can actually export the file back into a Visual Basic project (completely decompile) but I do know you can edit the graphic look of it as long as it was compiled with Visual Basics. I have never heard of trying to get the actual source with a decompiler and I am unsure if you can. Even if you do find a way I don't think it would be setup correctly (for example all the functions would be used every time est. making the program very hard to work with and very long). I believe tansgrx post back in 2007 is correct. You can never really get the exact source back.
Sorry Feedbacker but it looks like you are going to need to make the exe yourself. By the way, why exactly did you want to decompile an exe? They are much more secure then other files such as zip files and I believe they take up less space. Sparkx |
|
|
|
May 7 2008, 05:03 PM
Post
#10
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
how to Decompile An .Exe To Source Code
Decompile An Exe To Source Code How to Decompile An .Exe To Source Code which was written in c++ -reply by santosh |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 22nd November 2008 - 10:13 AM |