On 12/15/2010 05:23 AM, Torben Fgidius Mogensen wrote:> Some of the least readable code I have seen has been code where every> trick in the book was used to make it as short as possible, so using> extreme optimisaton tricks is probably a much better obfuscator than> inserting random code -- even random control-structure code.

I'm not sure what work has been done on deoptimization (perhaps anyone
with the Hex-Rays decompiler could tell us?), but some of the
optimization techniques seem relatively easy to reverse.

From a purely theoretical standpoint, obfuscation that adds
non-executing code is going to be less difficult to reverse engineer
than obfuscation that does the same thing, just... less obviously.
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
[A good optimizer should make code much more obscure, since it throws
away everything not necessary to produce a correct result. Really good
optimizers like the ones in embedded linkers do gross tricks like combining
constants that happen to have the same bit pattern even though they mean
different things. -John]