Shoutbox

C++ Decompiler - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: C++ Decompiler (/showthread.php?tid=29092)

C++ Decompiler by DJeX on 07-25-2004 at 04:46 PM

has any one heard of a C++ decompiler, if so where can I get it form?


RE: C++ Decompiler by RaceProUK on 07-25-2004 at 05:05 PM

I haven't, and I don't think you can get one either.


RE: C++ Decompiler by Choli on 07-25-2004 at 05:36 PM

once you compile a program it's nearly impossible to have the source code again. The most you can have is the assembly code. Windasm and Ollybdg (<- or similar name) are 2 disassemblers. You can try them, but you don't get the C++ code, only asm.


RE: C++ Decompiler by aNILEator on 07-25-2004 at 06:55 PM

lol that would be the worst program ever in regards to software companies, just think how many games would get hacked and trial versions modified to be full version. Yes for us it would be great, but as a whole i think its a bad idea


RE: C++ Decompiler by Anubis on 07-25-2004 at 07:03 PM

I don't think these are possible. No doubt some guy is working on an algorithm that can decompile a program, but so far I think its more of a pie in the sky idea. If it was possible you could reverse engineer Windows, that would be Microsoft's worst nightmare :p


RE: C++ Decompiler by Choli on 07-25-2004 at 07:31 PM

The cause why there isn't any program of that type isn't because the code of the programs of big companies would be known, the cause is because it's very very very complex doing that kind of program because there's no a unique sollution to the problem.

I mean: you have an EXE, that's the same as if you have some ASM code. Well, from the ASM code you can't decide what the original C code was, because several C codes can give as result the same ASM code and also the C code may have been so optimized that once you have the ASM it's impossible to know the original code.

Also, suppose the program can "extract" the C code: As you know, the C language uses variables (as most of all high-level programming languages). Well, what would the name of those variables be? Note that the names of variables are only nemonics (<- dodgy spelling :P). The only thing that the supposed decompiler could do is assing names like v0001, v0002, and so.. and with those names you wouldn't be able to understand the code. Similar things would happen with inline functions, global optimizations, calling conventions, etc... The code would be unreadable.

In short: there are some things in high-level languages that help the programmer in doing his/her job, and those things exists only in high-level languages. They're lost when you compile a program and they can't be restored in a decompilation. That's why, in case that kind of tool exists, it'd be useless.


RE: C++ Decompiler by RaceProUK on 07-25-2004 at 08:12 PM

In addition, different compilers will compile the same source different ways, so you'd also need to knwo the compiler used. Even across different versions of the same compiler there will be differences in the results.


RE: C++ Decompiler by Choli on 07-25-2004 at 09:12 PM

quote:
Originally posted by raceprouk
In addition, different compilers will compile the same source different ways, so you'd also need to knwo the compiler used. Even across different versions of the same compiler there will be differences in the results.
and ever the same compiler, depending on the options used (optimize or not, small vs fast code, debug vs release mode, etc... ) :P
RE: C++ Decompiler by RaceProUK on 07-25-2004 at 09:42 PM

So basically it's just not possible realistically.

Offtopic: Choli, are we having a competition to see who can get the most detail? :)


RE: C++ Decompiler by DJeX on 07-26-2004 at 06:47 AM

lol, well the reason i wanted it was to decompile a game lol. I wanted to get rid of the anti cheat function in it. O well.


RE: C++ Decompiler by Maniac on 07-26-2004 at 08:07 AM

hahahaha lol, that would have been too good to be true ;)


RE: C++ Decompiler by Kryptonate on 07-26-2004 at 10:20 AM

quote:
Originally posted by DJeX
lol, well the reason i wanted it was to decompile a game lol. I wanted to get rid of the anti cheat function in it. O well.
that would be illegal ;)
RE: C++ Decompiler by Anubis on 07-26-2004 at 12:07 PM

quote:
Originally posted by DJeX
well the reason i wanted it was to decompile a game lol. I wanted to get rid of the anti cheat function in it. O well.
You could probably do that with a crack out there anyway...what game was it?
RE: C++ Decompiler by DJeX on 07-26-2004 at 05:07 PM

The game was Battlezone 2.


RE: C++ Decompiler by Choli on 07-26-2004 at 07:28 PM

quote:
Originally posted by DJeX
lol, well the reason i wanted it was to decompile a game lol. I wanted to get rid of the anti cheat function in it. O well.
you can still do it with you dissasemble it with olly dgb or similar programs ... however it's very very very complex.

anyway, take note of what kryptonate said: It'd be illegal.


quote:
Originally posted by raceprouk
Offtopic: Choli, are we having a competition to see who can get the most detail?
[self-split] C++ Decompiler

RE: C++ Decompiler by DJeX on 07-26-2004 at 07:34 PM

illegal, meh I dont really care. What are they going to do to me. Not much.


RE: C++ Decompiler by CookieRevised on 07-26-2004 at 07:52 PM

We care.... no illegal talk on this forum..... :D

PS: and that's a bad attitude if you think like that, if everybody would think like that then there wouldn't be Battlezone 2 or any games or programs...


RE: C++ Decompiler by DJeX on 07-26-2004 at 09:29 PM

Wel ok I see your point. But if anyones interested I did find a half way decent decompiler.

http://www.backerstreet.com/rec/rec.htm