import jaclib.nanotime.QueryPerformanceCounter;
import java.applet.Applet;
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.LayoutManager;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.image.ImageObserver;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.URL;

public abstract class GameEngine implements Interface27, Runnable, FocusListener, WindowListener {

   public static int anInt3290 = 231668653;
   static long aLong3291 = -7263588489492834560L;
   boolean aBool3292 = false;
   static final int anInt3293 = 32;
   static int anInt3294;
   static final String aString3295 = "main_file_cache.idx255";
   static long[] aLongArray3296 = new long[32];
   static long[] aLongArray3297 = new long[32];
   boolean aBool3298 = false;
   static volatile long aLong3299 = 0L;
   public static int anInt3300 = 0;
   protected static String aString3301 = null;
   protected static volatile boolean aBool3302 = true;
   static int anInt3303 = 2115454740;
   protected static volatile boolean aBool3304 = false;
   protected static int anInt3305;
   protected static boolean aBool3306 = false;
   static final String aString3307 = "main_file_cache.dat2";
   static final int anInt3308 = 1048576000;
   static int anInt3309;
   static final String aString3310 = "rw";
   static int anInt3311;
   protected static Class452 aClass452_3312 = null;
   static final int anInt3313 = 1;
   static final String aString3314 = "main_file_cache.idx";
   static final String aString3315 = "random.dat";
   static Class452 aClass452_3316 = null;
   public static int anInt3317 = 0;
   static Class452 aClass452_3318 = null;
   static final int anInt3319 = 0;
   static final int anInt3320 = 1048576;
   static Class283 aClass283_3321 = null;
   static long aLong3322 = 0L;
   static boolean aBool3323 = false;
   static volatile boolean aBool3324 = true;
   public static int anInt3325 = 0;
   public static int anInt3326 = -1071481727;
   static int anInt3327;
   static Class171[] aClass171Array3328;


   public final void method5074(WindowEvent var1) {}

   public final void method5075(WindowEvent var1) {}

   final void method5076(Class200 var1, String var2, String var3, int var4, int var5, int var6, int var7, boolean var8, int var9) {
      try {
         this.method5168(Class283.aClass283_3330, var8, (byte)-72);
         anInt3305 = (Class563.anInt7495 = var1.method3421(1607755686) * 241194575) * -1231329497;
         Class463_Sub14.anInt8016 = (Class440.anInt5458 = var1.method3420((short)-19406) * 1289941381) * 1019237945;
         anInt3325 = 0;
         anInt3317 = 0;
         if(Class178.method3161(-837281966) == Class283.aClass283_3331) {
            anInt3305 += -1099440622 * var1.method3418((byte)49);
            Class463_Sub14.anInt8016 += 1456793914 * var1.method3419(-1887959251);
            this.method5081(var1.method3415(2019226485), -523810512);
         }

         RuntimeException_Sub3.anApplet10692 = Class393.anApplet4870;
         this.method5109(var2, var3, var4, var5, var6, var7, -980829250);
      } catch (Throwable var11) {
         Class109.method2190((String)null, var11, 2124963491);
         this.method5097("crash", 2146301908);
      }

   }

   public static Container method5077() {
      return (Container)(null != Class254.aFrame3020?Class254.aFrame3020:(null != Class268.aFrame3105?Class268.aFrame3105:Class393.anApplet4870));
   }

   File method5078(String var1, String var2, int var3, int var4) {
      String var5 = var3 == 0?"":"" + var3;
      Class426.aFile5371 = new File(Class466.aString5747, "jagex_cl_" + var1 + "_" + var2 + var5 + ".dat");
      String var6 = null;
      String var7 = null;
      boolean var8 = false;
      File var22;
      if(Class426.aFile5371.exists()) {
         try {
            Class431 var9 = new Class431(Class426.aFile5371, "rw", 10000L);

            RS2Buffer var10;
            int var11;
            for(var10 = new RS2Buffer((int)var9.method7298(678332451)); -543666943 * var10.position < var10.buffer.length; var10.position += var11 * 1385214721) {
               var11 = var9.method7299(var10.buffer, var10.position * -543666943, var10.buffer.length - -543666943 * var10.position, -2083846195);
               if(-1 == var11) {
                  throw new IOException();
               }
            }

            var10.position = 0;
            var11 = var10.readUnsignedByte(-700559597);
            if(var11 < 1 || var11 > 3) {
               throw new IOException("" + var11);
            }

            int var12 = 0;
            if(var11 > 1) {
               var12 = var10.readUnsignedByte(-700559597);
            }

            if(var11 <= 2) {
               var6 = var10.method13927((short)-25435);
               if(var12 == 1) {
                  var7 = var10.method13927((short)-8074);
               }
            } else {
               var6 = var10.method13817((short)-8206);
               if(var12 == 1) {
                  var7 = var10.method13817((short)-9501);
               }
            }

            var9.method7297(-700450585);
         } catch (IOException var18) {
            var18.printStackTrace();
         }

         if(var6 != null) {
            var22 = new File(var6);
            if(!var22.exists()) {
               var6 = null;
            }
         }

         if(null != var6) {
            var22 = new File(var6, "test.dat");
            if(!this.method5172(var22, true, (byte)59)) {
               var6 = null;
            }
         }
      }

      if(var6 == null && 0 == var3) {
         label99:
         for(int var19 = 0; var19 < Class252.aStringArray2985.length; ++var19) {
            for(int var21 = 0; var21 < Class225_Sub14_Sub8.aStringArray10506.length; ++var21) {
               File var23 = new File(Class225_Sub14_Sub8.aStringArray10506[var21] + Class252.aStringArray2985[var19] + File.separatorChar + var1 + File.separatorChar);
               if(var23.exists() && this.method5172(new File(var23, "test.dat"), true, (byte)59)) {
                  var6 = var23.toString();
                  var8 = true;
                  break label99;
               }
            }
         }
      }

      if(var6 == null) {
         var6 = Class466.aString5747 + File.separatorChar + "jagexcache" + var5 + File.separatorChar + var1 + File.separatorChar + var2 + File.separatorChar;
         var8 = true;
      }

      if(null != var7) {
         File var20 = new File(var7);
         var22 = new File(var6);

         try {
            File[] var24 = var20.listFiles();
            File[] var25 = var24;

            for(int var13 = 0; var13 < var25.length; ++var13) {
               File var14 = var25[var13];
               File var15 = new File(var22, var14.getName());
               boolean var16 = var14.renameTo(var15);
               if(!var16) {
                  throw new IOException();
               }
            }
         } catch (Exception var17) {
            var17.printStackTrace();
         }

         var8 = true;
      }

      if(var8) {
         this.method5080(new File(var6), (File)null, -1920599135);
      }

      return new File(var6);
   }

   public boolean method5079(File var1, int var2) {
      if(var1 == null) {
         return false;
      } else if(!var1.exists()) {
         return false;
      } else if(!var1.isDirectory()) {
         return false;
      } else if(var1.listFiles().length != 0) {
         return false;
      } else if(!this.method5172(new File(var1, "test.dat"), true, (byte)59)) {
         return false;
      } else {
         this.method5080(var1, Class97.aFile984, -1999505740);
         return true;
      }
   }

   void method5080(File var1, File var2, int var3) {
      try {
         Class431 var4 = new Class431(Class426.aFile5371, "rw", 10000L);
         RS2Buffer var5 = new RS2Buffer(500);
         var5.writeByte(3, -765864773);
         var5.writeByte(null != var2?1:0, -765864773);
         var5.method13947(var1.getPath(), 912458262);
         if(null != var2) {
            var5.method13947(var2.getPath(), -1061295856);
         }

         var4.method7296(var5.buffer, 0, -543666943 * var5.position, (byte)0);
         var4.method7297(992414484);
      } catch (IOException var6) {
         var6.printStackTrace();
      }

   }

   public void method136() {
      if(!aBool3323) {
         aLong3322 = 0L;
      }
   }

   synchronized void method5081(String var1, int var2) {
      Class268.aFrame3105 = new Frame();
      Class268.aFrame3105.setTitle(var1);
      Class268.aFrame3105.setResizable(true);
      Class268.aFrame3105.addWindowListener(this);
      Class268.aFrame3105.setBackground(Color.black);
      Class268.aFrame3105.setVisible(true);
      Class268.aFrame3105.toFront();
      Insets var3 = Class268.aFrame3105.getInsets();
      Class268.aFrame3105.setSize(var3.right + var3.left + 2059685689 * anInt3305, Class463_Sub14.anInt8016 * -854085195 + var3.top + var3.bottom);
   }

   synchronized void method5082(int var1) {
      this.method5167(1933308106);
      Container var2 = Class274.method4851(999408293);
      Class572.aCanvas7591 = new Canvas_Sub1(var2);
      this.method5083(var2, -1275899821);
   }

   void method5083(Container var1, int var2) {
      var1.setBackground(Color.black);
      var1.setLayout((LayoutManager)null);
      var1.add(Class572.aCanvas7591);
      Class572.aCanvas7591.setSize(Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
      Class572.aCanvas7591.setVisible(true);
      if(var1 == Class268.aFrame3105) {
         Insets var3 = Class268.aFrame3105.getInsets();
         Class572.aCanvas7591.setLocation(anInt3325 * 1402293235 + var3.left, -1285172503 * anInt3317 + var3.top);
      } else {
         Class572.aCanvas7591.setLocation(anInt3325 * 1402293235, -1285172503 * anInt3317);
      }

      Class572.aCanvas7591.addFocusListener(this);
      Class572.aCanvas7591.requestFocus();
      Class541.aBool7320 = true;
      aBool3324 = true;
      Class572.aCanvas7591.setFocusTraversalKeysEnabled(false);
      aBool3302 = true;
      aBool3304 = false;
      aLong3299 = Class339.method6240(1340295763) * 1527419193025848623L;
   }

   synchronized void method5084() {
      this.method5167(1596445697);
      Container var1 = Class274.method4851(1274404140);
      Class572.aCanvas7591 = new Canvas_Sub1(var1);
      this.method5083(var1, -2109746064);
   }

   final boolean method5085(int var1) {
      String var2 = Class393.anApplet4870.getDocumentBase().getHost().toLowerCase();
      if(!var2.equals("jagex.com") && !var2.endsWith(".jagex.com")) {
         if(!var2.equals("runescape.com") && !var2.endsWith(".runescape.com")) {
            if(!var2.equals("stellardawn.com") && !var2.endsWith(".stellardawn.com")) {
               if(var2.endsWith("127.0.0.1")) {
                  return true;
               } else {
                  while(var2.length() > 0 && var2.charAt(var2.length() - 1) >= 48 && var2.charAt(var2.length() - 1) <= 57) {
                     var2 = var2.substring(0, var2.length() - 1);
                  }

                  if(var2.endsWith("192.168.1.")) {
                     return true;
                  } else {
                     this.method5097("invalidhost", 1791155051);
                     return false;
                  }
               }
            } else {
               return true;
            }
         } else {
            return true;
         }
      } else {
         return true;
      }
   }

   public void destroy() {
      if(!aBool3323) {
         aLong3322 = Class339.method6240(-200929754) * 804428450548703621L;
         Class75.method1619(5000L);
         this.method5089(false, 2094061161);
      }
   }

   void method5086(int var1) {
      if(null != Class427.aString5373) {
         String var2 = Class427.aString5373.toLowerCase();
         if(var2.indexOf("sun") != -1 || var2.indexOf("apple") != -1) {
            String var3 = Class283.aString3332;
            if(var3.equals("1.1") || var3.startsWith("1.1.") || var3.equals("1.2") || var3.startsWith("1.2.") || var3.equals("1.3") || var3.startsWith("1.3.") || var3.equals("1.4") || var3.startsWith("1.4.") || var3.equals("1.5") || var3.startsWith("1.5.") || var3.equals("1.6.0")) {
               this.method5097("wrongjava", -1885565256);
               return;
            }

            if(var3.startsWith("1.6.0_")) {
               int var4;
               for(var4 = 6; var4 < var3.length() && Class115.method2283(var3.charAt(var4), -1256334734); ++var4) {
                  ;
               }

               String var5 = var3.substring(6, var4);
               if(IncommingOpcode.method5361(var5, 1590480759) && Class78.method1629(var5, -998428163) < 10) {
                  this.method5097("wrongjava", -351564415);
                  return;
               }
            }
         }
      }

      Class274.method4851(1110292018).setFocusCycleRoot(true);
      anInt3290 = ((int)(Runtime.getRuntime().maxMemory() / 1048576L) + 1) * -231668653;
      anInt3326 = Runtime.getRuntime().availableProcessors() * -1071481727;
      this.method5082(1162954862);
      this.method5093((short)-23403);
      Class256.aClass290_3033 = Class545_Sub3.method15397(1546668222);

      while(-3144615201752060083L * aLong3322 == 0L || Class339.method6240(2043532825) < aLong3322 * -3144615201752060083L) {
         anInt3309 = Class256.aClass290_3033.method5281(-6555189860274633573L * aLong3291) * 176240711;

         for(int var6 = 0; var6 < anInt3309 * 1986851191; ++var6) {
            this.method5145(2075401282);
         }

         this.method5100((byte)71);
         Class108.method2173(Class572.aCanvas7591, (byte)78);
      }

   }

   public final void method5087(WindowEvent var1) {}

   public void method141() {
      if(!aBool3323) {
         aLong3322 = Class339.method6240(1976941850) * 804428450548703621L;
         Class75.method1619(5000L);
         this.method5089(false, 834525455);
      }
   }

   static void method5088() {
      try {
         File var0 = new File(Class466.aString5747, "random.dat");
         int var2;
         if(var0.exists()) {
            aClass452_3316 = new Class452(new Class431(var0, "rw", 25L), 24, 0);
         } else {
            label30:
            for(int var1 = 0; var1 < Class252.aStringArray2985.length; ++var1) {
               for(var2 = 0; var2 < Class225_Sub14_Sub8.aStringArray10506.length; ++var2) {
                  File var3 = new File(Class225_Sub14_Sub8.aStringArray10506[var2] + Class252.aStringArray2985[var1] + File.separatorChar + "random.dat");
                  if(var3.exists()) {
                     aClass452_3316 = new Class452(new Class431(var3, "rw", 25L), 24, 0);
                     break label30;
                  }
               }
            }
         }

         if(null == aClass452_3316) {
            RandomAccessFile var5 = new RandomAccessFile(var0, "rw");
            var2 = var5.read();
            var5.seek(0L);
            var5.write(var2);
            var5.seek(0L);
            var5.close();
            aClass452_3316 = new Class452(new Class431(var0, "rw", 25L), 24, 0);
         }
      } catch (IOException var4) {
         ;
      }

   }

   final void method5089(boolean var1, int var2) {
      synchronized(this) {
         if(aBool3323) {
            return;
         }

         aBool3323 = true;
      }

      try {
         this.method5136((byte)24);
      } catch (Exception var7) {
         ;
      }

      try {
         aClass452_3312.method7559(-1530646292);

         for(int var3 = 0; var3 < -1574837983 * anInt3311; ++var3) {
            Class107.aClass452Array1041[var3].method7559(-113468424);
         }

         aClass452_3318.method7559(1200058394);
         aClass452_3316.method7559(-1095287020);
      } catch (Exception var8) {
         ;
      }

      if(this.aBool3292) {
         try {
            QueryPerformanceCounter.quit();
         } catch (Throwable var6) {
            ;
         }
      }

      Class164.method2841(true, 931377650);
      if(Class8_Sub4.method14964(-204189727)) {
         Class335.method6178(-425939735).method311((byte)16);
      }

      if(null != Class572.aCanvas7591) {
         try {
            Class572.aCanvas7591.removeFocusListener(this);
            Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
         } catch (Exception var5) {
            ;
         }
      }

      if(null != Class268.aFrame3105) {
         Class268.aFrame3105.setVisible(false);
         Class268.aFrame3105.dispose();
         Class268.aFrame3105 = null;
      }

   }

   public void method5090() {
      try {
         try {
            this.method5086(-1111651871);
         } catch (ThreadDeath var6) {
            throw var6;
         } catch (Throwable var7) {
            Class109.method2190(this.method5181(1303134032), var7, -909073344);
            this.method5097("crash", -591087012);
            this.method5089(true, 1160532520);
            return;
         }

         this.method5089(true, 1160819510);
      } finally {
         this.method5089(true, 1038432397);
      }
   }

   public void stop() {
      if(!aBool3323) {
         aLong3322 = (Class339.method6240(146041971) + 4000L) * 804428450548703621L;
      }
   }

   final void method5091(Class200 var1, String var2, String var3, int var4, int var5, int var6, int var7, boolean var8) {
      try {
         this.method5168(Class283.aClass283_3330, var8, (byte)-64);
         anInt3305 = (Class563.anInt7495 = var1.method3421(1607755686) * 241194575) * -1231329497;
         Class463_Sub14.anInt8016 = (Class440.anInt5458 = var1.method3420((short)-11062) * 1289941381) * 1019237945;
         anInt3325 = 0;
         anInt3317 = 0;
         if(Class178.method3161(-689169612) == Class283.aClass283_3331) {
            anInt3305 += -1099440622 * var1.method3418((byte)-72);
            Class463_Sub14.anInt8016 += 1456793914 * var1.method3419(-2061455950);
            this.method5081(var1.method3415(1765949077), -179242390);
         }

         RuntimeException_Sub3.anApplet10692 = Class393.anApplet4870;
         this.method5109(var2, var3, var4, var5, var6, var7, -2026013334);
      } catch (Throwable var10) {
         Class109.method2190((String)null, var10, 412650573);
         this.method5097("crash", 83716502);
      }

   }

   public void method138() {
      if(!aBool3323) {
         aLong3322 = (Class339.method6240(-1548966353) + 4000L) * 804428450548703621L;
      }
   }

   public final synchronized void paint(Graphics var1) {
      if(!aBool3323) {
         aBool3302 = true;
         if(Class339.method6240(739635197) - -169696136796569137L * aLong3299 > 1000L) {
            Rectangle var2 = var1.getClipBounds();
            if(var2 == null || var2.width >= 2059685689 * anInt3305 && var2.height >= -854085195 * Class463_Sub14.anInt8016) {
               aBool3304 = true;
            }
         }

      }
   }

   public final void focusGained(FocusEvent var1) {
      aBool3324 = true;
      aBool3302 = true;
   }

   public final void focusLost(FocusEvent var1) {
      aBool3324 = false;
   }

   public abstract void method133();

   public final void windowClosed(WindowEvent var1) {}

   public final void windowClosing(WindowEvent var1) {
      aBool3306 = true;
      this.destroy();
   }

   void method5092(File var1, File var2) {
      try {
         Class431 var3 = new Class431(Class426.aFile5371, "rw", 10000L);
         RS2Buffer var4 = new RS2Buffer(500);
         var4.writeByte(3, -765864773);
         var4.writeByte(null != var2?1:0, -765864773);
         var4.method13947(var1.getPath(), -374018948);
         if(null != var2) {
            var4.method13947(var2.getPath(), -1822212773);
         }

         var3.method7296(var4.buffer, 0, -543666943 * var4.position, (byte)0);
         var3.method7297(-561564824);
      } catch (IOException var5) {
         var5.printStackTrace();
      }

   }

   public final void windowDeiconified(WindowEvent var1) {}

   public final void windowIconified(WindowEvent var1) {}

   public void run() {
      try {
         try {
            this.method5086(-1111651871);
         } catch (ThreadDeath var6) {
            throw var6;
         } catch (Throwable var7) {
            Class109.method2190(this.method5181(588496904), var7, -2025380235);
            this.method5097("crash", 895365958);
            this.method5089(true, 796302464);
            return;
         }

         this.method5089(true, 695255961);
      } finally {
         this.method5089(true, 1632044285);
      }
   }

   public abstract void init();

   abstract void method5093(short var1);

   abstract void method5094(int var1);

   abstract void method5095(int var1);

   String method5096() {
      return null;
   }

   void method5097(String var1, int var2) {
      if(!this.aBool3298) {
         this.aBool3298 = true;
         System.out.println("error_game_" + var1);

         try {
            Class438.method7363(Class393.anApplet4870, "loggedout", (byte)-36);
         } catch (Throwable var5) {
            ;
         }

         try {
            Class393.anApplet4870.getAppletContext().showDocument(new URL(Class393.anApplet4870.getCodeBase(), "error_game_" + var1 + ".ws"), "_top");
         } catch (Exception var4) {
            ;
         }

      }
   }

   public boolean method5098(byte var1) {
      this.aBool3292 = Class335.method6178(-67697047).method310("jaclib", 2098226057);
      if(this.aBool3292) {
         try {
            QueryPerformanceCounter.init();
         } catch (Throwable var3) {
            ;
         }
      }

      return this.aBool3292;
   }

   public boolean method5099(byte var1) {
      return Class335.method6178(-1711814274).method310("jagtheora", 2098226057);
   }

   void method5100(byte var1) {
      long var2 = Class339.method6240(-645333828);
      long var4 = aLongArray3297[162887677 * anInt3294];
      aLongArray3297[anInt3294 * 162887677] = var2;
      anInt3294 = (anInt3294 * 162887677 + 1 & 31) * 1587387733;
      if(var4 != 0L && var2 > var4) {
         int var6 = (int)(var2 - var4);
         anInt3300 = 415893117 * ((32000 + (var6 >> 1)) / var6);
      }

      if((anInt3303 += -554114839) * 856815449 - 1 > 50) {
         anInt3303 -= -1935938174;
         aBool3302 = true;
         Class572.aCanvas7591.setSize(Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
         Class572.aCanvas7591.setVisible(true);
         if(Class268.aFrame3105 != null && null == Class254.aFrame3020) {
            Insets var7 = Class268.aFrame3105.getInsets();
            Class572.aCanvas7591.setLocation(anInt3325 * 1402293235 + var7.left, -1285172503 * anInt3317 + var7.top);
         } else {
            Class572.aCanvas7591.setLocation(anInt3325 * 1402293235, anInt3317 * -1285172503);
         }
      }

      this.method5095(264763565);
   }

   public void method5101() {
      try {
         try {
            this.method5086(-1111651871);
         } catch (ThreadDeath var6) {
            throw var6;
         } catch (Throwable var7) {
            Class109.method2190(this.method5181(-826176357), var7, 971210892);
            this.method5097("crash", -2112679316);
            this.method5089(true, 744144278);
            return;
         }

         this.method5089(true, 2136293258);
      } finally {
         this.method5089(true, 2117585300);
      }
   }

   abstract void method5102();

   public void method5103() {
      try {
         try {
            this.method5086(-1111651871);
         } catch (ThreadDeath var6) {
            throw var6;
         } catch (Throwable var7) {
            Class109.method2190(this.method5181(1514257769), var7, 494628995);
            this.method5097("crash", -552954481);
            this.method5089(true, 1367497143);
            return;
         }

         this.method5089(true, 2008020117);
      } finally {
         this.method5089(true, 1014871545);
      }
   }

   abstract void method5104();

   abstract void method5105();

   public static void method5106(RS2Buffer var0) {
      byte[] var1 = new byte[24];

      try {
         aClass452_3316.method7560(0L);
         aClass452_3316.method7567(var1, (short)14238);

         int var2;
         for(var2 = 0; var2 < 24 && 0 == var1[var2]; ++var2) {
            ;
         }

         if(var2 >= 24) {
            throw new IOException();
         }
      } catch (Exception var4) {
         for(int var3 = 0; var3 < 24; ++var3) {
            var1[var3] = -1;
         }
      }

      var0.method13714(var1, 0, 24, -1140879833);
   }

   abstract void method5107();

   abstract void method5108();

   final void method5109(String var1, String var2, int var3, int var4, int var5, int var6, int var7) throws Exception {
      anInt3311 = var4 * -700783903;
      Class566.anInt7510 = var3 * -834325245;
      RuntimeException_Sub3.anInt10693 = var5 * 200730889;
      Class30.anInt368 = 1804266531 * var6;
      Class427.aString5373 = "Unknown";
      Class283.aString3332 = "1.1";

      try {
         Class427.aString5373 = System.getProperty("java.vendor");
         Class283.aString3332 = System.getProperty("java.version");
      } catch (Exception var20) {
         ;
      }

      try {
         Class338.aString4363 = System.getProperty("os.name");
      } catch (Exception var19) {
         Class338.aString4363 = "Unknown";
      }

      Class65.aString628 = Class338.aString4363.toLowerCase();

      try {
         Class225_Sub36_Sub1.aString10053 = System.getProperty("os.arch").toLowerCase();
      } catch (Exception var18) {
         Class225_Sub36_Sub1.aString10053 = "";
      }

      try {
         Class413.aString5101 = System.getProperty("os.version").toLowerCase();
      } catch (Exception var17) {
         Class413.aString5101 = "";
      }

      try {
         Class466.aString5747 = System.getProperty("user.home");
         if(Class466.aString5747 != null) {
            Class466.aString5747 = Class466.aString5747 + "/";
         }
      } catch (Exception var16) {
         ;
      }

      try {
         if(Class65.aString628.startsWith("win")) {
            if(Class466.aString5747 == null) {
               Class466.aString5747 = System.getenv("USERPROFILE");
            }
         } else if(Class466.aString5747 == null) {
            Class466.aString5747 = System.getenv("HOME");
         }

         if(Class466.aString5747 != null) {
            Class466.aString5747 = Class466.aString5747 + "/";
         }
      } catch (Exception var15) {
         ;
      }

      if(null == Class466.aString5747) {
         Class466.aString5747 = "~/";
      }

      try {
         Class67.anEventQueue640 = Toolkit.getDefaultToolkit().getSystemEventQueue();
      } catch (Throwable var14) {
         ;
      }

      Class225_Sub14_Sub8.aStringArray10506 = new String[]{"c:/rscache/", "/rscache/", "c:/windows/", "c:/winnt/", "c:/", Class466.aString5747, "/tmp/", ""};
      Class252.aStringArray2985 = new String[]{".jagex_cache_" + Class566.anInt7510 * -1906909781, ".file_store_" + -1906909781 * Class566.anInt7510};
      int var8 = 0;

      int var11;
      label125:
      while(var8 < 4) {
         Class97.aFile984 = this.method5078(var1, var2, var8, 297717515);
         if(!Class97.aFile984.exists()) {
            Class97.aFile984.mkdirs();
         }

         File[] var9 = Class97.aFile984.listFiles();
         if(null == var9) {
            break;
         }

         File[] var10 = var9;
         var11 = 0;

         while(true) {
            if(var11 >= var10.length) {
               break label125;
            }

            File var12 = var10[var11];
            if(!this.method5172(var12, false, (byte)59)) {
               ++var8;
               break;
            }

            ++var11;
         }
      }

      Class37.method1051(Class97.aFile984, (byte)-51);
      Class174.method3053(-521579833);
      aClass452_3312 = new Class452(new Class431(Class496.method8302("main_file_cache.dat2", (byte)16), "rw", 1048576000L), 5200, 0);
      aClass452_3318 = new Class452(new Class431(Class496.method8302("main_file_cache.idx255", (byte)16), "rw", 1048576L), 6000, 0);
      Class107.aClass452Array1041 = new Class452[-1574837983 * anInt3311];

      for(var8 = 0; var8 < -1574837983 * anInt3311; ++var8) {
         Class107.aClass452Array1041[var8] = new Class452(new Class431(Class496.method8302("main_file_cache.idx" + var8, (byte)16), "rw", 1048576L), 6000, 0);
      }

      try {
         Class127.aClass466_1542 = new Class466();
      } catch (Exception var13) {
         Class446.aBool5570 = false;
      }

      Class339.aClass287_4368 = new Class287();
      ThreadGroup var21 = Thread.currentThread().getThreadGroup();

      for(ThreadGroup var22 = var21.getParent(); var22 != null; var22 = var22.getParent()) {
         var21 = var22;
      }

      Thread[] var24 = new Thread[1000];
      var21.enumerate(var24);

      for(var11 = 0; var11 < var24.length; ++var11) {
         if(var24[var11] != null && var24[var11].getName().startsWith("AWT")) {
            var24[var11].setPriority(1);
         }
      }

      Thread var23 = new Thread(this);
      var23.setDaemon(true);
      var23.start();
      var23.setPriority(1);
   }

   void method5110(Container var1) {
      var1.setBackground(Color.black);
      var1.setLayout((LayoutManager)null);
      var1.add(Class572.aCanvas7591);
      Class572.aCanvas7591.setSize(Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
      Class572.aCanvas7591.setVisible(true);
      if(var1 == Class268.aFrame3105) {
         Insets var2 = Class268.aFrame3105.getInsets();
         Class572.aCanvas7591.setLocation(anInt3325 * 1402293235 + var2.left, -1285172503 * anInt3317 + var2.top);
      } else {
         Class572.aCanvas7591.setLocation(anInt3325 * 1402293235, -1285172503 * anInt3317);
      }

      Class572.aCanvas7591.addFocusListener(this);
      Class572.aCanvas7591.requestFocus();
      Class541.aBool7320 = true;
      aBool3324 = true;
      Class572.aCanvas7591.setFocusTraversalKeysEnabled(false);
      aBool3302 = true;
      aBool3304 = false;
      aLong3299 = Class339.method6240(25284771) * 1527419193025848623L;
   }

   abstract void method5111();

   String method5112() {
      return null;
   }

   String method5113() {
      return null;
   }

   public void method135() {
      if(!aBool3323) {
         aLong3322 = (Class339.method6240(2072486713) + 4000L) * 804428450548703621L;
      }
   }

   String method5114() {
      return null;
   }

   public void method139(Applet var1) {
      Class393.anApplet4870 = var1;
   }

   public boolean method5115() {
      return Class335.method6178(1730506749).method310("jagtheora", 2098226057);
   }

   final void method5116(Class200 var1, String var2, String var3, int var4, int var5, int var6, int var7, boolean var8) {
      try {
         this.method5168(Class283.aClass283_3330, var8, (byte)-87);
         anInt3305 = (Class563.anInt7495 = var1.method3421(1607755686) * 241194575) * -1231329497;
         Class463_Sub14.anInt8016 = (Class440.anInt5458 = var1.method3420((short)-8147) * 1289941381) * 1019237945;
         anInt3325 = 0;
         anInt3317 = 0;
         if(Class178.method3161(-401617906) == Class283.aClass283_3331) {
            anInt3305 += -1099440622 * var1.method3418((byte)50);
            Class463_Sub14.anInt8016 += 1456793914 * var1.method3419(-1766528253);
            this.method5081(var1.method3415(1856282831), -437847717);
         }

         RuntimeException_Sub3.anApplet10692 = Class393.anApplet4870;
         this.method5109(var2, var3, var4, var5, var6, var7, 1658858592);
      } catch (Throwable var10) {
         Class109.method2190((String)null, var10, -532423866);
         this.method5097("crash", 843690941);
      }

   }

   final void method5117(Class200 var1, String var2, String var3, int var4, int var5, int var6, int var7, boolean var8) {
      try {
         this.method5168(Class283.aClass283_3330, var8, (byte)-86);
         anInt3305 = (Class563.anInt7495 = var1.method3421(1607755686) * 241194575) * -1231329497;
         Class463_Sub14.anInt8016 = (Class440.anInt5458 = var1.method3420((short)-7745) * 1289941381) * 1019237945;
         anInt3325 = 0;
         anInt3317 = 0;
         if(Class178.method3161(-1630303881) == Class283.aClass283_3331) {
            anInt3305 += -1099440622 * var1.method3418((byte)-12);
            Class463_Sub14.anInt8016 += 1456793914 * var1.method3419(-1639483641);
            this.method5081(var1.method3415(1992461258), 1624707691);
         }

         RuntimeException_Sub3.anApplet10692 = Class393.anApplet4870;
         this.method5109(var2, var3, var4, var5, var6, var7, 499485288);
      } catch (Throwable var10) {
         Class109.method2190((String)null, var10, 2045127266);
         this.method5097("crash", -609911701);
      }

   }

   File method5118(String var1, String var2, int var3) {
      String var4 = var3 == 0?"":"" + var3;
      Class426.aFile5371 = new File(Class466.aString5747, "jagex_cl_" + var1 + "_" + var2 + var4 + ".dat");
      String var5 = null;
      String var6 = null;
      boolean var7 = false;
      File var19;
      if(Class426.aFile5371.exists()) {
         try {
            Class431 var8 = new Class431(Class426.aFile5371, "rw", 10000L);

            RS2Buffer var9;
            int var10;
            for(var9 = new RS2Buffer((int)var8.method7298(1568359960)); -543666943 * var9.position < var9.buffer.length; var9.position += var10 * 1385214721) {
               var10 = var8.method7299(var9.buffer, var9.position * -543666943, var9.buffer.length - -543666943 * var9.position, -2143718217);
               if(-1 == var10) {
                  throw new IOException();
               }
            }

            var9.position = 0;
            var10 = var9.readUnsignedByte(-700559597);
            if(var10 < 1 || var10 > 3) {
               throw new IOException("" + var10);
            }

            int var11 = 0;
            if(var10 > 1) {
               var11 = var9.readUnsignedByte(-700559597);
            }

            if(var10 <= 2) {
               var5 = var9.method13927((short)-1927);
               if(var11 == 1) {
                  var6 = var9.method13927((short)-25158);
               }
            } else {
               var5 = var9.method13817((short)-15640);
               if(var11 == 1) {
                  var6 = var9.method13817((short)-30044);
               }
            }

            var8.method7297(-311361670);
         } catch (IOException var17) {
            var17.printStackTrace();
         }

         if(var5 != null) {
            var19 = new File(var5);
            if(!var19.exists()) {
               var5 = null;
            }
         }

         if(null != var5) {
            var19 = new File(var5, "test.dat");
            if(!this.method5172(var19, true, (byte)59)) {
               var5 = null;
            }
         }
      }

      if(var5 == null && 0 == var3) {
         label99:
         for(int var18 = 0; var18 < Class252.aStringArray2985.length; ++var18) {
            for(int var21 = 0; var21 < Class225_Sub14_Sub8.aStringArray10506.length; ++var21) {
               File var23 = new File(Class225_Sub14_Sub8.aStringArray10506[var21] + Class252.aStringArray2985[var18] + File.separatorChar + var1 + File.separatorChar);
               if(var23.exists() && this.method5172(new File(var23, "test.dat"), true, (byte)59)) {
                  var5 = var23.toString();
                  var7 = true;
                  break label99;
               }
            }
         }
      }

      if(var5 == null) {
         var5 = Class466.aString5747 + File.separatorChar + "jagexcache" + var4 + File.separatorChar + var1 + File.separatorChar + var2 + File.separatorChar;
         var7 = true;
      }

      if(null != var6) {
         File var20 = new File(var6);
         var19 = new File(var5);

         try {
            File[] var22 = var20.listFiles();
            File[] var24 = var22;

            for(int var12 = 0; var12 < var24.length; ++var12) {
               File var13 = var24[var12];
               File var14 = new File(var19, var13.getName());
               boolean var15 = var13.renameTo(var14);
               if(!var15) {
                  throw new IOException();
               }
            }
         } catch (Exception var16) {
            var16.printStackTrace();
         }

         var7 = true;
      }

      if(var7) {
         this.method5080(new File(var5), (File)null, -1845499369);
      }

      return new File(var5);
   }

   File method5119(String var1, String var2, int var3) {
      String var4 = var3 == 0?"":"" + var3;
      Class426.aFile5371 = new File(Class466.aString5747, "jagex_cl_" + var1 + "_" + var2 + var4 + ".dat");
      String var5 = null;
      String var6 = null;
      boolean var7 = false;
      File var19;
      if(Class426.aFile5371.exists()) {
         try {
            Class431 var8 = new Class431(Class426.aFile5371, "rw", 10000L);

            RS2Buffer var9;
            int var10;
            for(var9 = new RS2Buffer((int)var8.method7298(827263124)); -543666943 * var9.position < var9.buffer.length; var9.position += var10 * 1385214721) {
               var10 = var8.method7299(var9.buffer, var9.position * -543666943, var9.buffer.length - -543666943 * var9.position, -2111350418);
               if(-1 == var10) {
                  throw new IOException();
               }
            }

            var9.position = 0;
            var10 = var9.readUnsignedByte(-700559597);
            if(var10 < 1 || var10 > 3) {
               throw new IOException("" + var10);
            }

            int var11 = 0;
            if(var10 > 1) {
               var11 = var9.readUnsignedByte(-700559597);
            }

            if(var10 <= 2) {
               var5 = var9.method13927((short)-31062);
               if(var11 == 1) {
                  var6 = var9.method13927((short)-27185);
               }
            } else {
               var5 = var9.method13817((short)-5699);
               if(var11 == 1) {
                  var6 = var9.method13817((short)-18145);
               }
            }

            var8.method7297(-150870354);
         } catch (IOException var17) {
            var17.printStackTrace();
         }

         if(var5 != null) {
            var19 = new File(var5);
            if(!var19.exists()) {
               var5 = null;
            }
         }

         if(null != var5) {
            var19 = new File(var5, "test.dat");
            if(!this.method5172(var19, true, (byte)59)) {
               var5 = null;
            }
         }
      }

      if(var5 == null && 0 == var3) {
         label99:
         for(int var18 = 0; var18 < Class252.aStringArray2985.length; ++var18) {
            for(int var21 = 0; var21 < Class225_Sub14_Sub8.aStringArray10506.length; ++var21) {
               File var23 = new File(Class225_Sub14_Sub8.aStringArray10506[var21] + Class252.aStringArray2985[var18] + File.separatorChar + var1 + File.separatorChar);
               if(var23.exists() && this.method5172(new File(var23, "test.dat"), true, (byte)59)) {
                  var5 = var23.toString();
                  var7 = true;
                  break label99;
               }
            }
         }
      }

      if(var5 == null) {
         var5 = Class466.aString5747 + File.separatorChar + "jagexcache" + var4 + File.separatorChar + var1 + File.separatorChar + var2 + File.separatorChar;
         var7 = true;
      }

      if(null != var6) {
         File var20 = new File(var6);
         var19 = new File(var5);

         try {
            File[] var22 = var20.listFiles();
            File[] var24 = var22;

            for(int var12 = 0; var12 < var24.length; ++var12) {
               File var13 = var24[var12];
               File var14 = new File(var19, var13.getName());
               boolean var15 = var13.renameTo(var14);
               if(!var15) {
                  throw new IOException();
               }
            }
         } catch (Exception var16) {
            var16.printStackTrace();
         }

         var7 = true;
      }

      if(var7) {
         this.method5080(new File(var5), (File)null, -1754863373);
      }

      return new File(var5);
   }

   public boolean method5120(File var1) {
      if(var1 == null) {
         return false;
      } else if(!var1.exists()) {
         return false;
      } else if(!var1.isDirectory()) {
         return false;
      } else if(var1.listFiles().length != 0) {
         return false;
      } else if(!this.method5172(new File(var1, "test.dat"), true, (byte)59)) {
         return false;
      } else {
         this.method5080(var1, Class97.aFile984, -1582790401);
         return true;
      }
   }

   public boolean method5121(File var1) {
      if(var1 == null) {
         return false;
      } else if(!var1.exists()) {
         return false;
      } else if(!var1.isDirectory()) {
         return false;
      } else if(var1.listFiles().length != 0) {
         return false;
      } else if(!this.method5172(new File(var1, "test.dat"), true, (byte)59)) {
         return false;
      } else {
         this.method5080(var1, Class97.aFile984, -1997767370);
         return true;
      }
   }

   public boolean method5122(File var1) {
      if(var1 == null) {
         return false;
      } else if(!var1.exists()) {
         return false;
      } else if(!var1.isDirectory()) {
         return false;
      } else if(var1.listFiles().length != 0) {
         return false;
      } else if(!this.method5172(new File(var1, "test.dat"), true, (byte)59)) {
         return false;
      } else {
         this.method5080(var1, Class97.aFile984, -1920475705);
         return true;
      }
   }

   public static final void method5123() {
      Class117.anImage1191 = null;
      Class299.aFont3669 = null;
   }

   public final void update(Graphics var1) {
      this.paint(var1);
   }

   public static File method5124() {
      return Class97.aFile984;
   }

   public static File method5125() {
      return Class97.aFile984;
   }

   public static File method5126() {
      return Class97.aFile984;
   }

   public static Class431 method5127(String var0, String var1, boolean var2) {
      File var3 = new File(Class97.aFile984, "preferences" + var0 + ".dat");
      if(var3.exists()) {
         try {
            Class431 var10 = new Class431(var3, "rw", 10000L);
            return var10;
         } catch (IOException var9) {
            ;
         }
      }

      String var4 = "";
      if(-1906909781 * Class566.anInt7510 == 33) {
         var4 = "_rc";
      } else if(-1906909781 * Class566.anInt7510 == 34) {
         var4 = "_wip";
      }

      File var5 = new File(Class466.aString5747, "jagex_" + var1 + "_preferences" + var0 + var4 + ".dat");
      Class431 var6;
      if(!var2 && var5.exists()) {
         try {
            var6 = new Class431(var5, "rw", 10000L);
            return var6;
         } catch (IOException var8) {
            ;
         }
      }

      try {
         var6 = new Class431(var3, "rw", 10000L);
         return var6;
      } catch (IOException var7) {
         throw new RuntimeException();
      }
   }

   public static Class431 method5128(String var0, String var1, boolean var2) {
      File var3 = new File(Class97.aFile984, "preferences" + var0 + ".dat");
      if(var3.exists()) {
         try {
            Class431 var10 = new Class431(var3, "rw", 10000L);
            return var10;
         } catch (IOException var9) {
            ;
         }
      }

      String var4 = "";
      if(-1906909781 * Class566.anInt7510 == 33) {
         var4 = "_rc";
      } else if(-1906909781 * Class566.anInt7510 == 34) {
         var4 = "_wip";
      }

      File var5 = new File(Class466.aString5747, "jagex_" + var1 + "_preferences" + var0 + var4 + ".dat");
      Class431 var6;
      if(!var2 && var5.exists()) {
         try {
            var6 = new Class431(var5, "rw", 10000L);
            return var6;
         } catch (IOException var8) {
            ;
         }
      }

      try {
         var6 = new Class431(var3, "rw", 10000L);
         return var6;
      } catch (IOException var7) {
         throw new RuntimeException();
      }
   }

   public void method146() {
      if(!aBool3323) {
         aLong3322 = 0L;
      }
   }

   public static Container method5129() {
      return (Container)(null != Class254.aFrame3020?Class254.aFrame3020:(null != Class268.aFrame3105?Class268.aFrame3105:Class393.anApplet4870));
   }

   synchronized void method5130(String var1) {
      Class268.aFrame3105 = new Frame();
      Class268.aFrame3105.setTitle(var1);
      Class268.aFrame3105.setResizable(true);
      Class268.aFrame3105.addWindowListener(this);
      Class268.aFrame3105.setBackground(Color.black);
      Class268.aFrame3105.setVisible(true);
      Class268.aFrame3105.toFront();
      Insets var2 = Class268.aFrame3105.getInsets();
      Class268.aFrame3105.setSize(var2.right + var2.left + 2059685689 * anInt3305, Class463_Sub14.anInt8016 * -854085195 + var2.top + var2.bottom);
   }

   public static void method5131(RS2Buffer var0) {
      byte[] var1 = new byte[24];

      try {
         aClass452_3316.method7560(0L);
         aClass452_3316.method7567(var1, (short)-24259);

         int var2;
         for(var2 = 0; var2 < 24 && 0 == var1[var2]; ++var2) {
            ;
         }

         if(var2 >= 24) {
            throw new IOException();
         }
      } catch (Exception var4) {
         for(int var3 = 0; var3 < 24; ++var3) {
            var1[var3] = -1;
         }
      }

      var0.method13714(var1, 0, 24, -904571291);
   }

   static void method5132(RS2Buffer var0, int var1) {
      if(null != aClass452_3316) {
         try {
            aClass452_3316.method7560(0L);
            aClass452_3316.method7564(var0.buffer, var1, 24, 1553267636);
         } catch (Exception var3) {
            ;
         }
      }

   }

   public final void method5133(WindowEvent var1) {}

   synchronized void method5134() {
      this.method5167(590689912);
      Container var1 = Class274.method4851(1539912843);
      Class572.aCanvas7591 = new Canvas_Sub1(var1);
      this.method5083(var1, -1685646900);
   }

   synchronized void method5135() {
      this.method5167(842394858);
      Container var1 = Class274.method4851(1520098273);
      Class572.aCanvas7591 = new Canvas_Sub1(var1);
      this.method5083(var1, -934613254);
   }

   abstract void method5136(byte var1);

   public static Container method5137() {
      return (Container)(null != Class254.aFrame3020?Class254.aFrame3020:(null != Class268.aFrame3105?Class268.aFrame3105:Class393.anApplet4870));
   }

   public static void method5138(RS2Buffer var0) {
      byte[] var1 = new byte[24];

      try {
         aClass452_3316.method7560(0L);
         aClass452_3316.method7567(var1, (short)-8152);

         int var2;
         for(var2 = 0; var2 < 24 && 0 == var1[var2]; ++var2) {
            ;
         }

         if(var2 >= 24) {
            throw new IOException();
         }
      } catch (Exception var4) {
         for(int var3 = 0; var3 < 24; ++var3) {
            var1[var3] = -1;
         }
      }

      var0.method13714(var1, 0, 24, -632832573);
   }

   void method5139() {
      if(Class572.aCanvas7591 != null) {
         Class572.aCanvas7591.removeFocusListener(this);
         Class572.aCanvas7591.getParent().setBackground(Color.black);
         Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
      }

   }

   void method5140(String var1) {
      if(!this.aBool3298) {
         this.aBool3298 = true;
         System.out.println("error_game_" + var1);

         try {
            Class438.method7363(Class393.anApplet4870, "loggedout", (byte)-36);
         } catch (Throwable var4) {
            ;
         }

         try {
            Class393.anApplet4870.getAppletContext().showDocument(new URL(Class393.anApplet4870.getCodeBase(), "error_game_" + var1 + ".ws"), "_top");
         } catch (Exception var3) {
            ;
         }

      }
   }

   void method5141(Container var1) {
      var1.setBackground(Color.black);
      var1.setLayout((LayoutManager)null);
      var1.add(Class572.aCanvas7591);
      Class572.aCanvas7591.setSize(Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
      Class572.aCanvas7591.setVisible(true);
      if(var1 == Class268.aFrame3105) {
         Insets var2 = Class268.aFrame3105.getInsets();
         Class572.aCanvas7591.setLocation(anInt3325 * 1402293235 + var2.left, -1285172503 * anInt3317 + var2.top);
      } else {
         Class572.aCanvas7591.setLocation(anInt3325 * 1402293235, -1285172503 * anInt3317);
      }

      Class572.aCanvas7591.addFocusListener(this);
      Class572.aCanvas7591.requestFocus();
      Class541.aBool7320 = true;
      aBool3324 = true;
      Class572.aCanvas7591.setFocusTraversalKeysEnabled(false);
      aBool3302 = true;
      aBool3304 = false;
      aLong3299 = Class339.method6240(9014315) * 1527419193025848623L;
   }

   void method5142() {
      if(Class572.aCanvas7591 != null) {
         Class572.aCanvas7591.removeFocusListener(this);
         Class572.aCanvas7591.getParent().setBackground(Color.black);
         Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
      }

   }

   final void method5143(boolean var1) {
      synchronized(this) {
         if(aBool3323) {
            return;
         }

         aBool3323 = true;
      }

      try {
         this.method5136((byte)106);
      } catch (Exception var6) {
         ;
      }

      try {
         aClass452_3312.method7559(-412228726);

         for(int var2 = 0; var2 < -1574837983 * anInt3311; ++var2) {
            Class107.aClass452Array1041[var2].method7559(1577510135);
         }

         aClass452_3318.method7559(-1836301769);
         aClass452_3316.method7559(-961233761);
      } catch (Exception var7) {
         ;
      }

      if(this.aBool3292) {
         try {
            QueryPerformanceCounter.quit();
         } catch (Throwable var5) {
            ;
         }
      }

      Class164.method2841(true, -2071011507);
      if(Class8_Sub4.method14964(-204189727)) {
         Class335.method6178(558091364).method311((byte)16);
      }

      if(null != Class572.aCanvas7591) {
         try {
            Class572.aCanvas7591.removeFocusListener(this);
            Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
         } catch (Exception var4) {
            ;
         }
      }

      if(null != Class268.aFrame3105) {
         Class268.aFrame3105.setVisible(false);
         Class268.aFrame3105.dispose();
         Class268.aFrame3105 = null;
      }

   }

   void method5144() {
      if(Class572.aCanvas7591 != null) {
         Class572.aCanvas7591.removeFocusListener(this);
         Class572.aCanvas7591.getParent().setBackground(Color.black);
         Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
      }

   }

   void method5145(int var1) {
      long var2 = Class339.method6240(-1143395089);
      long var4 = aLongArray3296[-1553395149 * anInt3327];
      aLongArray3296[anInt3327 * -1553395149] = var2;
      anInt3327 = (1 + -1553395149 * anInt3327 & 31) * 67123451;
      if(0L != var4 && var2 > var4) {
         ;
      }

      synchronized(this) {
         Class541.aBool7320 = aBool3324;
      }

      this.method5094(961358561);
   }

   public final void method5146(FocusEvent var1) {
      aBool3324 = false;
   }

   void method5147() {
      if(null != Class427.aString5373) {
         String var1 = Class427.aString5373.toLowerCase();
         if(var1.indexOf("sun") != -1 || var1.indexOf("apple") != -1) {
            String var2 = Class283.aString3332;
            if(var2.equals("1.1") || var2.startsWith("1.1.") || var2.equals("1.2") || var2.startsWith("1.2.") || var2.equals("1.3") || var2.startsWith("1.3.") || var2.equals("1.4") || var2.startsWith("1.4.") || var2.equals("1.5") || var2.startsWith("1.5.") || var2.equals("1.6.0")) {
               this.method5097("wrongjava", -1093035644);
               return;
            }

            if(var2.startsWith("1.6.0_")) {
               int var3;
               for(var3 = 6; var3 < var2.length() && Class115.method2283(var2.charAt(var3), -1696852708); ++var3) {
                  ;
               }

               String var4 = var2.substring(6, var3);
               if(IncommingOpcode.method5361(var4, 1620486830) && Class78.method1629(var4, -987948287) < 10) {
                  this.method5097("wrongjava", -1015168666);
                  return;
               }
            }
         }
      }

      Class274.method4851(1762679741).setFocusCycleRoot(true);
      anInt3290 = ((int)(Runtime.getRuntime().maxMemory() / 1048576L) + 1) * -231668653;
      anInt3326 = Runtime.getRuntime().availableProcessors() * -1071481727;
      this.method5082(1162954862);
      this.method5093((short)-10760);
      Class256.aClass290_3033 = Class545_Sub3.method15397(1398983187);

      while(-3144615201752060083L * aLong3322 == 0L || Class339.method6240(1230077557) < aLong3322 * -3144615201752060083L) {
         anInt3309 = Class256.aClass290_3033.method5281(-6555189860274633573L * aLong3291) * 176240711;

         for(int var5 = 0; var5 < anInt3309 * 1986851191; ++var5) {
            this.method5145(2075401282);
         }

         this.method5100((byte)70);
         Class108.method2173(Class572.aCanvas7591, (byte)-11);
      }

   }

   void method5148() {
      long var1 = Class339.method6240(-979114494);
      long var3 = aLongArray3296[-1553395149 * anInt3327];
      aLongArray3296[anInt3327 * -1553395149] = var1;
      anInt3327 = (1 + -1553395149 * anInt3327 & 31) * 67123451;
      if(0L != var3 && var1 > var3) {
         ;
      }

      synchronized(this) {
         Class541.aBool7320 = aBool3324;
      }

      this.method5094(961358561);
   }

   public final void windowActivated(WindowEvent var1) {}

   final void method5149(boolean var1) {
      synchronized(this) {
         if(aBool3323) {
            return;
         }

         aBool3323 = true;
      }

      try {
         this.method5136((byte)25);
      } catch (Exception var6) {
         ;
      }

      try {
         aClass452_3312.method7559(1332485260);

         for(int var2 = 0; var2 < -1574837983 * anInt3311; ++var2) {
            Class107.aClass452Array1041[var2].method7559(-183994824);
         }

         aClass452_3318.method7559(4165574);
         aClass452_3316.method7559(-592573808);
      } catch (Exception var7) {
         ;
      }

      if(this.aBool3292) {
         try {
            QueryPerformanceCounter.quit();
         } catch (Throwable var5) {
            ;
         }
      }

      Class164.method2841(true, -358854879);
      if(Class8_Sub4.method14964(-204189727)) {
         Class335.method6178(833472749).method311((byte)16);
      }

      if(null != Class572.aCanvas7591) {
         try {
            Class572.aCanvas7591.removeFocusListener(this);
            Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
         } catch (Exception var4) {
            ;
         }
      }

      if(null != Class268.aFrame3105) {
         Class268.aFrame3105.setVisible(false);
         Class268.aFrame3105.dispose();
         Class268.aFrame3105 = null;
      }

   }

   public final void windowOpened(WindowEvent var1) {}

   void method5150(Class283 var1, boolean var2) {
      if(var1 == null) {
         throw new NullPointerException();
      } else if(var1 != Class283.aClass283_3330 && var1 != Class283.aClass283_3329) {
         throw new IllegalStateException();
      } else {
         aClass283_3321 = var1;
         if(aClass283_3321 != Class283.aClass283_3329) {
            if(var2) {
               aClass283_3321 = Class283.aClass283_3331;
            }

         }
      }
   }

   final void method5151(boolean var1) {
      synchronized(this) {
         if(aBool3323) {
            return;
         }

         aBool3323 = true;
      }

      try {
         this.method5136((byte)26);
      } catch (Exception var6) {
         ;
      }

      try {
         aClass452_3312.method7559(1851184505);

         for(int var2 = 0; var2 < -1574837983 * anInt3311; ++var2) {
            Class107.aClass452Array1041[var2].method7559(733678594);
         }

         aClass452_3318.method7559(1273970667);
         aClass452_3316.method7559(-588813656);
      } catch (Exception var7) {
         ;
      }

      if(this.aBool3292) {
         try {
            QueryPerformanceCounter.quit();
         } catch (Throwable var5) {
            ;
         }
      }

      Class164.method2841(true, -226650096);
      if(Class8_Sub4.method14964(-204189727)) {
         Class335.method6178(1770186745).method311((byte)16);
      }

      if(null != Class572.aCanvas7591) {
         try {
            Class572.aCanvas7591.removeFocusListener(this);
            Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
         } catch (Exception var4) {
            ;
         }
      }

      if(null != Class268.aFrame3105) {
         Class268.aFrame3105.setVisible(false);
         Class268.aFrame3105.dispose();
         Class268.aFrame3105 = null;
      }

   }

   final void method5152(boolean var1) {
      synchronized(this) {
         if(aBool3323) {
            return;
         }

         aBool3323 = true;
      }

      try {
         this.method5136((byte)91);
      } catch (Exception var6) {
         ;
      }

      try {
         aClass452_3312.method7559(-301815271);

         for(int var2 = 0; var2 < -1574837983 * anInt3311; ++var2) {
            Class107.aClass452Array1041[var2].method7559(-2037915363);
         }

         aClass452_3318.method7559(1384310986);
         aClass452_3316.method7559(668420471);
      } catch (Exception var7) {
         ;
      }

      if(this.aBool3292) {
         try {
            QueryPerformanceCounter.quit();
         } catch (Throwable var5) {
            ;
         }
      }

      Class164.method2841(true, 569152410);
      if(Class8_Sub4.method14964(-204189727)) {
         Class335.method6178(483764887).method311((byte)16);
      }

      if(null != Class572.aCanvas7591) {
         try {
            Class572.aCanvas7591.removeFocusListener(this);
            Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
         } catch (Exception var4) {
            ;
         }
      }

      if(null != Class268.aFrame3105) {
         Class268.aFrame3105.setVisible(false);
         Class268.aFrame3105.dispose();
         Class268.aFrame3105 = null;
      }

   }

   void method5153() {
      long var1 = Class339.method6240(235909059);
      long var3 = aLongArray3297[162887677 * anInt3294];
      aLongArray3297[anInt3294 * 162887677] = var1;
      anInt3294 = (anInt3294 * 162887677 + 1 & 31) * 1587387733;
      if(var3 != 0L && var1 > var3) {
         int var5 = (int)(var1 - var3);
         anInt3300 = 415893117 * ((32000 + (var5 >> 1)) / var5);
      }

      if((anInt3303 += -554114839) * 856815449 - 1 > 50) {
         anInt3303 -= -1935938174;
         aBool3302 = true;
         Class572.aCanvas7591.setSize(Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
         Class572.aCanvas7591.setVisible(true);
         if(Class268.aFrame3105 != null && null == Class254.aFrame3020) {
            Insets var6 = Class268.aFrame3105.getInsets();
            Class572.aCanvas7591.setLocation(anInt3325 * 1402293235 + var6.left, -1285172503 * anInt3317 + var6.top);
         } else {
            Class572.aCanvas7591.setLocation(anInt3325 * 1402293235, anInt3317 * -1285172503);
         }
      }

      this.method5095(190644879);
   }

   void method5154() {
      long var1 = Class339.method6240(797631470);
      long var3 = aLongArray3297[162887677 * anInt3294];
      aLongArray3297[anInt3294 * 162887677] = var1;
      anInt3294 = (anInt3294 * 162887677 + 1 & 31) * 1587387733;
      if(var3 != 0L && var1 > var3) {
         int var5 = (int)(var1 - var3);
         anInt3300 = 415893117 * ((32000 + (var5 >> 1)) / var5);
      }

      if((anInt3303 += -554114839) * 856815449 - 1 > 50) {
         anInt3303 -= -1935938174;
         aBool3302 = true;
         Class572.aCanvas7591.setSize(Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
         Class572.aCanvas7591.setVisible(true);
         if(Class268.aFrame3105 != null && null == Class254.aFrame3020) {
            Insets var6 = Class268.aFrame3105.getInsets();
            Class572.aCanvas7591.setLocation(anInt3325 * 1402293235 + var6.left, -1285172503 * anInt3317 + var6.top);
         } else {
            Class572.aCanvas7591.setLocation(anInt3325 * 1402293235, anInt3317 * -1285172503);
         }
      }

      this.method5095(-282382862);
   }

   public static final int method5155() {
      return (int)(1000000000L / (-6555189860274633573L * aLong3291));
   }

   public static final int method5156() {
      return (int)(1000000000L / (-6555189860274633573L * aLong3291));
   }

   public static final int method5157() {
      return (int)(1000000000L / (-6555189860274633573L * aLong3291));
   }

   abstract void method5158();

   public static final void method5159() {
      Class256.aClass290_3033.method5282((byte)-28);

      int var0;
      for(var0 = 0; var0 < 32; ++var0) {
         aLongArray3297[var0] = 0L;
      }

      for(var0 = 0; var0 < 32; ++var0) {
         aLongArray3296[var0] = 0L;
      }

      anInt3309 = 0;
   }

   static long method5160() {
      return Class256.aClass290_3033.method5285(566422772);
   }

   static long method5161() {
      return Class256.aClass290_3033.method5285(566422772);
   }

   public final void method5162(WindowEvent var1) {}

   public void method134() {
      if(!aBool3323) {
         aLong3322 = 0L;
      }
   }

   void method5163(Class283 var1, boolean var2) {
      if(var1 == null) {
         throw new NullPointerException();
      } else if(var1 != Class283.aClass283_3330 && var1 != Class283.aClass283_3329) {
         throw new IllegalStateException();
      } else {
         aClass283_3321 = var1;
         if(aClass283_3321 != Class283.aClass283_3329) {
            if(var2) {
               aClass283_3321 = Class283.aClass283_3331;
            }

         }
      }
   }

   void method5164(String var1) {
      if(!this.aBool3298) {
         this.aBool3298 = true;
         System.out.println("error_game_" + var1);

         try {
            Class438.method7363(Class393.anApplet4870, "loggedout", (byte)10);
         } catch (Throwable var4) {
            ;
         }

         try {
            Class393.anApplet4870.getAppletContext().showDocument(new URL(Class393.anApplet4870.getCodeBase(), "error_game_" + var1 + ".ws"), "_top");
         } catch (Exception var3) {
            ;
         }

      }
   }

   abstract void method5165();

   final void method5166(boolean var1) {
      synchronized(this) {
         if(aBool3323) {
            return;
         }

         aBool3323 = true;
      }

      try {
         this.method5136((byte)52);
      } catch (Exception var6) {
         ;
      }

      try {
         aClass452_3312.method7559(1724396814);

         for(int var2 = 0; var2 < -1574837983 * anInt3311; ++var2) {
            Class107.aClass452Array1041[var2].method7559(439547273);
         }

         aClass452_3318.method7559(641444134);
         aClass452_3316.method7559(-787723873);
      } catch (Exception var7) {
         ;
      }

      if(this.aBool3292) {
         try {
            QueryPerformanceCounter.quit();
         } catch (Throwable var5) {
            ;
         }
      }

      Class164.method2841(true, 269144752);
      if(Class8_Sub4.method14964(-204189727)) {
         Class335.method6178(1770497657).method311((byte)16);
      }

      if(null != Class572.aCanvas7591) {
         try {
            Class572.aCanvas7591.removeFocusListener(this);
            Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
         } catch (Exception var4) {
            ;
         }
      }

      if(null != Class268.aFrame3105) {
         Class268.aFrame3105.setVisible(false);
         Class268.aFrame3105.dispose();
         Class268.aFrame3105 = null;
      }

   }

   public void method140() {
      if(!aBool3323) {
         aLong3322 = (Class339.method6240(1948522978) + 4000L) * 804428450548703621L;
      }
   }

   void method5167(int var1) {
      if(Class572.aCanvas7591 != null) {
         if(var1 <= '\uff00') {
            ;
         }

         Class572.aCanvas7591.removeFocusListener(this);
         Class572.aCanvas7591.getParent().setBackground(Color.black);
         Class572.aCanvas7591.getParent().remove(Class572.aCanvas7591);
      }

   }

   public void method142() {
      if(!aBool3323) {
         aLong3322 = Class339.method6240(-1541924583) * 804428450548703621L;
         Class75.method1619(5000L);
         this.method5089(false, 976593593);
      }
   }

   public final void method143(Graphics var1) {
      this.paint(var1);
   }

   public final void method144(Graphics var1) {
      this.paint(var1);
   }

   void method5168(Class283 var1, boolean var2, byte var3) {
      if(var1 == null) {
         throw new NullPointerException();
      } else if(var1 != Class283.aClass283_3330 && var1 != Class283.aClass283_3329) {
         throw new IllegalStateException();
      } else {
         aClass283_3321 = var1;
         if(aClass283_3321 != Class283.aClass283_3329) {
            if(var2) {
               aClass283_3321 = Class283.aClass283_3331;
            }

         }
      }
   }

   public final synchronized void method137(Graphics var1) {
      if(!aBool3323) {
         aBool3302 = true;
         if(Class339.method6240(-632930256) - -169696136796569137L * aLong3299 > 1000L) {
            Rectangle var2 = var1.getClipBounds();
            if(var2 == null || var2.width >= 2059685689 * anInt3305 && var2.height >= -854085195 * Class463_Sub14.anInt8016) {
               aBool3304 = true;
            }
         }

      }
   }

   public final void method5169(FocusEvent var1) {
      aBool3324 = true;
      aBool3302 = true;
   }

   public void supplyApplet(Applet var1) {
      Class393.anApplet4870 = var1;
   }

   public static Container method5170() {
      return (Container)(null != Class254.aFrame3020?Class254.aFrame3020:(null != Class268.aFrame3105?Class268.aFrame3105:Class393.anApplet4870));
   }

   public final void method5171(FocusEvent var1) {
      aBool3324 = true;
      aBool3302 = true;
   }

   boolean method5172(File var1, boolean var2, byte var3) {
      try {
         RandomAccessFile var4 = new RandomAccessFile(var1, "rw");
         int var5 = var4.read();
         var4.seek(0L);
         var4.write(var5);
         var4.seek(0L);
         var4.close();
         if(var2) {
            var1.delete();
         }

         return true;
      } catch (Exception var6) {
         return false;
      }
   }

   public final void method5173(WindowEvent var1) {}

   public final void windowDeactivated(WindowEvent var1) {}

   public final void method5174(WindowEvent var1) {}

   public final void method5175(WindowEvent var1) {
      aBool3306 = true;
      this.destroy();
   }

   public final void method5176(WindowEvent var1) {
      aBool3306 = true;
      this.destroy();
   }

   boolean method5177(File var1, boolean var2) {
      try {
         RandomAccessFile var3 = new RandomAccessFile(var1, "rw");
         int var4 = var3.read();
         var3.seek(0L);
         var3.write(var4);
         var3.seek(0L);
         var3.close();
         if(var2) {
            var1.delete();
         }

         return true;
      } catch (Exception var5) {
         return false;
      }
   }

   public final void method5178(WindowEvent var1) {}

   public final void method5179(WindowEvent var1) {}

   public final void method5180(WindowEvent var1) {}

   String method5181(int var1) {
      return null;
   }

   public final void method5182(WindowEvent var1) {}

   public final void method5183(WindowEvent var1) {}

   void method5184() {
      long var1 = Class339.method6240(1453299159);
      long var3 = aLongArray3297[162887677 * anInt3294];
      aLongArray3297[anInt3294 * 162887677] = var1;
      anInt3294 = (anInt3294 * 162887677 + 1 & 31) * 1587387733;
      if(var3 != 0L && var1 > var3) {
         int var5 = (int)(var1 - var3);
         anInt3300 = 415893117 * ((32000 + (var5 >> 1)) / var5);
      }

      if((anInt3303 += -554114839) * 856815449 - 1 > 50) {
         anInt3303 -= -1935938174;
         aBool3302 = true;
         Class572.aCanvas7591.setSize(Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
         Class572.aCanvas7591.setVisible(true);
         if(Class268.aFrame3105 != null && null == Class254.aFrame3020) {
            Insets var6 = Class268.aFrame3105.getInsets();
            Class572.aCanvas7591.setLocation(anInt3325 * 1402293235 + var6.left, -1285172503 * anInt3317 + var6.top);
         } else {
            Class572.aCanvas7591.setLocation(anInt3325 * 1402293235, anInt3317 * -1285172503);
         }
      }

      this.method5095(638224755);
   }

   public boolean method5185() {
      return Class335.method6178(2026381278).method310("jagtheora", 2098226057);
   }

   public static final void method5186(int var0, String var1, Color var2, Color var3, Color var4) {
      try {
         Graphics var5 = Class572.aCanvas7591.getGraphics();
         if(null == Class299.aFont3669) {
            Class299.aFont3669 = new Font("Helvetica", 1, 13);
         }

         if(var2 == null) {
            var2 = new Color(140, 17, 17);
         }

         if(var3 == null) {
            var3 = new Color(140, 17, 17);
         }

         if(null == var4) {
            var4 = new Color(255, 255, 255);
         }

         int var7;
         int var8;
         try {
            if(Class117.anImage1191 == null) {
               Class117.anImage1191 = Class572.aCanvas7591.createImage(759890095 * Class563.anInt7495, Class440.anInt5458 * 1404657485);
            }

            Graphics var6 = Class117.anImage1191.getGraphics();
            var6.setColor(Color.black);
            var6.fillRect(0, 0, Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
            var7 = 759890095 * Class563.anInt7495 / 2 - 152;
            var8 = 1404657485 * Class440.anInt5458 / 2 - 18;
            var6.setColor(var3);
            var6.drawRect(var7, var8, 303, 33);
            var6.setColor(var2);
            var6.fillRect(var7 + 2, var8 + 2, var0 * 3, 30);
            var6.setColor(Color.black);
            var6.drawRect(var7 + 1, 1 + var8, 301, 31);
            var6.fillRect(2 + var7 + 3 * var0, 2 + var8, 300 - var0 * 3, 30);
            var6.setFont(Class299.aFont3669);
            var6.setColor(var4);
            var6.drawString(var1, var7 + (304 - var1.length() * 6) / 2, var8 + 22);
            if(aString3301 != null) {
               var6.setFont(Class299.aFont3669);
               var6.setColor(var4);
               var6.drawString(aString3301, 759890095 * Class563.anInt7495 / 2 - aString3301.length() * 6 / 2, Class440.anInt5458 * 1404657485 / 2 - 26);
            }

            var5.drawImage(Class117.anImage1191, 0, 0, (ImageObserver)null);
         } catch (Exception var9) {
            var5.setColor(Color.black);
            var5.fillRect(0, 0, Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
            var7 = 759890095 * Class563.anInt7495 / 2 - 152;
            var8 = Class440.anInt5458 * 1404657485 / 2 - 18;
            var5.setColor(var3);
            var5.drawRect(var7, var8, 303, 33);
            var5.setColor(var2);
            var5.fillRect(2 + var7, 2 + var8, var0 * 3, 30);
            var5.setColor(Color.black);
            var5.drawRect(var7 + 1, var8 + 1, 301, 31);
            var5.fillRect(2 + var7 + var0 * 3, 2 + var8, 300 - var0 * 3, 30);
            var5.setFont(Class299.aFont3669);
            var5.setColor(var4);
            if(null != aString3301) {
               var5.setFont(Class299.aFont3669);
               var5.setColor(var4);
               var5.drawString(aString3301, 759890095 * Class563.anInt7495 / 2 - aString3301.length() * 6 / 2, 1404657485 * Class440.anInt5458 / 2 - 26);
            }

            var5.drawString(var1, var7 + (304 - var1.length() * 6) / 2, var8 + 22);
         }
      } catch (Exception var10) {
         Class572.aCanvas7591.repaint();
      }

   }

   public static final void method5187(int var0, String var1, Color var2, Color var3, Color var4) {
      try {
         Graphics var5 = Class572.aCanvas7591.getGraphics();
         if(null == Class299.aFont3669) {
            Class299.aFont3669 = new Font("Helvetica", 1, 13);
         }

         if(var2 == null) {
            var2 = new Color(140, 17, 17);
         }

         if(var3 == null) {
            var3 = new Color(140, 17, 17);
         }

         if(null == var4) {
            var4 = new Color(255, 255, 255);
         }

         int var7;
         int var8;
         try {
            if(Class117.anImage1191 == null) {
               Class117.anImage1191 = Class572.aCanvas7591.createImage(759890095 * Class563.anInt7495, Class440.anInt5458 * 1404657485);
            }

            Graphics var6 = Class117.anImage1191.getGraphics();
            var6.setColor(Color.black);
            var6.fillRect(0, 0, Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
            var7 = 759890095 * Class563.anInt7495 / 2 - 152;
            var8 = 1404657485 * Class440.anInt5458 / 2 - 18;
            var6.setColor(var3);
            var6.drawRect(var7, var8, 303, 33);
            var6.setColor(var2);
            var6.fillRect(var7 + 2, var8 + 2, var0 * 3, 30);
            var6.setColor(Color.black);
            var6.drawRect(var7 + 1, 1 + var8, 301, 31);
            var6.fillRect(2 + var7 + 3 * var0, 2 + var8, 300 - var0 * 3, 30);
            var6.setFont(Class299.aFont3669);
            var6.setColor(var4);
            var6.drawString(var1, var7 + (304 - var1.length() * 6) / 2, var8 + 22);
            if(aString3301 != null) {
               var6.setFont(Class299.aFont3669);
               var6.setColor(var4);
               var6.drawString(aString3301, 759890095 * Class563.anInt7495 / 2 - aString3301.length() * 6 / 2, Class440.anInt5458 * 1404657485 / 2 - 26);
            }

            var5.drawImage(Class117.anImage1191, 0, 0, (ImageObserver)null);
         } catch (Exception var9) {
            var5.setColor(Color.black);
            var5.fillRect(0, 0, Class563.anInt7495 * 759890095, Class440.anInt5458 * 1404657485);
            var7 = 759890095 * Class563.anInt7495 / 2 - 152;
            var8 = Class440.anInt5458 * 1404657485 / 2 - 18;
            var5.setColor(var3);
            var5.drawRect(var7, var8, 303, 33);
            var5.setColor(var2);
            var5.fillRect(2 + var7, 2 + var8, var0 * 3, 30);
            var5.setColor(Color.black);
            var5.drawRect(var7 + 1, var8 + 1, 301, 31);
            var5.fillRect(2 + var7 + var0 * 3, 2 + var8, 300 - var0 * 3, 30);
            var5.setFont(Class299.aFont3669);
            var5.setColor(var4);
            if(null != aString3301) {
               var5.setFont(Class299.aFont3669);
               var5.setColor(var4);
               var5.drawString(aString3301, 759890095 * Class563.anInt7495 / 2 - aString3301.length() * 6 / 2, 1404657485 * Class440.anInt5458 / 2 - 26);
            }

            var5.drawString(var1, var7 + (304 - var1.length() * 6) / 2, var8 + 22);
         }
      } catch (Exception var10) {
         Class572.aCanvas7591.repaint();
      }

   }

   public static final void method5188() {
      Class117.anImage1191 = null;
      Class299.aFont3669 = null;
   }

   public final synchronized void method145(Graphics var1) {
      if(!aBool3323) {
         aBool3302 = true;
         if(Class339.method6240(-361374608) - -169696136796569137L * aLong3299 > 1000L) {
            Rectangle var2 = var1.getClipBounds();
            if(var2 == null || var2.width >= 2059685689 * anInt3305 && var2.height >= -854085195 * Class463_Sub14.anInt8016) {
               aBool3304 = true;
            }
         }

      }
   }

   public static final void method5189() {
      Class117.anImage1191 = null;
      Class299.aFont3669 = null;
   }

   void method5190(String var1) {
      if(!this.aBool3298) {
         this.aBool3298 = true;
         System.out.println("error_game_" + var1);

         try {
            Class438.method7363(Class393.anApplet4870, "loggedout", (byte)-15);
         } catch (Throwable var4) {
            ;
         }

         try {
            Class393.anApplet4870.getAppletContext().showDocument(new URL(Class393.anApplet4870.getCodeBase(), "error_game_" + var1 + ".ws"), "_top");
         } catch (Exception var3) {
            ;
         }

      }
   }

   void method5191(String var1) {
      if(!this.aBool3298) {
         this.aBool3298 = true;
         System.out.println("error_game_" + var1);

         try {
            Class438.method7363(Class393.anApplet4870, "loggedout", (byte)1);
         } catch (Throwable var4) {
            ;
         }

         try {
            Class393.anApplet4870.getAppletContext().showDocument(new URL(Class393.anApplet4870.getCodeBase(), "error_game_" + var1 + ".ws"), "_top");
         } catch (Exception var3) {
            ;
         }

      }
   }

   final boolean method5192() {
      String var1 = Class393.anApplet4870.getDocumentBase().getHost().toLowerCase();
      if(!var1.equals("jagex.com") && !var1.endsWith(".jagex.com")) {
         if(!var1.equals("runescape.com") && !var1.endsWith(".runescape.com")) {
            if(!var1.equals("stellardawn.com") && !var1.endsWith(".stellardawn.com")) {
               if(var1.endsWith("127.0.0.1")) {
                  return true;
               } else {
                  while(var1.length() > 0 && var1.charAt(var1.length() - 1) >= 48 && var1.charAt(var1.length() - 1) <= 57) {
                     var1 = var1.substring(0, var1.length() - 1);
                  }

                  if(var1.endsWith("192.168.1.")) {
                     return true;
                  } else {
                     this.method5097("invalidhost", -86635215);
                     return false;
                  }
               }
            } else {
               return true;
            }
         } else {
            return true;
         }
      } else {
         return true;
      }
   }

   void method5193(String var1) {
      if(!this.aBool3298) {
         this.aBool3298 = true;
         System.out.println("error_game_" + var1);

         try {
            Class438.method7363(Class393.anApplet4870, "loggedout", (byte)67);
         } catch (Throwable var4) {
            ;
         }

         try {
            Class393.anApplet4870.getAppletContext().showDocument(new URL(Class393.anApplet4870.getCodeBase(), "error_game_" + var1 + ".ws"), "_top");
         } catch (Exception var3) {
            ;
         }

      }
   }

   public void start() {
      if(!aBool3323) {
         aLong3322 = 0L;
      }
   }

   public boolean method5194() {
      this.aBool3292 = Class335.method6178(-987735398).method310("jaclib", 2098226057);
      if(this.aBool3292) {
         try {
            QueryPerformanceCounter.init();
         } catch (Throwable var2) {
            ;
         }
      }

      return this.aBool3292;
   }

   public boolean method5195() {
      return Class335.method6178(116607467).method310("jagtheora", 2098226057);
   }

   public void method132() {
      if(!aBool3323) {
         aLong3322 = (Class339.method6240(-758751565) + 4000L) * 804428450548703621L;
      }
   }

   public boolean method5196() {
      return Class335.method6178(1058185854).method310("jagtheora", 2098226057);
   }

   public static final void method5197() {
      Class256.aClass290_3033.method5282((byte)-14);

      int var0;
      for(var0 = 0; var0 < 32; ++var0) {
         aLongArray3297[var0] = 0L;
      }

      for(var0 = 0; var0 < 32; ++var0) {
         aLongArray3296[var0] = 0L;
      }

      anInt3309 = 0;
   }

   void method5198(Class283 var1, boolean var2) {
      if(var1 == null) {
         throw new NullPointerException();
      } else if(var1 != Class283.aClass283_3330 && var1 != Class283.aClass283_3329) {
         throw new IllegalStateException();
      } else {
         aClass283_3321 = var1;
         if(aClass283_3321 != Class283.aClass283_3329) {
            if(var2) {
               aClass283_3321 = Class283.aClass283_3331;
            }

         }
      }
   }

   void method5199() {
      if(null != Class427.aString5373) {
         String var1 = Class427.aString5373.toLowerCase();
         if(var1.indexOf("sun") != -1 || var1.indexOf("apple") != -1) {
            String var2 = Class283.aString3332;
            if(var2.equals("1.1") || var2.startsWith("1.1.") || var2.equals("1.2") || var2.startsWith("1.2.") || var2.equals("1.3") || var2.startsWith("1.3.") || var2.equals("1.4") || var2.startsWith("1.4.") || var2.equals("1.5") || var2.startsWith("1.5.") || var2.equals("1.6.0")) {
               this.method5097("wrongjava", 68420635);
               return;
            }

            if(var2.startsWith("1.6.0_")) {
               int var3;
               for(var3 = 6; var3 < var2.length() && Class115.method2283(var2.charAt(var3), 243630997); ++var3) {
                  ;
               }

               String var4 = var2.substring(6, var3);
               if(IncommingOpcode.method5361(var4, 1900019585) && Class78.method1629(var4, -1622157343) < 10) {
                  this.method5097("wrongjava", -465023014);
                  return;
               }
            }
         }
      }

      Class274.method4851(1830110659).setFocusCycleRoot(true);
      anInt3290 = ((int)(Runtime.getRuntime().maxMemory() / 1048576L) + 1) * -231668653;
      anInt3326 = Runtime.getRuntime().availableProcessors() * -1071481727;
      this.method5082(1162954862);
      this.method5093((short)-16603);
      Class256.aClass290_3033 = Class545_Sub3.method15397(1720007001);

      while(-3144615201752060083L * aLong3322 == 0L || Class339.method6240(608542703) < aLong3322 * -3144615201752060083L) {
         anInt3309 = Class256.aClass290_3033.method5281(-6555189860274633573L * aLong3291) * 176240711;

         for(int var5 = 0; var5 < anInt3309 * 1986851191; ++var5) {
            this.method5145(2075401282);
         }

         this.method5100((byte)57);
         Class108.method2173(Class572.aCanvas7591, (byte)23);
      }

   }

   public final void method5200(FocusEvent var1) {
      aBool3324 = true;
      aBool3302 = true;
   }

   void method5201(Class283 var1, boolean var2) {
      if(var1 == null) {
         throw new NullPointerException();
      } else if(var1 != Class283.aClass283_3330 && var1 != Class283.aClass283_3329) {
         throw new IllegalStateException();
      } else {
         aClass283_3321 = var1;
         if(aClass283_3321 != Class283.aClass283_3329) {
            if(var2) {
               aClass283_3321 = Class283.aClass283_3331;
            }

         }
      }
   }

   public static Class283 method5202() {
      return aClass283_3321;
   }

   public static Class283 method5203() {
      return aClass283_3321;
   }

   public static Class283 method5204() {
      return aClass283_3321;
   }

   public static Class568 method5205(Class545 var0, int var1, int var2, int var3, int var4, int var5, int var6) {
      long var7 = (long)var5;
      Class568 var9 = (Class568)Class186.aClass564_2236.method11959(var7);
      short var10 = 2055;
      if(var9 == null) {
         Class96 var11 = Class96.method1867(Class532.aClass253_7223, var5, 0);
         if(null == var11) {
            return null;
         }

         if(var11.anInt947 < 13) {
            var11.method1848(2);
         }

         var9 = var0.method11493(var11, var10, Class245.anInt2939 * 1004762603, 64, 768);
         Class186.aClass564_2236.method11958(var9, var7);
      }

      var9 = var9.method12060((byte)6, var10, true);
      if(var1 != 0) {
         var9.f(var1);
      }

      if(0 != var2) {
         var9.t(var2);
      }

      if(0 != var3) {
         var9.EA(var3);
      }

      if(var4 != 0) {
         var9.ia(0, var4, 0);
      }

      return var9;
   }

   public static void method5206(int var0, int var1, String var2, String var3, String var4, String var5, String var6, int var7, int var8) {
      Class42 var9 = Class46.aClass42Array487[99];

      for(int var10 = 99; var10 > 0; --var10) {
         Class46.aClass42Array487[var10] = Class46.aClass42Array487[var10 - 1];
      }

      if(var9 == null) {
         var9 = new Class42(var0, var1, var2, var3, var4, var6, var7, var5);
      } else {
         var9.method1119(var0, var1, var2, var3, var4, var6, var7, var5, 1711503638);
      }

      Class46.aClass42Array487[0] = var9;
      Class46.anInt486 += 407209719;
      client.anInt7631 = client.anInt7858 * 1514967319;
   }

   static final void method5207(Class508 var0, int var1) {
      byte var2 = Class5.aClass515_Sub1_Sub4_Sub4_Sub1_113.aByte8443;
      Class326 var3 = Class5.aClass515_Sub1_Sub4_Sub4_Sub1_113.method10913().aClass326_4031;
      Class548 var4 = client.aClass279_7807.method4909(1132220981);
      int var5 = -843659437 * var4.anInt7419 + ((int)var3.aFloat4036 >> 9);
      int var6 = ((int)var3.aFloat4033 >> 9) + -1518942839 * var4.anInt7420;
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = var6 + (var5 << 14) + (var2 << 28);
   }
}
