Reliable Java Decompiler

It reliably decompiles all bytecode into valid, compilable (if not pretty to look at) source code.

About 150 of those lines were from the comments I added in like ‘// Test.java:136 // vm:source-position’ which can be turned off.

If anything it has potential to make rs cheating a breeze (if it can decompile the obfuscated code in such a way that it isn’t detectable to use)

[quote=“Speljohan, post:22, topic:370275”]If anything it has potential to make rs cheating a breeze (if it can decompile the obfuscated code in such a way that it isn’t detectable to use)[/quote]That’s a fairly valid point I hadn’t even considered. Problem is, in order to do anything useful you’d have top change the code…not just decompile it then recompile it. And at that stage it’d probably be as detectable as bytecode editing already is…wouldn’t it?

[quote=“Moparisthebest, post:21, topic:370275”][quote author=the bank link=topic=466392.msg3421286#msg3421286 date=1291526530]
it gained 500 lines…
[/quote]

About 150 of those lines were from the comments I added in like ‘// Test.java:136 // vm:source-position’ which can be turned off.[/quote]

Fair enough. I guess all I’m saying is there must be a way, without altering the actual flow of code…to make it nicer on the eyes…

[quote=“the bank, post:23, topic:370275”][quote author=Speljohan link=topic=466392.msg3422096#msg3422096 date=1291592493]
If anything it has potential to make rs cheating a breeze (if it can decompile the obfuscated code in such a way that it isn’t detectable to use)
[/quote]That’s a fairly valid point I hadn’t even considered. Problem is, in order to do anything useful you’d have top change the code…not just decompile it then recompile it. And at that stage it’d probably be as detectable as bytecode editing already is…wouldn’t it?[/quote]Less effort.

I was talking to frank_ about this on IRC, this is basically a proof-of-concept to show it works. What would be a good final product would be to modify a decompiler that already works well (like JODE) and make it fall back to this method only when it can’t reduce the control flow back to nice clean language constructs. Then it would decompile some methods cleanly, and others like this.

Now some of you might think a deobfuscator would be better to write, and if you are just interested in decompiling code obfuscated by ZKM such as runescape, then certainly, write a deobfuscator to reverse ZKM stuff. A decompiler like the above would still be a good idea, however, because it could decompile ANYTHING that was obfuscated by ANYTHING, both past, present and future, which seems pretty powerful to me.

[quote=“Moparisthebest, post:25, topic:370275”][quote author=the bank link=topic=466392.msg3422127#msg3422127 date=1291594568]
I guess all I’m saying is there must be a way, without altering the actual flow of code…to make it nicer on the eyes…
[/quote]

I was talking to frank_ about this on IRC, this is basically a proof-of-concept to show it works. What would be a good final product would be to modify a decompiler that already works well (like JODE) and make it fall back to this method only when it can’t reduce the control flow back to nice clean language constructs. Then it would decompile some methods cleanly, and others like this.

Now some of you might think a deobfuscator would be better to write, and if you are just interested in decompiling code obfuscated by ZKM such as runescape, then certainly, write a deobfuscator to reverse ZKM stuff. A decompiler like the above would still be a good idea, however, because it could decompile ANYTHING that was obfuscated by ANYTHING, both past, present and future, which seems pretty powerful to me.[/quote]I agree, on both points.

Will you be sticking to this? Or handing it off?

I’ll finish up this XMLVM version and commit a patch to the XMLVM team, but as far as changing JODE or another to work like this, I’m not really interested as of now.

[quote=“Moparisthebest, post:27, topic:370275”]I’ll finish up this XMLVM version and commit a patch to the XMLVM team, but as far as changing JODE or another to work like this, I’m not really interested as of now.[/quote]Not trying to sound arrogant, but why? The whole concept as you said could be very powerful and with JODE being available as a base it wouldn’t be a terribly hard implementation.

For anyone interested, I got around to finishing this up and submitting a patch to the xmlvm developers, you can get and apply the patch too from here:
http://xmlvm-reviews.appspot.com/101001/show
Have fun.

Meh, for those too lazy to check out xmlvm and apply a patch, here is the full xmlvm.jar:
http://uppit.com/0mlrzqrg2usk/xmlvm.jar
Be aware though, it’s everything xmlvm can do, and is a full 28.6Mb. :wink:

Looks like my patch was accepted and committed, so now it’s an official part of XMLVM.

So judging by how fernflower chokes on the new client, I may have to finish up this thing so we can get some workable source code.

good luck with that