ahhhhhhhhhhhhhhh
This commit is contained in:
@@ -84,7 +84,7 @@ public class Deob
|
||||
|
||||
//new ModArith().run(group);
|
||||
|
||||
new MultiplicationDeobfuscator().run(group); // this causes spinning?
|
||||
new MultiplicationDeobfuscator().run(group);
|
||||
|
||||
// new MultiplyOneDeobfuscator().run(group);
|
||||
//
|
||||
|
||||
@@ -146,10 +146,16 @@ public class MultiplicationDeobfuscator implements Deobfuscator
|
||||
MultiplicationExpression other = parseExpression(orig.getPushed());
|
||||
// this expression is used elsewhere like 'pushConstant' so any changes
|
||||
// done to it affect that, too. so multiply it by existing values?
|
||||
me.instructions.addAll(other.instructions);
|
||||
me.dupedInstructions.addAll(other.instructions);
|
||||
me.subexpressions.addAll(other.subexpressions);
|
||||
//me.subexpressions.add(other);
|
||||
if (orig.getPushed().getInstruction() instanceof IAdd || orig.getPushed().getInstruction() instanceof ISub)
|
||||
{
|
||||
me.subexpressions.add(other);
|
||||
}
|
||||
else
|
||||
{
|
||||
me.instructions.addAll(other.instructions);
|
||||
me.dupedInstructions.addAll(other.instructions);
|
||||
me.subexpressions.addAll(other.subexpressions);
|
||||
}
|
||||
}
|
||||
catch (IllegalStateException ex)
|
||||
{
|
||||
|
||||
@@ -62,15 +62,15 @@ public class MultiplicationExpression
|
||||
count += me.simplify(result);
|
||||
}
|
||||
|
||||
// if (dupmagic != null)
|
||||
// {
|
||||
// PushConstantInstruction pci = (PushConstantInstruction) dupmagic.getInstruction();
|
||||
// int value = (int) pci.getConstant().getObject();
|
||||
//
|
||||
// value *= DMath.modInverse(result);
|
||||
//
|
||||
// pci.setConstant(new net.runelite.deob.pool.Integer(value));
|
||||
// }
|
||||
if (dupmagic != null)
|
||||
{
|
||||
PushConstantInstruction pci = (PushConstantInstruction) dupmagic.getInstruction();
|
||||
int value = (int) pci.getConstant().getObject();
|
||||
|
||||
value *= DMath.modInverse(result);
|
||||
|
||||
pci.setConstant(new net.runelite.deob.pool.Integer(value));
|
||||
}
|
||||
|
||||
result = 1; // constant has been distributed, outer numbers all go to 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user