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

public class Class23
{
    static final int anInt246 = 4;
    static final String aString247 = "services";
    static final String aString248 = "passwordchoice.ws";
    static final int anInt249 = 1000;
    static BigInteger aBigInteger250
	= (new BigInteger
	   ("80782894952180643741752986186714059433953886149239752893425047584684715842049"));
    static BigInteger aBigInteger251
	= (new BigInteger
	   ("7237300117305667488707183861728052766358166655052137727439795191253340127955075499635575104901523446809299097934591732635674173519120047404024393881551683"));
    static final int anInt252 = 2;
    static final int anInt253 = 3;
    static final int anInt254 = 6;
    public static final int anInt255 = 5;
    static final int anInt256 = 7;
    static final String aString257 = "m=accountappeal/login.ws";
    static final int anInt258 = 2;
    public static Class99 aClass99_259;
    static int anInt260;
    
    static boolean method912(String string) {
	if (null == string)
	    return false;
	try {
	    new URL(string);
	} catch (MalformedURLException malformedurlexception) {
	    return false;
	}
	return true;
    }
    
    Class23() throws Throwable {
	throw new Error();
    }
    
    public static final int method913(long l, String string) {
	Random random = new Random();
	Class243_Sub10 class243_sub10 = new Class243_Sub10(128);
	Class243_Sub10 class243_sub10_0_ = new Class243_Sub10(128);
	int[] is = new int[4];
	is[0] = random.nextInt();
	is[1] = random.nextInt();
	is[2] = (int) (l >> 32);
	is[3] = (int) l;
	class243_sub10.method14800(10, -848576124);
	for (int i = 0; i < 4; i++)
	    class243_sub10.method14841(random.nextInt(), 735483131);
	class243_sub10.method14841(is[0], 735483131);
	class243_sub10.method14841(is[1], 735483131);
	class243_sub10.method14650(l);
	class243_sub10.method14650(0L);
	for (int i = 0; i < 4; i++)
	    class243_sub10.method14841(random.nextInt(), 735483131);
	class243_sub10.method14690(aBigInteger250, aBigInteger251, 1732884035);
	class243_sub10_0_.method14800(10, 1397726985);
	for (int i = 0; i < 3; i++)
	    class243_sub10_0_.method14841(random.nextInt(), 735483131);
	class243_sub10_0_.method14650(random.nextLong());
	class243_sub10_0_.method14838(random.nextLong());
	Class25.method977(class243_sub10_0_, -1947592027);
	class243_sub10_0_.method14650(random.nextLong());
	class243_sub10_0_.method14690(aBigInteger250, aBigInteger251,
				      1811013316);
	int i = Class601.method13120(string, 1916269746);
	if (0 != i % 8)
	    i += 8 - i % 8;
	Class243_Sub10 class243_sub10_1_ = new Class243_Sub10(i);
	class243_sub10_1_.method14652(string, (byte) -111);
	class243_sub10_1_.anInt8688 = i * -2044845443;
	class243_sub10_1_.method14869(is, -225243114);
	Class243_Sub10 class243_sub10_2_
	    = new Class243_Sub10(class243_sub10.anInt8688 * 126215893 + 5
				 + 126215893 * class243_sub10_0_.anInt8688
				 + 126215893 * class243_sub10_1_.anInt8688);
	class243_sub10_2_.method14800(2, -1018498710);
	class243_sub10_2_.method14800(126215893 * class243_sub10.anInt8688,
				      227305018);
	class243_sub10_2_.method14655(class243_sub10.aByteArray8691, 0,
				      class243_sub10.anInt8688 * 126215893,
				      1923867121);
	class243_sub10_2_.method14800(126215893 * class243_sub10_0_.anInt8688,
				      806299507);
	class243_sub10_2_.method14655(class243_sub10_0_.aByteArray8691, 0,
				      class243_sub10_0_.anInt8688 * 126215893,
				      1923867121);
	class243_sub10_2_.method14643(class243_sub10_1_.anInt8688 * 126215893,
				      (short) 8337);
	class243_sub10_2_.method14655(class243_sub10_1_.aByteArray8691, 0,
				      126215893 * class243_sub10_1_.anInt8688,
				      1923867121);
	String string_3_
	    = Class2.method469(class243_sub10_2_.aByteArray8691, 178069191);
	int i_4_;
	try {
	    URL url = new URL(new StringBuilder().append
				  (Class109.method2822("services", false,
						       252302501))
				  .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
		     (Class130.method3272(string_3_, 1801426685)).append
		     ("&dest=").append
		     (Class130.method3272("passwordchoice.ws", 492830946))
		     .toString());
	    outputstreamwriter.flush();
	    InputStream inputstream = urlconnection.getInputStream();
	    class243_sub10_2_ = new Class243_Sub10(new byte[1000]);
	    for (;;) {
		int i_5_
		    = inputstream.read(class243_sub10_2_.aByteArray8691,
				       class243_sub10_2_.anInt8688 * 126215893,
				       1000 - (126215893
					       * class243_sub10_2_.anInt8688));
		if (-1 == i_5_)
		    break;
		class243_sub10_2_.anInt8688 += -2044845443 * i_5_;
		if (126215893 * class243_sub10_2_.anInt8688 >= 1000)
		    return 5;
	    }
	    outputstreamwriter.close();
	    inputstream.close();
	    String string_6_ = new String(class243_sub10_2_.aByteArray8691);
	    if (string_6_.startsWith("OFFLINE"))
		return 4;
	    if (string_6_.startsWith("WRONG"))
		return 7;
	    if (string_6_.startsWith("RELOAD"))
		return 3;
	    if (string_6_
		    .startsWith("Not permitted for social network accounts."))
		return 6;
	    class243_sub10_2_.method14687(is, -1818262283);
	    for (/**/;
		 (class243_sub10_2_.anInt8688 * 126215893 > 0
		  && (class243_sub10_2_.aByteArray8691
		      [class243_sub10_2_.anInt8688 * 126215893 - 1]) == 0);
		 class243_sub10_2_.anInt8688 -= -2044845443) {
		/* empty */
	    }
	    string_6_ = new String(class243_sub10_2_.aByteArray8691, 0,
				   126215893 * class243_sub10_2_.anInt8688);
	    if (Class71.method1761(string_6_, (byte) 0)) {
		Class421_Sub11.method14139(string_6_, true, client.aBool8139,
					   (byte) 58);
		return 2;
	    }
	    i_4_ = 5;
	} catch (Throwable throwable) {
	    throwable.printStackTrace();
	    return 5;
	}
	return i_4_;
    }
    
    static boolean method914(String string) {
	if (null == string)
	    return false;
	try {
	    new URL(string);
	} catch (MalformedURLException malformedurlexception) {
	    return false;
	}
	return true;
    }
    
    static boolean method915(String string) {
	if (null == string)
	    return false;
	try {
	    new URL(string);
	} catch (MalformedURLException malformedurlexception) {
	    return false;
	}
	return true;
    }
    
    static boolean method916(String string) {
	if (null == string)
	    return false;
	try {
	    new URL(string);
	} catch (MalformedURLException malformedurlexception) {
	    return false;
	}
	return true;
    }
    
    static void method917(String[] strings, int i) {
	if (strings.length > 1) {
	    for (int i_7_ = 0; i_7_ < strings.length; i_7_++) {
		if (strings[i_7_].startsWith("pause")) {
		    int i_8_ = 5;
		    try {
			i_8_ = Integer.parseInt(strings[i_7_].substring(6));
		    } catch (Exception exception) {
			/* empty */
		    }
		    Class2.method466(new StringBuilder().append
					 ("Pausing for ").append
					 (i_8_).append
					 (" seconds...").toString(),
				     1799455989);
		    Class188.aStringArray2234 = strings;
		    Class188.anInt2232 = (i_7_ + 1) * -1985752965;
		    Class188.aLong2233
			= (Class46.method1238(-1362743832)
			   + (long) (1000 * i_8_)) * -7603506170255382873L;
		    break;
		}
		Class188.aString2231 = strings[i_7_];
		Class365.method6943(false, -1118574803);
	    }
	} else {
	    Class188.aString2231
		= new StringBuilder().append(Class188.aString2231).append
		      (strings[0]).toString();
	    Class188.anInt2226 += strings[0].length() * 977380199;
	}
    }
    
    static final void method918(Class479 class479, int i) {
	Class465 class465 = (((Class479) class479).aBool6460
			     ? ((Class479) class479).aClass465_6445
			     : ((Class479) class479).aClass465_6443);
	Class117 class117 = ((Class465) class465).aClass117_6364;
	Class116 class116 = ((Class465) class465).aClass116_6363;
	Class120_Sub7_Sub2.method16870(class117, class116, class479,
				       1493990315);
    }
    
    static final void method919(Class479 class479, byte i) {
	Class612.aClass243_Sub7_7837.method14604((Class612.aClass243_Sub7_7837
						  .aClass421_Sub5_8656),
						 0, 126215893);
	Class272.method5338(156108876);
	client.aBool8140 = false;
    }
    
    public static void method920
	(Class621 class621, int i, int i_9_,
	 Class478_Sub1_Sub1_Sub5 class478_sub1_sub1_sub5, int i_10_,
	 byte i_11_) {
	Class479 class479 = Class389.method7157(1553613825);
	((Class479) class479).aClass478_Sub1_Sub1_Sub5_6448
	    = class478_sub1_sub1_sub5;
	((Class479) class479).anInt6454 = 964874769 * i_10_;
	Class7.method515(class621, i, i_9_, class479, (byte) 31);
	((Class479) class479).aClass478_Sub1_Sub1_Sub5_6448 = null;
	((Class479) class479).anInt6454 = -964874769;
    }
    
    public static Class316 method921(int i, short i_12_) {
	Class316 class316
	    = (Class316) Class316.aClass132_4626.method3282((long) i);
	if (class316 != null)
	    return class316;
	byte[] is = Class308.aClass272_4576.method5250(1, i, -617302218);
	class316 = new Class316();
	class316.anInt4621 = 1463639301 * i;
	if (is != null)
	    class316.method6183(new Class243_Sub10(is), 1269343737);
	class316.method6182((byte) 0);
	if (2 == -1625723499 * class316.anInt4623
	    && Class316.aClass431_4629.method7744((long) i) == null) {
	    Class316.aClass431_4629.method7748(new Class243_Sub9((Class316
								  .anInt4624)
								 * 995366865),
					       (long) i);
	    Class316.aClass316Array4630
		[(Class316.anInt4624 += 727556401) * 995366865 - 1]
		= class316;
	}
	Class316.aClass132_4626.method3293(class316, (long) i);
	return class316;
    }
}
