import java.io.IOException;

public class PacketContext {

   public boolean aBool2174 = false;
   int anInt2175;
   ISAACCipher aClass433_2176;
   int anInt2177 = 0;
   static final int anInt2178 = 15000;
   Class232 aClass232_2179;
   PacketBuffer aClass225_Sub23_Sub1_2180 = new PacketBuffer(15000);
   boolean aBool2181 = true;
   IncommingOpcode opcode = null;
   int size = 0;
   public ISAACCipher aClass433_2184;
   int anInt2185 = 0;
   public int anInt2186 = 0;
   int anInt2187;
   IncommingOpcode aClass296_2188;
   int anInt2189;
   int anInt2190;
   IncommingOpcode aClass296_2191;
   IncommingOpcode aClass296_2192;
   RS2Buffer aClass225_Sub23_2193 = new RS2Buffer(1600);
   Class456 aClass456_2194 = new Class456();
   Class17 aClass17_2195 = new Class17();


   void method3188() {
      if(this.aClass232_2179 != null) {
         this.aClass232_2179.method4000(1903240801);
         this.aClass232_2179 = null;
      }

      this.aClass17_2195.method759((String)null, -2139077406);
   }

   final void method3189(byte var1) {
      this.aClass456_2194.method7627((byte)16);
      this.anInt2177 = 0;
   }

   public final void method3190(Class225_Sub15 var1) {
      this.aClass456_2194.method7712(var1, (byte)112);
      var1.anInt8557 = 2056707657 * var1.buffer.position;
      var1.buffer.position = 0;
      this.anInt2177 += 363589279 * var1.anInt8557;
   }

   public final void method3191(Class225_Sub15 var1, byte var2) {
      this.aClass456_2194.method7712(var1, (byte)111);
      var1.anInt8557 = 2056707657 * var1.buffer.position;
      var1.buffer.position = 0;
      this.anInt2177 += 363589279 * var1.anInt8557;
   }

   void method3192(byte var1) {
      if(client.anInt7659 * -1255739433 % 50 == 0) {
         this.anInt2189 = this.anInt2187 * -923340725;
         this.anInt2187 = 0;
         this.anInt2190 = -1681483823 * this.anInt2175;
         this.anInt2175 = 0;
      }

   }

   void method3193() {
      this.aClass232_2179 = null;
      this.aClass17_2195.method759((String)null, 1386861592);
   }

   void method3194(int var1) {
      if(this.aClass232_2179 != null) {
         this.aClass232_2179.method4000(1390967548);
         this.aClass232_2179 = null;
      }

      this.aClass17_2195.method759((String)null, -1089446357);
   }

   void method3195(int var1) {
      this.aClass232_2179 = null;
      this.aClass17_2195.method759((String)null, -505203017);
   }

   void method3196(Class232 var1, String var2) {
      this.aClass232_2179 = var1;
      this.aClass17_2195.method759(var2, -753399789);
   }

   void method3197(Class232 var1, String var2) {
      this.aClass232_2179 = var1;
      this.aClass17_2195.method759(var2, -1228290300);
   }

   public final void method3198() throws IOException {
      if(null != this.aClass232_2179 && 2007976295 * this.anInt2177 > 0) {
         this.aClass225_Sub23_2193.position = 0;

         while(true) {
            Class225_Sub15 var1 = (Class225_Sub15)this.aClass456_2194.method7682((byte)98);
            if(null == var1 || var1.anInt8557 * -957785863 > this.aClass225_Sub23_2193.buffer.length - this.aClass225_Sub23_2193.position * -543666943) {
               this.aClass232_2179.method4001(this.aClass225_Sub23_2193.buffer, 0, this.aClass225_Sub23_2193.position * -543666943, -2117935269);
               this.anInt2187 += this.aClass225_Sub23_2193.position * 1035163037;
               this.anInt2186 = 0;
               break;
            }

            this.aClass225_Sub23_2193.method13714(var1.buffer.buffer, 0, var1.anInt8557 * -957785863, -483250138);
            this.anInt2177 -= var1.anInt8557 * 363589279;
            var1.method3857(719499588);
            var1.buffer.method13759((byte)-96);
            var1.method13604(-891960531);
         }
      }

   }

   public final void method3199() throws IOException {
      if(null != this.aClass232_2179 && 2007976295 * this.anInt2177 > 0) {
         this.aClass225_Sub23_2193.position = 0;

         while(true) {
            Class225_Sub15 var1 = (Class225_Sub15)this.aClass456_2194.method7682((byte)99);
            if(null == var1 || var1.anInt8557 * -957785863 > this.aClass225_Sub23_2193.buffer.length - this.aClass225_Sub23_2193.position * -543666943) {
               this.aClass232_2179.method4001(this.aClass225_Sub23_2193.buffer, 0, this.aClass225_Sub23_2193.position * -543666943, -1939669972);
               this.anInt2187 += this.aClass225_Sub23_2193.position * 1035163037;
               this.anInt2186 = 0;
               break;
            }

            this.aClass225_Sub23_2193.method13714(var1.buffer.buffer, 0, var1.anInt8557 * -957785863, -618391568);
            this.anInt2177 -= var1.anInt8557 * 363589279;
            var1.method3857(-1575362080);
            var1.buffer.method13759((byte)-83);
            var1.method13604(-1567797083);
         }
      }

   }

   public final void method3200(Class225_Sub15 var1) {
      this.aClass456_2194.method7712(var1, (byte)88);
      var1.anInt8557 = 2056707657 * var1.buffer.position;
      var1.buffer.position = 0;
      this.anInt2177 += 363589279 * var1.anInt8557;
   }

   final void method3201() {
      this.aClass456_2194.method7627((byte)16);
      this.anInt2177 = 0;
   }

   void method3202() {
      if(client.anInt7659 * -1255739433 % 50 == 0) {
         this.anInt2189 = this.anInt2187 * -923340725;
         this.anInt2187 = 0;
         this.anInt2190 = -1681483823 * this.anInt2175;
         this.anInt2175 = 0;
      }

   }

   void method3203() {
      if(client.anInt7659 * -1255739433 % 50 == 0) {
         this.anInt2189 = this.anInt2187 * -923340725;
         this.anInt2187 = 0;
         this.anInt2190 = -1681483823 * this.anInt2175;
         this.anInt2175 = 0;
      }

   }

   void method3204() {
      if(client.anInt7659 * -1255739433 % 50 == 0) {
         this.anInt2189 = this.anInt2187 * -923340725;
         this.anInt2187 = 0;
         this.anInt2190 = -1681483823 * this.anInt2175;
         this.anInt2175 = 0;
      }

   }

   PacketContext() {
      Thread var1 = new Thread(this.aClass17_2195);
      var1.setPriority(1);
      var1.start();
   }

   void method3205(Class232 var1, String var2) {
      this.aClass232_2179 = var1;
      this.aClass17_2195.method759(var2, -2030204975);
   }

   public Class232 method3206(byte var1) {
      return this.aClass232_2179;
   }

   void method3207(Class232 var1, String var2, int var3) {
      this.aClass232_2179 = var1;
      this.aClass17_2195.method759(var2, -794698731);
   }

   void method3208() {
      this.aClass232_2179 = null;
      this.aClass17_2195.method759((String)null, 939125859);
   }

   void method3209() {
      this.aClass232_2179 = null;
      this.aClass17_2195.method759((String)null, -1551589743);
   }

   public final void method3210(byte var1) throws IOException {
      if(null != this.aClass232_2179 && 2007976295 * this.anInt2177 > 0) {
         this.aClass225_Sub23_2193.position = 0;

         while(true) {
            Class225_Sub15 var2 = (Class225_Sub15)this.aClass456_2194.method7682((byte)48);
            if(null == var2 || var2.anInt8557 * -957785863 > this.aClass225_Sub23_2193.buffer.length - this.aClass225_Sub23_2193.position * -543666943) {
               this.aClass232_2179.method4001(this.aClass225_Sub23_2193.buffer, 0, this.aClass225_Sub23_2193.position * -543666943, -1772999580);
               this.anInt2187 += this.aClass225_Sub23_2193.position * 1035163037;
               this.anInt2186 = 0;
               break;
            }

            this.aClass225_Sub23_2193.method13714(var2.buffer.buffer, 0, var2.anInt8557 * -957785863, -1881518240);
            this.anInt2177 -= var2.anInt8557 * 363589279;
            var2.method3857(-2023162196);
            var2.buffer.method13759((byte)-52);
            var2.method13604(217344059);
         }
      }

   }

   static final int method3211(int var0, int var1, int var2, int var3, short var4) {
      int var5 = 65536 - Class312.anIntArray3956[var2 * 8192 / var3] >> 1;
      return (var1 * var5 >> 16) + ((65536 - var5) * var0 >> 16);
   }

   static void method3212(int var0, String var1, String var2, int var3) {
      if(client.aClass180_7704 != null) {
         Class225_Sub15 var4 = Class543.method11415(OutgoingOpcode.aClass302_3800, client.aClass180_7704.aClass433_2184, (byte)1);
         var4.buffer.writeShort(1 + Class133.method2503(var1, (byte)42) + Class133.method2503(var2, (byte)78), -1860859840);
         var4.buffer.writeByte(var0, -765864773);
         var4.buffer.method13892(var2, (byte)-13);
         var4.buffer.method13892(var1, (byte)-124);
         client.aClass180_7704.method3191(var4, (byte)-6);
      }

   }

   public static Class356 method3213(RS2Buffer var0, int var1) {
      Class356 var2 = Class216.method3746(var0, 1881519639);
      int var3 = var0.readInt_(-181151952);
      int var4 = var0.readInt_(399388543);
      return new Class356_Sub3(var2.aClass382_4481, var2.aClass365_4478, -172504591 * var2.anInt4479, -2061965875 * var2.anInt4484, -1800792699 * var2.anInt4485, -1712086601 * var2.anInt4482, var2.anInt4483 * -1466490429, 1650239165 * var2.anInt4477, var2.anInt4480 * -1349940851, var3, var4);
   }
}
