Exemple #1
0
        public void OnConnect()
        {
            PacketWriter arg_2E_0 = new PacketWriter();

            WorldClass2.smethod_7(this.clientSocket, this.DataBuffer, 0, this.DataBuffer.Length, SocketFlags.None, new AsyncCallback(this.Receive), null);
            arg_2E_0.WriteString(Module.smethod_37 <string>(1753682996u), true);
            byte[] array = arg_2E_0.ReadDataToSend(true).Concat(new byte[]
            {
                10
            }).ToArray <byte>();
            while (true)
            {
IL_99:
                uint arg_81_0 = 1075133308u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_81_0 ^ 981761687u)) % 3u)
                    {
                    case 1u:
                        WorldClass2.smethod_8(this.clientSocket, array, 0, array.Length, SocketFlags.None);
                        arg_81_0 = (num * 1060128331u ^ 2718837013u);
                        continue;

                    case 2u:
                        goto IL_99;
                    }
                    return;
                }
            }
        }
Exemple #2
0
        public void Send(ref PacketWriter packet)
        {
            byte[] array = packet.ReadDataToSend(false);
            try
            {
                if (this.Crypt.IsInitialized)
                {
                    goto IL_19;
                }
                goto IL_D0;
                uint arg_A8_0;
                while (true)
                {
IL_A3:
                    uint num;
                    switch ((num = (arg_A8_0 ^ 283575599u)) % 7u)
                    {
                    case 0u:
                        WorldClass2.smethod_16(packet);
                        arg_A8_0 = (num * 935397368u ^ 752419448u);
                        continue;

                    case 2u:
                        WorldClass2.smethod_8(this.clientSocket, array, 0, array.Length, SocketFlags.None);
                        arg_A8_0 = (num * 3241794667u ^ 1690790458u);
                        continue;

                    case 3u:
                        this.Crypt.Encrypt(array, 4);
                        arg_A8_0 = (num * 3789761871u ^ 961221312u);
                        continue;

                    case 4u:
                        array[0] = (byte)(255 & array.Length - 4);
                        array[1] = (byte)(255 & array.Length - 4 >> 8);
                        arg_A8_0 = (num * 3960662139u ^ 3351327311u);
                        continue;

                    case 5u:
                        goto IL_19;

                    case 6u:
                        goto IL_D0;
                    }
                    break;
                }
                return;

IL_19:
                arg_A8_0 = 1383073911u;
                goto IL_A3;
IL_D0:
                Log.Message(LogType.Packet, Module.smethod_33 <string>(332516270u), new object[]
                {
                    packet.Opcode,
                    packet.Size
                });
                arg_A8_0 = 516732805u;
                goto IL_A3;
            }
            catch (Exception exception_)
            {
                Log.Message(LogType.Error, Module.smethod_33 <string>(3822441984u), new object[]
                {
                    WorldClass2.smethod_15(exception_)
                });
                Log.Message();
                while (true)
                {
IL_172:
                    uint arg_13A_0 = 653994054u;
                    while (true)
                    {
                        uint num;
                        switch ((num = (arg_13A_0 ^ 283575599u)) % 3u)
                        {
                        case 1u:
                            CharacterHandler.chatRunning = false;
                            WorldClass2.smethod_17(this.clientSocket);
                            arg_13A_0 = (num * 3561998556u ^ 1357924445u);
                            continue;

                        case 2u:
                            goto IL_172;
                        }
                        goto Block_5;
                    }
                }
                Block_5 :;
            }
        }