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

public class Class359 implements Interface69
{
    static Class359 aClass359_3812;
    public boolean aBool3813;
    static Class359 aClass359_3814;
    static Class359 aClass359_3815;
    static Class359 aClass359_3816 = new Class359(0, -1, true, false, true);
    static Class359 aClass359_3817 = new Class359(1, 0, true, true, true);
    static Class359 aClass359_3818;
    static Class359 aClass359_3819;
    static Class359 aClass359_3820;
    int anInt3821;
    static Class359 aClass359_3822;
    public int anInt3823;
    public boolean aBool3824;
    
    Class359(int i, int i_0_, boolean bool, boolean bool_1_, boolean bool_2_) {
	((Class359) this).anInt3821 = i * -1216733349;
	anInt3823 = -1172573647 * i_0_;
	aBool3824 = bool_1_;
	aBool3813 = bool_2_;
    }
    
    public int method38() {
	return ((Class359) this).anInt3821 * 560527571;
    }
    
    static {
	aClass359_3814 = new Class359(2, 1, true, true, false);
	aClass359_3815 = new Class359(3, 8, false, true, true);
	aClass359_3812 = new Class359(4, 9, false, false, true);
	aClass359_3822 = new Class359(5, 10, false, true, true);
	aClass359_3818 = new Class359(6, 11, false, false, true);
	aClass359_3819 = new Class359(7, 12, false, false, true);
	aClass359_3820 = new Class359(8, 13, false, false, true);
    }
    
    public static Class359[] method4460(int i) {
	return (new Class359[]
		{ aClass359_3818, aClass359_3817, aClass359_3820,
		  aClass359_3816, aClass359_3815, aClass359_3812,
		  aClass359_3819, aClass359_3814, aClass359_3822 });
    }
    
    public int method24() {
	return ((Class359) this).anInt3821 * 560527571;
    }
    
    public static final int method4461(long l, String string, int i) {
	Random random = new Random();
	Class487_Sub17 class487_sub17 = new Class487_Sub17(128);
	Class487_Sub17 class487_sub17_3_ = new Class487_Sub17(128);
	int[] is = new int[4];
	is[0] = random.nextInt();
	is[1] = random.nextInt();
	is[2] = (int) (l >> 32);
	is[3] = (int) l;
	class487_sub17.method9201(10, (byte) 28);
	for (int i_4_ = 0; i_4_ < 4; i_4_++)
	    class487_sub17.method9286(random.nextInt(), (byte) -83);
	class487_sub17.method9286(is[0], (byte) -49);
	class487_sub17.method9286(is[1], (byte) -90);
	class487_sub17.method9257(l);
	class487_sub17.method9257(0L);
	for (int i_5_ = 0; i_5_ < 4; i_5_++)
	    class487_sub17.method9286(random.nextInt(), (byte) -96);
	class487_sub17.method9244(Class40.aBigInteger470,
				  Class40.aBigInteger466, (short) 5123);
	class487_sub17_3_.method9201(10, (byte) 22);
	for (int i_6_ = 0; i_6_ < 3; i_6_++)
	    class487_sub17_3_.method9286(random.nextInt(), (byte) -53);
	class487_sub17_3_.method9257(random.nextLong());
	class487_sub17_3_.method9207(random.nextLong());
	Class384.method4639(class487_sub17_3_, -1159231095);
	class487_sub17_3_.method9257(random.nextLong());
	class487_sub17_3_.method9244(Class40.aBigInteger470,
				     Class40.aBigInteger466, (short) 5123);
	int i_7_ = Class351.method4434(string, (byte) -115);
	if (i_7_ % 8 != 0)
	    i_7_ += 8 - i_7_ % 8;
	Class487_Sub17 class487_sub17_8_ = new Class487_Sub17(i_7_);
	class487_sub17_8_.method9210(string, -1054474757);
	class487_sub17_8_.anInt10192 = i_7_ * 850991277;
	class487_sub17_8_.method9262(is, (short) 20022);
	Class487_Sub17 class487_sub17_9_
	    = new Class487_Sub17(class487_sub17_3_.anInt10192 * -1980757211
				 + (class487_sub17.anInt10192 * -1980757211
				    + 5)
				 + -1980757211 * class487_sub17_8_.anInt10192);
	class487_sub17_9_.method9201(2, (byte) 108);
	class487_sub17_9_.method9201(-1980757211 * class487_sub17.anInt10192,
				     (byte) 40);
	class487_sub17_9_.method9213(class487_sub17.aByteArray10193, 0,
				     -1980757211 * class487_sub17.anInt10192,
				     (byte) 0);
	class487_sub17_9_.method9201((-1980757211
				      * class487_sub17_3_.anInt10192),
				     (byte) 121);
	class487_sub17_9_.method9213(class487_sub17_3_.aByteArray10193, 0,
				     (-1980757211
				      * class487_sub17_3_.anInt10192),
				     (byte) 0);
	class487_sub17_9_.method9202((class487_sub17_8_.anInt10192
				      * -1980757211),
				     -335720668);
	class487_sub17_9_.method9213(class487_sub17_8_.aByteArray10193, 0,
				     (class487_sub17_8_.anInt10192
				      * -1980757211),
				     (byte) 0);
	String string_10_
	    = Class552.method6731(class487_sub17_9_.aByteArray10193,
				  (short) -13796);
	int i_11_;
	try {
	    URL url = new URL(new StringBuilder().append
				  (Class156.method2512("services", false,
						       -2145870216))
				  .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
		     (Class662_Sub17.method9997(string_10_, (byte) -46)).append
		     ("&dest=").append
		     (Class662_Sub17.method9997("passwordchoice.ws",
						(byte) -64))
		     .toString());
	    outputstreamwriter.flush();
	    InputStream inputstream = urlconnection.getInputStream();
	    class487_sub17_9_ = new Class487_Sub17(new byte[1000]);
	    for (;;) {
		int i_12_
		    = inputstream.read(class487_sub17_9_.aByteArray10193,
				       (-1980757211
					* class487_sub17_9_.anInt10192),
				       1000 - (class487_sub17_9_.anInt10192
					       * -1980757211));
		if (i_12_ == -1)
		    break;
		class487_sub17_9_.anInt10192 += 850991277 * i_12_;
		if (-1980757211 * class487_sub17_9_.anInt10192 >= 1000)
		    return 5;
	    }
	    outputstreamwriter.close();
	    inputstream.close();
	    String string_13_ = new String(class487_sub17_9_.aByteArray10193);
	    if (string_13_.startsWith("OFFLINE"))
		return 4;
	    if (string_13_.startsWith("WRONG"))
		return 7;
	    if (string_13_.startsWith("RELOAD"))
		return 3;
	    if (string_13_
		    .startsWith("Not permitted for social network accounts."))
		return 6;
	    class487_sub17_9_.method9241(is, (byte) -92);
	    for (/**/;
		 (class487_sub17_9_.anInt10192 * -1980757211 > 0
		  && (class487_sub17_9_.aByteArray10193
		      [class487_sub17_9_.anInt10192 * -1980757211 - 1]) == 0);
		 class487_sub17_9_.anInt10192 -= 850991277) {
		/* empty */
	    }
	    string_13_
		= new String(class487_sub17_9_.aByteArray10193, 0,
			     class487_sub17_9_.anInt10192 * -1980757211);
	    if (Class280.method3826(string_13_, (byte) 39)) {
		Class427.method5222(string_13_, true, client.aBool10948,
				    (byte) -1);
		return 2;
	    }
	    i_11_ = 5;
	} catch (Throwable throwable) {
	    throwable.printStackTrace();
	    return 5;
	}
	return i_11_;
    }
    
    static final void method4462(Class612 class612, int i) {
	String string = (String) (((Class612) class612).anObjectArray8034
				  [(((Class612) class612).anInt8017
				    -= 1516150619) * -1930397485]);
	if (string != null)
	    ((Class612) class612).anIntArray8021
		[((((Class612) class612).anInt8022 += 201091009) * -40654783
		  - 1)]
		= string.length();
	else
	    ((Class612) class612).anIntArray8021
		[((((Class612) class612).anInt8022 += 201091009) * -40654783
		  - 1)]
		= 0;
    }
    
    static final void method4463(Class612 class612, int i) {
	if (Class632.aBool8130 && Class473.aFrame5395 != null)
	    Class228.method3267(Class447.aClass487_Sub42_5156
				    .aClass637_Sub20_10523
				    .method9776((byte) 0),
				-1, -1, false, -1595637406);
	if (Class18.method620((byte) 17) == Class474.aClass474_5423) {
	    Class628.method7549(433956405);
	    System.exit(0);
	} else
	    Exception_Sub2.method10132(-2060024164);
    }
    
    static final void method4464(Class211[] class211s, int i, int i_14_) {
	for (int i_15_ = 0; i_15_ < class211s.length; i_15_++) {
	    Class211 class211 = class211s[i_15_];
	    if (class211 != null && 1663661803 * class211.anInt2262 == i
		&& !client.method10024(class211)) {
		if (class211.anInt2246 * -130185867 == 0) {
		    method4464(class211s, -612115075 * class211.anInt2393,
			       -1301547990);
		    if (class211.aClass211Array2411 != null)
			method4464(class211.aClass211Array2411,
				   -612115075 * class211.anInt2393,
				   -493332200);
		    Class487_Sub40 class487_sub40
			= ((Class487_Sub40)
			   (client.aClass666_10871.method7918
			    ((long) (-612115075 * class211.anInt2393))));
		    if (null != class487_sub40)
			Class298_Sub1.method8818((1960427217
						  * class487_sub40.anInt10420),
						 (byte) -115);
		}
		if (class211.anInt2246 * -130185867 == 6
		    && 1927623257 * class211.anInt2304 != -1) {
		    if (class211.aClass652_2409 == null) {
			class211.aClass652_2409 = new Class652_Sub2();
			class211.aClass652_2409.method7726((1927623257
							    * (class211
							       .anInt2304)),
							   (byte) -22);
		    }
		    if (class211.aClass652_2409.method7740((-53547465
							    * (client
							       .anInt10785)),
							   -1491522980)
			&& class211.aClass652_2409.method7756(1232892571))
			class211.aClass652_2409.method7727(1312587240);
		}
	    }
	}
    }
    
    static final void method4465(Class612 class612, int i) {
	String string = (String) (((Class612) class612).anObjectArray8034
				  [(((Class612) class612).anInt8017
				    -= 1516150619) * -1930397485]);
	int i_16_
	    = (((Class612) class612).anIntArray8021
	       [(((Class612) class612).anInt8022 -= 201091009) * -40654783]);
	Class21.method635(string, 1 == i_16_, (byte) -122);
	((Class612) class612).anIntArray8021
	    [(((Class612) class612).anInt8022 += 201091009) * -40654783 - 1]
	    = -1242794361 * Class163_Sub5.anInt9594;
    }
}
