Rebuild jump graph in inliner
This commit is contained in:
@@ -95,7 +95,7 @@ public class Deob
|
|||||||
|
|
||||||
//new ModularArithmeticDeobfuscation().run(group);
|
//new ModularArithmeticDeobfuscation().run(group);
|
||||||
|
|
||||||
//new MethodInliner().run(group);
|
new MethodInliner().run(group);
|
||||||
|
|
||||||
saveJar(group, args[1]);
|
saveJar(group, args[1]);
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,15 @@ public class Goto extends Instruction implements JumpingInstruction
|
|||||||
public void write(DataOutputStream out) throws IOException
|
public void write(DataOutputStream out) throws IOException
|
||||||
{
|
{
|
||||||
super.write(out);
|
super.write(out);
|
||||||
|
|
||||||
int offset = to.getPc() - this.getPc();
|
int offset = to.getPc() - this.getPc();
|
||||||
|
|
||||||
assert offset <= Short.MAX_VALUE;
|
assert offset <= Short.MAX_VALUE;
|
||||||
assert offset >= Short.MIN_VALUE;
|
assert offset >= Short.MIN_VALUE;
|
||||||
|
|
||||||
|
assert to.getInstructions() == this.getInstructions();
|
||||||
|
assert to.getInstructions().getInstructions().contains(to);
|
||||||
|
|
||||||
out.writeShort(offset);
|
out.writeShort(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -200,6 +200,9 @@ public class MethodInliner implements Deobfuscator
|
|||||||
|
|
||||||
methodInstructions.remove(invokeIns);
|
methodInstructions.remove(invokeIns);
|
||||||
|
|
||||||
|
methodInstructions.buildJumpGraph();
|
||||||
|
invokeMethodInstructions.buildJumpGraph();
|
||||||
|
|
||||||
for (Instruction i : invokeMethodInstructions.getInstructions())
|
for (Instruction i : invokeMethodInstructions.getInstructions())
|
||||||
{
|
{
|
||||||
// move instructions over.
|
// move instructions over.
|
||||||
|
|||||||
Reference in New Issue
Block a user