diff --git a/src/main/java/net/runelite/deob/Deob.java b/src/main/java/net/runelite/deob/Deob.java index b82ce45710..ae12605449 100644 --- a/src/main/java/net/runelite/deob/Deob.java +++ b/src/main/java/net/runelite/deob/Deob.java @@ -41,50 +41,50 @@ public class Deob //run(group, new RenameUnique()); - // remove except RuntimeException - run(group, new RuntimeExceptions()); +// // remove except RuntimeException +// run(group, new RuntimeExceptions()); +// +// // remove unused methods +// run(group, new UnusedMethods()); +// +// run(group, new UnreachedCode()); +// +// // remove illegal state exceptions, frees up some parameters +// run(group, new IllegalStateExceptions()); +// +// // remove constant logically dead parameters +// run(group, new ConstantParameter()); +// +// // remove unhit blocks +// run(group, new UnreachedCode()); +// +// // remove unused parameters +// run(group, new UnusedParameters()); +// +// // remove jump obfuscation +// //new Jumps().run(group); +// +// // remove unused fields +// run(group, new UnusedFields()); +// +// // remove unused methods, again? +// run(group, new UnusedMethods()); +// +// run(group, new MethodInliner()); +// +// run(group, new MethodMover()); +// +// run(group, new FieldInliner()); +// +// // XXX this is broken because when moving clinit around, some fields can depend on other fields +// // (like multianewarray) +// //new FieldMover().run(group); +// +// run(group, new UnusedClass()); +// +// run(group, new ModArith()); - // remove unused methods - run(group, new UnusedMethods()); - - run(group, new UnreachedCode()); - - // remove illegal state exceptions, frees up some parameters - run(group, new IllegalStateExceptions()); - - // remove constant logically dead parameters - run(group, new ConstantParameter()); - - // remove unhit blocks - run(group, new UnreachedCode()); - - // remove unused parameters - run(group, new UnusedParameters()); - - // remove jump obfuscation - //new Jumps().run(group); - - // remove unused fields - run(group, new UnusedFields()); - - // remove unused methods, again? - run(group, new UnusedMethods()); - - run(group, new MethodInliner()); - - run(group, new MethodMover()); - - run(group, new FieldInliner()); - - // XXX this is broken because when moving clinit around, some fields can depend on other fields - // (like multianewarray) - //new FieldMover().run(group); - - run(group, new UnusedClass()); - - new ModArith().run(group); - -// new MultiplicationDeobfuscator().run(group); + new MultiplicationDeobfuscator().run(group); // new MultiplyOneDeobfuscator().run(group); // diff --git a/src/main/java/net/runelite/deob/deobfuscators/arithmetic/MultiplicationDeobfuscator.java b/src/main/java/net/runelite/deob/deobfuscators/arithmetic/MultiplicationDeobfuscator.java index ea6b4cc598..8b3a391af8 100644 --- a/src/main/java/net/runelite/deob/deobfuscators/arithmetic/MultiplicationDeobfuscator.java +++ b/src/main/java/net/runelite/deob/deobfuscators/arithmetic/MultiplicationDeobfuscator.java @@ -244,6 +244,7 @@ public class MultiplicationDeobfuscator implements Deobfuscator int count = 0; + int mcount = 0; for (Frame frame : e.processedFrames) outer: @@ -252,12 +253,35 @@ public class MultiplicationDeobfuscator implements Deobfuscator Instruction instruction = ictx.getInstruction(); Instructions instructions = instruction.getInstructions(); -// if (!frame.getMethod().getMethods().getClassFile().getName().equals("class118")) -// continue; + String cname = frame.getMethod().getMethods().getClassFile().getName(); if (!(instruction instanceof IMul)) continue; +// if (cname.equals("client")) +// { +// // 7500 works ok +// // 8250 doesnt work +// //if (mcount++ > 8250) +// ++mcount; +// if (!(mcount >= 7500 && mcount <= 8250)) +// continue; +// } +// else +// { +// continue; +// } +//field721 = (-1 != var5 && 1 != var5 ? +// (class139.field2363 * 1381104939 + 981643079 * field721 * 1807370871) / 2 : +// 1381104939 * class139.field2363) +// * 1807370871 * 981643079; +// +//field721 = (-1 != var5 && 1 != var5 ? +// (class139.field2363 * 1381104939 + 981643079 * field721 * 1807370871) / 2 : +// 1 * class139.field2363) +// * 1 * 1381104939; + + MultiplicationExpression expression; try {