/* Class590 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.io.File;
import java.io.FileOutputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;

public class Class590 implements Interface20 {
	Class279 aClass279_7698;
	String aString7699;
	Hashtable aHashtable7700 = new Hashtable();
	Hashtable aHashtable7701 = new Hashtable();

	public boolean method12796(String string) {
		return ((Class590) this).aHashtable7701.containsKey(string);
	}

	void method12797(String string, File file, byte i) {
		((Class590) this).aHashtable7700.put(string, file);
	}

	public boolean method122() {
		Hashtable hashtable = new Hashtable();
		Enumeration enumeration = ((Class590) this).aHashtable7701.keys();
		while (enumeration.hasMoreElements()) {
			String string = (String) enumeration.nextElement();
			hashtable.put(string, ((Class590) this).aHashtable7701.get(string));
		}
		try {
			Class var_class = Class.forName("java.lang.reflect.AccessibleObject");
			Class var_class_0_ = Class.forName("java.lang.ClassLoader");
			Field field = var_class_0_.getDeclaredField("nativeLibraries");
			Method method = var_class.getDeclaredMethod("setAccessible", new Class[] { Boolean.TYPE });
			method.invoke(field, new Object[] { Boolean.TRUE });
			try {
				enumeration = ((Class590) this).aHashtable7701.keys();
				while (enumeration.hasMoreElements()) {
					String string = (String) enumeration.nextElement();
					try {
						File file = ((File) ((Class590) this).aHashtable7700.get(string));
						Class var_class_1_ = ((Class) ((Class590) this).aHashtable7701.get(string));
						Vector vector = ((Vector) field.get(var_class_1_.getClassLoader()));
						for (int i = 0; i < vector.size(); i++) {
							try {
								Object object = vector.elementAt(i);
								Field field_2_ = object.getClass().getDeclaredField("name");
								method.invoke(field_2_, new Object[] { Boolean.TRUE });
								try {
									String string_3_ = (String) field_2_.get(object);
									if (string_3_ != null && (string_3_.equalsIgnoreCase(file.getCanonicalPath()))) {
										Field field_4_ = object.getClass().getDeclaredField("handle");
										Method method_5_ = (object.getClass().getDeclaredMethod("finalize", new Class[0]));
										method.invoke(field_4_, (new Object[] { Boolean.TRUE }));
										method.invoke(method_5_, (new Object[] { Boolean.TRUE }));
										try {
											method_5_.invoke(object, new Object[0]);
											field_4_.set(object, new Integer(0));
											hashtable.remove(string);
										} catch (Throwable throwable) {
											/* empty */
										}
										method.invoke(method_5_, (new Object[] { Boolean.FALSE }));
										method.invoke(field_4_, (new Object[] { Boolean.FALSE }));
									}
								} catch (Throwable throwable) {
									/* empty */
								}
								method.invoke(field_2_, new Object[] { Boolean.FALSE });
							} catch (Throwable throwable) {
								/* empty */
							}
						}
					} catch (Throwable throwable) {
						/* empty */
					}
				}
			} catch (Throwable throwable) {
				/* empty */
			}
			method.invoke(field, new Object[] { Boolean.FALSE });
		} catch (Throwable throwable) {
			/* empty */
		}
		((Class590) this).aHashtable7701 = hashtable;
		return ((Class590) this).aHashtable7701.isEmpty();
	}

	public int method12798(String string, byte i) throws Exception_Sub2 {
		if (((Class590) this).aHashtable7700.containsKey(string))
			return 100;
		String string_6_ = Class223.method4569(string, 1501394204);
		if (null == string_6_)
			throw new Exception_Sub2(1, string);
		String string_7_ = null;
		if (string_7_ == null) {
			string_7_ = new StringBuilder().append(((Class590) this).aString7699).append(string_6_).toString();
			if (!((Class590) this).aClass279_7698.method5667(string_7_, "", 916118838))
				throw new Exception_Sub2(2, string);
		}
		if (!((Class590) this).aClass279_7698.method5602(string_7_, 1773902010))
			return ((Class590) this).aClass279_7698.method5606(string_7_, (short) 22781);
		byte[] is = ((Class590) this).aClass279_7698.method5599(string_7_, "", 506910781);
		if (is == null)
			throw new Exception_Sub2(3, string);
		Object object = null;
		File file;
		try {
			file = Class520.method11660(string_6_, (byte) 41);
		} catch (RuntimeException runtimeexception) {
			throw new Exception_Sub2(4, string, runtimeexception);
		}
		if (null == file)
			throw new Exception_Sub2(5, string);
		boolean bool = true;
		byte[] is_8_ = Class628.method13233(file, (byte) 12);
		if (is_8_ != null && is_8_.length == is.length) {
			for (int i_9_ = 0; i_9_ < is_8_.length; i_9_++) {
				if (is_8_[i_9_] != is[i_9_]) {
					bool = false;
					break;
				}
			}
		} else
			bool = false;
		if (!bool) {
			try {
				FileOutputStream fileoutputstream = new FileOutputStream(file);
				fileoutputstream.write(is, 0, is.length);
				fileoutputstream.close();
			} catch (Throwable throwable) {
				throw new Exception_Sub2(6, string, throwable);
			}
		}
		method12797(string, file, (byte) 73);
		return 100;
	}

	public int method12799(String string) throws Exception_Sub2 {
		if (((Class590) this).aHashtable7700.containsKey(string))
			return 100;
		String string_10_ = Class223.method4569(string, -539615398);
		if (null == string_10_)
			throw new Exception_Sub2(1, string);
		String string_11_ = null;
		if (string_11_ == null) {
			string_11_ = new StringBuilder().append(((Class590) this).aString7699).append(string_10_).toString();
			if (!((Class590) this).aClass279_7698.method5667(string_11_, "", 916118838))
				throw new Exception_Sub2(2, string);
		}
		if (!((Class590) this).aClass279_7698.method5602(string_11_, 1390763963))
			return ((Class590) this).aClass279_7698.method5606(string_11_, (short) 29833);
		byte[] is = ((Class590) this).aClass279_7698.method5599(string_11_, "", 810852050);
		if (is == null)
			throw new Exception_Sub2(3, string);
		Object object = null;
		File file;
		try {
			file = Class520.method11660(string_10_, (byte) 100);
		} catch (RuntimeException runtimeexception) {
			throw new Exception_Sub2(4, string, runtimeexception);
		}
		if (null == file)
			throw new Exception_Sub2(5, string);
		boolean bool = true;
		byte[] is_12_ = Class628.method13233(file, (byte) 12);
		if (is_12_ != null && is_12_.length == is.length) {
			for (int i = 0; i < is_12_.length; i++) {
				if (is_12_[i] != is[i]) {
					bool = false;
					break;
				}
			}
		} else
			bool = false;
		if (!bool) {
			try {
				FileOutputStream fileoutputstream = new FileOutputStream(file);
				fileoutputstream.write(is, 0, is.length);
				fileoutputstream.close();
			} catch (Throwable throwable) {
				throw new Exception_Sub2(6, string, throwable);
			}
		}
		method12797(string, file, (byte) 122);
		return 100;
	}

	public void method117(String string, int i) throws Exception_Sub3 {
		method12800(string, Class245.class, (byte) -27);
	}

	void method12800(String string, Class var_class, byte i) throws Exception_Sub3 {
		Class var_class_13_ = (Class) ((Class590) this).aHashtable7701.get(string);
		if (null != var_class_13_ && var_class_13_.getClassLoader() != var_class.getClassLoader())
			throw new Exception_Sub3(1, string);
		File file = null;
		if (file == null)
			file = (File) ((Class590) this).aHashtable7700.get(string);
		if (file != null) {
			try {
				file = new File(file.getCanonicalPath());
				Class var_class_14_ = Class.forName("java.lang.Runtime");
				Class var_class_15_ = Class.forName("java.lang.reflect.AccessibleObject");
				Method method = var_class_15_.getDeclaredMethod("setAccessible", (new Class[] { Boolean.TYPE }));
				Method method_16_ = (var_class_14_.getDeclaredMethod("load0", new Class[] { Class.forName("java.lang.Class"), Class.forName("java.lang.String") }));
				method.invoke(method_16_, new Object[] { Boolean.TRUE });
				method_16_.invoke(Runtime.getRuntime(), new Object[] { var_class, file.getPath() });
				method.invoke(method_16_, new Object[] { Boolean.FALSE });
				((Class590) this).aHashtable7701.put(string, var_class);
			} catch (NoSuchMethodException nosuchmethodexception) {
				System.load(file.getPath());
				((Class590) this).aHashtable7701.put(string, Class245.class);
			} catch (Throwable throwable) {
				throw new Exception_Sub3(3, string);
			}
		} else
			throw new Exception_Sub3(4, string);
	}

	public boolean method25(byte i) {
		Hashtable hashtable = new Hashtable();
		Enumeration enumeration = ((Class590) this).aHashtable7701.keys();
		while (enumeration.hasMoreElements()) {
			String string = (String) enumeration.nextElement();
			hashtable.put(string, ((Class590) this).aHashtable7701.get(string));
		}
		try {
			Class var_class = Class.forName("java.lang.reflect.AccessibleObject");
			Class var_class_17_ = Class.forName("java.lang.ClassLoader");
			Field field = var_class_17_.getDeclaredField("nativeLibraries");
			Method method = var_class.getDeclaredMethod("setAccessible", new Class[] { Boolean.TYPE });
			method.invoke(field, new Object[] { Boolean.TRUE });
			try {
				enumeration = ((Class590) this).aHashtable7701.keys();
				while (enumeration.hasMoreElements()) {
					String string = (String) enumeration.nextElement();
					try {
						File file = ((File) ((Class590) this).aHashtable7700.get(string));
						Class var_class_18_ = ((Class) ((Class590) this).aHashtable7701.get(string));
						Vector vector = ((Vector) field.get(var_class_18_.getClassLoader()));
						for (int i_19_ = 0; i_19_ < vector.size(); i_19_++) {
							try {
								Object object = vector.elementAt(i_19_);
								Field field_20_ = object.getClass().getDeclaredField("name");
								method.invoke(field_20_, new Object[] { Boolean.TRUE });
								try {
									String string_21_ = (String) field_20_.get(object);
									if (string_21_ != null && (string_21_.equalsIgnoreCase(file.getCanonicalPath()))) {
										Field field_22_ = object.getClass().getDeclaredField("handle");
										Method method_23_ = (object.getClass().getDeclaredMethod("finalize", new Class[0]));
										method.invoke(field_22_, (new Object[] { Boolean.TRUE }));
										method.invoke(method_23_, (new Object[] { Boolean.TRUE }));
										try {
											method_23_.invoke(object, new Object[0]);
											field_22_.set(object, new Integer(0));
											hashtable.remove(string);
										} catch (Throwable throwable) {
											/* empty */
										}
										method.invoke(method_23_, (new Object[] { Boolean.FALSE }));
										method.invoke(field_22_, (new Object[] { Boolean.FALSE }));
									}
								} catch (Throwable throwable) {
									/* empty */
								}
								method.invoke(field_20_, new Object[] { Boolean.FALSE });
							} catch (Throwable throwable) {
								/* empty */
							}
						}
					} catch (Throwable throwable) {
						/* empty */
					}
				}
			} catch (Throwable throwable) {
				/* empty */
			}
			method.invoke(field, new Object[] { Boolean.FALSE });
		} catch (Throwable throwable) {
			/* empty */
		}
		((Class590) this).aHashtable7701 = hashtable;
		return ((Class590) this).aHashtable7701.isEmpty();
	}

	public boolean method12801(String string, int i) {
		return ((Class590) this).aHashtable7701.containsKey(string);
	}

	public boolean method119(String string) {
		return ((Class590) this).aHashtable7700.containsKey(string);
	}

	public boolean method118(String string) {
		return ((Class590) this).aHashtable7700.containsKey(string);
	}

	public boolean method121() {
		Hashtable hashtable = new Hashtable();
		Enumeration enumeration = ((Class590) this).aHashtable7701.keys();
		while (enumeration.hasMoreElements()) {
			String string = (String) enumeration.nextElement();
			hashtable.put(string, ((Class590) this).aHashtable7701.get(string));
		}
		try {
			Class var_class = Class.forName("java.lang.reflect.AccessibleObject");
			Class var_class_24_ = Class.forName("java.lang.ClassLoader");
			Field field = var_class_24_.getDeclaredField("nativeLibraries");
			Method method = var_class.getDeclaredMethod("setAccessible", new Class[] { Boolean.TYPE });
			method.invoke(field, new Object[] { Boolean.TRUE });
			try {
				enumeration = ((Class590) this).aHashtable7701.keys();
				while (enumeration.hasMoreElements()) {
					String string = (String) enumeration.nextElement();
					try {
						File file = ((File) ((Class590) this).aHashtable7700.get(string));
						Class var_class_25_ = ((Class) ((Class590) this).aHashtable7701.get(string));
						Vector vector = ((Vector) field.get(var_class_25_.getClassLoader()));
						for (int i = 0; i < vector.size(); i++) {
							try {
								Object object = vector.elementAt(i);
								Field field_26_ = object.getClass().getDeclaredField("name");
								method.invoke(field_26_, new Object[] { Boolean.TRUE });
								try {
									String string_27_ = (String) field_26_.get(object);
									if (string_27_ != null && (string_27_.equalsIgnoreCase(file.getCanonicalPath()))) {
										Field field_28_ = object.getClass().getDeclaredField("handle");
										Method method_29_ = (object.getClass().getDeclaredMethod("finalize", new Class[0]));
										method.invoke(field_28_, (new Object[] { Boolean.TRUE }));
										method.invoke(method_29_, (new Object[] { Boolean.TRUE }));
										try {
											method_29_.invoke(object, new Object[0]);
											field_28_.set(object, new Integer(0));
											hashtable.remove(string);
										} catch (Throwable throwable) {
											/* empty */
										}
										method.invoke(method_29_, (new Object[] { Boolean.FALSE }));
										method.invoke(field_28_, (new Object[] { Boolean.FALSE }));
									}
								} catch (Throwable throwable) {
									/* empty */
								}
								method.invoke(field_26_, new Object[] { Boolean.FALSE });
							} catch (Throwable throwable) {
								/* empty */
							}
						}
					} catch (Throwable throwable) {
						/* empty */
					}
				}
			} catch (Throwable throwable) {
				/* empty */
			}
			method.invoke(field, new Object[] { Boolean.FALSE });
		} catch (Throwable throwable) {
			/* empty */
		}
		((Class590) this).aHashtable7701 = hashtable;
		return ((Class590) this).aHashtable7701.isEmpty();
	}

	public boolean method116(String string, int i) {
		return ((Class590) this).aHashtable7700.containsKey(string);
	}

	static String method12802(String string) {
		if (Class234.aString2730.startsWith("win"))
			return new StringBuilder().append(string).append(".dll").toString();
		if (Class234.aString2730.startsWith("linux"))
			return new StringBuilder().append("lib").append(string).append(".so").toString();
		if (Class234.aString2730.startsWith("mac"))
			return new StringBuilder().append("lib").append(string).append(".dylib").toString();
		return null;
	}

	public int method12803(String string) throws Exception_Sub2 {
		if (((Class590) this).aHashtable7700.containsKey(string))
			return 100;
		String string_30_ = Class223.method4569(string, -784646736);
		if (null == string_30_)
			throw new Exception_Sub2(1, string);
		String string_31_ = null;
		if (string_31_ == null) {
			string_31_ = new StringBuilder().append(((Class590) this).aString7699).append(string_30_).toString();
			if (!((Class590) this).aClass279_7698.method5667(string_31_, "", 916118838))
				throw new Exception_Sub2(2, string);
		}
		if (!((Class590) this).aClass279_7698.method5602(string_31_, -524662836))
			return ((Class590) this).aClass279_7698.method5606(string_31_, (short) 8243);
		byte[] is = ((Class590) this).aClass279_7698.method5599(string_31_, "", -64633919);
		if (is == null)
			throw new Exception_Sub2(3, string);
		Object object = null;
		File file;
		try {
			file = Class520.method11660(string_30_, (byte) 48);
		} catch (RuntimeException runtimeexception) {
			throw new Exception_Sub2(4, string, runtimeexception);
		}
		if (null == file)
			throw new Exception_Sub2(5, string);
		boolean bool = true;
		byte[] is_32_ = Class628.method13233(file, (byte) 12);
		if (is_32_ != null && is_32_.length == is.length) {
			for (int i = 0; i < is_32_.length; i++) {
				if (is_32_[i] != is[i]) {
					bool = false;
					break;
				}
			}
		} else
			bool = false;
		if (!bool) {
			try {
				FileOutputStream fileoutputstream = new FileOutputStream(file);
				fileoutputstream.write(is, 0, is.length);
				fileoutputstream.close();
			} catch (Throwable throwable) {
				throw new Exception_Sub2(6, string, throwable);
			}
		}
		method12797(string, file, (byte) 39);
		return 100;
	}

	public int method12804(String string) throws Exception_Sub2 {
		if (((Class590) this).aHashtable7700.containsKey(string))
			return 100;
		String string_33_ = Class223.method4569(string, 799223209);
		if (null == string_33_)
			throw new Exception_Sub2(1, string);
		String string_34_ = null;
		if (string_34_ == null) {
			string_34_ = new StringBuilder().append(((Class590) this).aString7699).append(string_33_).toString();
			if (!((Class590) this).aClass279_7698.method5667(string_34_, "", 916118838))
				throw new Exception_Sub2(2, string);
		}
		if (!((Class590) this).aClass279_7698.method5602(string_34_, 410780974))
			return ((Class590) this).aClass279_7698.method5606(string_34_, (short) 27483);
		byte[] is = ((Class590) this).aClass279_7698.method5599(string_34_, "", -2137574155);
		if (is == null)
			throw new Exception_Sub2(3, string);
		Object object = null;
		File file;
		try {
			file = Class520.method11660(string_33_, (byte) 5);
		} catch (RuntimeException runtimeexception) {
			throw new Exception_Sub2(4, string, runtimeexception);
		}
		if (null == file)
			throw new Exception_Sub2(5, string);
		boolean bool = true;
		byte[] is_35_ = Class628.method13233(file, (byte) 12);
		if (is_35_ != null && is_35_.length == is.length) {
			for (int i = 0; i < is_35_.length; i++) {
				if (is_35_[i] != is[i]) {
					bool = false;
					break;
				}
			}
		} else
			bool = false;
		if (!bool) {
			try {
				FileOutputStream fileoutputstream = new FileOutputStream(file);
				fileoutputstream.write(is, 0, is.length);
				fileoutputstream.close();
			} catch (Throwable throwable) {
				throw new Exception_Sub2(6, string, throwable);
			}
		}
		method12797(string, file, (byte) 42);
		return 100;
	}

	public void method120(String string) throws Exception_Sub3 {
		method12800(string, Class245.class, (byte) -108);
	}

	public int method12805(String string) throws Exception_Sub2 {
		if (((Class590) this).aHashtable7700.containsKey(string))
			return 100;
		String string_36_ = Class223.method4569(string, 1893316663);
		if (null == string_36_)
			throw new Exception_Sub2(1, string);
		String string_37_ = null;
		if (string_37_ == null) {
			string_37_ = new StringBuilder().append(((Class590) this).aString7699).append(string_36_).toString();
			if (!((Class590) this).aClass279_7698.method5667(string_37_, "", 916118838))
				throw new Exception_Sub2(2, string);
		}
		if (!((Class590) this).aClass279_7698.method5602(string_37_, -1714474339))
			return ((Class590) this).aClass279_7698.method5606(string_37_, (short) 26861);
		byte[] is = ((Class590) this).aClass279_7698.method5599(string_37_, "", -698921192);
		if (is == null)
			throw new Exception_Sub2(3, string);
		Object object = null;
		File file;
		try {
			file = Class520.method11660(string_36_, (byte) 66);
		} catch (RuntimeException runtimeexception) {
			throw new Exception_Sub2(4, string, runtimeexception);
		}
		if (null == file)
			throw new Exception_Sub2(5, string);
		boolean bool = true;
		byte[] is_38_ = Class628.method13233(file, (byte) 12);
		if (is_38_ != null && is_38_.length == is.length) {
			for (int i = 0; i < is_38_.length; i++) {
				if (is_38_[i] != is[i]) {
					bool = false;
					break;
				}
			}
		} else
			bool = false;
		if (!bool) {
			try {
				FileOutputStream fileoutputstream = new FileOutputStream(file);
				fileoutputstream.write(is, 0, is.length);
				fileoutputstream.close();
			} catch (Throwable throwable) {
				throw new Exception_Sub2(6, string, throwable);
			}
		}
		method12797(string, file, (byte) 103);
		return 100;
	}

	public int method12806(String string) throws Exception_Sub2 {
		if (((Class590) this).aHashtable7700.containsKey(string))
			return 100;
		String string_39_ = Class223.method4569(string, 1005065999);
		if (null == string_39_)
			throw new Exception_Sub2(1, string);
		String string_40_ = null;
		if (string_40_ == null) {
			string_40_ = new StringBuilder().append(((Class590) this).aString7699).append(string_39_).toString();
			if (!((Class590) this).aClass279_7698.method5667(string_40_, "", 916118838))
				throw new Exception_Sub2(2, string);
		}
		if (!((Class590) this).aClass279_7698.method5602(string_40_, 2098648598))
			return ((Class590) this).aClass279_7698.method5606(string_40_, (short) 9780);
		byte[] is = ((Class590) this).aClass279_7698.method5599(string_40_, "", -825845854);
		if (is == null)
			throw new Exception_Sub2(3, string);
		Object object = null;
		File file;
		try {
			file = Class520.method11660(string_39_, (byte) 25);
		} catch (RuntimeException runtimeexception) {
			throw new Exception_Sub2(4, string, runtimeexception);
		}
		if (null == file)
			throw new Exception_Sub2(5, string);
		boolean bool = true;
		byte[] is_41_ = Class628.method13233(file, (byte) 12);
		if (is_41_ != null && is_41_.length == is.length) {
			for (int i = 0; i < is_41_.length; i++) {
				if (is_41_[i] != is[i]) {
					bool = false;
					break;
				}
			}
		} else
			bool = false;
		if (!bool) {
			try {
				FileOutputStream fileoutputstream = new FileOutputStream(file);
				fileoutputstream.write(is, 0, is.length);
				fileoutputstream.close();
			} catch (Throwable throwable) {
				throw new Exception_Sub2(6, string, throwable);
			}
		}
		method12797(string, file, (byte) 120);
		return 100;
	}

	void method12807(String string, File file) {
		((Class590) this).aHashtable7700.put(string, file);
	}

	public Class590(Class279 class279) {
		((Class590) this).aClass279_7698 = class279;
		String string = "";
		if (Class234.aString2730.startsWith("win") || Class234.aString2730.startsWith("windows 7"))
			string = new StringBuilder().append(string).append("windows/").toString();
		else if (Class234.aString2730.startsWith("linux"))
			string = new StringBuilder().append(string).append("linux/").toString();
		else if (Class234.aString2730.startsWith("mac"))
			string = new StringBuilder().append(string).append("macos/").toString();
		if (Class234.aString2732.startsWith("amd64") || Class234.aString2732.startsWith("x86_64"))
			string = new StringBuilder().append(string).append("x86_64/").toString();
		else if (Class234.aString2732.startsWith("i386") || Class234.aString2732.startsWith("i486") || Class234.aString2732.startsWith("i586") || Class234.aString2732.startsWith("x86"))
			string = new StringBuilder().append(string).append("x86/").toString();
		else if (Class234.aString2732.startsWith("ppc"))
			string = new StringBuilder().append(string).append("ppc/").toString();
		else
			string = new StringBuilder().append(string).append("universal/").toString();
		((Class590) this).aString7699 = string;
	}

	public boolean method12808(String string) {
		return ((Class590) this).aHashtable7701.containsKey(string);
	}

	public boolean method12809(String string) {
		return ((Class590) this).aHashtable7701.containsKey(string);
	}

	static final void method12810(Class477 class477, int i) {
		((Class477) class477).aClass497_Sub1_Sub3_Sub5_6494.method17384((((Class477) class477).anIntArray6497[(((Class477) class477).anInt6498 -= 1577301031) * 2028895127]), (short) 256);
	}
}
