View Single Post
Old 07-04-2008, 06:15 AM   #13 (permalink)
Ray
Forum Novice
 
Join Date: Jul 2004
Location: Switzerland
Age: 26
Posts: 234
Default

So eh... written in C
Then you shouldnt expect anything really useful from a decompiler as nearly every bit of information besides the procedural workflow gets removed/optimized and stripped away when the compiler does it's duty.

This means: No comments, no variable names, no macros nor inline-functions. No custom datatypes, No functoin names (except the entrypoint 'main' and perhaps some external functions in shared link libraries) and most likely: lots of ASM instructions.
The produced code doesnt even look like the original code.
And if you compile it again, you'll get, probably, something different.

There are lots of decompilers out there. Use a webcrawler to get one that fits your needs. But im pretty sure there's no decompiler for a native PE to managed code, as those languages lack support of ASM instructions. Decompilers need them, as not every bit of machine code can be translated back to a function that would make any sense. And nothing more than translators they are. Think of them like using babelfish.

If you're into added functionality, you should try code-injection rather than decompillation. That way, you dont fuck up the binaries ( hell - debuggung decompillated code), and you dont have to distribute property of the legal owner/creator of the code, which would be an infringement.
But this topic is pretty advanced... sorry to say if you don't know the difference between C and C++ then both ways are most likely beyond your abilities.
Anyways, it could be a good hint to have decompillated C code procedures to write your very own server. But even that is miles away from Copy/Pasteable code.

Good luck.
Ray is offline