/* Class94 - 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.Iterator;
import java.util.Random;

class Class94 implements Interface8
{
    Class130 this$0;
    static int anInt1066;
    
    void method2526(Interface55 interface55) {
	Iterator iterator
	    = ((Class94) this).this$0.method3227(1616603621).iterator();
	while (iterator.hasNext()) {
	    Class301 class301 = (Class301) iterator.next();
	    if (class301.method6029(-1715796317) == interface55) {
		class301.method5976(-459944198);
		iterator.remove();
	    }
	}
    }
    
    void method2527(Interface55 interface55, int i) {
	Iterator iterator
	    = ((Class94) this).this$0.method3227(362417573).iterator();
	while (iterator.hasNext()) {
	    Class301 class301 = (Class301) iterator.next();
	    if (class301.method6029(-1425598209) == interface55) {
		class301.method5976(610047372);
		iterator.remove();
	    }
	}
    }
    
    public void method47(Object object, int i) {
	method2527((Interface55) object, -1422250526);
    }
    
    public void method48(Object object) {
	method2527((Interface55) object, 194601116);
    }
    
    Class94(Class130 class130) {
	((Class94) this).this$0 = class130;
    }
    
    void method2528(Interface55 interface55) {
	Iterator iterator
	    = ((Class94) this).this$0.method3227(1997826343).iterator();
	while (iterator.hasNext()) {
	    Class301 class301 = (Class301) iterator.next();
	    if (class301.method6029(-1549139379) == interface55) {
		class301.method5976(-1105582928);
		iterator.remove();
	    }
	}
    }
    
    static final void method2529(Class479 class479, int i) {
	Class478_Sub1_Sub1_Sub5_Sub1 class478_sub1_sub1_sub5_sub1
	    = ((Class478_Sub1_Sub1_Sub5_Sub1)
	       ((Class479) class479).aClass478_Sub1_Sub1_Sub5_6448);
	boolean bool = false;
	Class619 class619 = class478_sub1_sub1_sub5_sub1.aClass619_11303;
	if (class619.anIntArray7952 != null)
	    class619
		= class619.method13325(Class326.aClass12_4953,
				       Class326.aClass12_4953, 1651413082);
	if (null != class619)
	    bool = class619.aBool7925;
	((Class479) class479).anIntArray6435
	    [(((Class479) class479).anInt6442 += -1158629699) * -117934955 - 1]
	    = bool ? 1 : 0;
    }
    
    public static int method2530(int i, int i_0_) {
	int i_1_ = 0;
	if (i < 0 || i >= 65536) {
	    i >>>= 16;
	    i_1_ += 16;
	}
	if (i >= 256) {
	    i >>>= 8;
	    i_1_ += 8;
	}
	if (i >= 16) {
	    i >>>= 4;
	    i_1_ += 4;
	}
	if (i >= 4) {
	    i >>>= 2;
	    i_1_ += 2;
	}
	if (i >= 1) {
	    i >>>= 1;
	    i_1_++;
	}
	return i + i_1_;
    }
    
    public static final int method2531(String string, byte i) {
	if (string == null)
	    return -1;
	for (int i_2_ = 0; i_2_ < client.anInt8408 * -1864493739; i_2_++) {
	    if (string.equalsIgnoreCase(client.aClass24Array8368[i_2_]
					.aString262))
		return i_2_;
	}
	return -1;
    }
    
    public static final int method2532(long l, String string, byte i) {
	Random random = new Random();
	Class243_Sub10 class243_sub10 = new Class243_Sub10(128);
	Class243_Sub10 class243_sub10_3_ = 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, 1498106136);
	for (int i_4_ = 0; i_4_ < 4; i_4_++)
	    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_5_ = 0; i_5_ < 4; i_5_++)
	    class243_sub10.method14841(random.nextInt(), 735483131);
	class243_sub10.method14690(Class23.aBigInteger250,
				   Class23.aBigInteger251, 1405357203);
	class243_sub10_3_.method14800(10, 1892207160);
	for (int i_6_ = 0; i_6_ < 3; i_6_++)
	    class243_sub10_3_.method14841(random.nextInt(), 735483131);
	class243_sub10_3_.method14650(random.nextLong());
	class243_sub10_3_.method14838(random.nextLong());
	Class25.method977(class243_sub10_3_, -712838522);
	class243_sub10_3_.method14650(random.nextLong());
	class243_sub10_3_.method14690(Class23.aBigInteger250,
				      Class23.aBigInteger251, 1985112365);
	int i_7_ = Class601.method13120(string, 1916269746);
	if (0 != i_7_ % 8)
	    i_7_ += 8 - i_7_ % 8;
	Class243_Sub10 class243_sub10_8_ = new Class243_Sub10(i_7_);
	class243_sub10_8_.method14652(string, (byte) -31);
	class243_sub10_8_.anInt8688 = i_7_ * -2044845443;
	class243_sub10_8_.method14869(is, 1228489141);
	Class243_Sub10 class243_sub10_9_
	    = new Class243_Sub10(class243_sub10.anInt8688 * 126215893 + 5
				 + 126215893 * class243_sub10_3_.anInt8688
				 + 126215893 * class243_sub10_8_.anInt8688);
	class243_sub10_9_.method14800(2, -336066140);
	class243_sub10_9_.method14800(126215893 * class243_sub10.anInt8688,
				      -1254905827);
	class243_sub10_9_.method14655(class243_sub10.aByteArray8691, 0,
				      class243_sub10.anInt8688 * 126215893,
				      1923867121);
	class243_sub10_9_.method14800(126215893 * class243_sub10_3_.anInt8688,
				      -808114549);
	class243_sub10_9_.method14655(class243_sub10_3_.aByteArray8691, 0,
				      class243_sub10_3_.anInt8688 * 126215893,
				      1923867121);
	class243_sub10_9_.method14643(class243_sub10_8_.anInt8688 * 126215893,
				      (short) -9277);
	class243_sub10_9_.method14655(class243_sub10_8_.aByteArray8691, 0,
				      126215893 * class243_sub10_8_.anInt8688,
				      1923867121);
	String string_10_
	    = Class2.method469(class243_sub10_9_.aByteArray8691, 178069191);
	int i_11_;
	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_10_, 353143189)).append
		     ("&dest=").append
		     (Class130.method3272("passwordchoice.ws", -721884583))
		     .toString());
	    outputstreamwriter.flush();
	    InputStream inputstream = urlconnection.getInputStream();
	    class243_sub10_9_ = new Class243_Sub10(new byte[1000]);
	    for (;;) {
		int i_12_
		    = inputstream.read(class243_sub10_9_.aByteArray8691,
				       class243_sub10_9_.anInt8688 * 126215893,
				       1000 - (126215893
					       * class243_sub10_9_.anInt8688));
		if (-1 == i_12_)
		    break;
		class243_sub10_9_.anInt8688 += -2044845443 * i_12_;
		if (126215893 * class243_sub10_9_.anInt8688 >= 1000)
		    return 5;
	    }
	    outputstreamwriter.close();
	    inputstream.close();
	    String string_13_ = new String(class243_sub10_9_.aByteArray8691);
	    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;
	    class243_sub10_9_.method14687(is, -1818262283);
	    for (/**/;
		 (class243_sub10_9_.anInt8688 * 126215893 > 0
		  && (class243_sub10_9_.aByteArray8691
		      [class243_sub10_9_.anInt8688 * 126215893 - 1]) == 0);
		 class243_sub10_9_.anInt8688 -= -2044845443) {
		/* empty */
	    }
	    string_13_ = new String(class243_sub10_9_.aByteArray8691, 0,
				    126215893 * class243_sub10_9_.anInt8688);
	    if (Class71.method1761(string_13_, (byte) 0)) {
		Class421_Sub11.method14139(string_13_, true, client.aBool8139,
					   (byte) -43);
		return 2;
	    }
	    i_11_ = 5;
	} catch (Throwable throwable) {
	    throwable.printStackTrace();
	    return 5;
	}
	return i_11_;
    }
}
