/* Class400_Sub1 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.lang.reflect.Method;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.Socket;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.List;

public class Class400_Sub1 extends Class400 {
	static final String aString8334 = "java.net.useSystemProxies";
	ProxySelector aProxySelector8335 = ProxySelector.getDefault();

	Socket method13760(Proxy proxy) throws IOException {
		if (proxy.type() == Proxy.Type.DIRECT)
			return method7171((byte) 46);
		java.net.SocketAddress socketaddress = proxy.address();
		if (!(socketaddress instanceof InetSocketAddress))
			return null;
		InetSocketAddress inetsocketaddress = (InetSocketAddress) socketaddress;
		if (proxy.type() == Proxy.Type.HTTP) {
			String string = null;
			try {
				Class var_class = (Class.forName("sun.net.www.protocol.http.AuthenticationInfo"));
				Method method = var_class.getDeclaredMethod("getProxyAuth", (new Class[] { java.lang.String.class, Integer.TYPE }));
				method.setAccessible(true);
				Object object = method.invoke(null, (new Object[] { inetsocketaddress.getHostName(), new Integer(inetsocketaddress.getPort()) }));
				if (null != object) {
					Method method_0_ = (var_class.getDeclaredMethod("supportsPreemptiveAuthorization", new Class[0]));
					method_0_.setAccessible(true);
					if (((Boolean) method_0_.invoke(object, new Object[0])).booleanValue()) {
						Method method_1_ = var_class.getDeclaredMethod("getHeaderName", new Class[0]);
						method_1_.setAccessible(true);
						Method method_2_ = (var_class.getDeclaredMethod("getHeaderValue", new Class[] { java.net.URL.class, java.lang.String.class }));
						method_2_.setAccessible(true);
						String string_3_ = (String) method_1_.invoke(object, new Object[0]);
						String string_4_ = ((String) (method_2_.invoke(object, (new Object[] { new URL(new StringBuilder().append("https://").append(((Class400_Sub1) this).aString5743).append("/").toString()), "https" }))));
						string = new StringBuilder().append(string_3_).append(": ").append(string_4_).toString();
					}
				}
			} catch (Exception exception) {
				/* empty */
			}
			return method13762(inetsocketaddress.getHostName(), inetsocketaddress.getPort(), string, -264508299);
		}
		if (proxy.type() == Proxy.Type.SOCKS) {
			Socket socket = new Socket(proxy);
			socket.connect(new InetSocketAddress((((Class400_Sub1) this).aString5743), (((Class400_Sub1) this).anInt5742) * -1139539209));
			return socket;
		}
		return null;
	}

	Class400_Sub1() {
		/* empty */
	}

	Socket method13761(Proxy proxy, int i) throws IOException {
		if (proxy.type() == Proxy.Type.DIRECT)
			return method7171((byte) 36);
		java.net.SocketAddress socketaddress = proxy.address();
		if (!(socketaddress instanceof InetSocketAddress))
			return null;
		InetSocketAddress inetsocketaddress = (InetSocketAddress) socketaddress;
		if (proxy.type() == Proxy.Type.HTTP) {
			String string = null;
			try {
				Class var_class = (Class.forName("sun.net.www.protocol.http.AuthenticationInfo"));
				Method method = var_class.getDeclaredMethod("getProxyAuth", (new Class[] { java.lang.String.class, Integer.TYPE }));
				method.setAccessible(true);
				Object object = method.invoke(null, (new Object[] { inetsocketaddress.getHostName(), new Integer(inetsocketaddress.getPort()) }));
				if (null != object) {
					Method method_5_ = (var_class.getDeclaredMethod("supportsPreemptiveAuthorization", new Class[0]));
					method_5_.setAccessible(true);
					if (((Boolean) method_5_.invoke(object, new Object[0])).booleanValue()) {
						Method method_6_ = var_class.getDeclaredMethod("getHeaderName", new Class[0]);
						method_6_.setAccessible(true);
						Method method_7_ = (var_class.getDeclaredMethod("getHeaderValue", new Class[] { java.net.URL.class, java.lang.String.class }));
						method_7_.setAccessible(true);
						String string_8_ = (String) method_6_.invoke(object, new Object[0]);
						String string_9_ = ((String) (method_7_.invoke(object, (new Object[] { new URL(new StringBuilder().append("https://").append(((Class400_Sub1) this).aString5743).append("/").toString()), "https" }))));
						string = new StringBuilder().append(string_8_).append(": ").append(string_9_).toString();
					}
				}
			} catch (Exception exception) {
				/* empty */
			}
			return method13762(inetsocketaddress.getHostName(), inetsocketaddress.getPort(), string, 1863863174);
		}
		if (proxy.type() == Proxy.Type.SOCKS) {
			Socket socket = new Socket(proxy);
			socket.connect(new InetSocketAddress((((Class400_Sub1) this).aString5743), (((Class400_Sub1) this).anInt5742) * -1139539209));
			return socket;
		}
		return null;
	}

	Socket method13762(String string, int i, String string_10_, int i_11_) throws IOException {
		Socket socket = new Socket(string, i);
		socket.setSoTimeout(10000);
		OutputStream outputstream = socket.getOutputStream();
		if (null == string_10_)
			outputstream.write(new StringBuilder().append("CONNECT ").append(((Class400_Sub1) this).aString5743).append(":").append(-1139539209 * ((Class400_Sub1) this).anInt5742).append(" HTTP/1.0\n\n").toString().getBytes(Charset.forName("ISO-8859-1")));
		else
			outputstream.write(new StringBuilder().append("CONNECT ").append(((Class400_Sub1) this).aString5743).append(":").append(((Class400_Sub1) this).anInt5742 * -1139539209).append(" HTTP/1.0\n").append(string_10_).append("\n\n").toString().getBytes(Charset.forName("ISO-8859-1")));
		outputstream.flush();
		BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
		String string_12_ = bufferedreader.readLine();
		if (null != string_12_) {
			if (string_12_.startsWith("HTTP/1.0 200") || string_12_.startsWith("HTTP/1.1 200"))
				return socket;
			if (string_12_.startsWith("HTTP/1.0 407") || string_12_.startsWith("HTTP/1.1 407")) {
				int i_13_ = 0;
				String string_14_ = "proxy-authenticate: ";
				for (string_12_ = bufferedreader.readLine(); string_12_ != null && i_13_ < 50; i_13_++) {
					if (string_12_.toLowerCase().startsWith(string_14_)) {
						string_12_ = string_12_.substring(string_14_.length()).trim();
						int i_15_ = string_12_.indexOf(' ');
						if (-1 != i_15_)
							string_12_ = string_12_.substring(0, i_15_);
						throw new IOException_Sub1(string_12_);
					}
					string_12_ = bufferedreader.readLine();
				}
				throw new IOException_Sub1("");
			}
		}
		outputstream.close();
		bufferedreader.close();
		socket.close();
		return null;
	}

	public Socket method7166() throws IOException {
		boolean bool = (Boolean.parseBoolean(System.getProperty("java.net.useSystemProxies")));
		if (!bool)
			System.setProperty("java.net.useSystemProxies", "true");
		boolean bool_16_ = 443 == -1139539209 * ((Class400_Sub1) this).anInt5742;
		List list;
		List list_17_;
		try {
			list = (((Class400_Sub1) this).aProxySelector8335.select(new URI(new StringBuilder().append(bool_16_ ? "https" : "http").append("://").append(((Class400_Sub1) this).aString5743).toString())));
			list_17_ = (((Class400_Sub1) this).aProxySelector8335.select(new URI(new StringBuilder().append(bool_16_ ? "http" : "https").append("://").append(((Class400_Sub1) this).aString5743).toString())));
		} catch (URISyntaxException urisyntaxexception) {
			return method7171((byte) 34);
		}
		list.addAll(list_17_);
		Object[] objects = list.toArray();
		IOException_Sub1 ioexception_sub1 = null;
		Object[] objects_18_ = objects;
		for (int i = 0; i < objects_18_.length; i++) {
			Object object = objects_18_[i];
			Proxy proxy = (Proxy) object;
			Socket socket;
			try {
				Socket socket_19_ = method13761(proxy, 1145190344);
				if (null == socket_19_)
					continue;
				socket = socket_19_;
			} catch (IOException_Sub1 ioexception_sub1_20_) {
				ioexception_sub1 = ioexception_sub1_20_;
				continue;
			} catch (IOException ioexception) {
				continue;
			}
			return socket;
		}
		if (ioexception_sub1 != null)
			throw ioexception_sub1;
		return method7171((byte) 12);
	}

	Socket method13763(String string, int i, String string_21_) throws IOException {
		Socket socket = new Socket(string, i);
		socket.setSoTimeout(10000);
		OutputStream outputstream = socket.getOutputStream();
		if (null == string_21_)
			outputstream.write(new StringBuilder().append("CONNECT ").append(((Class400_Sub1) this).aString5743).append(":").append(-1139539209 * ((Class400_Sub1) this).anInt5742).append(" HTTP/1.0\n\n").toString().getBytes(Charset.forName("ISO-8859-1")));
		else
			outputstream.write(new StringBuilder().append("CONNECT ").append(((Class400_Sub1) this).aString5743).append(":").append(((Class400_Sub1) this).anInt5742 * -1139539209).append(" HTTP/1.0\n").append(string_21_).append("\n\n").toString().getBytes(Charset.forName("ISO-8859-1")));
		outputstream.flush();
		BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
		String string_22_ = bufferedreader.readLine();
		if (null != string_22_) {
			if (string_22_.startsWith("HTTP/1.0 200") || string_22_.startsWith("HTTP/1.1 200"))
				return socket;
			if (string_22_.startsWith("HTTP/1.0 407") || string_22_.startsWith("HTTP/1.1 407")) {
				int i_23_ = 0;
				String string_24_ = "proxy-authenticate: ";
				for (string_22_ = bufferedreader.readLine(); string_22_ != null && i_23_ < 50; i_23_++) {
					if (string_22_.toLowerCase().startsWith(string_24_)) {
						string_22_ = string_22_.substring(string_24_.length()).trim();
						int i_25_ = string_22_.indexOf(' ');
						if (-1 != i_25_)
							string_22_ = string_22_.substring(0, i_25_);
						throw new IOException_Sub1(string_22_);
					}
					string_22_ = bufferedreader.readLine();
				}
				throw new IOException_Sub1("");
			}
		}
		outputstream.close();
		bufferedreader.close();
		socket.close();
		return null;
	}

	public Socket method7164(int i) throws IOException {
		boolean bool = (Boolean.parseBoolean(System.getProperty("java.net.useSystemProxies")));
		if (!bool)
			System.setProperty("java.net.useSystemProxies", "true");
		boolean bool_26_ = 443 == -1139539209 * ((Class400_Sub1) this).anInt5742;
		List list;
		List list_27_;
		try {
			list = (((Class400_Sub1) this).aProxySelector8335.select(new URI(new StringBuilder().append(bool_26_ ? "https" : "http").append("://").append(((Class400_Sub1) this).aString5743).toString())));
			list_27_ = (((Class400_Sub1) this).aProxySelector8335.select(new URI(new StringBuilder().append(bool_26_ ? "http" : "https").append("://").append(((Class400_Sub1) this).aString5743).toString())));
		} catch (URISyntaxException urisyntaxexception) {
			return method7171((byte) 101);
		}
		list.addAll(list_27_);
		Object[] objects = list.toArray();
		IOException_Sub1 ioexception_sub1 = null;
		Object[] objects_28_ = objects;
		for (int i_29_ = 0; i_29_ < objects_28_.length; i_29_++) {
			Object object = objects_28_[i_29_];
			Proxy proxy = (Proxy) object;
			Socket socket;
			try {
				Socket socket_30_ = method13761(proxy, 1333684880);
				if (null == socket_30_)
					continue;
				socket = socket_30_;
			} catch (IOException_Sub1 ioexception_sub1_31_) {
				ioexception_sub1 = ioexception_sub1_31_;
				continue;
			} catch (IOException ioexception) {
				continue;
			}
			return socket;
		}
		if (ioexception_sub1 != null)
			throw ioexception_sub1;
		return method7171((byte) 23);
	}

	Socket method13764(Proxy proxy) throws IOException {
		if (proxy.type() == Proxy.Type.DIRECT)
			return method7171((byte) 109);
		java.net.SocketAddress socketaddress = proxy.address();
		if (!(socketaddress instanceof InetSocketAddress))
			return null;
		InetSocketAddress inetsocketaddress = (InetSocketAddress) socketaddress;
		if (proxy.type() == Proxy.Type.HTTP) {
			String string = null;
			try {
				Class var_class = (Class.forName("sun.net.www.protocol.http.AuthenticationInfo"));
				Method method = var_class.getDeclaredMethod("getProxyAuth", (new Class[] { java.lang.String.class, Integer.TYPE }));
				method.setAccessible(true);
				Object object = method.invoke(null, (new Object[] { inetsocketaddress.getHostName(), new Integer(inetsocketaddress.getPort()) }));
				if (null != object) {
					Method method_32_ = (var_class.getDeclaredMethod("supportsPreemptiveAuthorization", new Class[0]));
					method_32_.setAccessible(true);
					if (((Boolean) method_32_.invoke(object, new Object[0])).booleanValue()) {
						Method method_33_ = var_class.getDeclaredMethod("getHeaderName", new Class[0]);
						method_33_.setAccessible(true);
						Method method_34_ = (var_class.getDeclaredMethod("getHeaderValue", new Class[] { java.net.URL.class, java.lang.String.class }));
						method_34_.setAccessible(true);
						String string_35_ = ((String) method_33_.invoke(object, new Object[0]));
						String string_36_ = ((String) (method_34_.invoke(object, (new Object[] { new URL(new StringBuilder().append("https://").append(((Class400_Sub1) this).aString5743).append("/").toString()), "https" }))));
						string = new StringBuilder().append(string_35_).append(": ").append(string_36_).toString();
					}
				}
			} catch (Exception exception) {
				/* empty */
			}
			return method13762(inetsocketaddress.getHostName(), inetsocketaddress.getPort(), string, 274760947);
		}
		if (proxy.type() == Proxy.Type.SOCKS) {
			Socket socket = new Socket(proxy);
			socket.connect(new InetSocketAddress((((Class400_Sub1) this).aString5743), (((Class400_Sub1) this).anInt5742) * -1139539209));
			return socket;
		}
		return null;
	}

	Socket method13765(Proxy proxy) throws IOException {
		if (proxy.type() == Proxy.Type.DIRECT)
			return method7171((byte) 119);
		java.net.SocketAddress socketaddress = proxy.address();
		if (!(socketaddress instanceof InetSocketAddress))
			return null;
		InetSocketAddress inetsocketaddress = (InetSocketAddress) socketaddress;
		if (proxy.type() == Proxy.Type.HTTP) {
			String string = null;
			try {
				Class var_class = (Class.forName("sun.net.www.protocol.http.AuthenticationInfo"));
				Method method = var_class.getDeclaredMethod("getProxyAuth", (new Class[] { java.lang.String.class, Integer.TYPE }));
				method.setAccessible(true);
				Object object = method.invoke(null, (new Object[] { inetsocketaddress.getHostName(), new Integer(inetsocketaddress.getPort()) }));
				if (null != object) {
					Method method_37_ = (var_class.getDeclaredMethod("supportsPreemptiveAuthorization", new Class[0]));
					method_37_.setAccessible(true);
					if (((Boolean) method_37_.invoke(object, new Object[0])).booleanValue()) {
						Method method_38_ = var_class.getDeclaredMethod("getHeaderName", new Class[0]);
						method_38_.setAccessible(true);
						Method method_39_ = (var_class.getDeclaredMethod("getHeaderValue", new Class[] { java.net.URL.class, java.lang.String.class }));
						method_39_.setAccessible(true);
						String string_40_ = ((String) method_38_.invoke(object, new Object[0]));
						String string_41_ = ((String) (method_39_.invoke(object, (new Object[] { new URL(new StringBuilder().append("https://").append(((Class400_Sub1) this).aString5743).append("/").toString()), "https" }))));
						string = new StringBuilder().append(string_40_).append(": ").append(string_41_).toString();
					}
				}
			} catch (Exception exception) {
				/* empty */
			}
			return method13762(inetsocketaddress.getHostName(), inetsocketaddress.getPort(), string, -1410293502);
		}
		if (proxy.type() == Proxy.Type.SOCKS) {
			Socket socket = new Socket(proxy);
			socket.connect(new InetSocketAddress((((Class400_Sub1) this).aString5743), (((Class400_Sub1) this).anInt5742) * -1139539209));
			return socket;
		}
		return null;
	}

	public Socket method7167() throws IOException {
		boolean bool = (Boolean.parseBoolean(System.getProperty("java.net.useSystemProxies")));
		if (!bool)
			System.setProperty("java.net.useSystemProxies", "true");
		boolean bool_42_ = 443 == -1139539209 * ((Class400_Sub1) this).anInt5742;
		List list;
		List list_43_;
		try {
			list = (((Class400_Sub1) this).aProxySelector8335.select(new URI(new StringBuilder().append(bool_42_ ? "https" : "http").append("://").append(((Class400_Sub1) this).aString5743).toString())));
			list_43_ = (((Class400_Sub1) this).aProxySelector8335.select(new URI(new StringBuilder().append(bool_42_ ? "http" : "https").append("://").append(((Class400_Sub1) this).aString5743).toString())));
		} catch (URISyntaxException urisyntaxexception) {
			return method7171((byte) 71);
		}
		list.addAll(list_43_);
		Object[] objects = list.toArray();
		IOException_Sub1 ioexception_sub1 = null;
		Object[] objects_44_ = objects;
		for (int i = 0; i < objects_44_.length; i++) {
			Object object = objects_44_[i];
			Proxy proxy = (Proxy) object;
			Socket socket;
			try {
				Socket socket_45_ = method13761(proxy, 1294139543);
				if (null == socket_45_)
					continue;
				socket = socket_45_;
			} catch (IOException_Sub1 ioexception_sub1_46_) {
				ioexception_sub1 = ioexception_sub1_46_;
				continue;
			} catch (IOException ioexception) {
				continue;
			}
			return socket;
		}
		if (ioexception_sub1 != null)
			throw ioexception_sub1;
		return method7171((byte) 70);
	}

	Socket method13766(Proxy proxy) throws IOException {
		if (proxy.type() == Proxy.Type.DIRECT)
			return method7171((byte) 54);
		java.net.SocketAddress socketaddress = proxy.address();
		if (!(socketaddress instanceof InetSocketAddress))
			return null;
		InetSocketAddress inetsocketaddress = (InetSocketAddress) socketaddress;
		if (proxy.type() == Proxy.Type.HTTP) {
			String string = null;
			try {
				Class var_class = (Class.forName("sun.net.www.protocol.http.AuthenticationInfo"));
				Method method = var_class.getDeclaredMethod("getProxyAuth", (new Class[] { java.lang.String.class, Integer.TYPE }));
				method.setAccessible(true);
				Object object = method.invoke(null, (new Object[] { inetsocketaddress.getHostName(), new Integer(inetsocketaddress.getPort()) }));
				if (null != object) {
					Method method_47_ = (var_class.getDeclaredMethod("supportsPreemptiveAuthorization", new Class[0]));
					method_47_.setAccessible(true);
					if (((Boolean) method_47_.invoke(object, new Object[0])).booleanValue()) {
						Method method_48_ = var_class.getDeclaredMethod("getHeaderName", new Class[0]);
						method_48_.setAccessible(true);
						Method method_49_ = (var_class.getDeclaredMethod("getHeaderValue", new Class[] { java.net.URL.class, java.lang.String.class }));
						method_49_.setAccessible(true);
						String string_50_ = ((String) method_48_.invoke(object, new Object[0]));
						String string_51_ = ((String) (method_49_.invoke(object, (new Object[] { new URL(new StringBuilder().append("https://").append(((Class400_Sub1) this).aString5743).append("/").toString()), "https" }))));
						string = new StringBuilder().append(string_50_).append(": ").append(string_51_).toString();
					}
				}
			} catch (Exception exception) {
				/* empty */
			}
			return method13762(inetsocketaddress.getHostName(), inetsocketaddress.getPort(), string, -309934358);
		}
		if (proxy.type() == Proxy.Type.SOCKS) {
			Socket socket = new Socket(proxy);
			socket.connect(new InetSocketAddress((((Class400_Sub1) this).aString5743), (((Class400_Sub1) this).anInt5742) * -1139539209));
			return socket;
		}
		return null;
	}

	Socket method13767(Proxy proxy) throws IOException {
		if (proxy.type() == Proxy.Type.DIRECT)
			return method7171((byte) 47);
		java.net.SocketAddress socketaddress = proxy.address();
		if (!(socketaddress instanceof InetSocketAddress))
			return null;
		InetSocketAddress inetsocketaddress = (InetSocketAddress) socketaddress;
		if (proxy.type() == Proxy.Type.HTTP) {
			String string = null;
			try {
				Class var_class = (Class.forName("sun.net.www.protocol.http.AuthenticationInfo"));
				Method method = var_class.getDeclaredMethod("getProxyAuth", (new Class[] { java.lang.String.class, Integer.TYPE }));
				method.setAccessible(true);
				Object object = method.invoke(null, (new Object[] { inetsocketaddress.getHostName(), new Integer(inetsocketaddress.getPort()) }));
				if (null != object) {
					Method method_52_ = (var_class.getDeclaredMethod("supportsPreemptiveAuthorization", new Class[0]));
					method_52_.setAccessible(true);
					if (((Boolean) method_52_.invoke(object, new Object[0])).booleanValue()) {
						Method method_53_ = var_class.getDeclaredMethod("getHeaderName", new Class[0]);
						method_53_.setAccessible(true);
						Method method_54_ = (var_class.getDeclaredMethod("getHeaderValue", new Class[] { java.net.URL.class, java.lang.String.class }));
						method_54_.setAccessible(true);
						String string_55_ = ((String) method_53_.invoke(object, new Object[0]));
						String string_56_ = ((String) (method_54_.invoke(object, (new Object[] { new URL(new StringBuilder().append("https://").append(((Class400_Sub1) this).aString5743).append("/").toString()), "https" }))));
						string = new StringBuilder().append(string_55_).append(": ").append(string_56_).toString();
					}
				}
			} catch (Exception exception) {
				/* empty */
			}
			return method13762(inetsocketaddress.getHostName(), inetsocketaddress.getPort(), string, 1586985102);
		}
		if (proxy.type() == Proxy.Type.SOCKS) {
			Socket socket = new Socket(proxy);
			socket.connect(new InetSocketAddress((((Class400_Sub1) this).aString5743), (((Class400_Sub1) this).anInt5742) * -1139539209));
			return socket;
		}
		return null;
	}

	Socket method13768(String string, int i, String string_57_) throws IOException {
		Socket socket = new Socket(string, i);
		socket.setSoTimeout(10000);
		OutputStream outputstream = socket.getOutputStream();
		if (null == string_57_)
			outputstream.write(new StringBuilder().append("CONNECT ").append(((Class400_Sub1) this).aString5743).append(":").append(-1139539209 * ((Class400_Sub1) this).anInt5742).append(" HTTP/1.0\n\n").toString().getBytes(Charset.forName("ISO-8859-1")));
		else
			outputstream.write(new StringBuilder().append("CONNECT ").append(((Class400_Sub1) this).aString5743).append(":").append(((Class400_Sub1) this).anInt5742 * -1139539209).append(" HTTP/1.0\n").append(string_57_).append("\n\n").toString().getBytes(Charset.forName("ISO-8859-1")));
		outputstream.flush();
		BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
		String string_58_ = bufferedreader.readLine();
		if (null != string_58_) {
			if (string_58_.startsWith("HTTP/1.0 200") || string_58_.startsWith("HTTP/1.1 200"))
				return socket;
			if (string_58_.startsWith("HTTP/1.0 407") || string_58_.startsWith("HTTP/1.1 407")) {
				int i_59_ = 0;
				String string_60_ = "proxy-authenticate: ";
				for (string_58_ = bufferedreader.readLine(); string_58_ != null && i_59_ < 50; i_59_++) {
					if (string_58_.toLowerCase().startsWith(string_60_)) {
						string_58_ = string_58_.substring(string_60_.length()).trim();
						int i_61_ = string_58_.indexOf(' ');
						if (-1 != i_61_)
							string_58_ = string_58_.substring(0, i_61_);
						throw new IOException_Sub1(string_58_);
					}
					string_58_ = bufferedreader.readLine();
				}
				throw new IOException_Sub1("");
			}
		}
		outputstream.close();
		bufferedreader.close();
		socket.close();
		return null;
	}

	public Socket method7165() throws IOException {
		boolean bool = (Boolean.parseBoolean(System.getProperty("java.net.useSystemProxies")));
		if (!bool)
			System.setProperty("java.net.useSystemProxies", "true");
		boolean bool_62_ = 443 == -1139539209 * ((Class400_Sub1) this).anInt5742;
		List list;
		List list_63_;
		try {
			list = (((Class400_Sub1) this).aProxySelector8335.select(new URI(new StringBuilder().append(bool_62_ ? "https" : "http").append("://").append(((Class400_Sub1) this).aString5743).toString())));
			list_63_ = (((Class400_Sub1) this).aProxySelector8335.select(new URI(new StringBuilder().append(bool_62_ ? "http" : "https").append("://").append(((Class400_Sub1) this).aString5743).toString())));
		} catch (URISyntaxException urisyntaxexception) {
			return method7171((byte) 91);
		}
		list.addAll(list_63_);
		Object[] objects = list.toArray();
		IOException_Sub1 ioexception_sub1 = null;
		Object[] objects_64_ = objects;
		for (int i = 0; i < objects_64_.length; i++) {
			Object object = objects_64_[i];
			Proxy proxy = (Proxy) object;
			Socket socket;
			try {
				Socket socket_65_ = method13761(proxy, 721285773);
				if (null == socket_65_)
					continue;
				socket = socket_65_;
			} catch (IOException_Sub1 ioexception_sub1_66_) {
				ioexception_sub1 = ioexception_sub1_66_;
				continue;
			} catch (IOException ioexception) {
				continue;
			}
			return socket;
		}
		if (ioexception_sub1 != null)
			throw ioexception_sub1;
		return method7171((byte) 107);
	}

	Socket method13769(String string, int i, String string_67_) throws IOException {
		Socket socket = new Socket(string, i);
		socket.setSoTimeout(10000);
		OutputStream outputstream = socket.getOutputStream();
		if (null == string_67_)
			outputstream.write(new StringBuilder().append("CONNECT ").append(((Class400_Sub1) this).aString5743).append(":").append(-1139539209 * ((Class400_Sub1) this).anInt5742).append(" HTTP/1.0\n\n").toString().getBytes(Charset.forName("ISO-8859-1")));
		else
			outputstream.write(new StringBuilder().append("CONNECT ").append(((Class400_Sub1) this).aString5743).append(":").append(((Class400_Sub1) this).anInt5742 * -1139539209).append(" HTTP/1.0\n").append(string_67_).append("\n\n").toString().getBytes(Charset.forName("ISO-8859-1")));
		outputstream.flush();
		BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
		String string_68_ = bufferedreader.readLine();
		if (null != string_68_) {
			if (string_68_.startsWith("HTTP/1.0 200") || string_68_.startsWith("HTTP/1.1 200"))
				return socket;
			if (string_68_.startsWith("HTTP/1.0 407") || string_68_.startsWith("HTTP/1.1 407")) {
				int i_69_ = 0;
				String string_70_ = "proxy-authenticate: ";
				for (string_68_ = bufferedreader.readLine(); string_68_ != null && i_69_ < 50; i_69_++) {
					if (string_68_.toLowerCase().startsWith(string_70_)) {
						string_68_ = string_68_.substring(string_70_.length()).trim();
						int i_71_ = string_68_.indexOf(' ');
						if (-1 != i_71_)
							string_68_ = string_68_.substring(0, i_71_);
						throw new IOException_Sub1(string_68_);
					}
					string_68_ = bufferedreader.readLine();
				}
				throw new IOException_Sub1("");
			}
		}
		outputstream.close();
		bufferedreader.close();
		socket.close();
		return null;
	}

	static void method13770(Class587_Sub30 class587_sub30, byte i) {
		Class9.aClass72_Sub1_53 = new Class72_Sub1(client.aClass22_8268);
		Class9.aClass72_Sub1_53.method1692(Class63.aClass63_1000, (byte) 11);
		try {
			Class360_Sub1 class360_sub1 = ((Class360_Sub1) Class9.aClass72_Sub1_53.method1637(Class77.aClass77_1128, false, (byte) 16));
			Class432_Sub2 class432_sub2 = ((Class432_Sub2) Class9.aClass72_Sub1_53.method1636(Class82.aClass82_1147, false, (byte) 66));
			class360_sub1.method16339(class587_sub30, (byte) 10);
			class432_sub2.method13805(new Class262(0.0F, 0.0F, 0.0F), (short) 16699);
			Class9.aClass72_Sub1_53.method1646(Class277.method5434(99999.0F, 99999.0F, 99999.0F), 1981871575);
			Class9.aClass72_Sub1_53.method1701(Class277.method5434(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY), -720092315);
			Class9.aClass72_Sub1_53.method1709(Class277.method5434(99999.0F, 99999.0F, 99999.0F), (byte) 53);
			Class9.aClass72_Sub1_53.method1642(Class277.method5434(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY), -227094801);
		} catch (Exception_Sub4 exception_sub4) {
			/* empty */
		}
		Class9.anInt54 = Class275.aClass569_4206.method12334(1876660245) * -823747349;
		Class293.anInt4299 = Class275.aClass569_4206.method12321(-1534094942) * 719331;
		Class9.aBool55 = true;
	}

	static Class587_Sub34_Sub9 method13771(Class279 class279, int i, int i_72_, byte i_73_) {
		Class587_Sub4 class587_sub4 = new Class587_Sub4(class279.method5578(i, i_72_, 2131931519));
		Class587_Sub34_Sub9 class587_sub34_sub9 = new Class587_Sub34_Sub9(i_72_, class587_sub4.method14209(-832273022), class587_sub4.method14209(675654805), class587_sub4.method14408(1097722201), class587_sub4.method14408(1097722201), (class587_sub4.method14349(-1130636365) == 1), class587_sub4.method14349(-1130636365), class587_sub4.method14349(-1130636365));
		int i_74_ = class587_sub4.method14349(-1130636365);
		for (int i_75_ = 0; i_75_ < i_74_; i_75_++)
			((Class587_Sub34_Sub9) class587_sub34_sub9).aClass413_10722.method7337(new Class587_Sub28(class587_sub4.method14349(-1130636365), class587_sub4.method14191((byte) -107), class587_sub4.method14191((byte) -45), class587_sub4.method14191((byte) -11), class587_sub4.method14191((byte) -19), class587_sub4.method14191((byte) -57), class587_sub4.method14191((byte) -42), class587_sub4.method14191((byte) -43), class587_sub4.method14191((byte) -66)), -111691200);
		class587_sub34_sub9.method17038(2006605250);
		return class587_sub34_sub9;
	}

	static void method13772(int i, int i_76_, byte i_77_) {
		if (Class119.aClass511_1651.aBool6814 || (Class16.anInt155 * -938768445 != 1 && (!Class92.aBool1334 || 2 != -938768445 * Class16.anInt155 || !(((Class587_Sub34_Sub8) Class16.aClass587_Sub34_Sub8_183).aString10703.equals(Class404.aClass404_5806.method7191(Class316.aClass469_4747, -1065556453)))))) {
			Class611 class611 = Class54.method1294(-222346938);
			int i_78_ = (class611.method13004(Class404.aClass404_5852.method7191(Class316.aClass469_4747, -1675990554), (byte) -1));
			int i_79_;
			if (!Class16.aBool157) {
				for (Class587_Sub34_Sub8 class587_sub34_sub8 = ((Class587_Sub34_Sub8) Class16.aClass413_166.method7361(1548080039)); null != class587_sub34_sub8; class587_sub34_sub8 = ((Class587_Sub34_Sub8) Class16.aClass413_166.method7344(-1168864086))) {
					int i_80_ = Class284.method5704(class587_sub34_sub8, class611, -1140365234);
					if (i_80_ > i_78_)
						i_78_ = i_80_;
				}
				i_78_ += 8;
				i_79_ = 21 + 1071275241 * Class16.anInt164 * (Class16.anInt155 * -938768445);
				Class587_Sub40.anInt9800 = (((Class16.aBool171 ? 26 : 22) + Class16.anInt164 * 1071275241 * (-938768445 * Class16.anInt155)) * 1063134831);
			} else {
				for (Class587_Sub34_Sub4 class587_sub34_sub4 = ((Class587_Sub34_Sub4) Class16.aClass421_174.method7637((byte) 34)); class587_sub34_sub4 != null; class587_sub34_sub4 = ((Class587_Sub34_Sub4) Class16.aClass421_174.method7642(1832544305))) {
					int i_81_;
					if (-2031689577 * ((Class587_Sub34_Sub4) class587_sub34_sub4).anInt10682 == 1)
						i_81_ = Class284.method5704(((Class587_Sub34_Sub8) (((Class587_Sub34_Sub4) class587_sub34_sub4).aClass421_10680.aClass587_Sub34_6162.aClass587_Sub34_9746)), class611, -1140365234);
					else
						i_81_ = Class587_Sub46.method16126(class587_sub34_sub4, class611, (byte) -64);
					if (i_81_ > i_78_)
						i_78_ = i_81_;
				}
				i_78_ += 8;
				i_79_ = 21 + Class16.anInt179 * -728725915 * (Class16.anInt164 * 1071275241);
				Class587_Sub40.anInt9800 = 1063134831 * ((1071275241 * Class16.anInt164 * (-728725915 * Class16.anInt179)) + (Class16.aBool171 ? 26 : 22));
			}
			i_78_ += 10;
			int i_82_ = i - i_78_ / 2;
			if (i_78_ + i_82_ > -334452787 * Class117.anInt1641)
				i_82_ = -334452787 * Class117.anInt1641 - i_78_;
			if (i_82_ < 0)
				i_82_ = 0;
			int i_83_ = i_76_;
			if (i_83_ + i_79_ > Class39.anInt722 * -322515687)
				i_83_ = -322515687 * Class39.anInt722 - i_79_;
			if (i_83_ < 0)
				i_83_ = 0;
			Class78.anInt1134 = i_82_ * -76296257;
			Class520.anInt6954 = 292420083 * i_83_;
			Class592.anInt7704 = -1217889519 * i_78_;
			Class16.anInt165 = (int) (Math.random() * 24.0) * 289320895;
			Class16.aBool153 = true;
		}
	}
}
