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

View File

@@ -63,11 +63,9 @@ public class IllegalStateExceptions implements Deobfuscator
// remove stack of if. // remove stack of if.
boolean found = false; boolean found = false;
boolean foundMethod = false;
for (Frame f : execution.processedFrames) for (Frame f : execution.processedFrames)
if (f.getMethod() == m) if (f.getMethod() == m)
{ {
foundMethod = true;
for (InstructionContext ic : f.getInstructions()) for (InstructionContext ic : f.getInstructions())
if (ic.getInstruction() == ins) // this is the if if (ic.getInstruction() == ins) // this is the if
{ {
@@ -78,8 +76,11 @@ public class IllegalStateExceptions implements Deobfuscator
ic.removeStack(0); ic.removeStack(0);
} }
} }
assert foundMethod; if (!found)
assert 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... // instruction is no longer at 'i' because we've just removed stuff...
i = ilist.indexOf(ins); i = ilist.indexOf(ins);