/* Class473 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.applet.Applet;
import java.awt.Color;
import java.awt.Container;
import java.awt.Frame;
import java.awt.Graphics;
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 Class473
    implements Interface56, Runnable, FocusListener, WindowListener
{
    static int anInt5382;
    static long aLong5383 = 8934793449676178688L;
    public static int anInt5384 = 0;
    public static int anInt5385;
    public static Class466 aClass466_5386;
    static final int anInt5387 = 32;
    static long[] aLongArray5388;
    static int anInt5389;
    static final int anInt5390 = 0;
    static int anInt5391;
    public static int anInt5392;
    public static int anInt5393;
    protected static String aString5394;
    public static Frame aFrame5395;
    protected static volatile boolean aBool5396;
    static final long aLong5397 = 3221225472L;
    protected static volatile boolean aBool5398;
    static volatile long aLong5399;
    static long[] aLongArray5400;
    public static int anInt5401;
    static int anInt5402;
    static final int anInt5403 = 1048576;
    static final String aString5404 = "rw";
    static final String aString5405 = "main_file_cache.dat2";
    protected static Class671 aClass671_5406;
    static final String aString5407 = "main_file_cache.idx255";
    static final String aString5408 = "random.dat";
    public static int anInt5409 = 0;
    protected static Class671 aClass671_5410;
    static final String aString5411 = "main_file_cache.idx";
    static volatile boolean aBool5412;
    static final int anInt5413 = 1;
    static Class474 aClass474_5414;
    static long aLong5415;
    static boolean aBool5416;
    boolean aBool5417 = false;
    static Class671 aClass671_5418;
    protected static boolean aBool5419;
    boolean aBool5420 = false;
    
    public void method367() {
	if (!aBool5416)
	    aLong5415 = 0L;
    }
    
    abstract void method5833();
    
    final void method5834(Class475 class475, String string, String string_0_,
			  int i, int i_1_, int i_2_, int i_3_, boolean bool,
			  int i_4_) {
	try {
	    method5851(Class474.aClass474_5422, bool, 1353859152);
	    Class369.anInt4086
		= (Class175.anInt2012
		   = class475.method5901(943228316) * 1201879153) * 518297767;
	    Class144_Sub1_Sub2_Sub1.anInt11753
		= ((Class570.anInt7649
		    = class475.method5902((byte) 85) * -1872838357)
		   * 1515663261);
	    anInt5392 = 0;
	    anInt5393 = 0;
	    if (Class18.method620((byte) 115) == Class474.aClass474_5421) {
		Class369.anInt4086
		    += 1329714030 * class475.method5903(-449981663);
		Class144_Sub1_Sub2_Sub1.anInt11753
		    += 1717614782 * class475.method5904(-1974156077);
		method5876(class475.method5905(-61926521), (byte) -8);
	    }
	    Class491.anApplet6722 = Class659.anApplet8402;
	    method5835(string, string_0_, i, i_1_, i_2_, i_3_, -243758533);
	} catch (Throwable throwable) {
	    Class430_Sub3.method8950(null, throwable, 398147767);
	    method5848("crash", 1360940111);
	}
    }
    
    final void method5835(String string, String string_5_, int i, int i_6_,
			  int i_7_, int i_8_, int i_9_) throws Exception {
	Class206.anInt2148 = 1420701505 * i_6_;
	Class245.anInt2822 = 514324905 * i;
	RuntimeException_Sub2.anInt11728 = 539465257 * i_7_;
	RuntimeException_Sub2.anInt11731 = i_8_ * -2126741493;
	Class67_Sub1.aString8606 = "Unknown";
	Class364.aString3990 = "1.1";
	try {
	    Class67_Sub1.aString8606 = System.getProperty("java.vendor");
	    Class364.aString3990 = System.getProperty("java.version");
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    Class347.aString3684 = System.getProperty("os.name");
	} catch (Exception exception) {
	    Class347.aString3684 = "Unknown";
	}
	Class198.aString2126 = Class347.aString3684.toLowerCase();
	try {
	    Class219.aString2560 = System.getProperty("os.arch").toLowerCase();
	} catch (Exception exception) {
	    Class219.aString2560 = "";
	}
	try {
	    Class209.aString2166
		= System.getProperty("os.version").toLowerCase();
	} catch (Exception exception) {
	    Class209.aString2166 = "";
	}
	try {
	    Class349.aString3703 = System.getProperty("user.home");
	    if (Class349.aString3703 != null)
		Class349.aString3703
		    = new StringBuilder().append(Class349.aString3703).append
			  ("/").toString();
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    if (Class198.aString2126.startsWith("win")) {
		if (null == Class349.aString3703)
		    Class349.aString3703 = System.getenv("USERPROFILE");
	    } else if (Class349.aString3703 == null)
		Class349.aString3703 = System.getenv("HOME");
	    if (null != Class349.aString3703)
		Class349.aString3703
		    = new StringBuilder().append(Class349.aString3703).append
			  ("/").toString();
	} catch (Exception exception) {
	    /* empty */
	}
	if (Class349.aString3703 == null)
	    Class349.aString3703 = "~/";
	try {
	    Class608.anEventQueue7993
		= Toolkit.getDefaultToolkit().getSystemEventQueue();
	} catch (Throwable throwable) {
	    /* empty */
	}
	Class234.aStringArray2629
	    = new String[] { "c:/rscache/", "/rscache/", "c:/windows/",
			     "c:/winnt/", "c:/", Class349.aString3703, "/tmp/",
			     "" };
	Class596.aStringArray7893
	    = new String[] { new StringBuilder().append(".jagex_cache_").append
				 (-387990887 * Class245.anInt2822).toString(),
			     new StringBuilder().append(".file_store_").append
				 (Class245.anInt2822 * -387990887)
				 .toString() };
    while_36_:
	for (int i_10_ = 0; i_10_ < 4; i_10_++) {
	    Class506.aFile6992
		= method5846(string, string_5_, i_10_, (byte) 106);
	    if (!Class506.aFile6992.exists())
		Class506.aFile6992.mkdirs();
	    File[] files = Class506.aFile6992.listFiles();
	    if (files != null) {
		File[] files_11_ = files;
		for (int i_12_ = 0; i_12_ < files_11_.length; i_12_++) {
		    File file = files_11_[i_12_];
		    if (!method5837(file, false, -2075253198))
			continue while_36_;
		}
	    }
	    break;
	}
	Class651.method7709(Class506.aFile6992, 983033140);
	Class504.method6249((byte) 67);
	aClass671_5410 = new Class671(new Class668((Class44.method868
						    ("main_file_cache.dat2",
						     -1648868009)),
						   "rw", 3221225472L),
				      5200, 0);
	aClass671_5406 = new Class671(new Class668((Class44.method868
						    ("main_file_cache.idx255",
						     -1952894814)),
						   "rw", 1048576L),
				      6000, 0);
	Class232.aClass671Array2620
	    = new Class671[Class206.anInt2148 * 1333158081];
	for (int i_13_ = 0; i_13_ < Class206.anInt2148 * 1333158081; i_13_++)
	    Class232.aClass671Array2620[i_13_]
		= (new Class671
		   (new Class668(Class44.method868(new StringBuilder().append
						       ("main_file_cache.idx")
						       .append
						       (i_13_).toString(),
						   -2127487239),
				 "rw", 1048576L),
		    6000, 0));
	try {
	    Class605_Sub2.aClass641_10421 = new Class641();
	} catch (Exception exception) {
	    Class632.aBool8130 = false;
	}
	Class434.aClass484_5028 = new Class484();
	ThreadGroup threadgroup = Thread.currentThread().getThreadGroup();
	for (ThreadGroup threadgroup_14_ = threadgroup.getParent();
	     null != threadgroup_14_;
	     threadgroup_14_ = threadgroup.getParent())
	    threadgroup = threadgroup_14_;
	Thread[] threads = new Thread[1000];
	threadgroup.enumerate(threads);
	for (int i_15_ = 0; i_15_ < threads.length; i_15_++) {
	    if (threads[i_15_] != null
		&& threads[i_15_].getName().startsWith("AWT"))
		threads[i_15_].setPriority(1);
	}
	Thread thread = new Thread(this);
	thread.setDaemon(true);
	thread.start();
	thread.setPriority(1);
    }
    
    void method5836(File file, File file_16_, int i) {
	try {
	    Class668 class668
		= new Class668(Exception_Sub1.aFile11026, "rw", 10000L);
	    Class487_Sub17 class487_sub17 = new Class487_Sub17(500);
	    class487_sub17.method9201(3, (byte) 23);
	    class487_sub17.method9201(file_16_ != null ? 1 : 0, (byte) -100);
	    class487_sub17.method9212(file.getPath(), (byte) -70);
	    if (file_16_ != null)
		class487_sub17.method9212(file_16_.getPath(), (byte) -51);
	    class668.method7972(class487_sub17.aByteArray10193, 0,
				-1980757211 * class487_sub17.anInt10192,
				-666264433);
	    class668.method7973(-1804034670);
	} catch (IOException ioexception) {
	    ioexception.printStackTrace();
	}
    }
    
    boolean method5837(File file, boolean bool, int i) {
	boolean bool_17_;
	try {
	    RandomAccessFile randomaccessfile
		= new RandomAccessFile(file, "rw");
	    int i_18_ = randomaccessfile.read();
	    randomaccessfile.seek(0L);
	    randomaccessfile.write(i_18_);
	    randomaccessfile.seek(0L);
	    randomaccessfile.close();
	    if (bool)
		file.delete();
	    bool_17_ = true;
	} catch (Exception exception) {
	    return false;
	}
	return bool_17_;
    }
    
    public abstract void init();
    
    synchronized void method5838(int i) {
	method5839(2114965138);
	Container container = Class593.method7263(-1873951127);
	Class630.aCanvas8127 = new Canvas_Sub1(container);
	method5865(container, -1911049469);
    }
    
    public void method366() {
	if (!aBool5416)
	    aLong5415 = 0L;
    }
    
    void method5839(int i) {
	if (Class630.aCanvas8127 != null) {
	    Class630.aCanvas8127.removeFocusListener(this);
	    Class630.aCanvas8127.getParent().setBackground(Color.black);
	    Class630.aCanvas8127.getParent().remove(Class630.aCanvas8127);
	}
    }
    
    final boolean method5840(int i) {
	String string
	    = Class659.anApplet8402.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;
	method5848("invalidhost", 1332854357);
	return false;
    }
    
    public void run() {
	do {
	    try {
		try {
		    method5878(2047978104);
		} catch (ThreadDeath threaddeath) {
		    throw threaddeath;
		} catch (Throwable throwable) {
		    Class430_Sub3.method8950(method5843(2125041047), throwable,
					     -1649892976);
		    method5848("crash", 1343258247);
		    method5844(true, -1197536777);
		    break;
		}
		method5844(true, -1092725716);
	    } catch (Exception object) {
		method5844(true, 570855950);
		throw object;
	    }
	} while (false);
    }
    
    void method5841(int i) {
	long l = Class222.method3225(1877279974);
	long l_19_ = aLongArray5400[-351012339 * anInt5391];
	aLongArray5400[-351012339 * anInt5391] = l;
	anInt5391 = -798890811 * (1 + anInt5391 * -351012339 & 0x1f);
	if (0L != l_19_ && l <= l_19_) {
	    /* empty */
	}
	synchronized (this) {
	    Class157.aBool1921 = aBool5412;
	}
	method5880(1381610952);
    }
    
    abstract void method5842();
    
    String method5843(int i) {
	return null;
    }
    
    final void method5844(boolean bool, int i) {
	synchronized (this) {
	    if (aBool5416)
		return;
	    aBool5416 = true;
	}
	try {
	    method5879((byte) 31);
	} catch (Exception exception) {
	    /* empty */
	}
	try {
	    aClass671_5410.method8006((byte) 3);
	    for (int i_20_ = 0; i_20_ < Class206.anInt2148 * 1333158081;
		 i_20_++)
		Class232.aClass671Array2620[i_20_].method8006((byte) 3);
	    aClass671_5406.method8006((byte) 3);
	    aClass671_5418.method8006((byte) 3);
	} catch (Exception exception) {
	    /* empty */
	}
	if (((Class473) this).aBool5420) {
	    try {
		QueryPerformanceCounter.quit();
	    } catch (Throwable throwable) {
		/* empty */
	    }
	}
	if (Class14.method584(-1716955340))
	    Class637_Sub18.method9766((byte) 25).method333((short) 18368);
	if (Class630.aCanvas8127 != null) {
	    try {
		Class630.aCanvas8127.removeFocusListener(this);
		Class630.aCanvas8127.getParent().remove(Class630.aCanvas8127);
	    } catch (Exception exception) {
		/* empty */
	    }
	}
	if (null != Class37.aFrame459) {
	    Class37.aFrame459.setVisible(false);
	    Class37.aFrame459.dispose();
	    Class37.aFrame459 = null;
	}
    }
    
    public void start() {
	if (!aBool5416)
	    aLong5415 = 0L;
    }
    
    public void stop() {
	if (!aBool5416)
	    aLong5415 = ((Class222.method3225(1653098436) + 4000L)
			 * 8075226552386245929L);
    }
    
    public void destroy() {
	if (!aBool5416) {
	    aLong5415 = Class222.method3225(2125102072) * 8075226552386245929L;
	    Class118.method1565(5000L);
	    method5844(false, 84876591);
	}
    }
    
    public final void update(Graphics graphics) {
	paint(graphics);
    }
    
    public final synchronized void paint(Graphics graphics) {
	if (!aBool5416) {
	    aBool5396 = true;
	    if ((Class222.method3225(1561266131)
		 - -7279978314733525419L * aLong5399)
		> 1000L) {
		Rectangle rectangle = graphics.getClipBounds();
		if (rectangle == null
		    || (rectangle.width >= Class369.anInt4086 * -1952234489
			&& rectangle.height >= (Class144_Sub1_Sub2_Sub1
						.anInt11753) * 462225311))
		    aBool5398 = true;
	    }
	}
    }
    
    public final void focusGained(FocusEvent focusevent) {
	aBool5412 = true;
	aBool5396 = true;
    }
    
    public final void focusLost(FocusEvent focusevent) {
	aBool5412 = false;
    }
    
    public final void method370(Graphics graphics) {
	paint(graphics);
    }
    
    public final void windowClosing(WindowEvent windowevent) {
	aBool5419 = true;
	destroy();
    }
    
    abstract void method5845(int i);
    
    public final void windowDeiconified(WindowEvent windowevent) {
	/* empty */
    }
    
    public final void windowIconified(WindowEvent windowevent) {
	/* empty */
    }
    
    public final void windowOpened(WindowEvent windowevent) {
	/* empty */
    }
    
    File method5846(String string, String string_21_, int i, byte i_22_) {
	String string_23_
	    = (0 == i ? ""
	       : new StringBuilder().append("").append(i).toString());
	Exception_Sub1.aFile11026
	    = new File(Class349.aString3703,
		       new StringBuilder().append("jagex_cl_").append
			   (string).append
			   ("_").append
			   (string_21_).append
			   (string_23_).append
			   (".dat").toString());
	String string_24_ = null;
	String string_25_ = null;
	boolean bool = false;
	if (Exception_Sub1.aFile11026.exists()) {
	    try {
		Class668 class668
		    = new Class668(Exception_Sub1.aFile11026, "rw", 10000L);
		int i_26_;
		Class487_Sub17 class487_sub17;
		for (class487_sub17
			 = (new Class487_Sub17
			    ((int) class668.method7974(-1913730317)));
		     (class487_sub17.anInt10192 * -1980757211
		      < class487_sub17.aByteArray10193.length);
		     class487_sub17.anInt10192 += i_26_ * 850991277) {
		    i_26_ = class668.method7975(class487_sub17.aByteArray10193,
						(class487_sub17.anInt10192
						 * -1980757211),
						((class487_sub17
						  .aByteArray10193).length
						 - (class487_sub17.anInt10192
						    * -1980757211)),
						-1650245867);
		    if (i_26_ == -1)
			throw new IOException();
		}
		class487_sub17.anInt10192 = 0;
		i_26_ = class487_sub17.method9219(-1669265047);
		if (i_26_ < 1 || i_26_ > 3)
		    throw new IOException(new StringBuilder().append("").append
					      (i_26_).toString());
		int i_27_ = 0;
		if (i_26_ > 1)
		    i_27_ = class487_sub17.method9219(-1853824986);
		if (i_26_ <= 2) {
		    string_24_ = class487_sub17.method9230(-1815706021);
		    if (i_27_ == 1)
			string_25_ = class487_sub17.method9230(-1734584628);
		} else {
		    string_24_ = class487_sub17.method9231(2014968912);
		    if (i_27_ == 1)
			string_25_ = class487_sub17.method9231(1764255264);
		}
		class668.method7973(-1795247044);
	    } catch (IOException ioexception) {
		ioexception.printStackTrace();
	    }
	    if (string_24_ != null) {
		File file = new File(string_24_);
		if (!file.exists())
		    string_24_ = null;
	    }
	    if (null != string_24_) {
		File file = new File(string_24_, "test.dat");
		if (!method5837(file, true, -2017732823))
		    string_24_ = null;
	    }
	}
	if (null == string_24_ && i == 0) {
	while_37_:
	    for (int i_28_ = 0; i_28_ < Class596.aStringArray7893.length;
		 i_28_++) {
		for (int i_29_ = 0; i_29_ < Class234.aStringArray2629.length;
		     i_29_++) {
		    File file = new File(new StringBuilder().append
					     (Class234.aStringArray2629[i_29_])
					     .append
					     (Class596.aStringArray7893[i_28_])
					     .append
					     (File.separatorChar).append
					     (string).append
					     (File.separatorChar).toString());
		    if (file.exists() && method5837(new File(file, "test.dat"),
						    true, -1928926121)) {
			string_24_ = file.toString();
			bool = true;
			break while_37_;
		    }
		}
	    }
	}
	if (null == string_24_) {
	    string_24_
		= new StringBuilder().append(Class349.aString3703).append
		      (File.separatorChar).append
		      ("jagexcache").append
		      (string_23_).append
		      (File.separatorChar).append
		      (string).append
		      (File.separatorChar).append
		      (string_21_).append
		      (File.separatorChar).toString();
	    bool = true;
	}
	if (null != string_25_) {
	    File file = new File(string_25_);
	    File file_30_ = new File(string_24_);
	    try {
		File[] files = file.listFiles();
		File[] files_31_ = files;
		for (int i_32_ = 0; i_32_ < files_31_.length; i_32_++) {
		    File file_33_ = files_31_[i_32_];
		    File file_34_ = new File(file_30_, file_33_.getName());
		    boolean bool_35_ = file_33_.renameTo(file_34_);
		    if (!bool_35_)
			throw new IOException();
		}
	    } catch (Exception exception) {
		exception.printStackTrace();
	    }
	    bool = true;
	}
	if (bool)
	    method5836(new File(string_24_), null, 1920485837);
	return new File(string_24_);
    }
    
    final boolean method5847() {
	String string
	    = Class659.anApplet8402.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;
	method5848("invalidhost", 705322700);
	return false;
    }
    
    void method5848(String string, int i) {
	if (!((Class473) this).aBool5417) {
	    ((Class473) this).aBool5417 = true;
	    System.out.println(new StringBuilder().append("error_game_").append
				   (string).toString());
	    try {
		Class12.method573(Class659.anApplet8402, "loggedout",
				  -160057052);
	    } catch (Throwable throwable) {
		/* empty */
	    }
	    try {
		Class659.anApplet8402.getAppletContext().showDocument
		    (new URL(Class659.anApplet8402.getCodeBase(),
			     new StringBuilder().append("error_game_").append
				 (string).append
				 (".ws").toString()),
		     "_top");
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    void method5849(String string, String string_36_, int i) {
	if (!((Class473) this).aBool5417) {
	    ((Class473) this).aBool5417 = true;
	    System.out.println(new StringBuilder().append("error_game_").append
				   (string).toString());
	    try {
		Class12.method573(Class659.anApplet8402, "loggedout",
				  -673980960);
	    } catch (Throwable throwable) {
		/* empty */
	    }
	    try {
		Class659.anApplet8402.getAppletContext().showDocument
		    (new URL(Class659.anApplet8402.getCodeBase(),
			     new StringBuilder().append("error_game_").append
				 (string).append
				 (".ws?").append
				 (string_36_).toString()),
		     "_top");
	    } catch (Exception exception) {
		/* empty */
	    }
	}
    }
    
    public void method5850(int i) throws Exception_Sub5 {
	if (!((Class473) this).aBool5420) {
	    Class637_Sub18.method9766((byte) 120).method334("jaclib",
							    -1853091017);
	    try {
		QueryPerformanceCounter.init();
	    } catch (Throwable throwable) {
		if (Class198.aString2126.startsWith("win"))
		    throw new Exception_Sub5(128, "jaclib");
	    }
	    ((Class473) this).aBool5420 = true;
	}
    }
    
    void method5851(Class474 class474, boolean bool, int i) {
	if (null == class474)
	    throw new NullPointerException();
	if (class474 != Class474.aClass474_5422
	    && class474 != Class474.aClass474_5423)
	    throw new IllegalStateException();
	aClass474_5414 = class474;
	if (Class474.aClass474_5423 != aClass474_5414) {
	    if (bool)
		aClass474_5414 = Class474.aClass474_5421;
	}
    }
    
    public void method5852() {
	do {
	    try {
		try {
		    method5878(1586533258);
		} catch (ThreadDeath threaddeath) {
		    throw threaddeath;
		} catch (Throwable throwable) {
		    Class430_Sub3.method8950(method5843(2030673631), throwable,
					     115551516);
		    method5848("crash", 1971478995);
		    method5844(true, -1481797851);
		    break;
		}
		method5844(true, 931181946);
	    } catch (Exception object) {
		method5844(true, -1928985113);
		throw object;
	    }
	} while (false);
    }
    
    public void method5853() {
	do {
	    try {
		try {
		    method5878(-578484155);
		} catch (ThreadDeath threaddeath) {
		    throw threaddeath;
		} catch (Throwable throwable) {
		    Class430_Sub3.method8950(method5843(2049713876), throwable,
					     -1266643848);
		    method5848("crash", 439768933);
		    method5844(true, -509581784);
		    break;
		}
		method5844(true, -866027482);
	    } catch (Exception object) {
		method5844(true, 51574871);
		throw object;
	    }
	} while (false);
    }
    
    abstract void method5854();
    
    abstract void method5855(int i);
    
    static {
	aLongArray5388 = new long[32];
	aLongArray5400 = new long[32];
	anInt5392 = 0;
	anInt5393 = 0;
	aString5394 = null;
	aBool5396 = true;
	anInt5382 = 1043921748;
	aBool5398 = false;
	aLong5399 = 0L;
	aBool5419 = false;
	aBool5412 = true;
	aClass671_5418 = null;
	aClass671_5410 = null;
	aClass671_5406 = null;
	aClass474_5414 = null;
	aLong5415 = 0L;
	aBool5416 = false;
	anInt5401 = 1380796129;
	anInt5385 = 2127118539;
    }
    
    public void method369() {
	if (!aBool5416) {
	    aLong5415 = Class222.method3225(1682456047) * 8075226552386245929L;
	    Class118.method1565(5000L);
	    method5844(false, 1509201072);
	}
    }
    
    Class473() {
	/* empty */
    }
    
    String method5856() {
	return null;
    }
    
    public void method362(Applet applet) {
	Class659.anApplet8402 = applet;
    }
    
    public void method363(Applet applet) {
	Class659.anApplet8402 = applet;
    }
    
    public void method364(Applet applet) {
	Class659.anApplet8402 = applet;
    }
    
    public void method361(Applet applet) {
	Class659.anApplet8402 = applet;
    }
    
    abstract void method5857();
    
    synchronized void method5858() {
	method5839(2098448539);
	Container container = Class593.method7263(-1242349137);
	Class630.aCanvas8127 = new Canvas_Sub1(container);
	method5865(container, -1837641476);
    }
    
    public final void windowClosed(WindowEvent windowevent) {
	/* empty */
    }
    
    static void method5859() {
	try {
	    File file = new File(Class349.aString3703, "random.dat");
	    if (file.exists())
		aClass671_5418
		    = new Class671(new Class668(file, "rw", 25L), 24, 0);
	    else {
	    while_38_:
		for (int i = 0; i < Class596.aStringArray7893.length; i++) {
		    for (int i_37_ = 0;
			 i_37_ < Class234.aStringArray2629.length; i_37_++) {
			File file_38_
			    = new File(new StringBuilder().append
					   (Class234.aStringArray2629[i_37_])
					   .append
					   (Class596.aStringArray7893[i])
					   .append
					   (File.separatorChar).append
					   ("random.dat").toString());
			if (file_38_.exists()) {
			    aClass671_5418
				= new Class671(new Class668(file_38_, "rw",
							    25L),
					       24, 0);
			    break while_38_;
			}
		    }
		}
	    }
	    if (aClass671_5418 == null) {
		RandomAccessFile randomaccessfile
		    = new RandomAccessFile(file, "rw");
		int i = randomaccessfile.read();
		randomaccessfile.seek(0L);
		randomaccessfile.write(i);
		randomaccessfile.seek(0L);
		randomaccessfile.close();
		aClass671_5418
		    = new Class671(new Class668(file, "rw", 25L), 24, 0);
	    }
	} catch (IOException ioexception) {
	    /* empty */
	}
    }
    
    public static void method5860(Class487_Sub17 class487_sub17) {
	byte[] is = new byte[24];
	try {
	    aClass671_5418.method8007(0L);
	    aClass671_5418.method8009(is, -1864916519);
	    int i;
	    for (i = 0; i < 24 && is[i] == 0; i++) {
		/* empty */
	    }
	    if (i >= 24)
		throw new IOException();
	} catch (Exception exception) {
	    for (int i = 0; i < 24; i++)
		is[i] = (byte) -1;
	}
	class487_sub17.method9213(is, 0, 24, (byte) 0);
    }
    
    synchronized void method5861() {
	method5839(2110907683);
	Container container = Class593.method7263(-2053288047);
	Class630.aCanvas8127 = new Canvas_Sub1(container);
	method5865(container, -787065186);
    }
    
    String method5862() {
	return null;
    }
    
    void method5863() {
	if (Class630.aCanvas8127 != null) {
	    Class630.aCanvas8127.removeFocusListener(this);
	    Class630.aCanvas8127.getParent().setBackground(Color.black);
	    Class630.aCanvas8127.getParent().remove(Class630.aCanvas8127);
	}
    }
    
    final boolean method5864() {
	String string
	    = Class659.anApplet8402.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;
	method5848("invalidhost", 504765332);
	return false;
    }
    
    void method5865(Container container, int i) {
	container.setBackground(Color.black);
	container.setLayout(null);
	container.add(Class630.aCanvas8127);
	Class630.aCanvas8127.setSize(1881245841 * Class175.anInt2012,
				     Class570.anInt7649 * -1922042493);
	Class630.aCanvas8127.setVisible(true);
	if (container == Class37.aFrame459) {
	    Insets insets = Class37.aFrame459.getInsets();
	    Class630.aCanvas8127.setLocation((1879860523 * anInt5392
					      + insets.left),
					     (insets.top
					      + -833984083 * anInt5393));
	} else
	    Class630.aCanvas8127.setLocation(anInt5392 * 1879860523,
					     -833984083 * anInt5393);
	Class630.aCanvas8127.addFocusListener(this);
	Class630.aCanvas8127.requestFocus();
	Class157.aBool1921 = true;
	aBool5412 = true;
	Class630.aCanvas8127.setFocusTraversalKeysEnabled(false);
	aBool5396 = true;
	aBool5398 = false;
	aLong5399 = Class222.method3225(1789437096) * -1353555663192922371L;
    }
    
    void method5866() {
	long l = Class222.method3225(2022438794);
	long l_39_ = aLongArray5400[-351012339 * anInt5391];
	aLongArray5400[-351012339 * anInt5391] = l;
	anInt5391 = -798890811 * (1 + anInt5391 * -351012339 & 0x1f);
	if (0L != l_39_ && l <= l_39_) {
	    /* empty */
	}
	synchronized (this) {
	    Class157.aBool1921 = aBool5412;
	}
	method5880(1324594830);
    }
    
    void method5867() {
	long l = Class222.method3225(1725284339);
	long l_40_ = aLongArray5400[-351012339 * anInt5391];
	aLongArray5400[-351012339 * anInt5391] = l;
	anInt5391 = -798890811 * (1 + anInt5391 * -351012339 & 0x1f);
	if (0L != l_40_ && l <= l_40_) {
	    /* empty */
	}
	synchronized (this) {
	    Class157.aBool1921 = aBool5412;
	}
	method5880(1810526689);
    }
    
    void method5868() {
	long l = Class222.method3225(1943334231);
	long l_41_ = aLongArray5388[68140323 * anInt5389 - 1 & 0x1f];
	long l_42_ = aLongArray5388[anInt5389 * 68140323];
	aLongArray5388[68140323 * anInt5389] = l;
	anInt5389 = (anInt5389 * 68140323 + 1 & 0x1f) * -678274421;
	if (l_42_ != 0L && l > l_42_) {
	    int i = (int) (l - l_42_);
	    anInt5409 = (int) (l - l_41_) * 62012109;
	    anInt5384 = 640327433 * (((i >> 1) + 32000) / i);
	}
	if ((anInt5382 += -324329671) * -355197175 - 1 > 50) {
	    anInt5382 -= 963385634;
	    aBool5396 = true;
	    Class630.aCanvas8127.setSize(1881245841 * Class175.anInt2012,
					 Class570.anInt7649 * -1922042493);
	    Class630.aCanvas8127.setVisible(true);
	    if (Class37.aFrame459 != null && null == aFrame5395) {
		Insets insets = Class37.aFrame459.getInsets();
		Class630.aCanvas8127.setLocation((insets.left
						  + anInt5392 * 1879860523),
						 (insets.top
						  + -833984083 * anInt5393));
	    } else
		Class630.aCanvas8127.setLocation(1879860523 * anInt5392,
						 anInt5393 * -833984083);
	}
	method5855(172455925);
    }
    
    void method5869() {
	long l = Class222.method3225(1597469857);
	long l_43_ = aLongArray5388[68140323 * anInt5389 - 1 & 0x1f];
	long l_44_ = aLongArray5388[anInt5389 * 68140323];
	aLongArray5388[68140323 * anInt5389] = l;
	anInt5389 = (anInt5389 * 68140323 + 1 & 0x1f) * -678274421;
	if (l_44_ != 0L && l > l_44_) {
	    int i = (int) (l - l_44_);
	    anInt5409 = (int) (l - l_43_) * 62012109;
	    anInt5384 = 640327433 * (((i >> 1) + 32000) / i);
	}
	if ((anInt5382 += -324329671) * -355197175 - 1 > 50) {
	    anInt5382 -= 963385634;
	    aBool5396 = true;
	    Class630.aCanvas8127.setSize(1881245841 * Class175.anInt2012,
					 Class570.anInt7649 * -1922042493);
	    Class630.aCanvas8127.setVisible(true);
	    if (Class37.aFrame459 != null && null == aFrame5395) {
		Insets insets = Class37.aFrame459.getInsets();
		Class630.aCanvas8127.setLocation((insets.left
						  + anInt5392 * 1879860523),
						 (insets.top
						  + -833984083 * anInt5393));
	    } else
		Class630.aCanvas8127.setLocation(1879860523 * anInt5392,
						 anInt5393 * -833984083);
	}
	method5855(950516856);
    }
    
    public final void method5870(FocusEvent focusevent) {
	aBool5412 = false;
    }
    
    void method5871(byte i) {
	long l = Class222.method3225(1705849434);
	long l_45_ = aLongArray5388[68140323 * anInt5389 - 1 & 0x1f];
	long l_46_ = aLongArray5388[anInt5389 * 68140323];
	aLongArray5388[68140323 * anInt5389] = l;
	anInt5389 = (anInt5389 * 68140323 + 1 & 0x1f) * -678274421;
	if (l_46_ != 0L && l > l_46_) {
	    int i_47_ = (int) (l - l_46_);
	    anInt5409 = (int) (l - l_45_) * 62012109;
	    anInt5384 = 640327433 * (((i_47_ >> 1) + 32000) / i_47_);
	}
	if ((anInt5382 += -324329671) * -355197175 - 1 > 50) {
	    anInt5382 -= 963385634;
	    aBool5396 = true;
	    Class630.aCanvas8127.setSize(1881245841 * Class175.anInt2012,
					 Class570.anInt7649 * -1922042493);
	    Class630.aCanvas8127.setVisible(true);
	    if (Class37.aFrame459 != null && null == aFrame5395) {
		Insets insets = Class37.aFrame459.getInsets();
		Class630.aCanvas8127.setLocation((insets.left
						  + anInt5392 * 1879860523),
						 (insets.top
						  + -833984083 * anInt5393));
	    } else
		Class630.aCanvas8127.setLocation(1879860523 * anInt5392,
						 anInt5393 * -833984083);
	}
	method5855(884640212);
    }
    
    public static final int method5872() {
	return (int) (1000000000L / (aLong5383 * 8599743404253538185L));
    }
    
    public static final void method5873() {
	aClass466_5386.method5729(-2073840946);
	for (int i = 0; i < 32; i++)
	    aLongArray5388[i] = 0L;
	for (int i = 0; i < 32; i++)
	    aLongArray5400[i] = 0L;
	anInt5402 = 0;
    }
    
    public static final void method5874() {
	aClass466_5386.method5729(-891428572);
	for (int i = 0; i < 32; i++)
	    aLongArray5388[i] = 0L;
	for (int i = 0; i < 32; i++)
	    aLongArray5400[i] = 0L;
	anInt5402 = 0;
    }
    
    public final void method5875(FocusEvent focusevent) {
	aBool5412 = false;
    }
    
    public void method360() {
	if (!aBool5416)
	    aLong5415 = 0L;
    }
    
    public void supplyApplet(Applet applet) {
	Class659.anApplet8402 = applet;
    }
    
    public void method368() {
	if (!aBool5416)
	    aLong5415 = ((Class222.method3225(1803647688) + 4000L)
			 * 8075226552386245929L);
    }
    
    synchronized void method5876(String string, byte i) {
	Class37.aFrame459 = new Frame();
	Class37.aFrame459.setTitle(string);
	Class37.aFrame459.setResizable(true);
	Class37.aFrame459.addWindowListener(this);
	Class37.aFrame459.setBackground(Color.black);
	Class37.aFrame459.setVisible(true);
	Class37.aFrame459.toFront();
	Insets insets = Class37.aFrame459.getInsets();
	Class37.aFrame459.setSize
	    (insets.right + (Class369.anInt4086 * -1952234489 + insets.left),
	     insets.bottom + (insets.top + (Class144_Sub1_Sub2_Sub1.anInt11753
					    * 462225311)));
    }
    
    public void method359() {
	if (!aBool5416)
	    aLong5415 = ((Class222.method3225(1699906452) + 4000L)
			 * 8075226552386245929L);
    }
    
    public final synchronized void method371(Graphics graphics) {
	if (!aBool5416) {
	    aBool5396 = true;
	    if ((Class222.method3225(1842627442)
		 - -7279978314733525419L * aLong5399)
		> 1000L) {
		Rectangle rectangle = graphics.getClipBounds();
		if (rectangle == null
		    || (rectangle.width >= Class369.anInt4086 * -1952234489
			&& rectangle.height >= (Class144_Sub1_Sub2_Sub1
						.anInt11753) * 462225311))
		    aBool5398 = true;
	    }
	}
    }
    
    public final void method358(Graphics graphics) {
	paint(graphics);
    }
    
    public final synchronized void method365(Graphics graphics) {
	if (!aBool5416) {
	    aBool5396 = true;
	    if ((Class222.method3225(1623666988)
		 - -7279978314733525419L * aLong5399)
		> 1000L) {
		Rectangle rectangle = graphics.getClipBounds();
		if (rectangle == null
		    || (rectangle.width >= Class369.anInt4086 * -1952234489
			&& rectangle.height >= (Class144_Sub1_Sub2_Sub1
						.anInt11753) * 462225311))
		    aBool5398 = true;
	    }
	}
    }
    
    public final void method5877(FocusEvent focusevent) {
	aBool5412 = true;
	aBool5396 = true;
    }
    
    void method5878(int i) {
	if (Class67_Sub1.aString8606 != null) {
	    String string = Class67_Sub1.aString8606.toLowerCase();
	    if (string.indexOf("sun") != -1 || string.indexOf("apple") != -1) {
		String string_48_ = Class364.aString3990;
		if (string_48_.equals("1.1") || string_48_.startsWith("1.1.")
		    || string_48_.equals("1.2")
		    || string_48_.startsWith("1.2.")
		    || string_48_.equals("1.3")
		    || string_48_.startsWith("1.3.")
		    || string_48_.equals("1.4")
		    || string_48_.startsWith("1.4.")
		    || string_48_.equals("1.5")
		    || string_48_.startsWith("1.5.")
		    || string_48_.equals("1.6.0")) {
		    method5848("wrongjava", 274434689);
		    return;
		}
		if (string_48_.startsWith("1.6.0_")) {
		    int i_49_;
		    for (i_49_ = 6;
			 (i_49_ < string_48_.length()
			  && Class350.method4432(string_48_.charAt(i_49_),
						 (byte) -111));
			 i_49_++) {
			/* empty */
		    }
		    String string_50_ = string_48_.substring(6, i_49_);
		    if (Class610.method7427(string_50_, 1454335979)
			&& Class32.method780(string_50_, (byte) 5) < 10) {
			method5848("wrongjava", 1868501911);
			return;
		    }
		}
	    }
	}
	Class593.method7263(-877098665).setFocusCycleRoot(true);
	anInt5401 = (((int) (Runtime.getRuntime().maxMemory() / 1048576L) + 1)
		     * -1380796129);
	anInt5385 = Runtime.getRuntime().availableProcessors() * 2127118539;
	method5838(1820600483);
	method5845(490902037);
	aClass466_5386 = Class407.method4958(1872701614);
	while (3852638955516761881L * aLong5415 == 0L
	       || (Class222.method3225(1725643841)
		   < aLong5415 * 3852638955516761881L)) {
	    anInt5402
		= (aClass466_5386.method5728(8599743404253538185L * aLong5383)
		   * 1711264633);
	    for (int i_51_ = 0; i_51_ < anInt5402 * 1610032841; i_51_++)
		method5841(529436513);
	    method5871((byte) -102);
	    Class173.method2617(Class630.aCanvas8127, 548428558);
	}
    }
    
    abstract void method5879(byte i);
    
    abstract void method5880(int i);
    
    public abstract void method372();
    
    public abstract void method357();
    
    abstract void method5881();
    
    abstract void method5882();
    
    abstract void method5883();
    
    abstract void method5884();
    
    public static final void method5885() {
	Class476.anImage5431 = null;
	Class301_Sub2.aFont9806 = null;
    }
    
    public void method5886() throws Exception_Sub5 {
	if (!((Class473) this).aBool5420) {
	    Class637_Sub18.method9766((byte) 85).method334("jaclib",
							   -1987534265);
	    try {
		QueryPerformanceCounter.init();
	    } catch (Throwable throwable) {
		if (Class198.aString2126.startsWith("win"))
		    throw new Exception_Sub5(128, "jaclib");
	    }
	    ((Class473) this).aBool5420 = true;
	}
    }
    
    public final void windowActivated(WindowEvent windowevent) {
	/* empty */
    }
    
    abstract void method5887();
    
    public final void method5888(FocusEvent focusevent) {
	aBool5412 = false;
    }
    
    public final void windowDeactivated(WindowEvent windowevent) {
	/* empty */
    }
    
    static final void method5889(Class612 class612, int i) {
	int i_52_
	    = (((Class612) class612).anIntArray8021
	       [(((Class612) class612).anInt8022 -= 201091009) * -40654783]);
	((Class612) class612).anIntArray8021
	    [(((Class612) class612).anInt8022 += 201091009) * -40654783 - 1]
	    = Class452.aClass69_5208.method1099(i_52_, (byte) 121);
    }
    
    static final void method5890(Class612 class612, int i) {
	if (null == Class597.aShortArray7900
	    || (748461635 * Class192.anInt2098
		>= Class163_Sub5.anInt9594 * -1242794361))
	    ((Class612) class612).anIntArray8021
		[((((Class612) class612).anInt8022 += 201091009) * -40654783
		  - 1)]
		= -1;
	else
	    ((Class612) class612).anIntArray8021
		[((((Class612) class612).anInt8022 += 201091009) * -40654783
		  - 1)]
		= ((Class597.aShortArray7900
		    [(Class192.anInt2098 += -1020649877) * 748461635 - 1])
		   & 0xffff);
    }
    
    static final void method5891(Class612 class612, int i) {
	((Class612) class612).anIntArray8021
	    [(((Class612) class612).anInt8022 += 201091009) * -40654783 - 1]
	    = 0;
    }
    
    static final void method5892(Class612 class612, byte i) {
	((Class612) class612).anInt8022 -= -1881875188;
	Class556.method6755((byte) 56);
	Class399.method4806((byte) 113);
	Class675.anInt8535
	    = (((Class612) class612).anIntArray8021
	       [((Class612) class612).anInt8022 * -40654783]) * -1560439943;
	Class231.anInt2612
	    = ((((Class612) class612).anIntArray8021
		[((Class612) class612).anInt8022 * -40654783 + 1])
	       * -1277225167);
	Class522.anInt7191
	    = (-1811945531
	       * (((Class612) class612).anIntArray8021
		  [2 + ((Class612) class612).anInt8022 * -40654783]));
	Class416.anInt4670
	    = 1186450879 * (((Class612) class612).anIntArray8021
			    [((Class612) class612).anInt8022 * -40654783 + 3]);
	Class474.anInt5424
	    = (((Class612) class612).anIntArray8021
	       [4 + -40654783 * ((Class612) class612).anInt8022]) * -843101335;
	Class195.anInt2122
	    = 427120047 * (((Class612) class612).anIntArray8021
			   [-40654783 * ((Class612) class612).anInt8022 + 5]);
	Class538.anInt7334
	    = 1798688045 * (((Class612) class612).anIntArray8021
			    [((Class612) class612).anInt8022 * -40654783 + 6]);
	Class353.anInt3739
	    = 872181777 * (((Class612) class612).anIntArray8021
			   [-40654783 * ((Class612) class612).anInt8022 + 7]);
	Class637_Sub29.anInt10601
	    = 707098397 * (((Class612) class612).anIntArray8021
			   [-40654783 * ((Class612) class612).anInt8022 + 8]);
	Class287_Sub3.anInt9894
	    = 667676065 * (((Class612) class612).anIntArray8021
			   [9 + -40654783 * ((Class612) class612).anInt8022]);
	Class212.anInt2432
	    = (((Class612) class612).anIntArray8021
	       [10 + -40654783 * ((Class612) class612).anInt8022]) * 41380923;
	Class292.anInt3365
	    = (1884887985
	       * (((Class612) class612).anIntArray8021
		  [((Class612) class612).anInt8022 * -40654783 + 11]));
	Class397.aClass411_4552.method5033(-888015655 * Class474.anInt5424,
					   -1908716725);
	Class397.aClass411_4552.method5033(Class195.anInt2122 * 368124239,
					   -1859715198);
	Class397.aClass411_4552.method5033(Class538.anInt7334 * -991229275,
					   -1913098307);
	Class397.aClass411_4552.method5033(Class353.anInt3739 * -1271758607,
					   -2081953440);
	Class397.aClass411_4552
	    .method5033(Class637_Sub29.anInt10601 * -789773515, -1860124505);
	Class397.aClass411_4552.method5033(1587170641 * Class292.anInt3365,
					   -1852205486);
	Class297_Sub1.aClass411_9797
	    .method5033(1587170641 * Class292.anInt3365, -1966823233);
	Class163_Sub6.aClass114_9613 = null;
	Class559.aClass114_7541 = null;
	Class123.aClass114_1485 = null;
	Class506.aClass114_6991 = null;
	Class205.aClass114_2144 = null;
	Class575.aClass114_7709 = null;
	Class16.aClass114_288 = null;
	Class140.aClass114_1634 = null;
	Class25.aBool416 = true;
    }
    
    static final void method5893(Class612 class612, int i) {
	((Class612) class612).anIntArray8021
	    [-40654783 * ((Class612) class612).anInt8022 - 1]
	    = (((Class612) class612).aClass290_8032.method3941((byte) -39)
	       [(((Class612) class612).anIntArray8021
		 [-40654783 * ((Class612) class612).anInt8022 - 1])]);
    }
    
    public static void method5894(String string, int i) {
	Class655.method7786(0, 0, "", "", "", string, null, (byte) 33);
    }
}
