Not sure if this is right, but two different ins ctxs were popping this, but the same instruction, so I made it compare instructions
This commit is contained in:
@@ -322,9 +322,17 @@ public class MultiplicationDeobfuscator implements Deobfuscator
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Instruction poppedIns = null;
|
||||||
for (StackContext s : i.getPushes())
|
for (StackContext s : i.getPushes())
|
||||||
if (s.getPopped().size() > 1)
|
for (InstructionContext i2 : s.getPopped())
|
||||||
return false;
|
{
|
||||||
|
if (poppedIns == null)
|
||||||
|
poppedIns = i2.getInstruction();
|
||||||
|
else if (poppedIns != i2.getInstruction())
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//if (s.getPopped().size() > 1)
|
||||||
|
// return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -466,7 +466,7 @@ public class MultiplicationDeobfuscatorTest
|
|||||||
Assert.assertEquals(1, constant3.getConstantAsInt());
|
Assert.assertEquals(1, constant3.getConstantAsInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void test8()
|
public void test8()
|
||||||
{
|
{
|
||||||
ClassGroup group = ClassGroupFactory.generateGroup();
|
ClassGroup group = ClassGroupFactory.generateGroup();
|
||||||
@@ -493,9 +493,9 @@ public class MultiplicationDeobfuscatorTest
|
|||||||
label3 = new NOP(ins);
|
label3 = new NOP(ins);
|
||||||
|
|
||||||
Instruction body[] = {
|
Instruction body[] = {
|
||||||
new GetStatic(ins, field.getPoolField()),
|
//new GetStatic(ins, field.getPoolField()),
|
||||||
constant1,
|
constant1,
|
||||||
new IMul(ins),
|
//new IMul(ins),
|
||||||
constant2,
|
constant2,
|
||||||
new IMul(ins),
|
new IMul(ins),
|
||||||
|
|
||||||
@@ -515,6 +515,7 @@ public class MultiplicationDeobfuscatorTest
|
|||||||
|
|
||||||
label3,
|
label3,
|
||||||
new InvokeStatic(ins, group.findClass("test").findMethod("func2").getPoolMethod()),
|
new InvokeStatic(ins, group.findClass("test").findMethod("func2").getPoolMethod()),
|
||||||
|
//new Pop(ins), new Pop(ins), new Pop(ins),
|
||||||
|
|
||||||
new VReturn(ins)
|
new VReturn(ins)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user