make illegal state exception less strict

This commit is contained in:
Adam
2015-08-07 20:46:47 -04:00
parent 95368f61a8
commit 42e4223e83
2 changed files with 13 additions and 12 deletions

View File

@@ -63,10 +63,10 @@ public class Deob
System.out.println("constant param took " + bdur/1000L + " seconds");
// remove unhit blocks
// bstart = System.currentTimeMillis();
// new UnusedBlocks().run(group);
// bdur = System.currentTimeMillis() - bstart;
// System.out.println("unused blocks took " + bdur/1000L + " seconds");
bstart = System.currentTimeMillis();
new UnusedBlocks().run(group);
bdur = System.currentTimeMillis() - bstart;
System.out.println("unused blocks took " + bdur/1000L + " seconds");
// remove unused parameters
bstart = System.currentTimeMillis();
@@ -78,10 +78,10 @@ public class Deob
//new Jumps().run(group);
// remove unused fields
// bstart = System.currentTimeMillis();
// new UnusedFields().run(group);
// bdur = System.currentTimeMillis() - bstart;
// System.out.println("unused fields took " + bdur/1000L + " seconds");
bstart = System.currentTimeMillis();
new UnusedFields().run(group);
bdur = System.currentTimeMillis() - bstart;
System.out.println("unused fields took " + bdur/1000L + " seconds");
//new ModularArithmeticDeobfuscation().run(group);

View File

@@ -63,11 +63,9 @@ public class IllegalStateExceptions implements Deobfuscator
// remove stack of if.
boolean found = false;
boolean foundMethod = false;
for (Frame f : execution.processedFrames)
if (f.getMethod() == m)
{
foundMethod = true;
for (InstructionContext ic : f.getInstructions())
if (ic.getInstruction() == ins) // this is the if
{
@@ -78,8 +76,11 @@ public class IllegalStateExceptions implements Deobfuscator
ic.removeStack(0);
}
}
assert foundMethod;
assert found;
if (!found)
{
System.out.println("Unable to locate instruction ctx to remove stack for illegalstateexception " + ins + " in " + m);
continue;
}
// instruction is no longer at 'i' because we've just removed stuff...
i = ilist.indexOf(ins);