/* Class248 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.awt.Canvas;
import java.awt.Dimension;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.util.Random;

public class Class248 {
	public static final int anInt3970 = 2;
	public static final int anInt3971 = -3;
	public static final int anInt3972 = -4;
	public static final int anInt3973 = -5;
	public static final int anInt3974 = 1;
	public static final int anInt3975 = 53;
	public static final int anInt3976 = 21;
	public static final int anInt3977 = 45;
	public static final int anInt3978 = 7;
	public static final int anInt3979 = 9;
	public static final int anInt3980 = 15;
	public static final int anInt3981 = 6;
	public static final int anInt3982 = 23;
	public static final int anInt3983 = 29;
	public static final int anInt3984 = 48;
	public static final int anInt3985 = 42;
	public static final int anInt3986 = 35;
	public static final int anInt3987 = 3;
	public static final int anInt3988 = 49;
	public static final int anInt3989 = 52;
	public static final int anInt3990 = -2;

	Class248() throws Throwable {
		throw new Error();
	}

	public static Class84 method5029(int i, Canvas canvas, Class101 class101, Interface5 interface5, Class279 class279, int i_0_, int i_1_) {
		int i_2_ = 0;
		int i_3_ = 0;
		if (null != canvas) {
			Dimension dimension = canvas.getSize();
			i_2_ = dimension.width;
			i_3_ = dimension.height;
		}
		return Class84.method2089(i, canvas, class101, interface5, class279, i_0_, i_2_, i_3_, (byte) -83);
	}

	public static final int method5030(long l, String string, int i) {
		Random random = new Random();
		Class587_Sub4 class587_sub4 = new Class587_Sub4(128);
		Class587_Sub4 class587_sub4_4_ = new Class587_Sub4(128);
		int[] is = new int[4];
		is[0] = random.nextInt();
		is[1] = random.nextInt();
		is[2] = (int) (l >> 32);
		is[3] = (int) l;
		class587_sub4.method14416(10, 1302373931);
		for (int i_5_ = 0; i_5_ < 4; i_5_++)
			class587_sub4.method14181(random.nextInt(), (byte) 50);
		class587_sub4.method14181(is[0], (byte) 35);
		class587_sub4.method14181(is[1], (byte) 13);
		class587_sub4.method14185(l);
		class587_sub4.method14185(0L);
		for (int i_6_ = 0; i_6_ < 4; i_6_++)
			class587_sub4.method14181(random.nextInt(), (byte) 33);
		class587_sub4.method14224(Class8.aBigInteger43, Class8.aBigInteger44, (short) 20940);
		class587_sub4_4_.method14416(10, 1302373931);
		for (int i_7_ = 0; i_7_ < 3; i_7_++)
			class587_sub4_4_.method14181(random.nextInt(), (byte) 103);
		class587_sub4_4_.method14185(random.nextLong());
		class587_sub4_4_.method14236(random.nextLong());
		Class103.method2514(class587_sub4_4_, -947414581);
		class587_sub4_4_.method14185(random.nextLong());
		class587_sub4_4_.method14224(Class8.aBigInteger43, Class8.aBigInteger44, (short) 10039);
		int i_8_ = Class580.method12558(string, (byte) -74);
		if (i_8_ % 8 != 0)
			i_8_ += 8 - i_8_ % 8;
		Class587_Sub4 class587_sub4_9_ = new Class587_Sub4(i_8_);
		class587_sub4_9_.method14382(string, 1315097138);
		class587_sub4_9_.anInt8458 = i_8_ * -384389743;
		class587_sub4_9_.method14334(is, -618098541);
		Class587_Sub4 class587_sub4_10_ = new Class587_Sub4(-1961774223 * class587_sub4_9_.anInt8458 + (class587_sub4.anInt8458 * -1961774223 + 5 + (class587_sub4_4_.anInt8458 * -1961774223)));
		class587_sub4_10_.method14416(2, 1302373931);
		class587_sub4_10_.method14416(class587_sub4.anInt8458 * -1961774223, 1302373931);
		class587_sub4_10_.method14189(class587_sub4.aByteArray8460, 0, -1961774223 * class587_sub4.anInt8458, 1109480169);
		class587_sub4_10_.method14416(-1961774223 * class587_sub4_4_.anInt8458, 1302373931);
		class587_sub4_10_.method14189(class587_sub4_4_.aByteArray8460, 0, class587_sub4_4_.anInt8458 * -1961774223, 1327125621);
		class587_sub4_10_.method14178(class587_sub4_9_.anInt8458 * -1961774223, 1950611086);
		class587_sub4_10_.method14189(class587_sub4_9_.aByteArray8460, 0, -1961774223 * class587_sub4_9_.anInt8458, 668364446);
		String string_11_ = Class563.method12214(class587_sub4_10_.aByteArray8460, -1640531527);
		int i_12_;
		try {
			URL url = new URL(new StringBuilder().append(Class358.method6856("services", false, (byte) 94)).append("m=accountappeal/login.ws").toString());
			URLConnection urlconnection = url.openConnection();
			urlconnection.setDoInput(true);
			urlconnection.setDoOutput(true);
			urlconnection.setConnectTimeout(5000);
			OutputStreamWriter outputstreamwriter = new OutputStreamWriter(urlconnection.getOutputStream());
			outputstreamwriter.write(new StringBuilder().append("data2=").append(Class506.method11465(string_11_, 632627067)).append("&dest=").append(Class506.method11465("passwordchoice.ws", 632627067)).toString());
			outputstreamwriter.flush();
			InputStream inputstream = urlconnection.getInputStream();
			class587_sub4_10_ = new Class587_Sub4(new byte[1000]);
			for (;;) {
				int i_13_ = inputstream.read(class587_sub4_10_.aByteArray8460, (class587_sub4_10_.anInt8458 * -1961774223), 1000 - (class587_sub4_10_.anInt8458 * -1961774223));
				if (-1 == i_13_)
					break;
				class587_sub4_10_.anInt8458 += -384389743 * i_13_;
				if (-1961774223 * class587_sub4_10_.anInt8458 >= 1000)
					return 5;
			}
			outputstreamwriter.close();
			inputstream.close();
			String string_14_ = new String(class587_sub4_10_.aByteArray8460);
			if (string_14_.startsWith("OFFLINE"))
				return 4;
			if (string_14_.startsWith("WRONG"))
				return 7;
			if (string_14_.startsWith("RELOAD"))
				return 3;
			if (string_14_.startsWith("Not permitted for social network accounts."))
				return 6;
			class587_sub4_10_.method14310(is, -314012522);
			for (/**/; (-1961774223 * class587_sub4_10_.anInt8458 > 0 && 0 == (class587_sub4_10_.aByteArray8460[-1961774223 * class587_sub4_10_.anInt8458 - 1])); class587_sub4_10_.anInt8458 -= -384389743) {
				/* empty */
			}
			string_14_ = new String(class587_sub4_10_.aByteArray8460, 0, class587_sub4_10_.anInt8458 * -1961774223);
			if (Class34.method1005(string_14_, 958094341)) {
				Class234.method4657(string_14_, true, client.aBool8006, (byte) -60);
				return 2;
			}
			i_12_ = 5;
		} catch (Throwable throwable) {
			throwable.printStackTrace();
			return 5;
		}
		return i_12_;
	}
}
