Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2004, 06:34
Rhodium
 
Posts: n/a
decompiling back to C++?

Say you spent billions of dollars and hired all the best programmers in the world. Would they be able to come up with a program that decompiles applications back to their true C++ code?

Say you hired the worlds 100 best programmers and offered them 10 million dollars each if they did it.

Hypothetical.

Last edited by Rhodium; 07-09-2004 at 06:36.
Reply With Quote
  #2  
Old 07-09-2004, 07:08
JMI JMI is offline
Leader
 
Join Date: Jan 2002
Posts: 1,627
Rept. Given: 5
Rept. Rcvd 199 Times in 99 Posts
Thanks Given: 0
Thanks Rcvd at 96 Times in 94 Posts
JMI Reputation: 100-199 JMI Reputation: 100-199
And how long did you give them to accomplish the task?

Regards,
__________________
JMI
Reply With Quote
  #3  
Old 07-09-2004, 07:57
Rhodium
 
Posts: n/a
Give them a year.
Reply With Quote
  #4  
Old 07-09-2004, 20:58
fantast_xue
 
Posts: n/a
They would failed.
But I think maybe scientists could do this job, with ten or more years.
Reply With Quote
  #5  
Old 07-09-2004, 21:43
Sarge
 
Posts: n/a
Yeh, but what if those programmers were hired away from MS? What if they were the same programmers that wrote the C++ compiler in the first place? Maybe that would give them a edge; maybe they could do it in a year or less?

Sarge
Reply With Quote
  #6  
Old 07-09-2004, 22:04
Lunar_Dust
 
Posts: n/a
I don't know, there are numerous optimizations which can result in totally throwing away the original source. Of course, this would also have the effect of optimizing the source, wouldn't it? But it would probably be much harder to read, and you wouldn't have comments anyway.

The problem is that converting back to C++ code doesn't really help you all that much, because you won't have comments, and you won't have variable names which make sense.

You will have constructs, and code flow.

But those you can still get from ASM disassemblers anyway (like IDA). Knowing the original high-level intent of the programmer (why something was done certain way, variable names, how variables connect to each other) in enough of a way to reconstruct a source is pretty much impossible. C++ really isn't a round trip language ( unlike .NET languages).

-Lunar

Last edited by Lunar_Dust; 07-09-2004 at 22:10.
Reply With Quote
  #7  
Old 07-10-2004, 04:17
SHaG SHaG is offline
Friend
 
Join Date: Jan 2004
Posts: 51
Rept. Given: 1
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 0 Times in 0 Posts
SHaG Reputation: 0
Check:
hxxp://boomerang.sourceforge.net
Reply With Quote
  #8  
Old 07-10-2004, 08:44
tAz
 
Posts: n/a
true c++ code?
i wouldn't say impossible, but improbable.

decompilers will deal with the lost of code due to optimizations, and of course, the user-defined tokens (ex. variables, function names).

reusable code should be the target of decompilers, and until someone creates a program to analyze algorithms, and properly name all of the variables and functions, not to mention profiling the programmer on his/her preferences in the use of variables, we're still a long way to go before seeing the original code from a compiled sample.
Reply With Quote
  #9  
Old 07-10-2004, 15:17
_Servil_ _Servil_ is offline
VIP
 
Join Date: Jan 2002
Posts: 171
Rept. Given: 57
Rept. Rcvd 12 Times in 2 Posts
Thanks Given: 78
Thanks Rcvd at 27 Times in 13 Posts
_Servil_ Reputation: 12
it's impossible $10,000,000 is quite few.
__________________
_Servil_
SemtekSoft Corporation, Inc.
Reply With Quote
  #10  
Old 07-10-2004, 16:44
JMI JMI is offline
Leader
 
Join Date: Jan 2002
Posts: 1,627
Rept. Given: 5
Rept. Rcvd 199 Times in 99 Posts
Thanks Given: 0
Thanks Rcvd at 96 Times in 94 Posts
JMI Reputation: 100-199 JMI Reputation: 100-199
Ah, but he said $10 Million to EACH of the world's 100 best programers.

Regards,
__________________
JMI
Reply With Quote
  #11  
Old 07-10-2004, 17:40
_Servil_ _Servil_ is offline
VIP
 
Join Date: Jan 2002
Posts: 171
Rept. Given: 57
Rept. Rcvd 12 Times in 2 Posts
Thanks Given: 78
Thanks Rcvd at 27 Times in 13 Posts
_Servil_ Reputation: 12
nevertheless
__________________
_Servil_
SemtekSoft Corporation, Inc.
Reply With Quote
  #12  
Old 07-11-2004, 21:53
Sarge
 
Posts: n/a
I like this comment:
>reusable code should be the target of decompilers<

but I don't necessarily see the need for EXACT/original source code re-creation, especially where variables are concerned. As long as the decompiler proggie keeps them straight, I'd think it's ok for the compiler to spit out a variable named "Var1", even though the source code was "MyVar", as long as "Var1" was consistantly named whenever that specific variable was actually used in the target proggie.

Do we want this decompiler to give us, for example, a structure definition too, or just give us the operations on the structures elements, and let the compiler (when operating on our recovered code) generate error messages telling us what (syntatically) is wrong that we poor humans would have to clean up (in this case, by defining that structure ourselves)? This would certainly result in useable, runnable code, but obviously not the EXACT/original source code. How close to the EXACT/original source code are we talking?

Further, if you actually reproduced runnable code, but it was only 80% (or 70%? or maybe only 50%) of the EXACT/original code, and therefore needed some additional user input, would people buy it?

Sarge
Reply With Quote
  #13  
Old 07-12-2004, 09:21
hmora
 
Posts: n/a
Disassembler

sorry, but I don't know much about this topic, but I have used IDA a few times. My question is: is always possible to disassemble a program???
what are those exe protectors for?

Thanks in advance.
Reply With Quote
  #14  
Old 07-12-2004, 09:44
santa_kewl
 
Posts: n/a
[what are those exe protectors for?]

To protect the exe from disassembled

To protect the exe from debugging
Reply With Quote
  #15  
Old 07-12-2004, 09:55
Satyric0n
 
Posts: n/a
Quote:
Originally Posted by hmora
sorry, but I don't know much about this topic, but I have used IDA a few times. My question is: is always possible to disassemble a program???
what are those exe protectors for?

Thanks in advance.
Yes, it is always possible to disassemble a program, but if the program is protected/packed, the code you see disassembled is the unpacking/protector code; the actual program gets unpacked at runtime. So, you either need to unpack the program to see its code in the disassembler, or you just look at the code at runtime using a debugger.

Regards
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Decompiling the mov compiler chants General Discussion 3 12-08-2016 21:16
Who are familiar with decompiling? DMichael General Discussion 3 08-09-2013 01:04
VB3 decompiling wasq General Discussion 23 05-23-2005 02:30


All times are GMT +8. The time now is 18:30.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )