1/0 works once again, maybe.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package net.runelite.deob.deobfuscators.arithmetic;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import net.runelite.deob.ClassGroup;
|
||||
import net.runelite.deob.Deobfuscator;
|
||||
import net.runelite.deob.attributes.code.Instruction;
|
||||
@@ -35,6 +38,9 @@ public class MultiplyOneDeobfuscator implements Deobfuscator
|
||||
continue;
|
||||
|
||||
Instructions ins = ictx.getInstruction().getInstructions();
|
||||
if (ins == null)
|
||||
continue;
|
||||
|
||||
List<Instruction> ilist = ins.getInstructions();
|
||||
|
||||
if (!ilist.contains(ictx.getInstruction()))
|
||||
@@ -58,6 +64,9 @@ public class MultiplyOneDeobfuscator implements Deobfuscator
|
||||
if (removeIdx == -1)
|
||||
continue;
|
||||
|
||||
if (!MultiplicationDeobfuscator.isOnlyPath(e, ictx))
|
||||
continue;
|
||||
|
||||
ictx.removeStack(removeIdx);
|
||||
ins.replace(ictx.getInstruction(), new NOP(ins));
|
||||
//ins.remove(ictx.getInstruction());
|
||||
|
||||
@@ -31,6 +31,8 @@ public class MultiplyZeroDeobfuscator implements Deobfuscator
|
||||
{
|
||||
Instruction instruction = ictx.getInstruction();
|
||||
Instructions ins = instruction.getInstructions();
|
||||
if (ins == null)
|
||||
continue;
|
||||
|
||||
if (!(instruction instanceof IMul))
|
||||
continue;
|
||||
@@ -69,6 +71,9 @@ public class MultiplyZeroDeobfuscator implements Deobfuscator
|
||||
if (!ilist.contains(instruction))
|
||||
continue; // already done
|
||||
|
||||
if (!MultiplicationDeobfuscator.isOnlyPath(e, ictx))
|
||||
continue;
|
||||
|
||||
// remove both, remove imul, push 0
|
||||
|
||||
ictx.removeStack(1);
|
||||
|
||||
Reference in New Issue
Block a user