![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
Decompiler
I'd just like to know how much information you would get back if you were to decompile a project? Do you get the .h and .cpp files back if the program was programmed in c/ c++?
Would you know where i can find a c++ decompiler? i downloading a few from google and they gave me errors upon starting the program.
__________________
Death smiles at us all. All a man can do is smile back. |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
There are decompiler projects, such as Boomerang, but, I don't exactly trust projects like that, you will never get the original source code that the author wrote back, however, it seems like projects such as Boomerang get decent results (but then again I've also heard the results suck, so I'm not one to really pass judgement.)
The best you'll really get is a disassembly listing, which is basically all you will need if you really want to work out the internals of a program, but it takes time. On an related note you also might want to check out REC, it basically parses a disassembly and gives it weird constructs which are to me hard to follow due to the lack of syntax highlighting. |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Oct 2005
Posts: 134
Rep Power: 4
![]() |
First, although this article is a little old, read: http://www.tech-faq.com/c-decompiler.shtml
Decompiler technology is advancing but it still has a long way to go. There are links to two decompiler projects here: http://www.tech-faq.com/decompiler.shtml |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4
![]() |
Your OS is Win XP - MS actually listened to programmers back about the beginning of VB 5 and VC 5. It was too easy to decompile and "steal" code.
There were decompilers for VB 4 that really did re-create VB & VC code fairly well. MS changed the way the linker worked, and removed symbols. Now Windows decompilers give you assembly output, frequently without the original function names. Decompilers are really meant for shops that have an .exe without source code and they need changes. |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
I might write assembler code to result in the operation, "a = b + *c" in a number of different ways. You might narrow them all down to that with the machine language. More complex operation might be tougher to intuit. Without symbolic information you could not distinguish "a = b + *c" from "jazz = dogMeat + *hopolite". Consider that you decompiled an executable with a C decompiler and with a Fortran decompiler. Could you tell which language originally produced the executable? If the program was produced in C and you decompiled perfectly with a Fortan compiler, would you have "reproduced the original"? You get the picture.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 380
Rep Power: 3
![]() |
Why do you need a decompiler? There is a lot of open source out there for you to look at.
__________________
I am Addicted to Linux! |
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Incidentally, .h files are incorporated into the source code BEFORE the compiler sees it. Anything that would pluck it out would probably have to have enough wasteful information buried in the code that it would gag an armpit.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#8 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
Okay thanks.
__________________
Death smiles at us all. All a man can do is smile back. |
|
|
|
|
|
#9 | |
|
Hobbyist Programmer
|
Quote:
|
|
|
|
|
|
|
#10 | |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
Quote:
__________________
Death smiles at us all. All a man can do is smile back. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|