Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I have very good reasons to believe that it is possible to decompile C and C++.

Much of a program's code is not directly visible at run time and therefore would be impossible to decompile. One example of such a code fragment would be a comment. How on earth would a reverse engineering decompilation method pick up on such deliberately unexecuted code? Not to mention all the numerous needed extracts that would be missing in such a large scale piece of software, but lack of commenting alone would make the job infinitely difficult! I find it tedious to read a friend's Java data structures assignment, heaven forbid the entirety of a C based OS.

Decompiling essentially:

Decompile Hello World?
Quite possibly.

Decompile an entire command line tool?
If you're very lucky.

Decompile an application?
Not a hope.

Decompile an operating system?
HAHAHAHAHAHAHAHAHA

(My impression towards decompiling comes from 2 year of my Computer Science degree, and I think there's a reason virtually nobody takes it too seriously)
 
Last edited:
  • Like
Reactions: chrfr
As someone who has no experience in computer science, how would one even go about decompiling something anyways? I'm curious.

Short answer - a decompiler. If it can be compiled, it can also be decompiled. As to the output being easily legible is anyone's guess. The byte code formats used by languages like Java and .NET lend themselves more easily to it, C much less so. Modern tools can produce obfuscated code to deter reverse engineering or tampering.

A colleague at work showed me some obfuscated C that was (then) about 25 years old a few years back. It output the 12 days of Christmas to the screen. The source code had all the strings encoded within it and at first glance was utter gibberish. That's from the era of 16MHz 68K Macs and no modern encryption techniques.
 
Last edited:
  • Like
Reactions: tevion5
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.