Esempio n. 1
0
        public void Receive(IAsyncResult result)
        {
            try
            {
                int num = WorldClass.smethod_9(this.clientSocket, result);
                while (true)
                {
IL_303:
                    uint arg_2A1_0 = 2144244013u;
                    while (true)
                    {
                        uint num2;
                        switch ((num2 = (arg_2A1_0 ^ 2097752605u)) % 21u)
                        {
                        case 0u:
                            arg_2A1_0 = (((this.DataBuffer[0] == 10) ? 3516801827u : 2700854910u) ^ num2 * 2847739512u);
                            continue;

                        case 1u:
                            this.OnData();
                            arg_2A1_0 = 1349214829u;
                            continue;

                        case 2u:
                        {
                            PacketReader packetReader = new PacketReader(WorldClass.smethod_11(WorldClass.smethod_10(), Module.smethod_36 <string>(3253257661u)), false, false);
                            arg_2A1_0 = 1263277281u;
                            continue;
                        }

                        case 3u:
                            this.Decode(ref this.DataBuffer);
                            arg_2A1_0 = 337671581u;
                            continue;

                        case 4u:
                            goto IL_303;

                        case 5u:
                        {
                            byte[] array;
                            int    num3;
                            WorldClass.smethod_13(this.DataBuffer, 0, array, 0, num3);
                            arg_2A1_0 = (num2 * 916870607u ^ 1297900287u);
                            continue;
                        }

                        case 6u:
                            arg_2A1_0 = ((num <= 0) ? 194039135u : 1722859564u);
                            continue;

                        case 7u:
                            arg_2A1_0 = (num2 * 2848342300u ^ 737308501u);
                            continue;

                        case 8u:
                            arg_2A1_0 = (num2 * 1649544107u ^ 2180403397u);
                            continue;

                        case 9u:
                        {
                            int num3 = (int)(WorldClass.smethod_12(this.DataBuffer, 0) + 4);
                            arg_2A1_0 = (num2 * 766592189u ^ 1651164332u);
                            continue;
                        }

                        case 10u:
                            arg_2A1_0 = ((!this.Crypt.IsInitialized) ? 1207177178u : 1132968486u);
                            continue;

                        case 11u:
                            arg_2A1_0 = (((num == 1) ? 1586097055u : 2122513536u) ^ num2 * 3467687789u);
                            continue;

                        case 12u:
                            arg_2A1_0 = ((this.DataBuffer[num - 1] != 10) ? 1349214829u : 656592899u);
                            continue;

                        case 13u:
                            arg_2A1_0 = (((num == 0) ? 687461565u : 434568810u) ^ num2 * 663281082u);
                            continue;

                        case 14u:
                        {
                            byte[]       array;
                            PacketReader object_ = new PacketReader(array, true, true);
                            WorldClass.smethod_14(this.PacketQueue, object_);
                            int num3;
                            num -= num3;
                            WorldClass.smethod_13(this.DataBuffer, num3, this.DataBuffer, 0, num);
                            this.OnData();
                            arg_2A1_0 = (num2 * 789004399u ^ 1857816743u);
                            continue;
                        }

                        case 15u:
                        {
                            int    num3;
                            byte[] array = new byte[num3];
                            arg_2A1_0 = (num2 * 152044841u ^ 3418251853u);
                            continue;
                        }

                        case 16u:
                            arg_2A1_0 = (num2 * 354584314u ^ 3821096739u);
                            continue;

                        case 18u:
                            WorldClass.smethod_7(this.clientSocket, this.DataBuffer, 0, this.DataBuffer.Length, SocketFlags.None, new AsyncCallback(this.Receive), null);
                            arg_2A1_0 = 466592861u;
                            continue;

                        case 19u:
                            arg_2A1_0 = ((this.initiated ? 1275411404u : 788338040u) ^ num2 * 4152913669u);
                            continue;

                        case 20u:
                        {
                            PacketReader packetReader;
                            AuthenticationHandler.HandleAuthChallenge(ref packetReader, this);
                            arg_2A1_0 = (num2 * 2478836290u ^ 3479432470u);
                            continue;
                        }
                        }
                        goto Block_9;
                    }
                }
                Block_9 :;
            }
            catch (Exception)
            {
                while (true)
                {
                    IL_343 :
                    uint arg_314_0 = 794464263u;
                    while (true)
                    {
                        uint num2;
                        switch ((num2 = (arg_314_0 ^ 2097752605u)) % 3u)
                        {
                        case 0u:
                            goto IL_343;

                        case 2u:
                            CharacterHandler.chatRunning = false;
                            arg_314_0 = (num2 * 2798643116u ^ 1282738044u);
                            continue;
                        }
                        goto Block_11;
                    }
                }
                Block_11 :;
            }
        }