Re:Show HN: Assembly to C code Decompiler
by zzzcpan on Friday May 27, 2016 @01:30PM
(#11787527)
I don't think this can get you to a meaningful code, but more of assembly-looking C. It would require some sort of machine learning to guess code fragments with proper variable names, properly nested loops, etc.
[ Parent
| on HN ]
Re:Show HN: Assembly to C code Decompiler
by openasocket on Friday May 27, 2016 @01:54PM
(#11787695)
variable names are almost certainly a lost cause, but IDA pro is pretty good at recovering control flow, which could be turned into C constructs (didn't Dijkstra prove something about expressing any control flow using structured programming constructs?). You'd probably need a bunch of heuristics to tell the difference between a while loop and a for loop. More ambitious would be trying to un-inline functions, which would require liberal use of the de-optimizer and recognizing common sub-structures.
Re:Show HN: Assembly to C code Decompiler
by bluetomcat on Friday May 27, 2016 @01:50PM
(#11787667)
And with any non-trivial amount of optimization, it would lead to horridly looking HLL code. Compilation is a very "lossy" process when optimizations are turned on.