{"type": "func", "start": 6442547600, "end": 6442548009, "name": "cocos2d::extension::CCHttpClient::send", "pseudocode": "// \n// cocos2d::extension::CCHttpClient::send from 0x180017990 to 0x180017b29 (409 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c9ec\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:15:42 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall cocos2d::extension::CCHttpClient::send(\n        cocos2d::extension::CCHttpClient *this,\n        struct cocos2d::extension::CCHttpRequest *a2)\n{\n  __int64 v4; // rbx\n  __int64 v5; // rdx\n  __int64 v6; // rdx\n  __int64 v7; // rbp\n  __int64 v8; // rsi\n  __int64 v9; // rsi\n  _QWORD v10[7]; // [rsp+40h] [rbp-68h] BYREF\n  _QWORD *v11; // [rsp+78h] [rbp-30h]\n\n  if ( a2 )\n  {\n    cocos2d::CCObject::retain(a2);\n    v10[0] = &std::_Func_impl_no_alloc<_lambda_ad044ab4199c6678eabf6fbd29b3d029_,void,>::`vftable';\n    v10[1] = a2;\n    v11 = v10;\n    v4 = *((_QWORD *)this + 7);\n    if ( Mtx_lock((_Mtx_t)(v4 + 64)) )\n    {\n      std::_Throw_Cpp_error(5);\n      __debugbreak();\n    }\n    if ( *(_DWORD *)(v4 + 140) == 0x7FFFFFFF )\n    {\n      *(_DWORD *)(v4 + 140) = 2147483646;\n      std::_Throw_Cpp_error(6);\n      __debugbreak();\n    }\n    if ( *(_BYTE *)(v4 + 216) )\n    {\n      Mtx_unlock((_Mtx_t)(v4 + 64));\n    }\n    else\n    {\n      if ( *(_QWORD *)(v4 + 40) <= (unsigned __int64)(*(_QWORD *)(v4 + 56) + 1LL) )\n        sub_180018960(v4 + 24);\n      v6 = *(_QWORD *)(v4 + 40) - 1LL;\n      *(_QWORD *)(v4 + 48) &= v6;\n      v7 = *(_QWORD *)(v4 + 56) + *(_QWORD *)(v4 + 48);\n      v8 = 8 * (v6 & v7);\n      if ( !*(_QWORD *)(v8 + *(_QWORD *)(v4 + 32)) )\n        *(_QWORD *)(v8 + *(_QWORD *)(v4 + 32)) = sub_18001F040(0x40u);\n      v9 = *(_QWORD *)(*(_QWORD *)(v4 + 32) + 8 * (v7 & (*(_QWORD *)(v4 + 40) - 1LL)));\n      *(_QWORD *)(v9 + 56) = 0;\n      if ( v11 )\n        *(_QWORD *)(v9 + 56) = (*(__int64 (__fastcall **)(_QWORD *, __int64))*v11)(v11, v9);\n      ++*(_QWORD *)(v4 + 56);\n      Mtx_unlock((_Mtx_t)(v4 + 64));\n      Cnd_signal((_Cnd_t)(v4 + 144));\n    }\n    if ( v11 )\n    {\n      LOBYTE(v5) = v11 != v10;\n      (*(void (__fastcall **)(_QWORD *, __int64))(*v11 + 32LL))(v11, v5);\n    }\n  }\n}", "assembly": "; \n; cocos2d::extension::CCHttpClient::send from 0x180017990 to 0x180017b29 (409 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c9ec\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:15:42 +0000\n; \ntest    rdx, rdx                                                       ; +0x0, 0x180017990\njz      locret_180017B28                                               ; +0x3, 0x180017993\nmov     [rsp+arg_10], rbx                                              ; +0x9, 0x180017999\npush    rbp                                                            ; +0xe, 0x18001799e\npush    rsi                                                            ; +0xf, 0x18001799f\npush    rdi                                                            ; +0x10, 0x1800179a0\nsub     rsp, 90h                                                       ; +0x11, 0x1800179a1\nmov     rax, cs:__security_cookie                                      ; +0x18, 0x1800179a8\nxor     rax, rsp                                                       ; +0x1f, 0x1800179af\nmov     [rsp+0A8h+var_28], rax                                         ; +0x22, 0x1800179b2\nmov     rbx, rdx                                                       ; +0x2a, 0x1800179ba\nmov     rdi, rcx                                                       ; +0x2d, 0x1800179bd\nmov     rcx, rdx                                                       ; +0x30, 0x1800179c0\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x33, 0x1800179c3\nlea     rax, ??_7?$_Func_impl_no_alloc@V_lambda_ad044ab4199c6678eabf6fbd29b3d029_@@X$$V@std@@6B@; const std::_Func_impl_no_alloc<_lambda_ad044ab4199c6678eabf6fbd29b3d029_,void,>::`vftable' ; +0x39, 0x1800179c9\nmov     [rsp+0A8h+var_68], rax                                         ; +0x40, 0x1800179d0\nmov     [rsp+0A8h+var_60], rbx                                         ; +0x45, 0x1800179d5\nlea     rax, [rsp+0A8h+var_68]                                         ; +0x4a, 0x1800179da\nmov     [rsp+0A8h+var_30], rax                                         ; +0x4f, 0x1800179df\nmov     rbx, [rdi+38h]                                                 ; +0x54, 0x1800179e4\nlea     rdi, [rbx+40h]                                                 ; +0x58, 0x1800179e8\nmov     [rsp+0A8h+var_88], rdi                                         ; +0x5c, 0x1800179ec\nmov     [rsp+0A8h+var_80], 0                                           ; +0x61, 0x1800179f1\nmov     rcx, rdi; _Mtx_t                                               ; +0x66, 0x1800179f6\ncall    cs:_Mtx_lock                                                   ; +0x69, 0x1800179f9\ntest    eax, eax                                                       ; +0x6f, 0x1800179ff\njz      short loc_180017A0F                                            ; +0x71, 0x180017a01\nmov     ecx, 5                                                         ; +0x73, 0x180017a03\ncall    cs:?_Throw_Cpp_error@std@@YAXH@Z; std::_Throw_Cpp_error(int)   ; +0x78, 0x180017a08\nint     3; Trap to Debugger                                            ; +0x7e, 0x180017a0e\ncmp     dword ptr [rdi+4Ch], 7FFFFFFFh                                 ; +0x7f, 0x180017a0f\njnz     short loc_180017A2B                                            ; +0x86, 0x180017a16\nmov     dword ptr [rdi+4Ch], 7FFFFFFEh                                 ; +0x88, 0x180017a18\nmov     ecx, 6                                                         ; +0x8f, 0x180017a1f\ncall    cs:?_Throw_Cpp_error@std@@YAXH@Z; std::_Throw_Cpp_error(int)   ; +0x94, 0x180017a24\nint     3; Trap to Debugger                                            ; +0x9a, 0x180017a2a\nmov     [rsp+0A8h+var_80], 1                                           ; +0x9b, 0x180017a2b\ncmp     byte ptr [rbx+0D8h], 0                                         ; +0xa0, 0x180017a30\njz      short loc_180017A47                                            ; +0xa7, 0x180017a37\nmov     rcx, rdi; _Mtx_t                                               ; +0xa9, 0x180017a39\ncall    cs:_Mtx_unlock                                                 ; +0xac, 0x180017a3c\njmp     loc_180017AEB                                                  ; +0xb2, 0x180017a42\nlea     rcx, [rbx+18h]                                                 ; +0xb7, 0x180017a47\nmov     rax, [rbx+38h]                                                 ; +0xbb, 0x180017a4b\ninc     rax                                                            ; +0xbf, 0x180017a4f\ncmp     [rbx+28h], rax                                                 ; +0xc2, 0x180017a52\nja      short loc_180017A5D                                            ; +0xc6, 0x180017a56\ncall    sub_180018960                                                  ; +0xc8, 0x180017a58\nmov     rdx, [rbx+28h]                                                 ; +0xcd, 0x180017a5d\ndec     rdx                                                            ; +0xd1, 0x180017a61\nand     [rbx+30h], rdx                                                 ; +0xd4, 0x180017a64\nmov     rbp, [rbx+30h]                                                 ; +0xd8, 0x180017a68\nadd     rbp, [rbx+38h]                                                 ; +0xdc, 0x180017a6c\nmov     rax, rbp                                                       ; +0xe0, 0x180017a70\nand     rax, rdx                                                       ; +0xe3, 0x180017a73\nlea     rsi, ds:0[rax*8]                                               ; +0xe6, 0x180017a76\nmov     rax, [rbx+20h]                                                 ; +0xee, 0x180017a7e\ncmp     qword ptr [rsi+rax], 0                                         ; +0xf2, 0x180017a82\njnz     short loc_180017A9B                                            ; +0xf7, 0x180017a87\nmov     ecx, 40h ; '@'; Size                                           ; +0xf9, 0x180017a89\ncall    sub_18001F040                                                  ; +0xfe, 0x180017a8e\nmov     rcx, [rbx+20h]                                                 ; +0x103, 0x180017a93\nmov     [rsi+rcx], rax                                                 ; +0x107, 0x180017a97\nmov     rcx, [rbx+28h]                                                 ; +0x10b, 0x180017a9b\ndec     rcx                                                            ; +0x10f, 0x180017a9f\nand     rcx, rbp                                                       ; +0x112, 0x180017aa2\nmov     rax, [rbx+20h]                                                 ; +0x115, 0x180017aa5\nmov     rsi, [rax+rcx*8]                                               ; +0x119, 0x180017aa9\nmov     [rsp+0A8h+var_78], rsi                                         ; +0x11d, 0x180017aad\nmov     qword ptr [rsi+38h], 0                                         ; +0x122, 0x180017ab2\nmov     rcx, [rsp+0A8h+var_30]                                         ; +0x12a, 0x180017aba\ntest    rcx, rcx                                                       ; +0x12f, 0x180017abf\njz      short loc_180017AD0                                            ; +0x132, 0x180017ac2\nmov     rax, [rcx]                                                     ; +0x134, 0x180017ac4\nmov     rdx, rsi                                                       ; +0x137, 0x180017ac7\ncall    qword ptr [rax]                                                ; +0x13a, 0x180017aca\nmov     [rsi+38h], rax                                                 ; +0x13c, 0x180017acc\ninc     qword ptr [rbx+38h]                                            ; +0x140, 0x180017ad0\nmov     rcx, rdi; _Mtx_t                                               ; +0x144, 0x180017ad4\ncall    cs:_Mtx_unlock                                                 ; +0x147, 0x180017ad7\nlea     rcx, [rbx+90h]; _Cnd_t                                         ; +0x14d, 0x180017add\ncall    cs:_Cnd_signal                                                 ; +0x154, 0x180017ae4\nnop                                                                    ; +0x15a, 0x180017aea\nmov     rcx, [rsp+0A8h+var_30]                                         ; +0x15b, 0x180017aeb\ntest    rcx, rcx                                                       ; +0x160, 0x180017af0\njz      short loc_180017B06                                            ; +0x163, 0x180017af3\nlea     rax, [rsp+0A8h+var_68]                                         ; +0x165, 0x180017af5\ncmp     rcx, rax                                                       ; +0x16a, 0x180017afa\nsetnz   dl                                                             ; +0x16d, 0x180017afd\nmov     rax, [rcx]                                                     ; +0x170, 0x180017b00\ncall    qword ptr [rax+20h]                                            ; +0x173, 0x180017b03\nmov     rcx, [rsp+0A8h+var_28]                                         ; +0x176, 0x180017b06\nxor     rcx, rsp; StackCookie                                          ; +0x17e, 0x180017b0e\ncall    __security_check_cookie                                        ; +0x181, 0x180017b11\nmov     rbx, [rsp+0A8h+arg_10]                                         ; +0x186, 0x180017b16\nadd     rsp, 90h                                                       ; +0x18e, 0x180017b1e\npop     rdi                                                            ; +0x195, 0x180017b25\npop     rsi                                                            ; +0x196, 0x180017b26\npop     rbp                                                            ; +0x197, 0x180017b27\nretn                                                                   ; +0x198, 0x180017b28", "xrefs": ["<???> @ 0x180032408", "<???> @ 0x18004c9ec"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}