Rebuild jump graph in inliner

This commit is contained in:
Adam
2015-08-08 21:51:15 -04:00
parent da0b7403b4
commit 7c336948fc
3 changed files with 10 additions and 1 deletions

View File

@@ -95,7 +95,7 @@ public class Deob
//new ModularArithmeticDeobfuscation().run(group);
//new MethodInliner().run(group);
new MethodInliner().run(group);
saveJar(group, args[1]);

View File

@@ -43,9 +43,15 @@ public class Goto extends Instruction implements JumpingInstruction
public void write(DataOutputStream out) throws IOException
{
super.write(out);
int offset = to.getPc() - this.getPc();
assert offset <= Short.MAX_VALUE;
assert offset >= Short.MIN_VALUE;
assert to.getInstructions() == this.getInstructions();
assert to.getInstructions().getInstructions().contains(to);
out.writeShort(offset);
}

View File

@@ -200,6 +200,9 @@ public class MethodInliner implements Deobfuscator
methodInstructions.remove(invokeIns);
methodInstructions.buildJumpGraph();
invokeMethodInstructions.buildJumpGraph();
for (Instruction i : invokeMethodInstructions.getInstructions())
{
// move instructions over.