Page 1 of 1

Protected Password 4

Posted: Thu Jan 23, 2014 7:13 pm
by trofi
I've hand-edited .class a bit to remove "strange" jsr/pop pair to nop/nop
and ran a soot disassembler on it (soot didn't know jsr).

Some manual bit shifting cleaning and original algorithm is clear:

Code: Select all

    [ 'a' + i + 2 * j
    | i <- [0 ..2]
    , j <- [0..2]
    ]

Posted: Mon May 12, 2014 10:07 am
by Hippo
I have studied the bytecode and tried several decompilers.
The main problem was ishl where I tested on longs how it behaves ... the modulus of shiftamount ...
and on ints it uses another modulus.

Yes, the 0x200041 and so looked strange, but I were not sure the byte codes generated were ok ...

Posted: Fri May 19, 2017 2:42 pm
by adark
I used the FernFlower decompiler and it worked perfectly fine - everything else I tried choked, though.

De-obfuscated the various `stop` and `run` calls, but it turns out the actual math didn't need any de-obfuscation at all: the first loop creates the correct sequence in a 3x3 grid and the second must just run a comparison.

Lots of unnecessary loops and try/catch blocks in the original code, this challenge would have been a lot more difficult if FernFlower didn't exist. :P