import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InvalidClassException;
import java.io.ObjectInputStream;
import java.io.OptionalDataException;
import java.io.StreamCorruptedException;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Class427 {

   static Class456 aClass456_5372 = new Class456();
   public static String aString5373;
   static GarbageCollectorMXBean aGarbageCollectorMXBean5374;
   public static Class38 aClass38_5375;


   Class427() throws Throwable {
      throw new Error();
   }

   public static void method7270(PacketBuffer var0) {
      Class225_Sub3 var1 = (Class225_Sub3)aClass456_5372.method7682((byte)9);
      if(null != var1) {
         int var2 = -543666943 * var0.position;
         var0.writeInt(-1560343379 * var1.anInt8378, -1210521567);

         for(int var3 = 0; var3 < -1140811347 * var1.anInt8377; ++var3) {
            if(var1.anIntArray8379[var3] != 0) {
               var0.writeByte(var1.anIntArray8379[var3], -765864773);
            } else {
               try {
                  int var4 = var1.anIntArray8380[var3];
                  Field var5;
                  int var6;
                  if(var4 == 0) {
                     var5 = var1.aFieldArray8376[var3];
                     var6 = var5.getInt((Object)null);
                     var0.writeByte(0, -765864773);
                     var0.writeInt(var6, -1634384031);
                  } else if(var4 == 1) {
                     var5 = var1.aFieldArray8376[var3];
                     var5.setInt((Object)null, var1.anIntArray8381[var3]);
                     var0.writeByte(0, -765864773);
                  } else if(2 == var4) {
                     var5 = var1.aFieldArray8376[var3];
                     var6 = var5.getModifiers();
                     var0.writeByte(0, -765864773);
                     var0.writeInt(var6, -1479939034);
                  }

                  Method var22;
                  if(3 == var4) {
                     var22 = var1.aMethodArray8382[var3];
                     byte[][] var23 = var1.aByteArrayArrayArray8383[var3];
                     Object[] var7 = new Object[var23.length];

                     for(int var8 = 0; var8 < var23.length; ++var8) {
                        ObjectInputStream var9 = new ObjectInputStream(new ByteArrayInputStream(var23[var8]));
                        var7[var8] = var9.readObject();
                     }

                     Object var24 = var22.invoke((Object)null, var7);
                     if(null == var24) {
                        var0.writeByte(0, -765864773);
                     } else if(var24 instanceof Number) {
                        var0.writeByte(1, -765864773);
                        var0.writeLong(((Number)var24).longValue());
                     } else if(var24 instanceof String) {
                        var0.writeByte(2, -765864773);
                        var0.writeString((String)var24, (byte)60);
                     } else {
                        var0.writeByte(4, -765864773);
                     }
                  } else if(4 == var4) {
                     var22 = var1.aMethodArray8382[var3];
                     var6 = var22.getModifiers();
                     var0.writeByte(0, -765864773);
                     var0.writeInt(var6, -993259087);
                  }
               } catch (ClassNotFoundException var10) {
                  var0.writeByte(-10, -765864773);
               } catch (InvalidClassException var11) {
                  var0.writeByte(-11, -765864773);
               } catch (StreamCorruptedException var12) {
                  var0.writeByte(-12, -765864773);
               } catch (OptionalDataException var13) {
                  var0.writeByte(-13, -765864773);
               } catch (IllegalAccessException var14) {
                  var0.writeByte(-14, -765864773);
               } catch (IllegalArgumentException var15) {
                  var0.writeByte(-15, -765864773);
               } catch (InvocationTargetException var16) {
                  var0.writeByte(-16, -765864773);
               } catch (SecurityException var17) {
                  var0.writeByte(-17, -765864773);
               } catch (IOException var18) {
                  var0.writeByte(-18, -765864773);
               } catch (NullPointerException var19) {
                  var0.writeByte(-19, -765864773);
               } catch (Exception var20) {
                  var0.writeByte(-20, -765864773);
               } catch (Throwable var21) {
                  var0.writeByte(-21, -765864773);
               }
            }
         }

         var0.method13765(var2, -1164887317);
         var1.method3857(-1555739458);
      }
   }

   public static boolean method7271() {
      Class225_Sub3 var0 = (Class225_Sub3)aClass456_5372.method7682((byte)75);
      return var0 != null;
   }

   public static void method7272() {
      aClass456_5372 = new Class456();
   }

   public static boolean method7273() {
      Class225_Sub3 var0 = (Class225_Sub3)aClass456_5372.method7682((byte)57);
      return var0 != null;
   }

   public static void method7274(PacketBuffer var0) {
      Class225_Sub3 var1 = (Class225_Sub3)aClass456_5372.method7682((byte)97);
      if(null != var1) {
         int var2 = -543666943 * var0.position;
         var0.writeInt(-1560343379 * var1.anInt8378, -1239287194);

         for(int var3 = 0; var3 < -1140811347 * var1.anInt8377; ++var3) {
            if(var1.anIntArray8379[var3] != 0) {
               var0.writeByte(var1.anIntArray8379[var3], -765864773);
            } else {
               try {
                  int var4 = var1.anIntArray8380[var3];
                  Field var5;
                  int var6;
                  if(var4 == 0) {
                     var5 = var1.aFieldArray8376[var3];
                     var6 = var5.getInt((Object)null);
                     var0.writeByte(0, -765864773);
                     var0.writeInt(var6, -1612533724);
                  } else if(var4 == 1) {
                     var5 = var1.aFieldArray8376[var3];
                     var5.setInt((Object)null, var1.anIntArray8381[var3]);
                     var0.writeByte(0, -765864773);
                  } else if(2 == var4) {
                     var5 = var1.aFieldArray8376[var3];
                     var6 = var5.getModifiers();
                     var0.writeByte(0, -765864773);
                     var0.writeInt(var6, -2043726752);
                  }

                  Method var22;
                  if(3 == var4) {
                     var22 = var1.aMethodArray8382[var3];
                     byte[][] var23 = var1.aByteArrayArrayArray8383[var3];
                     Object[] var7 = new Object[var23.length];

                     for(int var8 = 0; var8 < var23.length; ++var8) {
                        ObjectInputStream var9 = new ObjectInputStream(new ByteArrayInputStream(var23[var8]));
                        var7[var8] = var9.readObject();
                     }

                     Object var24 = var22.invoke((Object)null, var7);
                     if(null == var24) {
                        var0.writeByte(0, -765864773);
                     } else if(var24 instanceof Number) {
                        var0.writeByte(1, -765864773);
                        var0.writeLong(((Number)var24).longValue());
                     } else if(var24 instanceof String) {
                        var0.writeByte(2, -765864773);
                        var0.writeString((String)var24, (byte)104);
                     } else {
                        var0.writeByte(4, -765864773);
                     }
                  } else if(4 == var4) {
                     var22 = var1.aMethodArray8382[var3];
                     var6 = var22.getModifiers();
                     var0.writeByte(0, -765864773);
                     var0.writeInt(var6, -1770554250);
                  }
               } catch (ClassNotFoundException var10) {
                  var0.writeByte(-10, -765864773);
               } catch (InvalidClassException var11) {
                  var0.writeByte(-11, -765864773);
               } catch (StreamCorruptedException var12) {
                  var0.writeByte(-12, -765864773);
               } catch (OptionalDataException var13) {
                  var0.writeByte(-13, -765864773);
               } catch (IllegalAccessException var14) {
                  var0.writeByte(-14, -765864773);
               } catch (IllegalArgumentException var15) {
                  var0.writeByte(-15, -765864773);
               } catch (InvocationTargetException var16) {
                  var0.writeByte(-16, -765864773);
               } catch (SecurityException var17) {
                  var0.writeByte(-17, -765864773);
               } catch (IOException var18) {
                  var0.writeByte(-18, -765864773);
               } catch (NullPointerException var19) {
                  var0.writeByte(-19, -765864773);
               } catch (Exception var20) {
                  var0.writeByte(-20, -765864773);
               } catch (Throwable var21) {
                  var0.writeByte(-21, -765864773);
               }
            }
         }

         var0.method13765(var2, -994747021);
         var1.method3857(1828973712);
      }
   }

   public static boolean method7275() {
      Class225_Sub3 var0 = (Class225_Sub3)aClass456_5372.method7682((byte)70);
      return var0 != null;
   }

   public static void method7276(RS2Buffer var0, int var1) {
      Class225_Sub3 var2 = new Class225_Sub3();
      var2.anInt8377 = var0.readUnsignedByte(-700559597) * 910045733;
      var2.anInt8378 = var0.readInt_(882639510) * -1370343643;
      var2.anIntArray8380 = new int[-1140811347 * var2.anInt8377];
      var2.anIntArray8379 = new int[var2.anInt8377 * -1140811347];
      var2.aFieldArray8376 = new Field[-1140811347 * var2.anInt8377];
      var2.anIntArray8381 = new int[-1140811347 * var2.anInt8377];
      var2.aMethodArray8382 = new Method[-1140811347 * var2.anInt8377];
      var2.aByteArrayArrayArray8383 = new byte[-1140811347 * var2.anInt8377][][];

      for(int var3 = 0; var3 < -1140811347 * var2.anInt8377; ++var3) {
         try {
            int var4 = var0.readUnsignedByte(-700559597);
            String var5;
            String var6;
            int var7;
            if(var4 != 0 && var4 != 1 && var4 != 2) {
               if(3 == var4 || var4 == 4) {
                  var5 = var0.readString((byte)-3);
                  var6 = var0.readString((byte)45);
                  var7 = var0.readUnsignedByte(-700559597);
                  String[] var8 = new String[var7];

                  for(int var9 = 0; var9 < var7; ++var9) {
                     var8[var9] = var0.readString((byte)71);
                  }

                  String var25 = var0.readString((byte)-28);
                  byte[][] var10 = new byte[var7][];
                  int var12;
                  if(var4 == 3) {
                     for(int var11 = 0; var11 < var7; ++var11) {
                        var12 = var0.readInt_(587064349);
                        var10[var11] = new byte[var12];
                        var0.method13737(var10[var11], 0, var12, 1385214721);
                     }
                  }

                  var2.anIntArray8380[var3] = var4;
                  Class[] var26 = new Class[var7];

                  for(var12 = 0; var12 < var7; ++var12) {
                     var26[var12] = Class515_Sub1_Sub3_Sub1.method16624(var8[var12], 1660112579);
                  }

                  Class var27 = Class515_Sub1_Sub3_Sub1.method16624(var25, 1140593153);
                  if(Class515_Sub1_Sub3_Sub1.method16624(var5, 2022664134).getClassLoader() == null) {
                     throw new SecurityException();
                  }

                  Method[] var13 = Class515_Sub1_Sub3_Sub1.method16624(var5, 1670576534).getDeclaredMethods();
                  Method[] var14 = var13;

                  for(int var15 = 0; var15 < var14.length; ++var15) {
                     Method var16 = var14[var15];
                     if(var16.getName().equals(var6)) {
                        Class[] var17 = var16.getParameterTypes();
                        if(var17.length == var26.length) {
                           boolean var18 = true;

                           for(int var19 = 0; var19 < var26.length; ++var19) {
                              if(var17[var19] != var26[var19]) {
                                 var18 = false;
                                 break;
                              }
                           }

                           if(var18 && var27 == var16.getReturnType()) {
                              var2.aMethodArray8382[var3] = var16;
                           }
                        }
                     }
                  }

                  var2.aByteArrayArrayArray8383[var3] = var10;
               }
            } else {
               var5 = var0.readString((byte)88);
               var6 = var0.readString((byte)41);
               var7 = 0;
               if(var4 == 1) {
                  var7 = var0.readInt_(-1444802214);
               }

               var2.anIntArray8380[var3] = var4;
               var2.anIntArray8381[var3] = var7;
               if(Class515_Sub1_Sub3_Sub1.method16624(var5, 1338695341).getClassLoader() == null) {
                  throw new SecurityException();
               }

               var2.aFieldArray8376[var3] = Class515_Sub1_Sub3_Sub1.method16624(var5, 1674240481).getDeclaredField(var6);
            }
         } catch (ClassNotFoundException var20) {
            var2.anIntArray8379[var3] = -1;
         } catch (SecurityException var21) {
            var2.anIntArray8379[var3] = -2;
         } catch (NullPointerException var22) {
            var2.anIntArray8379[var3] = -3;
         } catch (Exception var23) {
            var2.anIntArray8379[var3] = -4;
         } catch (Throwable var24) {
            var2.anIntArray8379[var3] = -5;
         }
      }

      aClass456_5372.method7712(var2, (byte)9);
   }

   public static void method7277(RS2Buffer var0, int var1) {
      Class225_Sub3 var2 = new Class225_Sub3();
      var2.anInt8377 = var0.readUnsignedByte(-700559597) * 910045733;
      var2.anInt8378 = var0.readInt_(1518188293) * -1370343643;
      var2.anIntArray8380 = new int[-1140811347 * var2.anInt8377];
      var2.anIntArray8379 = new int[var2.anInt8377 * -1140811347];
      var2.aFieldArray8376 = new Field[-1140811347 * var2.anInt8377];
      var2.anIntArray8381 = new int[-1140811347 * var2.anInt8377];
      var2.aMethodArray8382 = new Method[-1140811347 * var2.anInt8377];
      var2.aByteArrayArrayArray8383 = new byte[-1140811347 * var2.anInt8377][][];

      for(int var3 = 0; var3 < -1140811347 * var2.anInt8377; ++var3) {
         try {
            int var4 = var0.readUnsignedByte(-700559597);
            String var5;
            String var6;
            int var7;
            if(var4 != 0 && var4 != 1 && var4 != 2) {
               if(3 == var4 || var4 == 4) {
                  var5 = var0.readString((byte)21);
                  var6 = var0.readString((byte)21);
                  var7 = var0.readUnsignedByte(-700559597);
                  String[] var8 = new String[var7];

                  for(int var9 = 0; var9 < var7; ++var9) {
                     var8[var9] = var0.readString((byte)64);
                  }

                  String var25 = var0.readString((byte)16);
                  byte[][] var10 = new byte[var7][];
                  int var12;
                  if(var4 == 3) {
                     for(int var11 = 0; var11 < var7; ++var11) {
                        var12 = var0.readInt_(-2039270132);
                        var10[var11] = new byte[var12];
                        var0.method13737(var10[var11], 0, var12, 1385214721);
                     }
                  }

                  var2.anIntArray8380[var3] = var4;
                  Class[] var26 = new Class[var7];

                  for(var12 = 0; var12 < var7; ++var12) {
                     var26[var12] = Class515_Sub1_Sub3_Sub1.method16624(var8[var12], 1015678830);
                  }

                  Class var27 = Class515_Sub1_Sub3_Sub1.method16624(var25, 578942006);
                  if(Class515_Sub1_Sub3_Sub1.method16624(var5, 376443896).getClassLoader() == null) {
                     throw new SecurityException();
                  }

                  Method[] var13 = Class515_Sub1_Sub3_Sub1.method16624(var5, 1301359092).getDeclaredMethods();
                  Method[] var14 = var13;

                  for(int var15 = 0; var15 < var14.length; ++var15) {
                     Method var16 = var14[var15];
                     if(var16.getName().equals(var6)) {
                        Class[] var17 = var16.getParameterTypes();
                        if(var17.length == var26.length) {
                           boolean var18 = true;

                           for(int var19 = 0; var19 < var26.length; ++var19) {
                              if(var17[var19] != var26[var19]) {
                                 var18 = false;
                                 break;
                              }
                           }

                           if(var18 && var27 == var16.getReturnType()) {
                              var2.aMethodArray8382[var3] = var16;
                           }
                        }
                     }
                  }

                  var2.aByteArrayArrayArray8383[var3] = var10;
               }
            } else {
               var5 = var0.readString((byte)-39);
               var6 = var0.readString((byte)89);
               var7 = 0;
               if(var4 == 1) {
                  var7 = var0.readInt_(-746979327);
               }

               var2.anIntArray8380[var3] = var4;
               var2.anIntArray8381[var3] = var7;
               if(Class515_Sub1_Sub3_Sub1.method16624(var5, 1246260599).getClassLoader() == null) {
                  throw new SecurityException();
               }

               var2.aFieldArray8376[var3] = Class515_Sub1_Sub3_Sub1.method16624(var5, 709348858).getDeclaredField(var6);
            }
         } catch (ClassNotFoundException var20) {
            var2.anIntArray8379[var3] = -1;
         } catch (SecurityException var21) {
            var2.anIntArray8379[var3] = -2;
         } catch (NullPointerException var22) {
            var2.anIntArray8379[var3] = -3;
         } catch (Exception var23) {
            var2.anIntArray8379[var3] = -4;
         } catch (Throwable var24) {
            var2.anIntArray8379[var3] = -5;
         }
      }

      aClass456_5372.method7712(var2, (byte)42);
   }

   static Class method7278(String var0) throws ClassNotFoundException {
      return var0.equals("B")?Byte.TYPE:(var0.equals("I")?Integer.TYPE:(var0.equals("S")?Short.TYPE:(var0.equals("J")?Long.TYPE:(var0.equals("Z")?Boolean.TYPE:(var0.equals("F")?Float.TYPE:(var0.equals("D")?Double.TYPE:(var0.equals("C")?Character.TYPE:(var0.equals("void")?Void.TYPE:Class.forName(var0)))))))));
   }

   static Class method7279(String var0) throws ClassNotFoundException {
      return var0.equals("B")?Byte.TYPE:(var0.equals("I")?Integer.TYPE:(var0.equals("S")?Short.TYPE:(var0.equals("J")?Long.TYPE:(var0.equals("Z")?Boolean.TYPE:(var0.equals("F")?Float.TYPE:(var0.equals("D")?Double.TYPE:(var0.equals("C")?Character.TYPE:(var0.equals("void")?Void.TYPE:Class.forName(var0)))))))));
   }

   static final void method7280(int var0, int var1, int var2) {
      if(Class215_Sub1.aFloat2541 < Class215_Sub1.aFloat2533) {
         Class215_Sub1.aFloat2541 = (float)((double)Class215_Sub1.aFloat2541 + (double)Class215_Sub1.aFloat2541 / 30.0D);
         if(Class215_Sub1.aFloat2541 > Class215_Sub1.aFloat2533) {
            Class215_Sub1.aFloat2541 = Class215_Sub1.aFloat2533;
         }

         Class10.method684(-930730332);
         Class215_Sub1.anInt2529 = (int)Class215_Sub1.aFloat2541 >> 1;
         Class215_Sub1.aByteArrayArrayArray2528 = Class75.method1616(Class215_Sub1.anInt2529, (byte)23);
      } else if(Class215_Sub1.aFloat2541 > Class215_Sub1.aFloat2533) {
         Class215_Sub1.aFloat2541 = (float)((double)Class215_Sub1.aFloat2541 - (double)Class215_Sub1.aFloat2541 / 30.0D);
         if(Class215_Sub1.aFloat2541 < Class215_Sub1.aFloat2533) {
            Class215_Sub1.aFloat2541 = Class215_Sub1.aFloat2533;
         }

         Class10.method684(-930730332);
         Class215_Sub1.anInt2529 = (int)Class215_Sub1.aFloat2541 >> 1;
         Class215_Sub1.aByteArrayArrayArray2528 = Class75.method1616(Class215_Sub1.anInt2529, (byte)9);
      }

      if(Class215_Sub1.anInt8335 * -1726007583 != -1 && -1 != Class215_Sub1.anInt8336 * 1625943173) {
         int var3 = -1726007583 * Class215_Sub1.anInt8335 - 679266431 * Class72.anInt689;
         if(var3 < 2 || var3 > 2) {
            var3 /= 8;
         }

         int var4 = Class215_Sub1.anInt8336 * 1625943173 - 1215624379 * Class383.anInt4773;
         if(var4 < 2 || var4 > 2) {
            var4 /= 8;
         }

         Class72.anInt689 = -128256129 * (Class72.anInt689 * 679266431 + var3);
         Class383.anInt4773 = -1861668749 * (Class383.anInt4773 * 1215624379 + var4);
         if(0 == var3 && var4 == 0) {
            Class215_Sub1.anInt8335 = -163613985;
            Class215_Sub1.anInt8336 = -471411789;
         }

         Class10.method684(-930730332);
      }

      if(Class260.anInt3053 * 1882486243 > 0) {
         Class215_Sub1.anInt8341 -= 2121884333;
         if(Class215_Sub1.anInt8341 * -1800646363 == 0) {
            Class260.anInt3053 -= 1360951243;
            Class215_Sub1.anInt8341 = 1735035796;
         }
      } else {
         Class215_Sub1.anInt8342 = -264234723;
         Class215_Sub1.anInt8346 = -1858130899;
      }

      if(Class215_Sub1.aBool8337 && Class99.aClass456_1001 != null) {
         for(Class225_Sub51 var5 = (Class225_Sub51)Class99.aClass456_1001.method7682((byte)64); var5 != null; var5 = (Class225_Sub51)Class99.aClass456_1001.method7666(-654093638)) {
            Class567 var6 = Class215_Sub1.aClass555_2519.method11836(922203033 * var5.aClass225_Sub11_8890.anInt8528, 929523696);
            if(var5.method14255(var0, var1, (byte)-101)) {
               if(var6.aStringArray7527 != null) {
                  if(var6.aStringArray7527[4] != null) {
                     Class115.method2285(var6.aStringArray7527[4], var6.aString7511, -1, 1012, -1, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), var6.anInt7552 * -2118985305, 0, true, false, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), false, -1489992140);
                  }

                  if(var6.aStringArray7527[3] != null) {
                     Class115.method2285(var6.aStringArray7527[3], var6.aString7511, -1, 1011, -1, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), -2118985305 * var6.anInt7552, 0, true, false, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), false, -1489992140);
                  }

                  if(null != var6.aStringArray7527[2]) {
                     Class115.method2285(var6.aStringArray7527[2], var6.aString7511, -1, 1010, -1, (long)(var5.aClass225_Sub11_8890.anInt8528 * 922203033), var6.anInt7552 * -2118985305, 0, true, false, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), false, -1489992140);
                  }

                  if(null != var6.aStringArray7527[1]) {
                     Class115.method2285(var6.aStringArray7527[1], var6.aString7511, -1, 1009, -1, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), -2118985305 * var6.anInt7552, 0, true, false, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), false, -1489992140);
                  }

                  if(var6.aStringArray7527[0] != null) {
                     Class115.method2285(var6.aStringArray7527[0], var6.aString7511, -1, 1008, -1, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), -2118985305 * var6.anInt7552, 0, true, false, (long)(922203033 * var5.aClass225_Sub11_8890.anInt8528), false, -1489992140);
                  }
               }

               if(!var5.aClass225_Sub11_8890.aBool8530) {
                  var5.aClass225_Sub11_8890.aBool8530 = true;
                  Class363.method6461(Class386.aClass386_4815, 922203033 * var5.aClass225_Sub11_8890.anInt8528, var6.anInt7552 * -2118985305, (byte)77);
               }

               if(var5.aClass225_Sub11_8890.aBool8530) {
                  Class363.method6461(Class386.aClass386_4817, 922203033 * var5.aClass225_Sub11_8890.anInt8528, -2118985305 * var6.anInt7552, (byte)-42);
               }
            } else if(var5.aClass225_Sub11_8890.aBool8530) {
               var5.aClass225_Sub11_8890.aBool8530 = false;
               Class363.method6461(Class386.aClass386_4816, 922203033 * var5.aClass225_Sub11_8890.anInt8528, var6.anInt7552 * -2118985305, (byte)102);
            }
         }
      }

   }
}
