import jaclib.hardware_info.HardwareInfo;
import java.util.HashMap;

public class Class225_Sub5 extends Class225 {

   public int anInt8393;
   String aString8394;
   static final int anInt8395 = 2;
   static final int anInt8396 = 3;
   static final int anInt8397 = 4;
   static final int anInt8398 = 3;
   int anInt8399;
   static final int anInt8400 = 1;
   static final int anInt8401 = 2;
   static final int anInt8402 = 3;
   static final int anInt8403 = 4;
   String aString8404;
   static final int anInt8405 = 6;
   int[] anIntArray8406 = new int[3];
   static final int anInt8407 = 8;
   static final int anInt8408 = 9;
   static final int anInt8409 = 20;
   int anInt8410;
   static final int anInt8411 = 22;
   static final int anInt8412 = 23;
   static final int anInt8413 = 21;
   static final int anInt8414 = 1;
   static final int anInt8415 = 6;
   int anInt8416;
   static final int anInt8417 = 4;
   int anInt8418;
   public int anInt8419;
   int anInt8420;
   public int anInt8421;
   boolean aBool8422;
   int anInt8423;
   static final int anInt8424 = 0;
   int anInt8425;
   String aString8426;
   static final int anInt8427 = 5;
   static final int anInt8428 = 2;
   String aString8429;
   int anInt8430;
   String aString8431;
   int anInt8432;
   int anInt8433;
   int anInt8434;
   public static final int anInt8435 = 0;
   boolean aBool8436;
   String aString8437;
   static final int anInt8438 = 7;
   static final int anInt8439 = 1;
   int anInt8440;


   void method13381(int var1) {
      if(this.aString8429.length() > 40) {
         this.aString8429 = this.aString8429.substring(0, 40);
      }

      if(this.aString8394.length() > 40) {
         this.aString8394 = this.aString8394.substring(0, 40);
      }

      if(this.aString8431.length() > 10) {
         this.aString8431 = this.aString8431.substring(0, 10);
      }

      if(this.aString8404.length() > 10) {
         this.aString8404 = this.aString8404.substring(0, 10);
      }

   }

   public int method13382() {
      byte var1 = 38;
      int var2 = var1 + Class133.method2503(this.aString8429, (byte)33);
      var2 += Class133.method2503(this.aString8394, (byte)74);
      var2 += Class133.method2503(this.aString8431, (byte)49);
      var2 += Class133.method2503(this.aString8404, (byte)7);
      var2 += Class133.method2503(this.aString8437, (byte)43);
      var2 += Class133.method2503(this.aString8426, (byte)119);
      return var2;
   }

   public void method13383(RS2Buffer var1) {
      var1.writeByte(6, -765864773);
      var1.writeByte(718901221 * this.anInt8410, -765864773);
      var1.writeByte(this.aBool8436?1:0, -765864773);
      var1.writeByte(this.anInt8430 * -279554925, -765864773);
      var1.writeByte(1253278163 * this.anInt8418, -765864773);
      var1.writeByte(this.anInt8419 * -1288325609, -765864773);
      var1.writeByte(-1973656603 * this.anInt8440, -765864773);
      var1.writeByte(995492999 * this.anInt8393, -765864773);
      var1.writeByte(this.aBool8422?1:0, -765864773);
      var1.writeShort(-1109769881 * this.anInt8423, -1911554868);
      var1.writeByte(1545510793 * this.anInt8425, -765864773);
      var1.method13705(this.anInt8421 * 1889023163, 1608531583);
      var1.writeShort(920280651 * this.anInt8416, -1395182228);
      var1.method13892(this.aString8429, (byte)-102);
      var1.method13892(this.aString8394, (byte)-96);
      var1.method13892(this.aString8431, (byte)-73);
      var1.method13892(this.aString8404, (byte)-87);
      var1.writeByte(this.anInt8434 * 377274329, -765864773);
      var1.writeShort(this.anInt8433 * -937531471, 1482344025);
      var1.method13892(this.aString8437, (byte)-74);
      var1.method13892(this.aString8426, (byte)-75);
      var1.writeByte(this.anInt8420 * -333988453, -765864773);
      var1.writeByte(1449502309 * this.anInt8432, -765864773);

      for(int var2 = 0; var2 < this.anIntArray8406.length; ++var2) {
         var1.writeInt(this.anIntArray8406[var2], -258104929);
      }

      var1.writeInt(-1872071225 * this.anInt8399, -1908858044);
   }

   public int method13384(byte var1) {
      byte var2 = 38;
      int var3 = var2 + Class133.method2503(this.aString8429, (byte)100);
      var3 += Class133.method2503(this.aString8394, (byte)72);
      var3 += Class133.method2503(this.aString8431, (byte)7);
      var3 += Class133.method2503(this.aString8404, (byte)48);
      var3 += Class133.method2503(this.aString8437, (byte)26);
      var3 += Class133.method2503(this.aString8426, (byte)124);
      return var3;
   }

   public void method13385(RS2Buffer var1, int var2) {
      var1.writeByte(6, -765864773);
      var1.writeByte(718901221 * this.anInt8410, -765864773);
      var1.writeByte(this.aBool8436?1:0, -765864773);
      var1.writeByte(this.anInt8430 * -279554925, -765864773);
      var1.writeByte(1253278163 * this.anInt8418, -765864773);
      var1.writeByte(this.anInt8419 * -1288325609, -765864773);
      var1.writeByte(-1973656603 * this.anInt8440, -765864773);
      var1.writeByte(995492999 * this.anInt8393, -765864773);
      var1.writeByte(this.aBool8422?1:0, -765864773);
      var1.writeShort(-1109769881 * this.anInt8423, 2141715180);
      var1.writeByte(1545510793 * this.anInt8425, -765864773);
      var1.method13705(this.anInt8421 * 1889023163, 2135601975);
      var1.writeShort(920280651 * this.anInt8416, 245787456);
      var1.method13892(this.aString8429, (byte)-68);
      var1.method13892(this.aString8394, (byte)-14);
      var1.method13892(this.aString8431, (byte)-85);
      var1.method13892(this.aString8404, (byte)-44);
      var1.writeByte(this.anInt8434 * 377274329, -765864773);
      var1.writeShort(this.anInt8433 * -937531471, 1012111418);
      var1.method13892(this.aString8437, (byte)-88);
      var1.method13892(this.aString8426, (byte)-3);
      var1.writeByte(this.anInt8420 * -333988453, -765864773);
      var1.writeByte(1449502309 * this.anInt8432, -765864773);

      for(int var3 = 0; var3 < this.anIntArray8406.length; ++var3) {
         var1.writeInt(this.anIntArray8406[var3], -279982512);
      }

      var1.writeInt(-1872071225 * this.anInt8399, -261812787);
   }

   public int method13386() {
      byte var1 = 38;
      int var2 = var1 + Class133.method2503(this.aString8429, (byte)29);
      var2 += Class133.method2503(this.aString8394, (byte)51);
      var2 += Class133.method2503(this.aString8431, (byte)19);
      var2 += Class133.method2503(this.aString8404, (byte)13);
      var2 += Class133.method2503(this.aString8437, (byte)100);
      var2 += Class133.method2503(this.aString8426, (byte)117);
      return var2;
   }

   public int method13387() {
      byte var1 = 38;
      int var2 = var1 + Class133.method2503(this.aString8429, (byte)64);
      var2 += Class133.method2503(this.aString8394, (byte)70);
      var2 += Class133.method2503(this.aString8431, (byte)64);
      var2 += Class133.method2503(this.aString8404, (byte)94);
      var2 += Class133.method2503(this.aString8437, (byte)59);
      var2 += Class133.method2503(this.aString8426, (byte)85);
      return var2;
   }

   public int method13388() {
      byte var1 = 38;
      int var2 = var1 + Class133.method2503(this.aString8429, (byte)97);
      var2 += Class133.method2503(this.aString8394, (byte)12);
      var2 += Class133.method2503(this.aString8431, (byte)100);
      var2 += Class133.method2503(this.aString8404, (byte)88);
      var2 += Class133.method2503(this.aString8437, (byte)59);
      var2 += Class133.method2503(this.aString8426, (byte)58);
      return var2;
   }

   public Class225_Sub5(boolean var1) {
      if(var1) {
         if(Class65.aString628.startsWith("win")) {
            this.anInt8410 = 2627053;
         } else if(Class65.aString628.startsWith("mac")) {
            this.anInt8410 = 5254106;
         } else if(Class65.aString628.startsWith("linux")) {
            this.anInt8410 = 7881159;
         } else {
            this.anInt8410 = 10508212;
         }

         if(!Class225_Sub36_Sub1.aString10053.startsWith("amd64") && !Class225_Sub36_Sub1.aString10053.startsWith("x86_64")) {
            this.aBool8436 = false;
         } else {
            this.aBool8436 = true;
         }

         if(718901221 * this.anInt8410 == 1) {
            if(Class413.aString5101.indexOf("4.0") != -1) {
               this.anInt8430 = 1859905947;
            } else if(Class413.aString5101.indexOf("4.1") != -1) {
               this.anInt8430 = -575155402;
            } else if(Class413.aString5101.indexOf("4.9") != -1) {
               this.anInt8430 = 1284750545;
            } else if(Class413.aString5101.indexOf("5.0") != -1) {
               this.anInt8430 = -1150310804;
            } else if(Class413.aString5101.indexOf("5.1") != -1) {
               this.anInt8430 = 709595143;
            } else if(Class413.aString5101.indexOf("5.2") != -1) {
               this.anInt8430 = 1994345688;
            } else if(Class413.aString5101.indexOf("6.0") != -1) {
               this.anInt8430 = -1725466206;
            } else if(Class413.aString5101.indexOf("6.1") != -1) {
               this.anInt8430 = 134439741;
            } else if(Class413.aString5101.indexOf("6.2") != -1) {
               this.anInt8430 = -440715661;
            }
         } else if(718901221 * this.anInt8410 == 2) {
            if(Class413.aString5101.indexOf("10.4") != -1) {
               this.anInt8430 = -1456586724;
            } else if(Class413.aString5101.indexOf("10.5") != -1) {
               this.anInt8430 = 403319223;
            } else if(Class413.aString5101.indexOf("10.6") != -1) {
               this.anInt8430 = -2031742126;
            } else if(Class413.aString5101.indexOf("10.7") != -1) {
               this.anInt8430 = -171836179;
            }
         }

         if(Class427.aString5373.toLowerCase().indexOf("sun") != -1) {
            this.anInt8418 = -1935049125;
         } else if(Class427.aString5373.toLowerCase().indexOf("microsoft") != -1) {
            this.anInt8418 = 424869046;
         } else if(Class427.aString5373.toLowerCase().indexOf("apple") != -1) {
            this.anInt8418 = -1510180079;
         } else {
            this.anInt8418 = 849738092;
         }

         int var2 = 2;
         int var3 = 0;

         char var4;
         try {
            while(var2 < Class283.aString3332.length()) {
               var4 = Class283.aString3332.charAt(var2);
               if(var4 < 48 || var4 > 57) {
                  break;
               }

               var3 = var4 - 48 + var3 * 10;
               ++var2;
            }
         } catch (Exception var18) {
            ;
         }

         this.anInt8419 = 1945428391 * var3;
         var2 = Class283.aString3332.indexOf(46, 2) + 1;
         var3 = 0;

         try {
            while(var2 < Class283.aString3332.length()) {
               var4 = Class283.aString3332.charAt(var2);
               if(var4 < 48 || var4 > 57) {
                  break;
               }

               var3 = var3 * 10 + (var4 - 48);
               ++var2;
            }
         } catch (Exception var17) {
            ;
         }

         this.anInt8440 = 365634029 * var3;
         var2 = Class283.aString3332.indexOf(95, 4) + 1;
         var3 = 0;

         try {
            while(var2 < Class283.aString3332.length()) {
               var4 = Class283.aString3332.charAt(var2);
               if(var4 < 48 || var4 > 57) {
                  break;
               }

               var3 = var4 - 48 + 10 * var3;
               ++var2;
            }
         } catch (Exception var16) {
            ;
         }

         this.anInt8393 = var3 * -1575255753;
         this.aBool8422 = false;
         this.anInt8423 = -549035667 * GameEngine.anInt3290;
         if(this.anInt8419 * -1288325609 > 3) {
            this.anInt8425 = GameEngine.anInt3326 * -749154759;
         } else {
            this.anInt8425 = 0;
         }

         try {
            int[] var19 = HardwareInfo.getCPUInfo();
            if(var19 != null && 3 == var19.length) {
               this.anInt8420 = 739008659 * var19[0];
               this.anInt8416 = var19[1] * 890174307;
               this.anInt8421 = var19[2] * -1811681165;
            }

            int[] var5 = HardwareInfo.getRawCPUInfo();
            int var7;
            int var9;
            int var10;
            int var11;
            if(null != var5 && 0 == var5.length % 5) {
               HashMap var6 = new HashMap();

               for(var7 = 0; var7 < var5.length / 5; ++var7) {
                  int var8 = var5[var7 * 5];
                  var9 = var5[var7 * 5 + 1];
                  var10 = var5[2 + var7 * 5];
                  var11 = var5[var7 * 5 + 3];
                  int var12 = var5[var7 * 5 + 4];
                  Class430 var13 = new Class430(var8, var9, var10, var11, var12);
                  var6.put(Integer.valueOf(var8), var13);
               }

               Class430 var21 = (Class430)var6.get(Integer.valueOf(0));
               if(var21 != null) {
                  RS2Buffer var24 = new RS2Buffer(13);
                  var24.method13707(1015816347 * var21.anInt5388, (byte)1);
                  var24.method13707(638249609 * var21.anInt5392, (byte)1);
                  var24.method13707(-1104765127 * var21.anInt5390, (byte)1);
                  var24.position = 0;
                  this.aString8437 = var24.readString((byte)39);
               }

               Class430 var22 = (Class430)var6.get(Integer.valueOf(1));
               if(null != var22) {
                  this.anInt8399 = -1231649491 * var22.anInt5389;
                  var9 = 1015816347 * var22.anInt5388;
                  this.anInt8432 = (var9 >> 16 & 255) * -1895457939;
                  this.anIntArray8406[0] = var22.anInt5390 * -1104765127;
                  this.anIntArray8406[1] = 638249609 * var22.anInt5392;
               }

               Class430 var26 = (Class430)var6.get(Integer.valueOf(-2147483647));
               if(var26 != null) {
                  this.anIntArray8406[2] = var26.anInt5392 * 638249609;
               }

               RS2Buffer var28 = new RS2Buffer(49);

               for(var11 = -2147483646; var11 <= -2147483644; ++var11) {
                  Class430 var30 = (Class430)var6.get(Integer.valueOf(var11));
                  if(null != var30) {
                     var28.method13707(var30.anInt5389 * 780211963, (byte)1);
                     var28.method13707(var30.anInt5388 * 1015816347, (byte)1);
                     var28.method13707(var30.anInt5390 * -1104765127, (byte)1);
                     var28.method13707(var30.anInt5392 * 638249609, (byte)1);
                  }
               }

               var28.position = 0;
               this.aString8426 = var28.readString((byte)-32);
            }

            String[][] var20 = HardwareInfo.getDXDiagDisplayDevicesProps();
            String var25;
            if(null != var20 && var20.length > 0 && null != var20[0]) {
               for(var7 = 0; var7 < var20[0].length; var7 += 2) {
                  if(var20[0][var7].equalsIgnoreCase("szDescription")) {
                     this.aString8429 = var20[0][var7 + 1];
                  } else if(var20[0][var7].equalsIgnoreCase("szDriverDateEnglish")) {
                     var25 = var20[0][1 + var7];

                     try {
                        var9 = var25.indexOf("/");
                        var10 = var25.indexOf("/", 1 + var9);
                        this.anInt8434 = Integer.parseInt(var25.substring(0, var9)) * -293744535;
                        this.anInt8433 = Integer.parseInt(var25.substring(1 + var10, var25.indexOf(" ", var10))) * -948862639;
                     } catch (Exception var14) {
                        ;
                     }
                  }
               }
            }

            String[] var23 = HardwareInfo.getDXDiagSystemProps();
            if(var23 != null) {
               var25 = "";
               String var29 = "";
               String var27 = "";

               for(var11 = 0; var11 < var23.length; var11 += 2) {
                  if(var23[var11].equalsIgnoreCase("dwDirectXVersionMajor")) {
                     var25 = var23[1 + var11];
                  } else if(var23[var11].equalsIgnoreCase("dwDirectXVersionMinor")) {
                     var29 = var23[1 + var11];
                  } else if(var23[var11].equalsIgnoreCase("dwDirectXVersionLetter")) {
                     var27 = var23[var11 + 1];
                  }
               }

               this.aString8431 = var25 + "." + var29 + var27;
            }
         } catch (Throwable var15) {
            this.anInt8421 = 0;
         }
      }

      if(this.aString8429 == null) {
         this.aString8429 = "";
      }

      if(null == this.aString8394) {
         this.aString8394 = "";
      }

      if(null == this.aString8431) {
         this.aString8431 = "";
      }

      if(this.aString8404 == null) {
         this.aString8404 = "";
      }

      if(null == this.aString8437) {
         this.aString8437 = "";
      }

      if(null == this.aString8426) {
         this.aString8426 = "";
      }

      this.method13381(245404850);
   }

   static char method13389(char var0, Class470 var1, int var2) {
      if(var0 >= 192 && var0 <= 255) {
         if(var0 >= 192 && var0 <= 198) {
            return 'A';
         }

         if(199 == var0) {
            return 'C';
         }

         if(var0 >= 200 && var0 <= 203) {
            return 'E';
         }

         if(var0 >= 204 && var0 <= 207) {
            return 'I';
         }

         if(var0 == 209 && var1 != Class470.aClass470_5777) {
            return 'N';
         }

         if(var0 >= 210 && var0 <= 214) {
            return 'O';
         }

         if(var0 >= 217 && var0 <= 220) {
            return 'U';
         }

         if(221 == var0) {
            return 'Y';
         }

         if(var0 == 223) {
            return 's';
         }

         if(var0 >= 224 && var0 <= 230) {
            return 'a';
         }

         if(231 == var0) {
            return 'c';
         }

         if(var0 >= 232 && var0 <= 235) {
            return 'e';
         }

         if(var0 >= 236 && var0 <= 239) {
            return 'i';
         }

         if(241 == var0 && var1 != Class470.aClass470_5777) {
            return 'n';
         }

         if(var0 >= 242 && var0 <= 246) {
            return 'o';
         }

         if(var0 >= 249 && var0 <= 252) {
            return 'u';
         }

         if(253 == var0 || 255 == var0) {
            return 'y';
         }
      }

      return 338 == var0?'O':(var0 == 339?'o':(376 == var0?'Y':var0));
   }
}
