/* Class590 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
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.Image;
import java.awt.Insets;
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.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.URL;

import jaclib.nanotime.QueryPerformanceCounter;

public abstract class Class590
    implements Interface24, Runnable, FocusListener, WindowListener
{
    boolean aBool7646 = false;
    static final int anInt7647 = 32;
    public static int anInt7648;
    static final int anInt7649 = 0;
    static long[] aLongArray7650;
    static long[] aLongArray7651;
    static int anInt7652;
    public static int anInt7653;
    public static int anInt7654;
    public static int anInt7655;
    protected static String aString7656;
    protected static volatile boolean aBool7657;
    protected static Class418 aClass418_7658;
    static int anInt7659;
    protected static volatile boolean aBool7660;
    static volatile long aLong7661;
    static final long aLong7662 = 3221225472L;
    static volatile boolean aBool7663;
    static int anInt7664;
    static long aLong7665;
    static final String aString7666 = "rw";
    static final String aString7667 = "main_file_cache.dat2";
    static final String aString7668 = "main_file_cache.idx";
    static final String aString7669 = "main_file_cache.idx255";
    static final String aString7670 = "random.dat";
    static Class418 aClass418_7671;
    protected static Class418 aClass418_7672;
    static final int anInt7673 = 1048576;
    static boolean aBool7674;
    static final int anInt7675 = 1;
    static Class250 aClass250_7676;
    public static String aString7677;
    static long aLong7678 = 8001042629824155392L;
    public static Image anImage7679;
    public static int anInt7680;
    public static int anInt7681;
    boolean aBool7682 = false;
    public boolean aBool7683 = false;
    protected static boolean aBool7684;
    public static String aString7685;
    
    public void method12870() {
	do {
	    try {
		try {
		    method12976(1816787113);
		} catch (ThreadDeath threaddeath) {
		    throw threaddeath;
		} catch (Throwable throwable) {
		    Class14.method600(method12872(-1394433405), throwable,
				      1886020391);
		    method12892("crash", (byte) 6);
		    method12882(true, -1828286152);
		    break;
		}
		method12882(true, 66732635);
	    } catch (Object object) {
		method12882(true, -238689298);
		throw object;
	    }
	} while (false);
    }
    
    public void supplyApplet(Applet applet) {
	Class360.anApplet5507 = applet;
    }
    
    final void method12871(Class244 class244, String string, String string_0_,
			   int i, int i_1_, int i_2_, int i_3_, boolean bool,
			   int i_4_) {
	try {
	    method12896(Class250.aClass250_3943, bool, 532187816);
	    Class120_Sub17.anInt10263
		= ((Class2.anInt17
		    = class244.method4899(1716124909) * -1387402091)
		   * -1867273073);
	    Class171.anInt2125
		= ((Class14.anInt111
		    = class244.method4913(-654827636) * -1212509317)
		   * 781703925);
	    anInt7654 = 0;
	    anInt7655 = 0;
	    if (Class421_Sub12.method14150(-361844700)
		== Class250.aClass250_3942) {
		Class120_Sub17.anInt10263
		    += -883653002 * class244.method4909(1059165158);
		Class171.anInt2125
		    += -1654274706 * class244.method4900(562791899);
		method12932(class244.method4902(-1023568018), -874930213);
	    }
	    RuntimeException_Sub2.anApplet11092 = Class360.anApplet5507;
	    method12966(string, string_0_, i, i_1_, i_2_, i_3_, -1173827327);
	} catch (Throwable throwable) {
	    Class14.method600(null, throwable, 1821247142);
	    method12892("crash", (byte) -7);
	}
    }
    
    String method12872(int i) {
	return null;
    }
    
    File method12873(String string, String string_5_, int i, short i_6_) {
	String string_7_
	    = (0 == i ? ""
	       : new StringBuilder().append("").append(i).toString());
	Class44.aFile620
	    = new File(Class115.aString1341,
		       new StringBuilder().append("jagex_cl_").append
			   (string).append
			   ("_").append
			   (string_5_).append
			   (string_7_).append
			   (".dat").toString());
	String string_8_ = null;
	String string_9_ = null;
	boolean bool = false;
	if (Class44.aFile620.exists()) {
	    try {
		Class414 class414
		    = new Class414(Class44.aFile620, "rw", 10000L);
		int i_10_;
		Class243_Sub10 class243_sub10;
		for (class243_sub10
			 = (new Class243_Sub10
			    ((int) class414.method7372(-1464640242)));
		     (class243_sub10.anInt8688 * 126215893
		      < class243_sub10.aByteArray8691.length);
		     class243_sub10.anInt8688 += -2044845443 * i_10_) {
		    i_10_ = class414.method7373(class243_sub10.aByteArray8691,
						(126215893
						 * class243_sub10.anInt8688),
						((class243_sub10
						  .aByteArray8691).length
						 - 126215893 * (class243_sub10
								.anInt8688)),
						2121969055);
		    if (-1 == i_10_)
			throw new IOException();
		}
		class243_sub10.anInt8688 = 0;
		i_10_ = class243_sub10.method14878((byte) -78);
		if (i_10_ < 1 || i_10_ > 3)
		    throw new IOException(new StringBuilder().append("").append
					      (i_10_).toString());
		int i_11_ = 0;
		if (i_10_ > 1)
		    i_11_ = class243_sub10.method14878((byte) 8);
		if (i_10_ <= 2) {
		    string_8_ = class243_sub10.method14682(-437499001);
		    if (1 == i_11_)
			string_9_ = class243_sub10.method14682(-437499001);
		} else {
		    string_8_ = class243_sub10.method14677((byte) 23);
		    if (i_11_ == 1)
			string_9_ = class243_sub10.method14677((byte) 4);
		}
		class414.method7371(-1916311289);
	    } catch (IOException ioexception) {
		ioexception.printStackTrace();
	    }
	    if (string_8_ != null) {
		File file = new File(string_8_);
		if (!file.exists())
		    string_8_ = null;
	    }
	    if (string_8_ != null) {
		File file = new File(string_8_, "test.dat");
		if (!method12897(file, true, (byte) -111))
		    string_8_ = null;
	    }
	}
	if (string_8_ == null && i == 0) {
	while_150_:
	    for (int i_12_ = 0; i_12_ < Class471.aStringArray6385.length;
		 i_12_++) {
		for (int i_13_ = 0; i_13_ < Class335.aStringArray5285.length;
		     i_13_++) {
		    File file = new File(new StringBuilder().append
					     (Class335.aStringArray5285[i_13_])
					     .append
					     (Class471.aStringArray6385[i_12_])
					     .append
					     (File.separatorChar).append
					     (string).append
					     (File.separatorChar).toString());
		    if (file.exists()
			&& method12897(new File(file, "test.dat"), true,
				       (byte) -34)) {
			string_8_ = file.toString();
			bool = true;
			break while_150_;
		    }
		}
	    }
	}
	if (null == string_8_) {
	    string_8_ = new StringBuilder().append(Class115.aString1341).append
			    (File.separatorChar).append
			    ("jagexcache").append
			    (string_7_).append
			    (File.separatorChar).append
			    (string).append
			    (File.separatorChar).append
			    (string_5_).append
			    (File.separatorChar).toString();
	    bool = true;
	}
	if (string_9_ != null) {
	    File file = new File(string_9_);
	    File file_14_ = new File(string_8_);
	    try {
		File[] files = file.listFiles();
		File[] files_15_ = files;
		for (int i_16_ = 0; i_16_ < files_15_.length; i_16_++) {
		    File file_17_ = files_15_[i_16_];
		    File file_18_ = new File(file_14_, file_17_.getName());
		    boolean bool_19_ = file_17_.renameTo(file_18_);
		    if (!bool_19_)
			throw new IOException();
		}
	    } catch (Exception exception) {
		exception.printStackTrace();
	    }
	    bool = true;
	}
	if (bool)
	    method12935(new File(string_8_), null, 497626931);
	return new File(string_8_);
    }
    
    public void start() {
	if (!aBool7674)
	    aLong7665 = 0L;
    }
    
    public static Class250 method12874() {
	return aClass250_7676;
    }
    
    public static File method12875() {
	return Class478_Sub1_Sub5.aFile10675;
    }
    
    public void method168() {
	if (!aBool7674)
	    aLong7665 = ((Class46.method1238(-1901172995) + 4000L)
			 * -7431253796459201601L);
    }
    
    public void method12876(byte i) throws Exception_Sub4 {
	if (!((Class590) this).aBool7682) {
	    Class437.method7817(1329390934).method105("jaclib", 607660886);
	    try {
		QueryPerformanceCounter.init();
	    } catch (Throwable throwable) {
		if (aString7685.startsWith("win"))
		    throw new Exception_Sub4(128, "jaclib");
	    }
	    ((Class590) this).aBool7682 = true;
	}
    }
    
    void method12877(Container container, byte i) {
	container.setBackground(Color.black);
	container.setLayout(null);
	container.add(Class631.aCanvas8104);
	Class631.aCanvas8104.setSize(-1641316675 * Class2.anInt17,
				     Class14.anInt111 * -837921869);
	Class631.aCanvas8104.setVisible(true);
	if (Class359.aFrame5503 == container) {
	    Insets insets = Class359.aFrame5503.getInsets();
	    Class631.aCanvas8104.setLocation((anInt7654 * 1320420697
					      + insets.left),
					     (insets.top
					      + anInt7655 * -348785727));
	} else
	    Class631.aCanvas8104.setLocation(anInt7654 * 1320420697,
					     -348785727 * anInt7655);
	Class631.aCanvas8104.addFocusListener(this);
	Class631.aCanvas8104.requestFocus();
	Class259.aBool4033 = true;
	aBool7663 = true;
	Class631.aCanvas8104.setFocusTraversalKeysEnabled(false);
	aBool7657 = true;
	aBool7660 = false;
	aLong7661 = Class46.method1238(-1061783198) * -4443327343855904793L;
    }
    
    public final void windowClosed(WindowEvent windowevent) {
	/* empty */
    }
    
    public final void windowOpened(WindowEvent windowevent) {
	/* empty */
    }
    
    public void run() {
	do {
	    try {
		try {
		    method12976(1345585922);
		} catch (ThreadDeath threaddeath) {
		    throw threaddeath;
		} catch (Throwable throwable) {
		    Class14.method600(method12872(-1807892204), throwable,
				      1361709854);
		    method12892("crash", (byte) 56);
		    method12882(true, 1805282071);
		    break;
		}
		method12882(true, -1461233683);
	    } catch (Object object) {
		method12882(true, -543339739);
		throw object;
	    }
	} while (false);
    }
    
    public static final int method12878() {
	return (int) (1000000000L / (-6019249319442745853L * aLong7678));
    }
    
    void method12879(int i) {
	long l = Class46.method1238(511501788);
	long l_20_ = aLongArray7650[1142573579 * Class359.anInt5502];
	aLongArray7650[Class359.anInt5502 * 1142573579] = l;
	Class359.anInt5502
	    = (1 + 1142573579 * Class359.anInt5502 & 0x1f) * -902008413;
	if (0L != l_20_ && l <= l_20_) {
	    /* empty */
	}
	synchronized (this) {
	    Class259.aBool4033 = aBool7663;
	}
	method12887(-509079149);
    }
    
    void method12880(byte i) {
	long l = Class46.method1238(-1826612920);
	long l_21_ = aLongArray7651[anInt7652 * -1072959861 - 1 & 0x1f];
	long l_22_ = aLongArray7651[anInt7652 * -1072959861];
	aLongArray7651[-1072959861 * anInt7652] = l;
	anInt7652 = -270366429 * (1 + anInt7652 * -1072959861 & 0x1f);
	if (l_22_ != 0L && l > l_22_) {
	    int i_23_ = (int) (l - l_22_);
	    anInt7653 = 693291277 * (int) (l - l_21_);
	    anInt7648 = 912978945 * (((i_23_ >> 1) + 32000) / i_23_);
	}
	if ((anInt7659 += -1703237485) * 1522840987 - 1 > 50) {
	    anInt7659 -= 737471670;
	    aBool7657 = true;
	    Class631.aCanvas8104.setSize(Class2.anInt17 * -1641316675,
					 -837921869 * Class14.anInt111);
	    Class631.aCanvas8104.setVisible(true);
	    if (Class359.aFrame5503 != null && null == Class450.aFrame6260) {
		Insets insets = Class359.aFrame5503.getInsets();
		Class631.aCanvas8104.setLocation((anInt7654 * 1320420697
						  + insets.left),
						 (anInt7655 * -348785727
						  + insets.top));
	    } else
		Class631.aCanvas8104.setLocation(1320420697 * anInt7654,
						 anInt7655 * -348785727);
	}
	method12909(1677787814);
    }
    
    void method12881(Class250 class250, boolean bool) {
	if (null == class250)
	    throw new NullPointerException();
	if (class250 != Class250.aClass250_3943
	    && class250 != Class250.aClass250_3944)
	    throw new IllegalStateException();
	aClass250_7676 = class250;
	if (Class250.aClass250_3944 != aClass250_7676) {
	    if (bool)
		aClass250_7676 = Class250.aClass250_3942;
	}
    }
    
    final void method12882(boolean bool, int i) {
	synchronized (this) {
	    if (aBool7674)
		return;
	    aBool7674 = true;
	}
	try {
	    method12891(-355200140);
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    aClass418_7672.method7426(-1343205988);
	    for (int i_24_ = 0; i_24_ < -1425977297 * Class18.anInt129;
		 i_24_++)
		Class456.aClass418Array6291[i_24_].method7426(-275952759);
	    aClass418_7658.method7426(-186746756);
	    aClass418_7671.method7426(-1545364533);
	} catch (Exception exception) {
	    /* empty */
	}
	if (((Class590) this).aBool7682) {
	    try {
		QueryPerformanceCounter.quit();
	    } catch (Throwable throwable) {
		/* empty */
	    }
	}
	if (Class109.method2819((byte) -8))
	    Class437.method7817(-392341856).method107(754469658);
	if (Class631.aCanvas8104 != null) {
	    try {
		Class631.aCanvas8104.removeFocusListener(this);
		Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
	if (null != Class359.aFrame5503) {
	    Class359.aFrame5503.setVisible(false);
	    Class359.aFrame5503.dispose();
	    Class359.aFrame5503 = null;
	}
    }
    
    public static final int method12883() {
	return (int) (1000000000L / (-6019249319442745853L * aLong7678));
    }
    
    public void stop() {
	if (!aBool7674)
	    aLong7665 = ((Class46.method1238(-1655847763) + 4000L)
			 * -7431253796459201601L);
    }
    
    public void destroy() {
	if (!aBool7674) {
	    aLong7665 = Class46.method1238(667614523) * -7431253796459201601L;
	    Class43.method1220(5000L);
	    method12882(false, -337487013);
	}
    }
    
    public boolean method12884(File file, int i) {
	if (null == file)
	    return false;
	if (!file.exists())
	    return false;
	if (!file.isDirectory())
	    return false;
	if (file.listFiles().length != 0)
	    return false;
	if (!method12897(new File(file, "test.dat"), true, (byte) -30))
	    return false;
	method12935(file, Class478_Sub1_Sub5.aFile10675, 1528174893);
	return true;
    }
    
    abstract void method12885();
    
    public final void focusGained(FocusEvent focusevent) {
	aBool7663 = true;
	aBool7657 = true;
    }
    
    public static void method12886(Class243_Sub10 class243_sub10) {
	byte[] is = new byte[24];
	try {
	    aClass418_7671.method7427(0L);
	    aClass418_7671.method7429(is, -239688769);
	    int i;
	    for (i = 0; i < 24 && 0 == is[i]; i++) {
		/* empty */
	    }
	    if (i >= 24)
		throw new IOException();
	} catch (Exception exception) {
	    for (int i = 0; i < 24; i++)
		is[i] = (byte) -1;
	}
	class243_sub10.method14655(is, 0, 24, 1923867121);
    }
    
    public final void windowActivated(WindowEvent windowevent) {
	/* empty */
    }
    
    public final void focusLost(FocusEvent focusevent) {
	aBool7663 = false;
    }
    
    public final void windowClosing(WindowEvent windowevent) {
	aBool7684 = true;
	destroy();
    }
    
    public final void windowDeactivated(WindowEvent windowevent) {
	/* empty */
    }
    
    public final void windowDeiconified(WindowEvent windowevent) {
	/* empty */
    }
    
    abstract void method12887(int i);
    
    static void method12888(Class243_Sub10 class243_sub10, int i) {
	if (null != aClass418_7671) {
	    try {
		aClass418_7671.method7427(0L);
		aClass418_7671.method7432(class243_sub10.aByteArray8691, i, 24,
					  630213313);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    public abstract void init();
    
    abstract void method12889(int i);
    
    void method12890(Container container) {
	container.setBackground(Color.black);
	container.setLayout(null);
	container.add(Class631.aCanvas8104);
	Class631.aCanvas8104.setSize(-1641316675 * Class2.anInt17,
				     Class14.anInt111 * -837921869);
	Class631.aCanvas8104.setVisible(true);
	if (Class359.aFrame5503 == container) {
	    Insets insets = Class359.aFrame5503.getInsets();
	    Class631.aCanvas8104.setLocation((anInt7654 * 1320420697
					      + insets.left),
					     (insets.top
					      + anInt7655 * -348785727));
	} else
	    Class631.aCanvas8104.setLocation(anInt7654 * 1320420697,
					     -348785727 * anInt7655);
	Class631.aCanvas8104.addFocusListener(this);
	Class631.aCanvas8104.requestFocus();
	Class259.aBool4033 = true;
	aBool7663 = true;
	Class631.aCanvas8104.setFocusTraversalKeysEnabled(false);
	aBool7657 = true;
	aBool7660 = false;
	aLong7661 = Class46.method1238(1650676221) * -4443327343855904793L;
    }
    
    public final void windowIconified(WindowEvent windowevent) {
	/* empty */
    }
    
    abstract void method12891(int i);
    
    void method12892(String string, byte i) {
	if (((Class590) this).aBool7646) {
	    if (i == 1) {
		/* empty */
	    }
	} else {
	    ((Class590) this).aBool7646 = true;
	    System.out.println(new StringBuilder().append("error_game_").append
				   (string).toString());
	    try {
		Class615.method13262(Class360.anApplet5507, "loggedout",
				     -98730341);
	    } catch (Throwable throwable) {
		/* empty */
	    }
	    try {
		Class360.anApplet5507.getAppletContext().showDocument
		    (new URL(Class360.anApplet5507.getCodeBase(),
			     new StringBuilder().append("error_game_").append
				 (string).append
				 (".ws").toString()),
		     "_top");
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    public static final void method12893() {
	anImage7679 = null;
	Class388.aFont5668 = null;
    }
    
    public final void method12894(WindowEvent windowevent) {
	/* empty */
    }
    
    public void method12895(byte i) throws Exception_Sub4 {
	if (aBool7683) {
	    if (i <= 1) {
		/* empty */
	    }
	} else {
	    Class437.method7817(1687789325).method105("jagtheora", 592202522);
	    aBool7683 = true;
	}
    }
    
    void method12896(Class250 class250, boolean bool, int i) {
	if (null == class250)
	    throw new NullPointerException();
	if (class250 != Class250.aClass250_3943
	    && class250 != Class250.aClass250_3944)
	    throw new IllegalStateException();
	aClass250_7676 = class250;
	if (Class250.aClass250_3944 != aClass250_7676) {
	    if (bool)
		aClass250_7676 = Class250.aClass250_3942;
	}
    }
    
    static {
	anInt7648 = 0;
	anInt7653 = 0;
	aLongArray7651 = new long[32];
	aLongArray7650 = new long[32];
	anInt7654 = 0;
	anInt7655 = 0;
	aString7656 = null;
	aBool7657 = true;
	anInt7659 = -1215217892;
	aBool7660 = false;
	aLong7661 = 0L;
	aBool7684 = false;
	aBool7663 = true;
	aClass418_7671 = null;
	aClass418_7672 = null;
	aClass418_7658 = null;
	aClass250_7676 = null;
	aLong7665 = 0L;
	aBool7674 = false;
	anInt7680 = 1164317301;
	anInt7681 = -421292011;
    }
    
    boolean method12897(File file, boolean bool, byte i) {
	boolean bool_25_;
	try {
	    RandomAccessFile randomaccessfile
		= new RandomAccessFile(file, "rw");
	    int i_26_ = randomaccessfile.read();
	    randomaccessfile.seek(0L);
	    randomaccessfile.write(i_26_);
	    randomaccessfile.seek(0L);
	    randomaccessfile.close();
	    if (bool)
		file.delete();
	    bool_25_ = true;
	} catch (Exception exception) {
	    return false;
	}
	return bool_25_;
    }
    
    void method12898() {
	if (null != Class631.aCanvas8104) {
	    Class631.aCanvas8104.removeFocusListener(this);
	    Class631.aCanvas8104.getParent().setBackground(Color.black);
	    Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	}
    }
    
    synchronized void method12899(int i) {
	method12968((byte) -2);
	Container container = Class209.method4307(267661835);
	Class631.aCanvas8104 = new Canvas_Sub1(container);
	method12877(container, (byte) -24);
    }
    
    public void method12900() {
	do {
	    try {
		try {
		    method12976(-534489157);
		} catch (ThreadDeath threaddeath) {
		    throw threaddeath;
		} catch (Throwable throwable) {
		    Class14.method600(method12872(-1134436075), throwable,
				      1698555175);
		    method12892("crash", (byte) -2);
		    method12882(true, -499851860);
		    break;
		}
		method12882(true, 1722282297);
	    } catch (Object object) {
		method12882(true, 476188730);
		throw object;
	    }
	} while (false);
    }
    
    abstract void method12901();
    
    abstract void method12902();
    
    abstract void method12903();
    
    void method12904(String string, String string_27_) {
	if (!((Class590) this).aBool7646) {
	    ((Class590) this).aBool7646 = true;
	    System.out.println(new StringBuilder().append("error_game_").append
				   (string).toString());
	    try {
		Class615.method13262(Class360.anApplet5507, "loggedout",
				     -98730341);
	    } catch (Throwable throwable) {
		/* empty */
	    }
	    try {
		Class360.anApplet5507.getAppletContext().showDocument
		    (new URL(Class360.anApplet5507.getCodeBase(),
			     new StringBuilder().append("error_game_").append
				 (string).append
				 (".ws?").append
				 (string_27_).toString()),
		     "_top");
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    public static final int method12905() {
	return (int) (1000000000L / (-6019249319442745853L * aLong7678));
    }
    
    abstract void method12906();
    
    public final void update(Graphics graphics) {
	paint(graphics);
    }
    
    public static File method12907() {
	return Class478_Sub1_Sub5.aFile10675;
    }
    
    String method12908() {
	return null;
    }
    
    abstract void method12909(int i);
    
    void method12910(String string, String string_28_, int i) {
	if (!((Class590) this).aBool7646) {
	    ((Class590) this).aBool7646 = true;
	    System.out.println(new StringBuilder().append("error_game_").append
				   (string).toString());
	    try {
		Class615.method13262(Class360.anApplet5507, "loggedout",
				     -98730341);
	    } catch (Throwable throwable) {
		/* empty */
	    }
	    try {
		Class360.anApplet5507.getAppletContext().showDocument
		    (new URL(Class360.anApplet5507.getCodeBase(),
			     new StringBuilder().append("error_game_").append
				 (string).append
				 (".ws?").append
				 (string_28_).toString()),
		     "_top");
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    public void method165(Applet applet) {
	Class360.anApplet5507 = applet;
    }
    
    final void method12911(Class244 class244, String string, String string_29_,
			   int i, int i_30_, int i_31_, int i_32_,
			   boolean bool) {
	try {
	    method12896(Class250.aClass250_3943, bool, -656553684);
	    Class120_Sub17.anInt10263
		= ((Class2.anInt17
		    = class244.method4899(808810720) * -1387402091)
		   * -1867273073);
	    Class171.anInt2125
		= ((Class14.anInt111
		    = class244.method4913(1792434368) * -1212509317)
		   * 781703925);
	    anInt7654 = 0;
	    anInt7655 = 0;
	    if (Class421_Sub12.method14150(1808206775)
		== Class250.aClass250_3942) {
		Class120_Sub17.anInt10263
		    += -883653002 * class244.method4909(704662928);
		Class171.anInt2125
		    += -1654274706 * class244.method4900(1237694657);
		method12932(class244.method4902(511421168), -874930213);
	    }
	    RuntimeException_Sub2.anApplet11092 = Class360.anApplet5507;
	    method12966(string, string_29_, i, i_30_, i_31_, i_32_,
			-1173827327);
	} catch (Throwable throwable) {
	    Class14.method600(null, throwable, 2121752968);
	    method12892("crash", (byte) 42);
	}
    }
    
    final void method12912(Class244 class244, String string, String string_33_,
			   int i, int i_34_, int i_35_, int i_36_,
			   boolean bool) {
	try {
	    method12896(Class250.aClass250_3943, bool, -1406095553);
	    Class120_Sub17.anInt10263
		= ((Class2.anInt17
		    = class244.method4899(2045932776) * -1387402091)
		   * -1867273073);
	    Class171.anInt2125
		= ((Class14.anInt111
		    = class244.method4913(-607245915) * -1212509317)
		   * 781703925);
	    anInt7654 = 0;
	    anInt7655 = 0;
	    if (Class421_Sub12.method14150(1449961386)
		== Class250.aClass250_3942) {
		Class120_Sub17.anInt10263
		    += -883653002 * class244.method4909(299367593);
		Class171.anInt2125
		    += -1654274706 * class244.method4900(278591694);
		method12932(class244.method4902(770321505), -874930213);
	    }
	    RuntimeException_Sub2.anApplet11092 = Class360.anApplet5507;
	    method12966(string, string_33_, i, i_34_, i_35_, i_36_,
			-1173827327);
	} catch (Throwable throwable) {
	    Class14.method600(null, throwable, 1315708763);
	    method12892("crash", (byte) -11);
	}
    }
    
    final void method12913(Class244 class244, String string, String string_37_,
			   int i, int i_38_, int i_39_, int i_40_,
			   boolean bool) {
	try {
	    method12896(Class250.aClass250_3943, bool, -774835612);
	    Class120_Sub17.anInt10263
		= ((Class2.anInt17
		    = class244.method4899(901700820) * -1387402091)
		   * -1867273073);
	    Class171.anInt2125
		= ((Class14.anInt111
		    = class244.method4913(-692513914) * -1212509317)
		   * 781703925);
	    anInt7654 = 0;
	    anInt7655 = 0;
	    if (Class421_Sub12.method14150(1457389835)
		== Class250.aClass250_3942) {
		Class120_Sub17.anInt10263
		    += -883653002 * class244.method4909(656837847);
		Class171.anInt2125
		    += -1654274706 * class244.method4900(923638758);
		method12932(class244.method4902(-2122980419), -874930213);
	    }
	    RuntimeException_Sub2.anApplet11092 = Class360.anApplet5507;
	    method12966(string, string_37_, i, i_38_, i_39_, i_40_,
			-1173827327);
	} catch (Throwable throwable) {
	    Class14.method600(null, throwable, 1421669860);
	    method12892("crash", (byte) -8);
	}
    }
    
    final void method12914(Class244 class244, String string, String string_41_,
			   int i, int i_42_, int i_43_, int i_44_,
			   boolean bool) {
	try {
	    method12896(Class250.aClass250_3943, bool, -129998135);
	    Class120_Sub17.anInt10263
		= ((Class2.anInt17
		    = class244.method4899(-613890982) * -1387402091)
		   * -1867273073);
	    Class171.anInt2125
		= ((Class14.anInt111
		    = class244.method4913(1900657542) * -1212509317)
		   * 781703925);
	    anInt7654 = 0;
	    anInt7655 = 0;
	    if (Class421_Sub12.method14150(-378963019)
		== Class250.aClass250_3942) {
		Class120_Sub17.anInt10263
		    += -883653002 * class244.method4909(382061430);
		Class171.anInt2125
		    += -1654274706 * class244.method4900(2042007308);
		method12932(class244.method4902(1877430829), -874930213);
	    }
	    RuntimeException_Sub2.anApplet11092 = Class360.anApplet5507;
	    method12966(string, string_41_, i, i_42_, i_43_, i_44_,
			-1173827327);
	} catch (Throwable throwable) {
	    Class14.method600(null, throwable, 1897454768);
	    method12892("crash", (byte) -60);
	}
    }
    
    final void method12915(String string, String string_45_, int i, int i_46_,
			   int i_47_, int i_48_) throws Exception {
	Class18.anInt129 = 1133377231 * i_46_;
	Class166.anInt2115 = i * -659793743;
	RuntimeException_Sub2.anInt11087 = i_47_ * 1707839409;
	RuntimeException_Sub2.anInt11090 = 514093699 * i_48_;
	aString7677 = "Unknown";
	Class570.aString7413 = "1.1";
	try {
	    aString7677 = System.getProperty("java.vendor");
	    Class570.aString7413 = System.getProperty("java.version");
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    Class85.aString969 = System.getProperty("os.name");
	} catch (Exception exception) {
	    Class85.aString969 = "Unknown";
	}
	aString7685 = Class85.aString969.toLowerCase();
	try {
	    Class206.aString2470 = System.getProperty("os.arch").toLowerCase();
	} catch (Exception exception) {
	    Class206.aString2470 = "";
	}
	try {
	    Class274.aString4134
		= System.getProperty("os.version").toLowerCase();
	} catch (Exception exception) {
	    Class274.aString4134 = "";
	}
	try {
	    Class115.aString1341 = System.getProperty("user.home");
	    if (Class115.aString1341 != null)
		Class115.aString1341
		    = new StringBuilder().append(Class115.aString1341).append
			  ("/").toString();
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    if (aString7685.startsWith("win")) {
		if (Class115.aString1341 == null)
		    Class115.aString1341 = System.getenv("USERPROFILE");
	    } else if (null == Class115.aString1341)
		Class115.aString1341 = System.getenv("HOME");
	    if (Class115.aString1341 != null)
		Class115.aString1341
		    = new StringBuilder().append(Class115.aString1341).append
			  ("/").toString();
	} catch (Exception exception) {
	    /* empty */
	}
	if (Class115.aString1341 == null)
	    Class115.aString1341 = "~/";
	try {
	    Class266.anEventQueue4061
		= Toolkit.getDefaultToolkit().getSystemEventQueue();
	} catch (Throwable throwable) {
	    /* empty */
	}
	Class335.aStringArray5285
	    = new String[] { "c:/rscache/", "/rscache/", "c:/windows/",
			     "c:/winnt/", "c:/", Class115.aString1341, "/tmp/",
			     "" };
	Class471.aStringArray6385
	    = new String[] { new StringBuilder().append(".jagex_cache_").append
				 (938668113 * Class166.anInt2115).toString(),
			     new StringBuilder().append(".file_store_").append
				 (938668113 * Class166.anInt2115).toString() };
    while_152_:
	for (int i_49_ = 0; i_49_ < 4; i_49_++) {
	    Class478_Sub1_Sub5.aFile10675
		= method12873(string, string_45_, i_49_, (short) -9850);
	    if (!Class478_Sub1_Sub5.aFile10675.exists())
		Class478_Sub1_Sub5.aFile10675.mkdirs();
	    File[] files = Class478_Sub1_Sub5.aFile10675.listFiles();
	    if (null != files) {
		File[] files_50_ = files;
		for (int i_51_ = 0; i_51_ < files_50_.length; i_51_++) {
		    File file = files_50_[i_51_];
		    if (!method12897(file, false, (byte) -16))
			continue while_152_;
		}
	    }
	    break;
	}
	Class175.method3881(Class478_Sub1_Sub5.aFile10675, -2121516607);
	Class168.method3823((byte) -67);
	aClass418_7672
	    = new Class418(new Class414((Class626.method13500
					 ("main_file_cache.dat2", 1230749589)),
					"rw", 3221225472L),
			   5200, 0);
	aClass418_7658 = new Class418(new Class414((Class626.method13500
						    ("main_file_cache.idx255",
						     1230749589)),
						   "rw", 1048576L),
				      6000, 0);
	Class456.aClass418Array6291
	    = new Class418[-1425977297 * Class18.anInt129];
	for (int i_52_ = 0; i_52_ < Class18.anInt129 * -1425977297; i_52_++)
	    Class456.aClass418Array6291[i_52_]
		= new Class418(new Class414((Class626.method13500
					     (new StringBuilder().append
						  ("main_file_cache.idx")
						  .append
						  (i_52_).toString(),
					      1230749589)),
					    "rw", 1048576L),
			       6000, 0);
	try {
	    Class20.aClass410_194 = new Class410();
	} catch (Exception exception) {
	    Class441.aBool6211 = false;
	}
	Class179.aClass589_2170 = new Class589();
	ThreadGroup threadgroup = Thread.currentThread().getThreadGroup();
	for (ThreadGroup threadgroup_53_ = threadgroup.getParent();
	     null != threadgroup_53_;
	     threadgroup_53_ = threadgroup.getParent())
	    threadgroup = threadgroup_53_;
	Thread[] threads = new Thread[1000];
	threadgroup.enumerate(threads);
	for (int i_54_ = 0; i_54_ < threads.length; i_54_++) {
	    if (threads[i_54_] != null
		&& threads[i_54_].getName().startsWith("AWT"))
		threads[i_54_].setPriority(1);
	}
	Thread thread = new Thread(this);
	thread.setDaemon(true);
	thread.start();
	thread.setPriority(1);
    }
    
    File method12916(String string, String string_55_, int i) {
	String string_56_
	    = (0 == i ? ""
	       : new StringBuilder().append("").append(i).toString());
	Class44.aFile620
	    = new File(Class115.aString1341,
		       new StringBuilder().append("jagex_cl_").append
			   (string).append
			   ("_").append
			   (string_55_).append
			   (string_56_).append
			   (".dat").toString());
	String string_57_ = null;
	String string_58_ = null;
	boolean bool = false;
	if (Class44.aFile620.exists()) {
	    try {
		Class414 class414
		    = new Class414(Class44.aFile620, "rw", 10000L);
		int i_59_;
		Class243_Sub10 class243_sub10;
		for (class243_sub10
			 = (new Class243_Sub10
			    ((int) class414.method7372(-234278639)));
		     (class243_sub10.anInt8688 * 126215893
		      < class243_sub10.aByteArray8691.length);
		     class243_sub10.anInt8688 += -2044845443 * i_59_) {
		    i_59_ = class414.method7373(class243_sub10.aByteArray8691,
						(126215893
						 * class243_sub10.anInt8688),
						((class243_sub10
						  .aByteArray8691).length
						 - 126215893 * (class243_sub10
								.anInt8688)),
						1576344153);
		    if (-1 == i_59_)
			throw new IOException();
		}
		class243_sub10.anInt8688 = 0;
		i_59_ = class243_sub10.method14878((byte) 79);
		if (i_59_ < 1 || i_59_ > 3)
		    throw new IOException(new StringBuilder().append("").append
					      (i_59_).toString());
		int i_60_ = 0;
		if (i_59_ > 1)
		    i_60_ = class243_sub10.method14878((byte) -37);
		if (i_59_ <= 2) {
		    string_57_ = class243_sub10.method14682(-437499001);
		    if (1 == i_60_)
			string_58_ = class243_sub10.method14682(-437499001);
		} else {
		    string_57_ = class243_sub10.method14677((byte) 97);
		    if (i_60_ == 1)
			string_58_ = class243_sub10.method14677((byte) 1);
		}
		class414.method7371(-456790096);
	    } catch (IOException ioexception) {
		ioexception.printStackTrace();
	    }
	    if (string_57_ != null) {
		File file = new File(string_57_);
		if (!file.exists())
		    string_57_ = null;
	    }
	    if (string_57_ != null) {
		File file = new File(string_57_, "test.dat");
		if (!method12897(file, true, (byte) -94))
		    string_57_ = null;
	    }
	}
	if (string_57_ == null && i == 0) {
	while_153_:
	    for (int i_61_ = 0; i_61_ < Class471.aStringArray6385.length;
		 i_61_++) {
		for (int i_62_ = 0; i_62_ < Class335.aStringArray5285.length;
		     i_62_++) {
		    File file = new File(new StringBuilder().append
					     (Class335.aStringArray5285[i_62_])
					     .append
					     (Class471.aStringArray6385[i_61_])
					     .append
					     (File.separatorChar).append
					     (string).append
					     (File.separatorChar).toString());
		    if (file.exists()
			&& method12897(new File(file, "test.dat"), true,
				       (byte) -36)) {
			string_57_ = file.toString();
			bool = true;
			break while_153_;
		    }
		}
	    }
	}
	if (null == string_57_) {
	    string_57_
		= new StringBuilder().append(Class115.aString1341).append
		      (File.separatorChar).append
		      ("jagexcache").append
		      (string_56_).append
		      (File.separatorChar).append
		      (string).append
		      (File.separatorChar).append
		      (string_55_).append
		      (File.separatorChar).toString();
	    bool = true;
	}
	if (string_58_ != null) {
	    File file = new File(string_58_);
	    File file_63_ = new File(string_57_);
	    try {
		File[] files = file.listFiles();
		File[] files_64_ = files;
		for (int i_65_ = 0; i_65_ < files_64_.length; i_65_++) {
		    File file_66_ = files_64_[i_65_];
		    File file_67_ = new File(file_63_, file_66_.getName());
		    boolean bool_68_ = file_66_.renameTo(file_67_);
		    if (!bool_68_)
			throw new IOException();
		}
	    } catch (Exception exception) {
		exception.printStackTrace();
	    }
	    bool = true;
	}
	if (bool)
	    method12935(new File(string_57_), null, -293753946);
	return new File(string_57_);
    }
    
    public boolean method12917(File file) {
	if (null == file)
	    return false;
	if (!file.exists())
	    return false;
	if (!file.isDirectory())
	    return false;
	if (file.listFiles().length != 0)
	    return false;
	if (!method12897(new File(file, "test.dat"), true, (byte) -6))
	    return false;
	method12935(file, Class478_Sub1_Sub5.aFile10675, 509585134);
	return true;
    }
    
    public boolean method12918(File file) {
	if (null == file)
	    return false;
	if (!file.exists())
	    return false;
	if (!file.isDirectory())
	    return false;
	if (file.listFiles().length != 0)
	    return false;
	if (!method12897(new File(file, "test.dat"), true, (byte) -16))
	    return false;
	method12935(file, Class478_Sub1_Sub5.aFile10675, 1990791809);
	return true;
    }
    
    void method12919(File file, File file_69_) {
	try {
	    Class414 class414 = new Class414(Class44.aFile620, "rw", 10000L);
	    Class243_Sub10 class243_sub10 = new Class243_Sub10(500);
	    class243_sub10.method14800(3, 1782298388);
	    class243_sub10.method14800(null != file_69_ ? 1 : 0, 477979730);
	    class243_sub10.method14654(file.getPath(), (byte) -23);
	    if (file_69_ != null)
		class243_sub10.method14654(file_69_.getPath(), (byte) -27);
	    class414.method7374(class243_sub10.aByteArray8691, 0,
				126215893 * class243_sub10.anInt8688,
				(short) 255);
	    class414.method7371(1786449487);
	} catch (IOException ioexception) {
	    ioexception.printStackTrace();
	}
    }
    
    void method12920(File file, File file_70_) {
	try {
	    Class414 class414 = new Class414(Class44.aFile620, "rw", 10000L);
	    Class243_Sub10 class243_sub10 = new Class243_Sub10(500);
	    class243_sub10.method14800(3, 1127465434);
	    class243_sub10.method14800(null != file_70_ ? 1 : 0, 801171344);
	    class243_sub10.method14654(file.getPath(), (byte) -56);
	    if (file_70_ != null)
		class243_sub10.method14654(file_70_.getPath(), (byte) -19);
	    class414.method7374(class243_sub10.aByteArray8691, 0,
				126215893 * class243_sub10.anInt8688,
				(short) 255);
	    class414.method7371(-430408439);
	} catch (IOException ioexception) {
	    ioexception.printStackTrace();
	}
    }
    
    abstract void method12921();
    
    public static File method12922() {
	return Class478_Sub1_Sub5.aFile10675;
    }
    
    public void method12923() {
	do {
	    try {
		try {
		    method12976(225564794);
		} catch (ThreadDeath threaddeath) {
		    throw threaddeath;
		} catch (Throwable throwable) {
		    Class14.method600(method12872(-292323001), throwable,
				      1931756859);
		    method12892("crash", (byte) 13);
		    method12882(true, -518012717);
		    break;
		}
		method12882(true, 819777802);
	    } catch (Object object) {
		method12882(true, 1517657452);
		throw object;
	    }
	} while (false);
    }
    
    public static Class414 method12924(String string, String string_71_,
				       boolean bool) {
	File file = new File(Class478_Sub1_Sub5.aFile10675,
			     new StringBuilder().append("preferences").append
				 (string).append
				 (".dat").toString());
	do {
	    if (file.exists()) {
		Class414 class414;
		try {
		    Class414 class414_72_ = new Class414(file, "rw", 10000L);
		    class414 = class414_72_;
		} catch (IOException ioexception) {
		    break;
		}
		return class414;
	    }
	} while (false);
	String string_73_ = "";
	if (Class166.anInt2115 * 938668113 == 33)
	    string_73_ = "_rc";
	else if (Class166.anInt2115 * 938668113 == 34)
	    string_73_ = "_wip";
	File file_74_ = new File(Class115.aString1341,
				 new StringBuilder().append("jagex_").append
				     (string_71_).append
				     ("_preferences").append
				     (string).append
				     (string_73_).append
				     (".dat").toString());
	do {
	    if (!bool && file_74_.exists()) {
		Class414 class414;
		try {
		    Class414 class414_75_
			= new Class414(file_74_, "rw", 10000L);
		    class414 = class414_75_;
		} catch (IOException ioexception) {
		    break;
		}
		return class414;
	    }
	} while (false);
	Class414 class414;
	try {
	    Class414 class414_76_ = new Class414(file, "rw", 10000L);
	    class414 = class414_76_;
	} catch (IOException ioexception) {
	    throw new RuntimeException();
	}
	return class414;
    }
    
    public static Class414 method12925(String string, String string_77_,
				       boolean bool) {
	File file = new File(Class478_Sub1_Sub5.aFile10675,
			     new StringBuilder().append("preferences").append
				 (string).append
				 (".dat").toString());
	do {
	    if (file.exists()) {
		Class414 class414;
		try {
		    Class414 class414_78_ = new Class414(file, "rw", 10000L);
		    class414 = class414_78_;
		} catch (IOException ioexception) {
		    break;
		}
		return class414;
	    }
	} while (false);
	String string_79_ = "";
	if (Class166.anInt2115 * 938668113 == 33)
	    string_79_ = "_rc";
	else if (Class166.anInt2115 * 938668113 == 34)
	    string_79_ = "_wip";
	File file_80_ = new File(Class115.aString1341,
				 new StringBuilder().append("jagex_").append
				     (string_77_).append
				     ("_preferences").append
				     (string).append
				     (string_79_).append
				     (".dat").toString());
	do {
	    if (!bool && file_80_.exists()) {
		Class414 class414;
		try {
		    Class414 class414_81_
			= new Class414(file_80_, "rw", 10000L);
		    class414 = class414_81_;
		} catch (IOException ioexception) {
		    break;
		}
		return class414;
	    }
	} while (false);
	Class414 class414;
	try {
	    Class414 class414_82_ = new Class414(file, "rw", 10000L);
	    class414 = class414_82_;
	} catch (IOException ioexception) {
	    throw new RuntimeException();
	}
	return class414;
    }
    
    static void method12926() {
	try {
	    File file = new File(Class115.aString1341, "random.dat");
	    if (file.exists())
		aClass418_7671
		    = new Class418(new Class414(file, "rw", 25L), 24, 0);
	    else {
	    while_154_:
		for (int i = 0; i < Class471.aStringArray6385.length; i++) {
		    for (int i_83_ = 0;
			 i_83_ < Class335.aStringArray5285.length; i_83_++) {
			File file_84_
			    = new File(new StringBuilder().append
					   (Class335.aStringArray5285[i_83_])
					   .append
					   (Class471.aStringArray6385[i])
					   .append
					   (File.separatorChar).append
					   ("random.dat").toString());
			if (file_84_.exists()) {
			    aClass418_7671
				= new Class418(new Class414(file_84_, "rw",
							    25L),
					       24, 0);
			    break while_154_;
			}
		    }
		}
	    }
	    if (aClass418_7671 == null) {
		RandomAccessFile randomaccessfile
		    = new RandomAccessFile(file, "rw");
		int i = randomaccessfile.read();
		randomaccessfile.seek(0L);
		randomaccessfile.write(i);
		randomaccessfile.seek(0L);
		randomaccessfile.close();
		aClass418_7671
		    = new Class418(new Class414(file, "rw", 25L), 24, 0);
	    }
	} catch (IOException ioexception) {
	    /* empty */
	}
    }
    
    static void method12927() {
	try {
	    File file = new File(Class115.aString1341, "random.dat");
	    if (file.exists())
		aClass418_7671
		    = new Class418(new Class414(file, "rw", 25L), 24, 0);
	    else {
	    while_155_:
		for (int i = 0; i < Class471.aStringArray6385.length; i++) {
		    for (int i_85_ = 0;
			 i_85_ < Class335.aStringArray5285.length; i_85_++) {
			File file_86_
			    = new File(new StringBuilder().append
					   (Class335.aStringArray5285[i_85_])
					   .append
					   (Class471.aStringArray6385[i])
					   .append
					   (File.separatorChar).append
					   ("random.dat").toString());
			if (file_86_.exists()) {
			    aClass418_7671
				= new Class418(new Class414(file_86_, "rw",
							    25L),
					       24, 0);
			    break while_155_;
			}
		    }
		}
	    }
	    if (aClass418_7671 == null) {
		RandomAccessFile randomaccessfile
		    = new RandomAccessFile(file, "rw");
		int i = randomaccessfile.read();
		randomaccessfile.seek(0L);
		randomaccessfile.write(i);
		randomaccessfile.seek(0L);
		randomaccessfile.close();
		aClass418_7671
		    = new Class418(new Class414(file, "rw", 25L), 24, 0);
	    }
	} catch (IOException ioexception) {
	    /* empty */
	}
    }
    
    public static void method12928(Class243_Sub10 class243_sub10) {
	byte[] is = new byte[24];
	try {
	    aClass418_7671.method7427(0L);
	    aClass418_7671.method7429(is, -239688769);
	    int i;
	    for (i = 0; i < 24 && 0 == is[i]; i++) {
		/* empty */
	    }
	    if (i >= 24)
		throw new IOException();
	} catch (Exception exception) {
	    for (int i = 0; i < 24; i++)
		is[i] = (byte) -1;
	}
	class243_sub10.method14655(is, 0, 24, 1923867121);
    }
    
    public static void method12929(Class243_Sub10 class243_sub10) {
	byte[] is = new byte[24];
	try {
	    aClass418_7671.method7427(0L);
	    aClass418_7671.method7429(is, -239688769);
	    int i;
	    for (i = 0; i < 24 && 0 == is[i]; i++) {
		/* empty */
	    }
	    if (i >= 24)
		throw new IOException();
	} catch (Exception exception) {
	    for (int i = 0; i < 24; i++)
		is[i] = (byte) -1;
	}
	class243_sub10.method14655(is, 0, 24, 1923867121);
    }
    
    abstract void method12930();
    
    public final synchronized void paint(Graphics graphics) {
	if (!aBool7674) {
	    aBool7657 = true;
	    if ((Class46.method1238(1016006239)
		 - -9159938852138333225L * aLong7661)
		> 1000L) {
		Rectangle rectangle = graphics.getClipBounds();
		if (null == rectangle
		    || ((rectangle.width
			 >= Class120_Sub17.anInt10263 * 201694707)
			&& (rectangle.height
			    >= Class171.anInt2125 * 1910610695)))
		    aBool7660 = true;
	    }
	}
    }
    
    void method12931(String string, String string_87_) {
	if (!((Class590) this).aBool7646) {
	    ((Class590) this).aBool7646 = true;
	    System.out.println(new StringBuilder().append("error_game_").append
				   (string).toString());
	    try {
		Class615.method13262(Class360.anApplet5507, "loggedout",
				     -98730341);
	    } catch (Throwable throwable) {
		/* empty */
	    }
	    try {
		Class360.anApplet5507.getAppletContext().showDocument
		    (new URL(Class360.anApplet5507.getCodeBase(),
			     new StringBuilder().append("error_game_").append
				 (string).append
				 (".ws?").append
				 (string_87_).toString()),
		     "_top");
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    synchronized void method12932(String string, int i) {
	Class359.aFrame5503 = new Frame();
	Class359.aFrame5503.setTitle(string);
	Class359.aFrame5503.setResizable(true);
	Class359.aFrame5503.addWindowListener(this);
	Class359.aFrame5503.setBackground(Color.black);
	Class359.aFrame5503.setVisible(true);
	Class359.aFrame5503.toFront();
	Insets insets = Class359.aFrame5503.getInsets();
	Class359.aFrame5503.setSize((insets.right
				     + (201694707 * Class120_Sub17.anInt10263
					+ insets.left)),
				    (insets.bottom
				     + (Class171.anInt2125 * 1910610695
					+ insets.top)));
    }
    
    synchronized void method12933(String string) {
	Class359.aFrame5503 = new Frame();
	Class359.aFrame5503.setTitle(string);
	Class359.aFrame5503.setResizable(true);
	Class359.aFrame5503.addWindowListener(this);
	Class359.aFrame5503.setBackground(Color.black);
	Class359.aFrame5503.setVisible(true);
	Class359.aFrame5503.toFront();
	Insets insets = Class359.aFrame5503.getInsets();
	Class359.aFrame5503.setSize((insets.right
				     + (201694707 * Class120_Sub17.anInt10263
					+ insets.left)),
				    (insets.bottom
				     + (Class171.anInt2125 * 1910610695
					+ insets.top)));
    }
    
    synchronized void method12934(String string) {
	Class359.aFrame5503 = new Frame();
	Class359.aFrame5503.setTitle(string);
	Class359.aFrame5503.setResizable(true);
	Class359.aFrame5503.addWindowListener(this);
	Class359.aFrame5503.setBackground(Color.black);
	Class359.aFrame5503.setVisible(true);
	Class359.aFrame5503.toFront();
	Insets insets = Class359.aFrame5503.getInsets();
	Class359.aFrame5503.setSize((insets.right
				     + (201694707 * Class120_Sub17.anInt10263
					+ insets.left)),
				    (insets.bottom
				     + (Class171.anInt2125 * 1910610695
					+ insets.top)));
    }
    
    void method12935(File file, File file_88_, int i) {
	try {
	    Class414 class414 = new Class414(Class44.aFile620, "rw", 10000L);
	    Class243_Sub10 class243_sub10 = new Class243_Sub10(500);
	    class243_sub10.method14800(3, 1542196706);
	    class243_sub10.method14800(null != file_88_ ? 1 : 0, -1065044332);
	    class243_sub10.method14654(file.getPath(), (byte) -115);
	    if (file_88_ != null)
		class243_sub10.method14654(file_88_.getPath(), (byte) -102);
	    class414.method7374(class243_sub10.aByteArray8691, 0,
				126215893 * class243_sub10.anInt8688,
				(short) 255);
	    class414.method7371(1050909456);
	} catch (IOException ioexception) {
	    ioexception.printStackTrace();
	}
    }
    
    synchronized void method12936() {
	method12968((byte) -29);
	Container container = Class209.method4307(267661835);
	Class631.aCanvas8104 = new Canvas_Sub1(container);
	method12877(container, (byte) 40);
    }
    
    public static Container method12937() {
	if (Class450.aFrame6260 != null)
	    return Class450.aFrame6260;
	if (Class359.aFrame5503 != null)
	    return Class359.aFrame5503;
	return Class360.anApplet5507;
    }
    
    public static Container method12938() {
	if (Class450.aFrame6260 != null)
	    return Class450.aFrame6260;
	if (Class359.aFrame5503 != null)
	    return Class359.aFrame5503;
	return Class360.anApplet5507;
    }
    
    void method12939(Container container) {
	container.setBackground(Color.black);
	container.setLayout(null);
	container.add(Class631.aCanvas8104);
	Class631.aCanvas8104.setSize(-1641316675 * Class2.anInt17,
				     Class14.anInt111 * -837921869);
	Class631.aCanvas8104.setVisible(true);
	if (Class359.aFrame5503 == container) {
	    Insets insets = Class359.aFrame5503.getInsets();
	    Class631.aCanvas8104.setLocation((anInt7654 * 1320420697
					      + insets.left),
					     (insets.top
					      + anInt7655 * -348785727));
	} else
	    Class631.aCanvas8104.setLocation(anInt7654 * 1320420697,
					     -348785727 * anInt7655);
	Class631.aCanvas8104.addFocusListener(this);
	Class631.aCanvas8104.requestFocus();
	Class259.aBool4033 = true;
	aBool7663 = true;
	Class631.aCanvas8104.setFocusTraversalKeysEnabled(false);
	aBool7657 = true;
	aBool7660 = false;
	aLong7661 = Class46.method1238(-1341483205) * -4443327343855904793L;
    }
    
    void method12940(Container container) {
	container.setBackground(Color.black);
	container.setLayout(null);
	container.add(Class631.aCanvas8104);
	Class631.aCanvas8104.setSize(-1641316675 * Class2.anInt17,
				     Class14.anInt111 * -837921869);
	Class631.aCanvas8104.setVisible(true);
	if (Class359.aFrame5503 == container) {
	    Insets insets = Class359.aFrame5503.getInsets();
	    Class631.aCanvas8104.setLocation((anInt7654 * 1320420697
					      + insets.left),
					     (insets.top
					      + anInt7655 * -348785727));
	} else
	    Class631.aCanvas8104.setLocation(anInt7654 * 1320420697,
					     -348785727 * anInt7655);
	Class631.aCanvas8104.addFocusListener(this);
	Class631.aCanvas8104.requestFocus();
	Class259.aBool4033 = true;
	aBool7663 = true;
	Class631.aCanvas8104.setFocusTraversalKeysEnabled(false);
	aBool7657 = true;
	aBool7660 = false;
	aLong7661 = Class46.method1238(-1224093803) * -4443327343855904793L;
    }
    
    final boolean method12941() {
	String string
	    = Class360.anApplet5507.getDocumentBase().getHost().toLowerCase();
	if (string.equals("jagex.com") || string.endsWith(".jagex.com"))
	    return true;
	if (string.equals("runescape.com")
	    || string.endsWith(".runescape.com"))
	    return true;
	if (string.equals("stellardawn.com")
	    || string.endsWith(".stellardawn.com"))
	    return true;
	if (string.endsWith("127.0.0.1"))
	    return true;
	for (/**/;
	     (string.length() > 0 && string.charAt(string.length() - 1) >= '0'
	      && string.charAt(string.length() - 1) <= '9');
	     string = string.substring(0, string.length() - 1)) {
	    /* empty */
	}
	if (string.endsWith("192.168.1."))
	    return true;
	method12892("invalidhost", (byte) -48);
	return false;
    }
    
    void method12942(Container container) {
	container.setBackground(Color.black);
	container.setLayout(null);
	container.add(Class631.aCanvas8104);
	Class631.aCanvas8104.setSize(-1641316675 * Class2.anInt17,
				     Class14.anInt111 * -837921869);
	Class631.aCanvas8104.setVisible(true);
	if (Class359.aFrame5503 == container) {
	    Insets insets = Class359.aFrame5503.getInsets();
	    Class631.aCanvas8104.setLocation((anInt7654 * 1320420697
					      + insets.left),
					     (insets.top
					      + anInt7655 * -348785727));
	} else
	    Class631.aCanvas8104.setLocation(anInt7654 * 1320420697,
					     -348785727 * anInt7655);
	Class631.aCanvas8104.addFocusListener(this);
	Class631.aCanvas8104.requestFocus();
	Class259.aBool4033 = true;
	aBool7663 = true;
	Class631.aCanvas8104.setFocusTraversalKeysEnabled(false);
	aBool7657 = true;
	aBool7660 = false;
	aLong7661 = Class46.method1238(-1665203812) * -4443327343855904793L;
    }
    
    static void method12943(Class243_Sub10 class243_sub10, int i) {
	if (null != aClass418_7671) {
	    try {
		aClass418_7671.method7427(0L);
		aClass418_7671.method7432(class243_sub10.aByteArray8691, i, 24,
					  630213313);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    void method12944() {
	if (null != Class631.aCanvas8104) {
	    Class631.aCanvas8104.removeFocusListener(this);
	    Class631.aCanvas8104.getParent().setBackground(Color.black);
	    Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	}
    }
    
    void method12945(String string) {
	if (!((Class590) this).aBool7646) {
	    ((Class590) this).aBool7646 = true;
	    System.out.println(new StringBuilder().append("error_game_").append
				   (string).toString());
	    try {
		Class615.method13262(Class360.anApplet5507, "loggedout",
				     -98730341);
	    } catch (Throwable throwable) {
		/* empty */
	    }
	    try {
		Class360.anApplet5507.getAppletContext().showDocument
		    (new URL(Class360.anApplet5507.getCodeBase(),
			     new StringBuilder().append("error_game_").append
				 (string).append
				 (".ws").toString()),
		     "_top");
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    final boolean method12946() {
	String string
	    = Class360.anApplet5507.getDocumentBase().getHost().toLowerCase();
	if (string.equals("jagex.com") || string.endsWith(".jagex.com"))
	    return true;
	if (string.equals("runescape.com")
	    || string.endsWith(".runescape.com"))
	    return true;
	if (string.equals("stellardawn.com")
	    || string.endsWith(".stellardawn.com"))
	    return true;
	if (string.endsWith("127.0.0.1"))
	    return true;
	for (/**/;
	     (string.length() > 0 && string.charAt(string.length() - 1) >= '0'
	      && string.charAt(string.length() - 1) <= '9');
	     string = string.substring(0, string.length() - 1)) {
	    /* empty */
	}
	if (string.endsWith("192.168.1."))
	    return true;
	method12892("invalidhost", (byte) 36);
	return false;
    }
    
    void method12947() {
	if (null != aString7677) {
	    String string = aString7677.toLowerCase();
	    if (string.indexOf("sun") != -1 || string.indexOf("apple") != -1) {
		String string_89_ = Class570.aString7413;
		if (string_89_.equals("1.1") || string_89_.startsWith("1.1.")
		    || string_89_.equals("1.2")
		    || string_89_.startsWith("1.2.")
		    || string_89_.equals("1.3")
		    || string_89_.startsWith("1.3.")
		    || string_89_.equals("1.4")
		    || string_89_.startsWith("1.4.")
		    || string_89_.equals("1.5")
		    || string_89_.startsWith("1.5.")
		    || string_89_.equals("1.6.0")) {
		    method12892("wrongjava", (byte) 65);
		    return;
		}
		if (string_89_.startsWith("1.6.0_")) {
		    int i;
		    for (i = 6; (i < string_89_.length()
				 && Class484.method11059(string_89_.charAt(i),
							 716551957)); i++) {
			/* empty */
		    }
		    String string_90_ = string_89_.substring(6, i);
		    if (Class498.method11287(string_90_, 771466725)
			&& Class240.method4874(string_90_, -207436158) < 10) {
			method12892("wrongjava", (byte) 6);
			return;
		    }
		}
	    }
	}
	Class209.method4307(267661835).setFocusCycleRoot(true);
	anInt7680 = (((int) (Runtime.getRuntime().maxMemory() / 1048576L) + 1)
		     * -1164317301);
	anInt7681 = Runtime.getRuntime().availableProcessors() * -421292011;
	method12899(-726526792);
	method12889(1317157894);
	Class458.aClass251_6306 = Class474.method8426(82748843);
	while (aLong7665 * 7332127009189606463L == 0L
	       || (Class46.method1238(-1443589240)
		   < 7332127009189606463L * aLong7665)) {
	    anInt7664
		= Class458.aClass251_6306.method5007(-6019249319442745853L
						     * aLong7678) * 908588141;
	    for (int i = 0; i < 367670629 * anInt7664; i++)
		method12879(-1790392367);
	    method12880((byte) 7);
	    Class296.method5942(Class631.aCanvas8104, (byte) 41);
	}
    }
    
    void method12948() {
	long l = Class46.method1238(1366408186);
	long l_91_ = aLongArray7650[1142573579 * Class359.anInt5502];
	aLongArray7650[Class359.anInt5502 * 1142573579] = l;
	Class359.anInt5502
	    = (1 + 1142573579 * Class359.anInt5502 & 0x1f) * -902008413;
	if (0L != l_91_ && l <= l_91_) {
	    /* empty */
	}
	synchronized (this) {
	    Class259.aBool4033 = aBool7663;
	}
	method12887(-1604490716);
    }
    
    final void method12949(boolean bool) {
	synchronized (this) {
	    if (aBool7674)
		return;
	    aBool7674 = true;
	}
	try {
	    method12891(-355200140);
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    aClass418_7672.method7426(-1941774529);
	    for (int i = 0; i < -1425977297 * Class18.anInt129; i++)
		Class456.aClass418Array6291[i].method7426(-1831712422);
	    aClass418_7658.method7426(-598885736);
	    aClass418_7671.method7426(-642967902);
	} catch (Exception exception) {
	    /* empty */
	}
	if (((Class590) this).aBool7682) {
	    try {
		QueryPerformanceCounter.quit();
	    } catch (Throwable throwable) {
		/* empty */
	    }
	}
	if (Class109.method2819((byte) -68))
	    Class437.method7817(-1919478425).method107(-915047244);
	if (Class631.aCanvas8104 != null) {
	    try {
		Class631.aCanvas8104.removeFocusListener(this);
		Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
	if (null != Class359.aFrame5503) {
	    Class359.aFrame5503.setVisible(false);
	    Class359.aFrame5503.dispose();
	    Class359.aFrame5503 = null;
	}
    }
    
    final void method12950(boolean bool) {
	synchronized (this) {
	    if (aBool7674)
		return;
	    aBool7674 = true;
	}
	try {
	    method12891(-355200140);
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    aClass418_7672.method7426(-988421707);
	    for (int i = 0; i < -1425977297 * Class18.anInt129; i++)
		Class456.aClass418Array6291[i].method7426(-579183685);
	    aClass418_7658.method7426(-243816413);
	    aClass418_7671.method7426(-2094155734);
	} catch (Exception exception) {
	    /* empty */
	}
	if (((Class590) this).aBool7682) {
	    try {
		QueryPerformanceCounter.quit();
	    } catch (Throwable throwable) {
		/* empty */
	    }
	}
	if (Class109.method2819((byte) 81))
	    Class437.method7817(1838555315).method107(607945429);
	if (Class631.aCanvas8104 != null) {
	    try {
		Class631.aCanvas8104.removeFocusListener(this);
		Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
	if (null != Class359.aFrame5503) {
	    Class359.aFrame5503.setVisible(false);
	    Class359.aFrame5503.dispose();
	    Class359.aFrame5503 = null;
	}
    }
    
    final void method12951(boolean bool) {
	synchronized (this) {
	    if (aBool7674)
		return;
	    aBool7674 = true;
	}
	try {
	    method12891(-355200140);
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    aClass418_7672.method7426(-1873148481);
	    for (int i = 0; i < -1425977297 * Class18.anInt129; i++)
		Class456.aClass418Array6291[i].method7426(-989201464);
	    aClass418_7658.method7426(-1598795138);
	    aClass418_7671.method7426(-1852538416);
	} catch (Exception exception) {
	    /* empty */
	}
	if (((Class590) this).aBool7682) {
	    try {
		QueryPerformanceCounter.quit();
	    } catch (Throwable throwable) {
		/* empty */
	    }
	}
	if (Class109.method2819((byte) -14))
	    Class437.method7817(68309928).method107(25040113);
	if (Class631.aCanvas8104 != null) {
	    try {
		Class631.aCanvas8104.removeFocusListener(this);
		Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
	if (null != Class359.aFrame5503) {
	    Class359.aFrame5503.setVisible(false);
	    Class359.aFrame5503.dispose();
	    Class359.aFrame5503 = null;
	}
    }
    
    final void method12952(boolean bool) {
	synchronized (this) {
	    if (aBool7674)
		return;
	    aBool7674 = true;
	}
	try {
	    method12891(-355200140);
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    aClass418_7672.method7426(-1178193200);
	    for (int i = 0; i < -1425977297 * Class18.anInt129; i++)
		Class456.aClass418Array6291[i].method7426(-1455694713);
	    aClass418_7658.method7426(-965285602);
	    aClass418_7671.method7426(-923896797);
	} catch (Exception exception) {
	    /* empty */
	}
	if (((Class590) this).aBool7682) {
	    try {
		QueryPerformanceCounter.quit();
	    } catch (Throwable throwable) {
		/* empty */
	    }
	}
	if (Class109.method2819((byte) -23))
	    Class437.method7817(-2136228894).method107(-933117983);
	if (Class631.aCanvas8104 != null) {
	    try {
		Class631.aCanvas8104.removeFocusListener(this);
		Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
	if (null != Class359.aFrame5503) {
	    Class359.aFrame5503.setVisible(false);
	    Class359.aFrame5503.dispose();
	    Class359.aFrame5503 = null;
	}
    }
    
    final void method12953(boolean bool) {
	synchronized (this) {
	    if (aBool7674)
		return;
	    aBool7674 = true;
	}
	try {
	    method12891(-355200140);
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    aClass418_7672.method7426(-1715868345);
	    for (int i = 0; i < -1425977297 * Class18.anInt129; i++)
		Class456.aClass418Array6291[i].method7426(-1226671908);
	    aClass418_7658.method7426(-303488852);
	    aClass418_7671.method7426(-1544428120);
	} catch (Exception exception) {
	    /* empty */
	}
	if (((Class590) this).aBool7682) {
	    try {
		QueryPerformanceCounter.quit();
	    } catch (Throwable throwable) {
		/* empty */
	    }
	}
	if (Class109.method2819((byte) 73))
	    Class437.method7817(-1105475899).method107(-1378324600);
	if (Class631.aCanvas8104 != null) {
	    try {
		Class631.aCanvas8104.removeFocusListener(this);
		Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
	if (null != Class359.aFrame5503) {
	    Class359.aFrame5503.setVisible(false);
	    Class359.aFrame5503.dispose();
	    Class359.aFrame5503 = null;
	}
    }
    
    final void method12954(boolean bool) {
	synchronized (this) {
	    if (aBool7674)
		return;
	    aBool7674 = true;
	}
	try {
	    method12891(-355200140);
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    aClass418_7672.method7426(-745410084);
	    for (int i = 0; i < -1425977297 * Class18.anInt129; i++)
		Class456.aClass418Array6291[i].method7426(-792058970);
	    aClass418_7658.method7426(-103345401);
	    aClass418_7671.method7426(-1651386809);
	} catch (Exception exception) {
	    /* empty */
	}
	if (((Class590) this).aBool7682) {
	    try {
		QueryPerformanceCounter.quit();
	    } catch (Throwable throwable) {
		/* empty */
	    }
	}
	if (Class109.method2819((byte) 44))
	    Class437.method7817(1485306724).method107(4689606);
	if (Class631.aCanvas8104 != null) {
	    try {
		Class631.aCanvas8104.removeFocusListener(this);
		Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
	if (null != Class359.aFrame5503) {
	    Class359.aFrame5503.setVisible(false);
	    Class359.aFrame5503.dispose();
	    Class359.aFrame5503 = null;
	}
    }
    
    public void method12955() throws Exception_Sub4 {
	if (!((Class590) this).aBool7682) {
	    Class437.method7817(-286770317).method105("jaclib", 1689920297);
	    try {
		QueryPerformanceCounter.init();
	    } catch (Throwable throwable) {
		if (aString7685.startsWith("win"))
		    throw new Exception_Sub4(128, "jaclib");
	    }
	    ((Class590) this).aBool7682 = true;
	}
    }
    
    abstract void method12956();
    
    public void method158(Applet applet) {
	Class360.anApplet5507 = applet;
    }
    
    public static final void method12957() {
	Class458.aClass251_6306.method5005((byte) -100);
	for (int i = 0; i < 32; i++)
	    aLongArray7651[i] = 0L;
	for (int i = 0; i < 32; i++)
	    aLongArray7650[i] = 0L;
	anInt7664 = 0;
    }
    
    public final void method12958(WindowEvent windowevent) {
	/* empty */
    }
    
    public void method159() {
	if (!aBool7674)
	    aLong7665 = 0L;
    }
    
    public void method160() {
	if (!aBool7674)
	    aLong7665 = 0L;
    }
    
    public void method161() {
	if (!aBool7674)
	    aLong7665 = 0L;
    }
    
    public void method162() {
	if (!aBool7674)
	    aLong7665 = ((Class46.method1238(-866680508) + 4000L)
			 * -7431253796459201601L);
    }
    
    public final void method12959(FocusEvent focusevent) {
	aBool7663 = true;
	aBool7657 = true;
    }
    
    public void method163() {
	if (!aBool7674) {
	    aLong7665
		= Class46.method1238(-1158941428) * -7431253796459201601L;
	    Class43.method1220(5000L);
	    method12882(false, 1020987005);
	}
    }
    
    public void method164() {
	if (!aBool7674) {
	    aLong7665 = Class46.method1238(1676531532) * -7431253796459201601L;
	    Class43.method1220(5000L);
	    method12882(false, 2094731728);
	}
    }
    
    public void method169() {
	if (!aBool7674) {
	    aLong7665 = Class46.method1238(379958073) * -7431253796459201601L;
	    Class43.method1220(5000L);
	    method12882(false, 772725594);
	}
    }
    
    public void method166() {
	if (!aBool7674) {
	    aLong7665 = Class46.method1238(1339890296) * -7431253796459201601L;
	    Class43.method1220(5000L);
	    method12882(false, -1427371472);
	}
    }
    
    public final void method167(Graphics graphics) {
	paint(graphics);
    }
    
    synchronized void method12960(String string) {
	Class359.aFrame5503 = new Frame();
	Class359.aFrame5503.setTitle(string);
	Class359.aFrame5503.setResizable(true);
	Class359.aFrame5503.addWindowListener(this);
	Class359.aFrame5503.setBackground(Color.black);
	Class359.aFrame5503.setVisible(true);
	Class359.aFrame5503.toFront();
	Insets insets = Class359.aFrame5503.getInsets();
	Class359.aFrame5503.setSize((insets.right
				     + (201694707 * Class120_Sub17.anInt10263
					+ insets.left)),
				    (insets.bottom
				     + (Class171.anInt2125 * 1910610695
					+ insets.top)));
    }
    
    public final void method12961(FocusEvent focusevent) {
	aBool7663 = false;
    }
    
    public final void method12962(WindowEvent windowevent) {
	/* empty */
    }
    
    public final void method12963(WindowEvent windowevent) {
	/* empty */
    }
    
    public final void method12964(WindowEvent windowevent) {
	aBool7684 = true;
	destroy();
    }
    
    public final void method12965(WindowEvent windowevent) {
	aBool7684 = true;
	destroy();
    }
    
    final void method12966(String string, String string_92_, int i, int i_93_,
			   int i_94_, int i_95_, int i_96_) throws Exception {
	Class18.anInt129 = 1133377231 * i_93_;
	Class166.anInt2115 = i * -659793743;
	RuntimeException_Sub2.anInt11087 = i_94_ * 1707839409;
	RuntimeException_Sub2.anInt11090 = 514093699 * i_95_;
	aString7677 = "Unknown";
	Class570.aString7413 = "1.1";
	try {
	    aString7677 = System.getProperty("java.vendor");
	    Class570.aString7413 = System.getProperty("java.version");
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    Class85.aString969 = System.getProperty("os.name");
	} catch (Exception exception) {
	    Class85.aString969 = "Unknown";
	}
	aString7685 = Class85.aString969.toLowerCase();
	try {
	    Class206.aString2470 = System.getProperty("os.arch").toLowerCase();
	} catch (Exception exception) {
	    Class206.aString2470 = "";
	}
	try {
	    Class274.aString4134
		= System.getProperty("os.version").toLowerCase();
	} catch (Exception exception) {
	    Class274.aString4134 = "";
	}
	try {
	    Class115.aString1341 = System.getProperty("user.home");
	    if (Class115.aString1341 != null)
		Class115.aString1341
		    = new StringBuilder().append(Class115.aString1341).append
			  ("/").toString();
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    if (aString7685.startsWith("win")) {
		if (Class115.aString1341 == null)
		    Class115.aString1341 = System.getenv("USERPROFILE");
	    } else if (null == Class115.aString1341)
		Class115.aString1341 = System.getenv("HOME");
	    if (Class115.aString1341 != null)
		Class115.aString1341
		    = new StringBuilder().append(Class115.aString1341).append
			  ("/").toString();
	} catch (Exception exception) {
	    /* empty */
	}
	if (Class115.aString1341 == null)
	    Class115.aString1341 = "~/";
	try {
	    Class266.anEventQueue4061
		= Toolkit.getDefaultToolkit().getSystemEventQueue();
	} catch (Throwable throwable) {
	    /* empty */
	}
	Class335.aStringArray5285
	    = new String[] { "c:/rscache/", "/rscache/", "c:/windows/",
			     "c:/winnt/", "c:/", Class115.aString1341, "/tmp/",
			     "" };
	Class471.aStringArray6385
	    = new String[] { new StringBuilder().append(".jagex_cache_").append
				 (938668113 * Class166.anInt2115).toString(),
			     new StringBuilder().append(".file_store_").append
				 (938668113 * Class166.anInt2115).toString() };
    while_157_:
	for (int i_97_ = 0; i_97_ < 4; i_97_++) {
	    Class478_Sub1_Sub5.aFile10675
		= method12873(string, string_92_, i_97_, (short) 13101);
	    if (!Class478_Sub1_Sub5.aFile10675.exists())
		Class478_Sub1_Sub5.aFile10675.mkdirs();
	    File[] files = Class478_Sub1_Sub5.aFile10675.listFiles();
	    if (null != files) {
		File[] files_98_ = files;
		for (int i_99_ = 0; i_99_ < files_98_.length; i_99_++) {
		    File file = files_98_[i_99_];
		    if (!method12897(file, false, (byte) -33))
			continue while_157_;
		}
	    }
	    break;
	}
	Class175.method3881(Class478_Sub1_Sub5.aFile10675, -1972184348);
	Class168.method3823((byte) -37);
	aClass418_7672
	    = new Class418(new Class414((Class626.method13500
					 ("main_file_cache.dat2", 1230749589)),
					"rw", 3221225472L),
			   5200, 0);
	aClass418_7658 = new Class418(new Class414((Class626.method13500
						    ("main_file_cache.idx255",
						     1230749589)),
						   "rw", 1048576L),
				      6000, 0);
	Class456.aClass418Array6291
	    = new Class418[-1425977297 * Class18.anInt129];
	for (int i_100_ = 0; i_100_ < Class18.anInt129 * -1425977297; i_100_++)
	    Class456.aClass418Array6291[i_100_]
		= new Class418(new Class414((Class626.method13500
					     (new StringBuilder().append
						  ("main_file_cache.idx")
						  .append
						  (i_100_).toString(),
					      1230749589)),
					    "rw", 1048576L),
			       6000, 0);
	try {
	    Class20.aClass410_194 = new Class410();
	} catch (Exception exception) {
	    Class441.aBool6211 = false;
	}
	Class179.aClass589_2170 = new Class589();
	ThreadGroup threadgroup = Thread.currentThread().getThreadGroup();
	for (ThreadGroup threadgroup_101_ = threadgroup.getParent();
	     null != threadgroup_101_;
	     threadgroup_101_ = threadgroup.getParent())
	    threadgroup = threadgroup_101_;
	Thread[] threads = new Thread[1000];
	threadgroup.enumerate(threads);
	for (int i_102_ = 0; i_102_ < threads.length; i_102_++) {
	    if (threads[i_102_] != null
		&& threads[i_102_].getName().startsWith("AWT"))
		threads[i_102_].setPriority(1);
	}
	Thread thread = new Thread(this);
	thread.setDaemon(true);
	thread.start();
	thread.setPriority(1);
    }
    
    public final void method12967(WindowEvent windowevent) {
	/* empty */
    }
    
    void method12968(byte i) {
	if (null != Class631.aCanvas8104) {
	    Class631.aCanvas8104.removeFocusListener(this);
	    Class631.aCanvas8104.getParent().setBackground(Color.black);
	    Class631.aCanvas8104.getParent().remove(Class631.aCanvas8104);
	}
    }
    
    public final void method12969(WindowEvent windowevent) {
	/* empty */
    }
    
    public final void method12970(WindowEvent windowevent) {
	/* empty */
    }
    
    public abstract void method157();
    
    public abstract void method156();
    
    public static final void method12971(int i, String string, Color color,
					 Color color_103_, Color color_104_) {
	try {
	    Graphics graphics = Class631.aCanvas8104.getGraphics();
	    if (null == Class388.aFont5668)
		Class388.aFont5668 = new Font("Helvetica", 1, 13);
	    if (null == color)
		color = new Color(140, 17, 17);
	    if (null == color_103_)
		color_103_ = new Color(140, 17, 17);
	    if (color_104_ == null)
		color_104_ = new Color(255, 255, 255);
	    try {
		if (anImage7679 == null)
		    anImage7679
			= Class631.aCanvas8104.createImage((Class2.anInt17
							    * -1641316675),
							   (-837921869
							    * (Class14
							       .anInt111)));
		Graphics graphics_105_ = anImage7679.getGraphics();
		graphics_105_.setColor(Color.black);
		graphics_105_.fillRect(0, 0, Class2.anInt17 * -1641316675,
				       -837921869 * Class14.anInt111);
		int i_106_ = Class2.anInt17 * -1641316675 / 2 - 152;
		int i_107_ = Class14.anInt111 * -837921869 / 2 - 18;
		graphics_105_.setColor(color_103_);
		graphics_105_.drawRect(i_106_, i_107_, 303, 33);
		graphics_105_.setColor(color);
		graphics_105_.fillRect(i_106_ + 2, i_107_ + 2, i * 3, 30);
		graphics_105_.setColor(Color.black);
		graphics_105_.drawRect(i_106_ + 1, i_107_ + 1, 301, 31);
		graphics_105_.fillRect(i_106_ + 2 + i * 3, i_107_ + 2,
				       300 - i * 3, 30);
		graphics_105_.setFont(Class388.aFont5668);
		graphics_105_.setColor(color_104_);
		graphics_105_.drawString(string,
					 (i_106_
					  + (304 - string.length() * 6) / 2),
					 i_107_ + 22);
		if (aString7656 != null) {
		    graphics_105_.setFont(Class388.aFont5668);
		    graphics_105_.setColor(color_104_);
		    graphics_105_.drawString(aString7656,
					     (Class2.anInt17 * -1641316675 / 2
					      - aString7656.length() * 6 / 2),
					     (Class14.anInt111 * -837921869 / 2
					      - 26));
		}
		graphics.drawImage(anImage7679, 0, 0, null);
	    } catch (Exception exception) {
		graphics.setColor(Color.black);
		graphics.fillRect(0, 0, Class2.anInt17 * -1641316675,
				  -837921869 * Class14.anInt111);
		int i_108_ = -1641316675 * Class2.anInt17 / 2 - 152;
		int i_109_ = Class14.anInt111 * -837921869 / 2 - 18;
		graphics.setColor(color_103_);
		graphics.drawRect(i_108_, i_109_, 303, 33);
		graphics.setColor(color);
		graphics.fillRect(i_108_ + 2, 2 + i_109_, 3 * i, 30);
		graphics.setColor(Color.black);
		graphics.drawRect(1 + i_108_, 1 + i_109_, 301, 31);
		graphics.fillRect(2 + i_108_ + 3 * i, 2 + i_109_, 300 - i * 3,
				  30);
		graphics.setFont(Class388.aFont5668);
		graphics.setColor(color_104_);
		if (aString7656 != null) {
		    graphics.setFont(Class388.aFont5668);
		    graphics.setColor(color_104_);
		    graphics.drawString(aString7656,
					(Class2.anInt17 * -1641316675 / 2
					 - aString7656.length() * 6 / 2),
					(-837921869 * Class14.anInt111 / 2
					 - 26));
		}
		graphics.drawString(string,
				    i_108_ + (304 - string.length() * 6) / 2,
				    i_109_ + 22);
	    }
	} catch (Exception exception) {
	    Class631.aCanvas8104.repaint();
	}
    }
    
    public static final void method12972(int i, String string, Color color,
					 Color color_110_, Color color_111_) {
	try {
	    Graphics graphics = Class631.aCanvas8104.getGraphics();
	    if (null == Class388.aFont5668)
		Class388.aFont5668 = new Font("Helvetica", 1, 13);
	    if (null == color)
		color = new Color(140, 17, 17);
	    if (null == color_110_)
		color_110_ = new Color(140, 17, 17);
	    if (color_111_ == null)
		color_111_ = new Color(255, 255, 255);
	    try {
		if (anImage7679 == null)
		    anImage7679
			= Class631.aCanvas8104.createImage((Class2.anInt17
							    * -1641316675),
							   (-837921869
							    * (Class14
							       .anInt111)));
		Graphics graphics_112_ = anImage7679.getGraphics();
		graphics_112_.setColor(Color.black);
		graphics_112_.fillRect(0, 0, Class2.anInt17 * -1641316675,
				       -837921869 * Class14.anInt111);
		int i_113_ = Class2.anInt17 * -1641316675 / 2 - 152;
		int i_114_ = Class14.anInt111 * -837921869 / 2 - 18;
		graphics_112_.setColor(color_110_);
		graphics_112_.drawRect(i_113_, i_114_, 303, 33);
		graphics_112_.setColor(color);
		graphics_112_.fillRect(i_113_ + 2, i_114_ + 2, i * 3, 30);
		graphics_112_.setColor(Color.black);
		graphics_112_.drawRect(i_113_ + 1, i_114_ + 1, 301, 31);
		graphics_112_.fillRect(i_113_ + 2 + i * 3, i_114_ + 2,
				       300 - i * 3, 30);
		graphics_112_.setFont(Class388.aFont5668);
		graphics_112_.setColor(color_111_);
		graphics_112_.drawString(string,
					 (i_113_
					  + (304 - string.length() * 6) / 2),
					 i_114_ + 22);
		if (aString7656 != null) {
		    graphics_112_.setFont(Class388.aFont5668);
		    graphics_112_.setColor(color_111_);
		    graphics_112_.drawString(aString7656,
					     (Class2.anInt17 * -1641316675 / 2
					      - aString7656.length() * 6 / 2),
					     (Class14.anInt111 * -837921869 / 2
					      - 26));
		}
		graphics.drawImage(anImage7679, 0, 0, null);
	    } catch (Exception exception) {
		graphics.setColor(Color.black);
		graphics.fillRect(0, 0, Class2.anInt17 * -1641316675,
				  -837921869 * Class14.anInt111);
		int i_115_ = -1641316675 * Class2.anInt17 / 2 - 152;
		int i_116_ = Class14.anInt111 * -837921869 / 2 - 18;
		graphics.setColor(color_110_);
		graphics.drawRect(i_115_, i_116_, 303, 33);
		graphics.setColor(color);
		graphics.fillRect(i_115_ + 2, 2 + i_116_, 3 * i, 30);
		graphics.setColor(Color.black);
		graphics.drawRect(1 + i_115_, 1 + i_116_, 301, 31);
		graphics.fillRect(2 + i_115_ + 3 * i, 2 + i_116_, 300 - i * 3,
				  30);
		graphics.setFont(Class388.aFont5668);
		graphics.setColor(color_111_);
		if (aString7656 != null) {
		    graphics.setFont(Class388.aFont5668);
		    graphics.setColor(color_111_);
		    graphics.drawString(aString7656,
					(Class2.anInt17 * -1641316675 / 2
					 - aString7656.length() * 6 / 2),
					(-837921869 * Class14.anInt111 / 2
					 - 26));
		}
		graphics.drawString(string,
				    i_115_ + (304 - string.length() * 6) / 2,
				    i_116_ + 22);
	    }
	} catch (Exception exception) {
	    Class631.aCanvas8104.repaint();
	}
    }
    
    public static final void method12973() {
	anImage7679 = null;
	Class388.aFont5668 = null;
    }
    
    final boolean method12974(int i) {
	String string
	    = Class360.anApplet5507.getDocumentBase().getHost().toLowerCase();
	if (string.equals("jagex.com") || string.endsWith(".jagex.com"))
	    return true;
	if (string.equals("runescape.com")
	    || string.endsWith(".runescape.com"))
	    return true;
	if (string.equals("stellardawn.com")
	    || string.endsWith(".stellardawn.com"))
	    return true;
	if (string.endsWith("127.0.0.1"))
	    return true;
	for (/**/;
	     (string.length() > 0 && string.charAt(string.length() - 1) >= '0'
	      && string.charAt(string.length() - 1) <= '9');
	     string = string.substring(0, string.length() - 1)) {
	    /* empty */
	}
	if (string.endsWith("192.168.1."))
	    return true;
	method12892("invalidhost", (byte) -23);
	return false;
    }
    
    synchronized void method12975() {
	method12968((byte) -12);
	Container container = Class209.method4307(267661835);
	Class631.aCanvas8104 = new Canvas_Sub1(container);
	method12877(container, (byte) -59);
    }
    
    void method12976(int i) {
	if (null != aString7677) {
	    String string = aString7677.toLowerCase();
	    if (string.indexOf("sun") != -1 || string.indexOf("apple") != -1) {
		String string_117_ = Class570.aString7413;
		if (string_117_.equals("1.1") || string_117_.startsWith("1.1.")
		    || string_117_.equals("1.2")
		    || string_117_.startsWith("1.2.")
		    || string_117_.equals("1.3")
		    || string_117_.startsWith("1.3.")
		    || string_117_.equals("1.4")
		    || string_117_.startsWith("1.4.")
		    || string_117_.equals("1.5")
		    || string_117_.startsWith("1.5.")
		    || string_117_.equals("1.6.0")) {
		    method12892("wrongjava", (byte) -61);
		    return;
		}
		if (string_117_.startsWith("1.6.0_")) {
		    int i_118_;
		    for (i_118_ = 6;
			 (i_118_ < string_117_.length()
			  && Class484.method11059(string_117_.charAt(i_118_),
						  573338187));
			 i_118_++) {
			/* empty */
		    }
		    String string_119_ = string_117_.substring(6, i_118_);
		    if (Class498.method11287(string_119_, 1960040736)
			&& Class240.method4874(string_119_, 827181476) < 10) {
			method12892("wrongjava", (byte) -23);
			return;
		    }
		}
	    }
	}
	Class209.method4307(267661835).setFocusCycleRoot(true);
	anInt7680 = (((int) (Runtime.getRuntime().maxMemory() / 1048576L) + 1)
		     * -1164317301);
	anInt7681 = Runtime.getRuntime().availableProcessors() * -421292011;
	method12899(262348246);
	method12889(-910556920);
	Class458.aClass251_6306 = Class474.method8426(-913801785);
	while (aLong7665 * 7332127009189606463L == 0L
	       || (Class46.method1238(-1801529107)
		   < 7332127009189606463L * aLong7665)) {
	    anInt7664
		= Class458.aClass251_6306.method5007(-6019249319442745853L
						     * aLong7678) * 908588141;
	    for (int i_120_ = 0; i_120_ < 367670629 * anInt7664; i_120_++)
		method12879(-1895625759);
	    method12880((byte) 7);
	    Class296.method5942(Class631.aCanvas8104, (byte) 26);
	}
    }
    
    void method12977(String string, String string_121_) {
	if (!((Class590) this).aBool7646) {
	    ((Class590) this).aBool7646 = true;
	    System.out.println(new StringBuilder().append("error_game_").append
				   (string).toString());
	    try {
		Class615.method13262(Class360.anApplet5507, "loggedout",
				     -98730341);
	    } catch (Throwable throwable) {
		/* empty */
	    }
	    try {
		Class360.anApplet5507.getAppletContext().showDocument
		    (new URL(Class360.anApplet5507.getCodeBase(),
			     new StringBuilder().append("error_game_").append
				 (string).append
				 (".ws?").append
				 (string_121_).toString()),
		     "_top");
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    public void method12978() {
	do {
	    try {
		try {
		    method12976(-184992);
		} catch (ThreadDeath threaddeath) {
		    throw threaddeath;
		} catch (Throwable throwable) {
		    Class14.method600(method12872(761411789), throwable,
				      1740044245);
		    method12892("crash", (byte) -103);
		    method12882(true, -314458256);
		    break;
		}
		method12882(true, 913026644);
	    } catch (Object object) {
		method12882(true, -669805656);
		throw object;
	    }
	} while (false);
    }
    
    public void method12979() throws Exception_Sub4 {
	if (!((Class590) this).aBool7682) {
	    Class437.method7817(-652002550).method105("jaclib", -885361289);
	    try {
		QueryPerformanceCounter.init();
	    } catch (Throwable throwable) {
		if (aString7685.startsWith("win"))
		    throw new Exception_Sub4(128, "jaclib");
	    }
	    ((Class590) this).aBool7682 = true;
	}
    }
    
    public void method12980() throws Exception_Sub4 {
	if (!((Class590) this).aBool7682) {
	    Class437.method7817(2110169867).method105("jaclib", -766318096);
	    try {
		QueryPerformanceCounter.init();
	    } catch (Throwable throwable) {
		if (aString7685.startsWith("win"))
		    throw new Exception_Sub4(128, "jaclib");
	    }
	    ((Class590) this).aBool7682 = true;
	}
    }
    
    public void method155(Applet applet) {
	Class360.anApplet5507 = applet;
    }
    
    public void method12981() throws Exception_Sub4 {
	if (!((Class590) this).aBool7682) {
	    Class437.method7817(-1987340477).method105("jaclib", -422853594);
	    try {
		QueryPerformanceCounter.init();
	    } catch (Throwable throwable) {
		if (aString7685.startsWith("win"))
		    throw new Exception_Sub4(128, "jaclib");
	    }
	    ((Class590) this).aBool7682 = true;
	}
    }
    
    void method12982(Class250 class250, boolean bool) {
	if (null == class250)
	    throw new NullPointerException();
	if (class250 != Class250.aClass250_3943
	    && class250 != Class250.aClass250_3944)
	    throw new IllegalStateException();
	aClass250_7676 = class250;
	if (Class250.aClass250_3944 != aClass250_7676) {
	    if (bool)
		aClass250_7676 = Class250.aClass250_3942;
	}
    }
    
    Class590() {
	/* empty */
    }
    
    public static Class250 method12983() {
	return aClass250_7676;
    }
    
    static long method12984() {
	return Class458.aClass251_6306.method5008(16711935);
    }
    
    static final void method12985(Class479 class479, int i) {
	Class465 class465 = (((Class479) class479).aBool6460
			     ? ((Class479) class479).aClass465_6445
			     : ((Class479) class479).aClass465_6443);
	Class117 class117 = ((Class465) class465).aClass117_6364;
	int i_122_ = -1;
	int i_123_ = -1;
	Class44 class44
	    = class117.method2889(Class455.aClass87_6287, 33314734);
	if (null != class44) {
	    i_122_ = 1625880037 * class44.anInt616;
	    i_123_ = class44.anInt614 * -436660097;
	}
	((Class479) class479).anIntArray6435
	    [(((Class479) class479).anInt6442 += -1158629699) * -117934955 - 1]
	    = i_122_;
	((Class479) class479).anIntArray6435
	    [(((Class479) class479).anInt6442 += -1158629699) * -117934955 - 1]
	    = i_123_;
    }
    
    static final void method12986(Class479 class479, byte i) {
	Class243_Sub11_Sub4 class243_sub11_sub4
	    = Class564.method12299(((Class479) class479).anIntArray6435
				   [(((Class479) class479).anInt6442
				     -= -1158629699) * -117934955]);
	if (null == class243_sub11_sub4
	    || class243_sub11_sub4.aString10629 == null)
	    ((Class479) class479).anObjectArray6437
		[((((Class479) class479).anInt6432 += -1049632545) * -611591393
		  - 1)]
		= "";
	else
	    ((Class479) class479).anObjectArray6437
		[((((Class479) class479).anInt6432 += -1049632545) * -611591393
		  - 1)]
		= class243_sub11_sub4.aString10629;
    }
}
