Jul 27, 2008

Decompiler For C++ - Any suggestion?

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming

free web hosting

Decompiler For C++ - Any suggestion?

franz see
I'm interested in a decompiler for C++ (that works in Win XP). Preferably, Open Source, if not, a freeware....or at least a free tial smile.gif

Thanks a bunch smile.gif

Reply

osknockout
Hmm... kind of hard to answer actually. You could try Boomerang.

Although if you're on the holy grail to decompiling,
it'd be easier to write something yourself.

The real problem with decompiling anything into C++ though is that
1)you're assuming that the code is C++ compatible

- suppose it was a microkernel that used an x86 assembly/Perl mix.
(hypothetical case, don't flame me saying "who'd do that?")
So 'LOADALL .... CMOV ....' and (on the top of my head guys) "/help+.?/"
could be in there. Suppose we tried to decompile that to C++.

That asm code could be something like
inline(db 0x0F 0x07 0x4A 1A) in C++ - ok, that's not real inline style, but go with it.
sure it's in C++, but does that make any sense to a C++ programmer?
And I'm not even going to try the Perl expression.
Just realize there's a bunch of <cstring> functions involved.

2)you're ok with reading code in only one style.

- Seriously, if you plan on using a decompiler for a high level language
is that all variables will be named systematically. Like maybe a,b,c...
for example. So std::cout << (char) currency << dollars could be
reduced to std::cout << a << b. So you'd have to go back and try
and figure out what every little variable means. That's rather
pain consuming for a large project. It'd probably be easier just learning
assembly to decompile the program because C++ is a language of abstraction.
And abstraction does not go well with arbitrary, hard to remember variables.

 

 

 


Reply

franz see
QUOTE(osknockout @ Sep 26 2006, 01:05 AM) *

Hmm... kind of hard to answer actually. You could try Boomerang.



Wow ! Great ! An open source project ! Thanks for the tip smile.gif I'd try to check it out this weekend and take a look at it happy.gif


QUOTE(osknockout @ Sep 26 2006, 01:05 AM) *


Although if you're on the holy grail to decompiling,
it'd be easier to write something yourself.

The real problem with decompiling anything into C++ though is that
1)you're assuming that the code is C++ compatible

- suppose it was a microkernel that used an x86 assembly/Perl mix.
(hypothetical case, don't flame me saying "who'd do that?")
So 'LOADALL .... CMOV ....' and (on the top of my head guys) "/help+.?/"
could be in there. Suppose we tried to decompile that to C++.

That asm code could be something like
inline(db 0x0F 0x07 0x4A 1A) in C++ - ok, that's not real inline style, but go with it.
sure it's in C++, but does that make any sense to a C++ programmer?
And I'm not even going to try the Perl expression.
Just realize there's a bunch of <cstring> functions involved.



Don't worry smile.gif I don't expect the decompiler to work on non-C++ compatible smile.gif Besides, I'd probably not encounter that anyway in my basic use of it smile.gif

QUOTE(osknockout @ Sep 26 2006, 01:05 AM) *


2)you're ok with reading code in only one style.

- Seriously, if you plan on using a decompiler for a high level language
is that all variables will be named systematically. Like maybe a,b,c...
for example. So std::cout << (char) currency << dollars could be
reduced to std::cout << a << b. So you'd have to go back and try
and figure out what every little variable means. That's rather
pain consuming for a large project. It'd probably be easier just learning
assembly to decompile the program because C++ is a language of abstraction.
And abstraction does not go well with arbitrary, hard to remember variables.


Yes, I figure that much smile.gif But i think im up to the task of refactoring the output of the decompiler smile.gif hehe laugh.gif

Thanks again smile.gif

Reply

osknockout
Lol, best of luck then. Sounds like you're decompiling a program you wrote and then deleted the source too.
Do tell if you have any problems with Boomerang.

Reply

tydes
I want to ask, how to decompile C++ programs that have been obfuscated????

I can't decompile it

Reply

osknockout
I suggest you use an assembly decompiler. biggrin.gif
It's obfuscated, so it's already loopy, if anything it
should make more sense in asm. laugh.gif

But seriously, what do you mean you can't decompile it?
Do you mean that it just won't decompile or that the output makes no sense?

Reply

iGuest
Hi guys. I am a member of staff for an online game called Chain of Command. We are a growing community of players returning to a game lost long ago when 2am games company went bankrupt.

At present the game is full of glitches. But we only have a compiled version of the game. We can't fix anything. For 3 years we've been searching for a way to get the source code so we can fix the game, from hiring Private Investigators to help track down the original programmers, to talking to professionals who would charge us $40k to $60k. We are a free game and run on donations, we clearly don't have that kind of cash.

Now, with my sob story over, anyone have any suggestions? I am a programmer and I'm getting to grips with C++. Another guy on our team is an excellent C++ coder. So once we get the source code I'm sure we can make improvements.

I'd appreciate any help with this. I downloaded and ran boomerang, but it commits an illegal operation during the Decompile stage. I've tried a few times with different downloads of the software. This may be caused by one of the many glitches in the coding :)

We can have considered rewriting the game from scratch, but apart from the workload being far too heavy for our small staff, there are equations within the code that we could never recreate accurately. We aren't looking for the easy way out. This is our last resort, as we would obviously like an original copy of the commented source code with all the variables intact.

Sorry for the length of this post :) And thanks in advance for any help.


-SlickRed

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. decompiler for c - 4.27 hr back. (1)
  2. decompiling c - 13.58 hr back. (1)
  3. "how to decompile c " - 25.35 hr back. (1)
  4. decompiler c - 15.10 hr back. (2)
  5. best c decompiler - 30.34 hr back. (1)
  6. c decompiler ccp - 34.11 hr back. (1)
  7. c decompiler - 29.66 hr back. (3)
  8. c decompiler - 0.74 hr back. (22)
  9. a good decompiler for c - 35.75 hr back. (1)
  10. decompile c .so - 36.62 hr back. (1)
  11. c decompile - 38.83 hr back. (2)
  12. best c/c decompiler - 40.84 hr back. (1)
  13. can we decompile c programme - 42.78 hr back. (1)
  14. decompile into c - 46.53 hr back. (1)
Similar Topics

Keywords : decompiler suggestion


    Looking for decompiler, c, suggestion

Searching Video's for decompiler, c, suggestion
advertisement



Decompiler For C++ - Any suggestion?



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE