Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decompile?

Status
Not open for further replies.

Zas

Programmer
Oct 4, 2002
211
US
What if you created a .exe and you lost your source code .cpp? Is it possible to decompile a program? Or is everything going to be redone?

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Oooohh, I hate to tell you this, but yep.

EXE files are optimized binary machine code. When you compile C language code, the compiler translates it into machine code... which is just a series of bytes that the processor understands.

Sometimes people try to reverse-engineer programs, but if you're gonna do that, you may as well rewrite it from scratch.

When you finish a program, I recommend you burn your source code onto a CD and keep the CD in a safe place.

Sorry about that, though.

I REALLY hope that helps.
Will
 
Wow, thanks. So I'm thinking it'll take years of programmers before anyone ever makes a decompiler, if one at all. Great.
Just makes you wonder why it was so much faster creating a COMPILER. :D

Thanks anyways.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Okay, time for stupid analogies, but here it goes.

An EXE file is like a cake.

Making a cake from a recipe is easy.
Making a recipe from a cake can be very frustrating.

Really, think about it... How would the decompiler come up with names for your variables and functions? How would it even know where one function ends and another begins?

I REALLY hope that helps.
Will
 
Long debates happen about this one regularly. But I very much like the cake analogy. Incidentally, I'm not sure many people would even like a "decompiler" to exist: it would make it very hard to stop people taking your program, twiddling with it until it doesn't quite work anymore (but in their eyes is"nicer"), recompiling, and dragging your reputation through the dirt. As well as endless IP issues.
Sorry to hear you've lost your code, though. I'm embarassed to admit I've lost things too.
 
Status
Not open for further replies.

Similar threads

Replies
27
Views
784

Part and Inventory Search

Sponsor

Back
Top