Skip to content

Instantly share code, notes, and snippets.

@GregHib
Last active June 7, 2023 16:51
Show Gist options
  • Save GregHib/900e90082314f949b04ff5c0d3e4d8ab to your computer and use it in GitHub Desktop.
Save GregHib/900e90082314f949b04ff5c0d3e4d8ab to your computer and use it in GitHub Desktop.
Client Modifications
static final void method1213(String string, String string_16_, int i) {
try {
if (i > -48) aClass114_2068 = null;
anInt2063++;
RuntimeException_Sub1.anInt4596 = -1;
Class239_Sub12.anInt5969 = 1;
Class132.method1138(string, false, string_16_, (byte) -95);
if (Loader.skipLobby) {
Class239_Sub12.anInt5969 = 2;
}
} catch (RuntimeException runtimeexception) {
throw Class348_Sub17.method2929(runtimeexception, ("ok.E(" + (string != null ? "{...}" : "null") + ',' + (string_16_ != null ? "{...}" : "null") + ',' + i + ')'));
}
}
Class348_Sub4(boolean bool, Class297 class297) {
if (bool) {
if (Class297.aString3803.startsWith("win")) anInt6613 = 1;
else if (Class297.aString3803.startsWith("mac")) anInt6613 = 2;
else if (Class297.aString3803.startsWith("linux")) anInt6613 = 3;
else anInt6613 = 4;
aBoolean6608 = Class297.aString3780.startsWith("amd64") || Class297.aString3780.startsWith("x86_64");
if (anInt6613 != 1) {
if (anInt6613 == 2) {
if (Class297.aString3778.indexOf("10.4") == -1) {
if (Class297.aString3778.indexOf("10.5") == -1) {
if (Class297.aString3778.indexOf("10.6") != -1) anInt6595 = 22;
} else anInt6595 = 21;
} else anInt6595 = 20;
}
} else if (Class297.aString3778.indexOf("4.0") != -1) anInt6595 = 1;
else if (Class297.aString3778.indexOf("4.1") == -1) {
if (Class297.aString3778.indexOf("4.9") == -1) {
if (Class297.aString3778.indexOf("5.0") != -1) anInt6595 = 4;
else if (Class297.aString3778.indexOf("5.1") == -1) {
if (Class297.aString3778.indexOf("6.0") != -1) anInt6595 = 6;
else if (Class297.aString3778.indexOf("6.1") != -1) anInt6595 = 7;
} else anInt6595 = 5;
} else anInt6595 = 3;
} else anInt6595 = 2;
if (Class297.aString3782.toLowerCase().indexOf("sun") != -1) anInt6594 = 1;
else if (Class297.aString3782.toLowerCase().indexOf("microsoft") == -1) {
if (Class297.aString3782.toLowerCase().indexOf("apple") != -1) anInt6594 = 3;
else anInt6594 = 4;
} else anInt6594 = 2;
boolean oldJava = Class297.aString3796.startsWith("1.");
int i = oldJava ? 2 : 0;
int i_3_ = 0;
try {
while (Class297.aString3796.length() > i) {
int i_4_ = Class297.aString3796.charAt(i);
if (i_4_ < 48 || i_4_ > 57) break;
i++;
i_3_ = i_3_ * 10 - -i_4_ + -48;
}
} catch (Exception exception) {
/* empty */
}
anInt6616 = i_3_;
i = Class297.aString3796.indexOf('.', 2) - -1;
i_3_ = 0;
try {
for (/**/; (i < Class297.aString3796.length()); i++) {
int i_5_ = Class297.aString3796.charAt(i);
if (i_5_ < 48 || i_5_ > 57) break;
i_3_ = i_3_ * 10 + i_5_ + -48;
}
} catch (Exception exception) {
/* empty */
}
anInt6605 = i_3_;
i_3_ = 0;
i = 1 + Class297.aString3796.indexOf(oldJava ? '_' : '.', 4);
try {
for (/**/; Class297.aString3796.length() > i; i++) {
int i_6_ = Class297.aString3796.charAt(i);
if (i_6_ < 48 || i_6_ > 57) break;
i_3_ = i_6_ + -48 + i_3_ * 10;
}
} catch (Exception exception) {
/* empty */
}
aBoolean6607 = !class297.aBoolean3777;
anInt6612 = i_3_;
anInt6592 = Class226.anInt2964;
if (anInt6616 <= 3) anInt6599 = 0;
else anInt6599 = Class348_Sub40_Sub29.anInt9372;
try {
int[] is = HardwareInfo.getCPUInfo();
if (is != null && is.length == 7) {
anInt6598 = is[3];
anInt6596 = is[4];
anInt6591 = is[2];
anInt6603 = is[5];
this.anInt6609 = is[6];
}
} catch (Throwable throwable) {
this.anInt6609 = 0;
}
}
if (aString6610 == null) aString6610 = "";
if (aString6604 == null) aString6604 = "";
if (aString6597 == null) aString6597 = "";
if (aString6614 == null) aString6614 = "";
method2745(10);
}
static final void method843(byte i) {
anInt1499++;
if (Class225.anInt2955 != 0 && Class225.anInt2955 != 5) {
try {
int i_2_;
if (Class318_Sub1_Sub1_Sub2.anInt9971 != 0) i_2_ = 2000;
else i_2_ = 250;
if (i_2_ < ++Class11.anInt197) {
if (Class348_Sub40_Sub8.aClass238_9165 != null) {
Class348_Sub40_Sub8.aClass238_9165.method1700((byte) 36);
Class348_Sub40_Sub8.aClass238_9165 = null;
}
if (Class318_Sub1_Sub1_Sub2.anInt9971 >= 3) {
Class225.anInt2955 = 0;
Class14_Sub4.method254(-5, (byte) -111);
return;
}
if (Class239_Sub12.anInt5969 != 2) Class255.aClass161_3285.method1259(0);
else Class3.aClass161_125.method1259(0);
Class318_Sub1_Sub1_Sub2.anInt9971++;
Class225.anInt2955 = 1;
Class11.anInt197 = 0;
}
if (Class225.anInt2955 == 1) {
if (Class239_Sub12.anInt5969 == 2 && !Loader.splitPorts) Class130_Sub1.aClass144_5800 = (Class3.aClass161_125.method1262(Class348_Sub23_Sub1.aClass297_8992, (byte) 36));
else Class130_Sub1.aClass144_5800 = (Class255.aClass161_3285.method1262(Class348_Sub23_Sub1.aClass297_8992, (byte) 36));
Class225.anInt2955 = 2;
}
if (Class225.anInt2955 == 2) {
if (Class130_Sub1.aClass144_5800.anInt1997 == 2) throw new IOException();
if (Class130_Sub1.aClass144_5800.anInt1997 != 1) return;
Class348_Sub40_Sub8.aClass238_9165 = Class348_Sub23_Sub3.method2982(((Socket) (Class130_Sub1.aClass144_5800.anObject1998)), (byte) -118, 7500);
Class130_Sub1.aClass144_5800 = null;
Class348_Sub3.method2739(0);
Class348_Sub47 class348_sub47 = Class203.method1478(true);
class348_sub47.aClass348_Sub49_Sub2_7116.writeByte(false, Class178.aClass29_2339.anInt400);
Class348_Sub42_Sub14.method3243(9, class348_sub47);
Class239_Sub18.method1802(0);
Class225.anInt2955 = 3;
}
} catch (IOException ioexception) {
}
}
}
public static final BigInteger LOGIN_SERVER_RSA_MODULUS = new BigInteger("ea3680fdebf2621da7a33601ba39925ee203b3fc80775cd3727bf27fd8c0791c803e0bdb42b8b5257567177f8569024569da9147cef59009ed016af6007e57a556f1754f09ca84dd39a03287f7e41e8626fd78ab3b53262bd63f2e37403a549980bf3077bd402b82ef5fac269eb3c04d2a9b7712a67a018321ceba6c3bfb8f7f", 16);
public static final BigInteger FILE_SERVER_RSA_MODULUS = new BigInteger("d6808be939bbfd2ec4e96b1581ce3e1144b526e7643a72e3c64fbb902724fbfcf14ab601da6d6f8dbb57d1c369d080d9fc392abeb7886e0076d07f2aea5810e540d2817fd1967e35b39cc95cf7c9170b5fb55f5bf95524b60e938f0d64614bc365b87d66963a8cc8664e32875366099ef297180d01c7c3842162865e11d92299", 16);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment