Small fix found by test, not sure if it breaks the larger picture
This commit is contained in:
@@ -419,8 +419,10 @@ public class ModArith implements Deobfuscator
|
||||
boolean g = isGetterOrSetter(field, true, s1),
|
||||
g2 = isGetterOrSetter(field, true, s2);
|
||||
|
||||
boolean inverse = false;
|
||||
if (g == g2)
|
||||
{
|
||||
inverse = true;
|
||||
g = isGetterOrSetter(field, false, s1);
|
||||
g2 = isGetterOrSetter(field, false, s2);
|
||||
}
|
||||
@@ -432,7 +434,7 @@ public class ModArith implements Deobfuscator
|
||||
System.out.println("GOOD " + field.getName() + " " + s1 + " * " + s2 + " = " + smallest + " " + g + " " + g2);
|
||||
Pair p = new Pair();
|
||||
p.field = field;
|
||||
if (g)
|
||||
if (g != inverse)
|
||||
{
|
||||
p.getter = s1;
|
||||
p.setter = s2;
|
||||
|
||||
@@ -17,14 +17,15 @@ import org.junit.Test;
|
||||
class TestClass
|
||||
{
|
||||
private static int dummy(Object... args) { return 0; }
|
||||
private static final int var = 42;
|
||||
|
||||
private int field1051 = -1611704481;
|
||||
private int field2701;
|
||||
private int field2138, field2130;
|
||||
|
||||
public void test()
|
||||
{
|
||||
new TestClass(); // to trick executor to call the constructor
|
||||
TestClass tc = new TestClass(); // to trick executor to call the constructor
|
||||
int var = 42;
|
||||
|
||||
if (-1 != this.field1051 * 1928543073)
|
||||
{
|
||||
@@ -36,6 +37,13 @@ class TestClass
|
||||
{
|
||||
field2701 += -1868498967 * var;
|
||||
}
|
||||
|
||||
field2138 = tc.dummy() * 1510226873;
|
||||
field2130 = 572701809 * tc.field2138;
|
||||
if (-1722291303 * field2130 >= var)
|
||||
{
|
||||
var = field2130 * -1722291303;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user