Files
wes c30e839b64 SBoT 1.0 decompiled with CFR 0.152
Full source recovered from SBoT.jar (July 2004) plus the three bundled
example scripts (BoneBury, GuildFish, GuildFisher). Class names are the
original RSC-era single-letter obfuscation (a.java-z.java); mudclient.java
and Script.java kept their real names since those weren't obfuscated.
2026-08-25 13:11:31 -04:00

80 lines
2.3 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
import java.math.BigInteger;
import java.util.zip.CRC32;
public class n {
public byte[] a;
public int b;
static CRC32 c = new CRC32();
private static final int[] d = new int[]{0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, Short.MAX_VALUE, 65535, 131071, 262143, 524287, 1048575, 0x1FFFFF, 0x3FFFFF, 0x7FFFFF, 0xFFFFFF, 0x1FFFFFF, 0x3FFFFFF, 0x7FFFFFF, 0xFFFFFFF, 0x1FFFFFFF, 0x3FFFFFFF, Integer.MAX_VALUE, -1};
private n() {
}
public n(byte[] byArray) {
this.a = byArray;
this.b = 0;
}
public void a(int n2) {
this.a[this.b++] = (byte)n2;
}
public void b(int n2) {
this.a[this.b++] = (byte)(n2 >> 24);
this.a[this.b++] = (byte)(n2 >> 16);
this.a[this.b++] = (byte)(n2 >> 8);
this.a[this.b++] = (byte)n2;
}
public void a(String string) {
string.getBytes(0, string.length(), this.a, this.b);
this.b += string.length();
this.a[this.b++] = 10;
}
public void a(byte[] byArray, int n2, int n3) {
for (int i2 = n2; i2 < n2 + n3; ++i2) {
this.a[this.b++] = byArray[i2];
if (!q.d) continue;
}
}
public int a() {
return this.a[this.b++] & 0xFF;
}
public int b() {
this.b += 2;
return ((this.a[this.b - 2] & 0xFF) << 8) + (this.a[this.b - 1] & 0xFF);
}
public int c() {
this.b += 4;
return ((this.a[this.b - 4] & 0xFF) << 24) + ((this.a[this.b - 3] & 0xFF) << 16) + ((this.a[this.b - 2] & 0xFF) << 8) + (this.a[this.b - 1] & 0xFF);
}
public void b(byte[] byArray, int n2, int n3) {
for (int i2 = n2; i2 < n2 + n3; ++i2) {
byArray[i2] = this.a[this.b++];
if (!q.d) continue;
}
}
public void a(BigInteger bigInteger, BigInteger bigInteger2) {
int n2 = this.b;
this.b = 0;
byte[] byArray = new byte[n2];
this.b(byArray, 0, n2);
BigInteger bigInteger3 = new BigInteger(byArray);
BigInteger bigInteger4 = bigInteger3.modPow(bigInteger, bigInteger2);
byte[] byArray2 = bigInteger4.toByteArray();
this.b = 0;
this.a(byArray2.length);
this.a(byArray2, 0, byArray2.length);
}
}