More tests/fixes I dont know if this is right

This commit is contained in:
Adam
2015-10-10 21:15:07 -04:00
parent 27f2edbea6
commit 734f15fa4a
4 changed files with 122 additions and 14 deletions

View File

@@ -49,4 +49,10 @@ public class IConst_M1 extends Instruction implements PushConstantInstruction
{
return new LDC_W(this.getInstructions(), entry);
}
@Override
public Instruction makeGeneric()
{
return new LDC_W(this.getInstructions(), getConstant());
}
}

View File

@@ -310,16 +310,16 @@ public class ModArith implements Deobfuscator
public void run(ClassGroup group)
{
this.group = group;
runOnce();
if (true) return;
int passes = 0, total = 0, i;
while ((i = runOnce()) > 0)
{
++passes;
total += i;
}
System.out.println("Finished arith deob on " + total + " fields in " + passes + " passes");
//return runOnce();
// if (true) return;
//
// int passes = 0, total = 0, i;
// while ((i = runOnce()) > 0)
// {
// ++passes;
// total += i;
// }
// System.out.println("Finished arith deob on " + total + " fields in " + passes + " passes");
}
//
// private void translateSetFields(Execution e)
@@ -395,7 +395,7 @@ public class ModArith implements Deobfuscator
}
}
private int runOnce()
public int runOnce()
{
group.buildClassGraph();

View File

@@ -107,8 +107,7 @@ public class MultiplicationDeobfuscator implements Deobfuscator
{
if (i.getInstruction() instanceof PushConstantInstruction)
{
if (i.getInstruction() instanceof BiPush || i.getInstruction() instanceof SiPush
|| i.getInstruction() instanceof IConst_M1)
if (i.getInstruction() instanceof BiPush || i.getInstruction() instanceof SiPush)
throw new IllegalStateException();
// a constant of imul
@@ -194,7 +193,7 @@ public class MultiplicationDeobfuscator implements Deobfuscator
else
{
System.out.println("dup ins " + otherCtxI.getInstruction());
throw new IllegalStateException();
//throw new IllegalStateException();
}
}
}