예제 #1
0
        public void Send(IMessage message, uint serviceHash, uint methodId)
        {
            try
            {
                byte[] array = message.ToByteArray();
                while (true)
                {
IL_184:
                    uint arg_14E_0 = 2552486184u;
                    while (true)
                    {
                        uint num;
                        switch ((num = (arg_14E_0 ^ 2204077453u)) % 10u)
                        {
                        case 0u:
                        {
                            byte[] array2;
                            byte[] array3;
                            array2[0] = (byte)(array3.Length >> 8);
                            arg_14E_0 = (num * 2469205237u ^ 922619938u);
                            continue;
                        }

                        case 1u:
                            arg_14E_0 = (num * 369987135u ^ 995479250u);
                            continue;

                        case 2u:
                            goto IL_184;

                        case 3u:
                            Log.Message(LogType.Error, RestSession.smethod_18(Module.smethod_34 <string>(2746132316u), RestSession.smethod_17(message)), Array.Empty <object>());
                            arg_14E_0 = (num * 1089050472u ^ 225111790u);
                            continue;

                        case 4u:
                        {
                            byte[] array3;
                            byte[] array2 = array2.Concat(array3).Concat(array).ToArray <byte>();
                            arg_14E_0 = (((array2.Length == 2 + array3.Length + array.Length) ? 3650143856u : 2376975962u) ^ num * 2239156228u);
                            continue;
                        }

                        case 5u:
                        {
                            Header expr_61 = new Header();
                            uint   num2    = this.token;
                            this.token          = num2 + 1u;
                            expr_61.Token       = num2;
                            expr_61.ServiceId   = 0u;
                            expr_61.ServiceHash = serviceHash;
                            expr_61.MethodId    = methodId;
                            expr_61.Size        = (uint)array.Length;
                            byte[] array3 = expr_61.ToByteArray();
                            arg_14E_0 = (num * 1606904854u ^ 1376312577u);
                            continue;
                        }

                        case 6u:
                        {
                            byte[] array2 = new byte[2];
                            arg_14E_0 = (num * 3434274782u ^ 1626019935u);
                            continue;
                        }

                        case 7u:
                        {
                            byte[] array2;
                            byte[] array3;
                            array2[1] = (byte)(array3.Length & 255);
                            arg_14E_0 = (num * 4068384342u ^ 4016607499u);
                            continue;
                        }

                        case 9u:
                        {
                            byte[] array2;
                            RestSession.smethod_15(this.sslStream, array2);
                            arg_14E_0 = 3681796951u;
                            continue;
                        }
                        }
                        goto Block_3;
                    }
                }
                Block_3 :;
            }
            catch (SocketException exception_)
            {
                Log.Message(LogType.Error, Module.smethod_37 <string>(2717862335u), new object[]
                {
                    RestSession.smethod_19(exception_)
                });
                RestSession.smethod_20(this.client);
            }
        }
예제 #2
0
        public void Send(IMessage message)
        {
            try
            {
                byte[] array  = message.ToByteArray();
                byte[] array2 = new Header
                {
                    Token     = 0u,
                    ServiceId = 254u,
                    Size      = (uint)array.Length
                }.ToByteArray();
                byte[] array3 = new byte[2];
                while (true)
                {
IL_110:
                    uint arg_EB_0 = 3281382246u;
                    while (true)
                    {
                        uint num;
                        switch ((num = (arg_EB_0 ^ 2233116095u)) % 6u)
                        {
                        case 1u:
                            array3[0] = (byte)(array2.Length >> 8);
                            array3[1] = (byte)(array2.Length & 255);
                            array3    = array3.Concat(array2).Concat(array).ToArray <byte>();
                            arg_EB_0  = (num * 397377048u ^ 1189005203u);
                            continue;

                        case 2u:
                            goto IL_110;

                        case 3u:
                            Log.Message(LogType.Error, RestSession.smethod_18(Module.smethod_37 <string>(146717431u), RestSession.smethod_17(message)), Array.Empty <object>());
                            arg_EB_0 = (num * 4247256910u ^ 511300987u);
                            continue;

                        case 4u:
                            arg_EB_0 = (((array3.Length == 2 + array2.Length + array.Length) ? 3751062502u : 2638181500u) ^ num * 1995585982u);
                            continue;

                        case 5u:
                            RestSession.smethod_15(this.sslStream, array3);
                            arg_EB_0 = 3485856961u;
                            continue;
                        }
                        goto Block_3;
                    }
                }
                Block_3 :;
            }
            catch (SocketException exception_)
            {
                while (true)
                {
                    IL_169 :
                    uint arg_121_0 = 3567765158u;
                    while (true)
                    {
                        uint num;
                        switch ((num = (arg_121_0 ^ 2233116095u)) % 3u)
                        {
                        case 0u:
                            goto IL_169;

                        case 1u:
                            Log.Message(LogType.Error, Module.smethod_36 <string>(3490486299u), new object[]
                            {
                                RestSession.smethod_19(exception_)
                            });
                            arg_121_0 = (num * 1261360073u ^ 3352763934u);
                            continue;
                        }
                        goto Block_5;
                    }
                }
Block_5:
                RestSession.smethod_20(this.client);
            }
        }