Skip to content

Commit

Permalink
Deobfuscate SynchronizedInteger
Browse files Browse the repository at this point in the history
This revealed that the `anInt997` field was unused and could be removed.
  • Loading branch information
StenAL committed May 18, 2024
1 parent 90747a6 commit c75ccb9
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions client/src/main/java/agolf/SynchronizedInteger.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,39 @@

public class SynchronizedInteger {

private long aLong996;
private int anInt997;
private long n;


public SynchronizedInteger() {
this(0);
}

protected SynchronizedInteger(int var1) {
this.set(var1);
protected SynchronizedInteger(int n) {
this.set(n);
}

public synchronized int set(int var1) {
this.priv_set(var1);
this.anInt997 = var1;
return var1;
public synchronized int set(int n) {
this.priv_set(n);
return n;
}

public synchronized int get_upd() {
return this.set((this.aLong996 > 0L ? (int) ((2269700342778490L - this.aLong996) / 31L) : (int) ((this.aLong996 + 110157223978885L) / 7L)) + 1);
return this.set((this.n > 0L ? (int) ((2269700342778490L - this.n) / 31L) : (int) ((this.n + 110157223978885L) / 7L)) + 1);
}

public synchronized int get_upd(int var1) {
return this.set((this.aLong996 > 0L ? (int) ((2269700342778490L - this.aLong996) / 31L) : (int) ((this.aLong996 + 110157223978885L) / 7L)) + var1);
public synchronized int get_upd(int i) {
return this.set((this.n > 0L ? (int) ((2269700342778490L - this.n) / 31L) : (int) ((this.n + 110157223978885L) / 7L)) + i);
}

public synchronized int get() {
return this.aLong996 > 0L ? (int) ((2269700342778490L - this.aLong996) / 31L) : (int) ((this.aLong996 + 110157223978885L) / 7L);
return this.n > 0L ? (int) ((2269700342778490L - this.n) / 31L) : (int) ((this.n + 110157223978885L) / 7L);
}

private void priv_set(int var1) {
if (var1 % 2 == 0) {
this.aLong996 = 2269700342778490L - (long) var1 * 31L;
private void priv_set(int n) {
if (n % 2 == 0) {
this.n = 2269700342778490L - (long) n * 31L;
} else {
this.aLong996 = -110157223978885L + (long) var1 * 7L;
this.n = -110157223978885L + (long) n * 7L;
}
}
}

0 comments on commit c75ccb9

Please sign in to comment.