This commit is contained in:
Adam
2015-10-23 12:27:44 -04:00
parent d4f40eaf03
commit f21cbba8b5
2 changed files with 6 additions and 8 deletions

View File

@@ -64,7 +64,7 @@ public class MultiplyOneDeobfuscator implements Deobfuscator
if (removeIdx == -1) if (removeIdx == -1)
continue; continue;
if (!MultiplicationDeobfuscator.isOnlyPath(e, ictx)) if (!MultiplicationDeobfuscator.isOnlyPath(e, ictx, removeIdx == 0 ? one : two))
continue; continue;
ictx.removeStack(removeIdx); ictx.removeStack(removeIdx);

View File

@@ -11,6 +11,7 @@ import net.runelite.deob.attributes.code.instructions.IConst_1;
import net.runelite.deob.attributes.code.instructions.IConst_2; import net.runelite.deob.attributes.code.instructions.IConst_2;
import net.runelite.deob.attributes.code.instructions.IConst_3; import net.runelite.deob.attributes.code.instructions.IConst_3;
import net.runelite.deob.attributes.code.instructions.IConst_M1; import net.runelite.deob.attributes.code.instructions.IConst_M1;
import net.runelite.deob.attributes.code.instructions.IDiv;
import net.runelite.deob.attributes.code.instructions.ILoad; import net.runelite.deob.attributes.code.instructions.ILoad;
import net.runelite.deob.attributes.code.instructions.IMul; import net.runelite.deob.attributes.code.instructions.IMul;
import net.runelite.deob.attributes.code.instructions.IStore_0; import net.runelite.deob.attributes.code.instructions.IStore_0;
@@ -196,25 +197,22 @@ public class MultiplyOneDeobfuscatorTest
new ILoad(ins, 0), new ILoad(ins, 0),
new If(ins, label), new If(ins, label),
new ILoad(ins, 0), new Goto(ins, label2),
new IConst_1(ins),
new If(ins, label2),
label, label,
new ILoad(ins, 1), new ILoad(ins, 1),
new LDC_W(ins, -1440517609), new LDC_W(ins, -1440517609),
new IMul(ins), new IDiv(ins),
new Goto(ins, label3), new Goto(ins, label3),
label2, label2,
new ILoad(ins, 1), new ILoad(ins, 1),
new LDC_W(ins, -1440517609), new LDC_W(ins, -1440517609),
new IMul(ins), new IDiv(ins),
label3, label3,
mul, mul,
new VReturn(ins) new VReturn(ins)
}; };