From 2ea00d654f7bcfe607c947c5f4d605a36a47cd0e Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 7 Sep 2015 17:07:02 -0400 Subject: [PATCH] 32 vars! --- .../attributes/code/instructions/PutStatic.java | 13 ++++++++++++- .../deob/deobfuscators/arithmetic/ModArith.java | 9 +++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/runelite/deob/attributes/code/instructions/PutStatic.java b/src/main/java/net/runelite/deob/attributes/code/instructions/PutStatic.java index c00eb9c3e7..c600f80fbb 100644 --- a/src/main/java/net/runelite/deob/attributes/code/instructions/PutStatic.java +++ b/src/main/java/net/runelite/deob/attributes/code/instructions/PutStatic.java @@ -90,7 +90,18 @@ public class PutStatic extends Instruction implements SetFieldInstruction return true; } - if (ctx.getInstruction() instanceof InvokeInstruction) +// if (ctx.getInstruction() instanceof InvokeInstruction) +// return false; +// +// if (ctx.getInstruction() instanceof IDiv) +// return false; + + boolean ok = ctx.getInstruction() instanceof IAdd || + ctx.getInstruction() instanceof ISub || + ctx.getInstruction() instanceof IMul || + ctx.getInstruction() instanceof SetFieldInstruction; + + if (!ok) return false; boolean multipleBranches = ctx.getInstruction() instanceof IAdd || ctx.getInstruction() instanceof ISub; diff --git a/src/main/java/net/runelite/deob/deobfuscators/arithmetic/ModArith.java b/src/main/java/net/runelite/deob/deobfuscators/arithmetic/ModArith.java index f8471cc11c..526ccd31fd 100644 --- a/src/main/java/net/runelite/deob/deobfuscators/arithmetic/ModArith.java +++ b/src/main/java/net/runelite/deob/deobfuscators/arithmetic/ModArith.java @@ -273,13 +273,14 @@ public class ModArith implements Deobfuscator reduce(); int i = 0; - for (Pair pair : pairs) + int start = 0, end = 32; // 24 32 ok + for (int j = start; j < end; ++j) + //for (Pair pair : pairs) { + Pair pair = pairs.get(j); Field field = pair.field; - System.out.println("Processing " + field.getName() + " getter " + pair.getter + " setter " + pair.setter); - if (i > 0) // 2 - break; + System.out.println("Processing " + field.getName() + " getter " + pair.getter + " setter " + pair.setter); Encryption encr = new Encryption(); encr.addPair(pair);