one/zero? obs arent handling stuff right, add test. now im setting null on instructions some places they fail

This commit is contained in:
Adam
2015-10-22 09:53:56 -04:00
parent bd2e62c22f
commit 2f5f9861ef
5 changed files with 100 additions and 11 deletions

View File

@@ -92,9 +92,9 @@ public class Deob
{
new MultiplicationDeobfuscator().run(group);
new MultiplyOneDeobfuscator().run(group);
//new MultiplyOneDeobfuscator().run(group);
new MultiplyZeroDeobfuscator().run(group);
//new MultiplyZeroDeobfuscator().run(group);
if (last == cur)
{

View File

@@ -84,17 +84,10 @@ public class Instructions
public void remove(Instruction ins)
{
// for (Instruction i : instructions)
// {
// if (i instanceof JumpingInstruction)
// {
// JumpingInstruction j = (JumpingInstruction) i;
// assert !j.getJumps().contains(ins);
// }
// }
assert ins.getInstructions() == this;
ins.remove();
instructions.remove(ins);
ins.setInstructions(null);
}
public void remove(Block block)
@@ -293,5 +286,7 @@ public class Instructions
for (net.runelite.deob.attributes.code.Exception e : code.getExceptions().getExceptions())
e.replace(oldi, newi);
oldi.setInstructions(null);
}
}

View File

@@ -23,6 +23,12 @@ public class SiPush extends Instruction implements PushConstantInstruction
super(instructions, type, pc);
}
public SiPush(Instructions instructions, short value)
{
super(instructions, InstructionType.SIPUSH, -1);
s = value;
}
@Override
public void load(DataInputStream is) throws IOException
{

View File

@@ -474,7 +474,15 @@ public class ModArith implements Deobfuscator
Pair p = this.guess2(f, col2, set);
if (p != null)
{
if (this.deobfuscatedFields.contains(f))
continue;
pairs.add(p);
this.deobfuscatedFields.add(f);
}
}
}
}