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)
continue;
if (!MultiplicationDeobfuscator.isOnlyPath(e, ictx))
if (!MultiplicationDeobfuscator.isOnlyPath(e, ictx, removeIdx == 0 ? one : two))
continue;
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_3;
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.IMul;
import net.runelite.deob.attributes.code.instructions.IStore_0;
@@ -195,26 +196,23 @@ public class MultiplyOneDeobfuscatorTest
new IConst_M1(ins),
new ILoad(ins, 0),
new If(ins, label),
new ILoad(ins, 0),
new IConst_1(ins),
new If(ins, label2),
new Goto(ins, label2),
label,
new ILoad(ins, 1),
new LDC_W(ins, -1440517609),
new IMul(ins),
new IDiv(ins),
new Goto(ins, label3),
label2,
new ILoad(ins, 1),
new LDC_W(ins, -1440517609),
new IMul(ins),
new IDiv(ins),
label3,
mul,
new VReturn(ins)
};