private final void method101(byte i) {
	anInt5179++;
	if (((OndemandWorker) Class348_Sub4.ondemandWorker).attempts
	    > Class239_Sub11.ondemandWorkerAttempts) {
	    Class3.currentConnection.method1259(0);
	    Class341.anInt4235 = (((OndemandWorker) Class348_Sub4.ondemandWorker).attempts * 50 - 50) * 5;
	    if ((Class341.anInt4235 ^ 0xffffffff) < -3001)
		Class341.anInt4235 = 3000;
	    if (((OndemandWorker) Class348_Sub4.ondemandWorker).attempts >= 2 && (((OndemandWorker) Class348_Sub4.ondemandWorker).status
		    ^ 0xffffffff) == -7) {
		this.method82(-80, "js5connect_outofdate");
		Class240.anInt4674 = 14;
		return;
	    }
	    if ((((OndemandWorker) Class348_Sub4.ondemandWorker).attempts
		 ^ 0xffffffff) <= -5
		&& (((OndemandWorker) Class348_Sub4.ondemandWorker).status
		    ^ 0xffffffff) == 0) {
		this.method82(81, "js5crc");
		Class240.anInt4674 = 14;
		return;
	    }
	    if (((OndemandWorker) Class348_Sub4.ondemandWorker).attempts >= 4
		&& Class139.method1167(Class240.anInt4674, (byte) -81)) {
		if (((OndemandWorker) Class348_Sub4.ondemandWorker).status != 7
		    && (((OndemandWorker) Class348_Sub4.ondemandWorker).status
			^ 0xffffffff) != -10) {
		    if ((((OndemandWorker) Class348_Sub4.ondemandWorker).status
			 ^ 0xffffffff)
			>= -1)
			this.method82(72, "js5io");
		    else if (AbstractImageFetcher.aString6926 == null)
			this.method82(-116, "js5connect");
		    else
			this.method82(113,
				      ("js5proxy_"
				       + AbstractImageFetcher.aString6926.trim()));
		} else
		    this.method82(-93, "js5connect_full");
		Class240.anInt4674 = 14;
		return;
	    }
	}
	Class239_Sub11.ondemandWorkerAttempts = ((OndemandWorker) Class348_Sub4.ondemandWorker).attempts;
	if (Class341.anInt4235 > 0)
	    Class341.anInt4235--;
	else {
	    try {
		if (Class47.anInt846 == 0) {
		    aa.aClass144_114
			= Class3.currentConnection.method1262((Class348_Sub23_Sub1
							   .signlink),
							  (byte) 36);
		    Class47.anInt846++;
		}
		if ((Class47.anInt846 ^ 0xffffffff) == -2) {
		    if (aa.aClass144_114.state == 2) {
			if (aa.aClass144_114.returnObj != null)
			    AbstractImageFetcher.aString6926
				= (String) aa.aClass144_114.returnObj;
			method103(1000, (byte) 100);
			return;
		    }
		    if ((aa.aClass144_114.state ^ 0xffffffff) == -2)
			Class47.anInt846++;
		}
		if (Class47.anInt846 == 2) {
		    Class193.socketWorker = new SocketWorker((Socket) aa.aClass144_114.returnObj, Class348_Sub23_Sub1.signlink, 25000);
		    ByteBuffer buffer = new ByteBuffer(5);
		    buffer.putByte((((HandshakePacket) Class178.js5initialPacket).opcode));
		    buffer.putInt(634);
		    Class193.socketWorker.write((((ByteBuffer) buffer).payload), 0, 5);
		    Class47.anInt846++;
		    IndexLoader.aLong667 = Class62.getCurrentTimeMillis();
		}
		if ((Class47.anInt846 ^ 0xffffffff) == -4) {
		    if (Class139.method1167(Class240.anInt4674, (byte) -100) || (Class193.socketWorker.getAvailable((byte) 83) ^ 0xffffffff) < -1) {
			int response = Class193.socketWorker.readByte();
			if (response != 0) {
			    method103(response, (byte) 111);
			    return;
			}
			Class47.anInt846++;
		    } else if ((Class62.getCurrentTimeMillis() - IndexLoader.aLong667 ^ 0xffffffffffffffffL) < -30001L) {
			method103(1001, (byte) 85);
			return;
		    }
		}
		if (Class47.anInt846 == 4) {
		    boolean bool = (Class139.method1167(Class240.anInt4674, (byte) -100) || Class348_Sub42_Sub8.method3196(Class240.anInt4674, -87) || ArchiveFetcher.method2672(Class240.anInt4674, -127));
		    RequiredElement[] elements = RequiredElement.getRequiredElements(105);
                    System.out.println(elements.length);
		    ByteBuffer class348_sub49 = new ByteBuffer(elements.length * 4);
		    Class193.socketWorker.read(((ByteBuffer) class348_sub49).payload, 0, (byte) -72, (((ByteBuffer) class348_sub49).payload).length);
		    for (int i_1_ = 0; (elements.length ^ 0xffffffff) < (i_1_ ^ 0xffffffff); i_1_++)
			elements[i_1_].setSize(class348_sub49.getDword());
		    Class348_Sub4.ondemandWorker.initialize(!bool, Class193.socketWorker);
		    Class47.anInt846 = 0;
		    aa.aClass144_114 = null;
		    Class193.socketWorker = null;
		}
		int i_2_ = 127 / ((1 - i) / 60);
	    } catch (java.io.IOException ioexception) {
		method103(1002, (byte) 127);
	    }
	}
    }