{"type": "func", "start": 6442547728, "end": 6442548123, "name": "cocos2d::extension::CCHttpClient::send", "pseudocode": "// \n// cocos2d::extension::CCHttpClient::send from 0x180017a10 to 0x180017b9b (395 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004aa94\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\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; // rsi\n  __int64 v5; // r8\n  __int64 v6; // rbp\n  __int64 v7; // rbp\n  _QWORD *v8; // rdx\n  _QWORD v9[7]; // [rsp+40h] [rbp-68h] BYREF\n  _QWORD *v10; // [rsp+78h] [rbp-30h]\n\n  if ( a2 )\n  {\n    cocos2d::CCObject::retain(a2);\n    v9[0] = &std::_Func_impl_no_alloc<_lambda_ad044ab4199c6678eabf6fbd29b3d029_,void,>::`vftable';\n    v9[1] = a2;\n    v10 = v9;\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_180018530(v4 + 24);\n      v5 = *(_QWORD *)(v4 + 40) - 1LL;\n      *(_QWORD *)(v4 + 48) &= v5;\n      v6 = 8 * ((*(_QWORD *)(v4 + 56) + *(_QWORD *)(v4 + 48)) & v5);\n      if ( !*(_QWORD *)(*(_QWORD *)(v4 + 32) + v6) )\n        *(_QWORD *)(*(_QWORD *)(v4 + 32) + v6) = operator new(0x40u);\n      v7 = *(_QWORD *)(*(_QWORD *)(v4 + 32) + v6);\n      *(_QWORD *)(v7 + 56) = 0;\n      if ( v10 )\n        *(_QWORD *)(v7 + 56) = (*(__int64 (__fastcall **)(_QWORD *, __int64))*v10)(v10, v7);\n      ++*(_QWORD *)(v4 + 56);\n      Mtx_unlock((_Mtx_t)(v4 + 64));\n      Cnd_signal((_Cnd_t)(v4 + 144));\n    }\n    if ( v10 )\n    {\n      v8 = v9;\n      LOBYTE(v8) = v10 != v9;\n      (*(void (__fastcall **)(_QWORD *, _QWORD *))(*v10 + 32LL))(v10, v8);\n    }\n  }\n}", "assembly": "; \n; cocos2d::extension::CCHttpClient::send from 0x180017a10 to 0x180017b9b (395 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004aa94\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\ntest    rdx, rdx                                                       ; +0x0, 0x180017a10\njz      locret_180017B9A                                               ; +0x3, 0x180017a13\nmov     [rsp+arg_10], rbx                                              ; +0x9, 0x180017a19\npush    rbp                                                            ; +0xe, 0x180017a1e\npush    rsi                                                            ; +0xf, 0x180017a1f\npush    rdi                                                            ; +0x10, 0x180017a20\nsub     rsp, 90h                                                       ; +0x11, 0x180017a21\nmov     rax, cs:__security_cookie                                      ; +0x18, 0x180017a28\nxor     rax, rsp                                                       ; +0x1f, 0x180017a2f\nmov     [rsp+0A8h+var_28], rax                                         ; +0x22, 0x180017a32\nmov     rbx, rdx                                                       ; +0x2a, 0x180017a3a\nmov     rsi, rcx                                                       ; +0x2d, 0x180017a3d\nmov     rcx, rdx                                                       ; +0x30, 0x180017a40\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x33, 0x180017a43\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, 0x180017a49\nmov     [rsp+0A8h+var_68], rax                                         ; +0x40, 0x180017a50\nmov     [rsp+0A8h+var_60], rbx                                         ; +0x45, 0x180017a55\nlea     rax, [rsp+0A8h+var_68]                                         ; +0x4a, 0x180017a5a\nmov     [rsp+0A8h+var_30], rax                                         ; +0x4f, 0x180017a5f\nmov     rsi, [rsi+38h]                                                 ; +0x54, 0x180017a64\nlea     rdi, [rsi+40h]                                                 ; +0x58, 0x180017a68\nmov     [rsp+0A8h+var_88], rdi                                         ; +0x5c, 0x180017a6c\nmov     [rsp+0A8h+var_80], 0                                           ; +0x61, 0x180017a71\nmov     rcx, rdi; _Mtx_t                                               ; +0x66, 0x180017a76\ncall    cs:_Mtx_lock                                                   ; +0x69, 0x180017a79\ntest    eax, eax                                                       ; +0x6f, 0x180017a7f\njz      short loc_180017A8F                                            ; +0x71, 0x180017a81\nmov     ecx, 5                                                         ; +0x73, 0x180017a83\ncall    cs:?_Throw_Cpp_error@std@@YAXH@Z; std::_Throw_Cpp_error(int)   ; +0x78, 0x180017a88\nint     3; Trap to Debugger                                            ; +0x7e, 0x180017a8e\nmov     eax, [rdi+4Ch]                                                 ; +0x7f, 0x180017a8f\ncmp     eax, 7FFFFFFFh                                                 ; +0x82, 0x180017a92\njnz     short loc_180017AAA                                            ; +0x87, 0x180017a97\ndec     eax                                                            ; +0x89, 0x180017a99\nmov     [rdi+4Ch], eax                                                 ; +0x8b, 0x180017a9b\nmov     ecx, 6                                                         ; +0x8e, 0x180017a9e\ncall    cs:?_Throw_Cpp_error@std@@YAXH@Z; std::_Throw_Cpp_error(int)   ; +0x93, 0x180017aa3\nint     3; Trap to Debugger                                            ; +0x99, 0x180017aa9\nmov     [rsp+0A8h+var_80], 1                                           ; +0x9a, 0x180017aaa\ncmp     byte ptr [rsi+0D8h], 0                                         ; +0x9f, 0x180017aaf\njz      short loc_180017AC6                                            ; +0xa6, 0x180017ab6\nmov     rcx, rdi; _Mtx_t                                               ; +0xa8, 0x180017ab8\ncall    cs:_Mtx_unlock                                                 ; +0xab, 0x180017abb\njmp     loc_180017B5D                                                  ; +0xb1, 0x180017ac1\nmov     rax, [rsi+38h]                                                 ; +0xb6, 0x180017ac6\ninc     rax                                                            ; +0xba, 0x180017aca\ncmp     [rsi+28h], rax                                                 ; +0xbd, 0x180017acd\nja      short loc_180017ADC                                            ; +0xc1, 0x180017ad1\nlea     rcx, [rsi+18h]                                                 ; +0xc3, 0x180017ad3\ncall    sub_180018530                                                  ; +0xc7, 0x180017ad7\nmov     r8, [rsi+28h]                                                  ; +0xcc, 0x180017adc\ndec     r8                                                             ; +0xd0, 0x180017ae0\nand     [rsi+30h], r8                                                  ; +0xd3, 0x180017ae3\nmov     rdx, [rsi+30h]                                                 ; +0xd7, 0x180017ae7\nadd     rdx, [rsi+38h]                                                 ; +0xdb, 0x180017aeb\nand     r8, rdx                                                        ; +0xdf, 0x180017aef\nlea     rbp, ds:0[r8*8]                                                ; +0xe2, 0x180017af2\nmov     rax, [rsi+20h]                                                 ; +0xea, 0x180017afa\ncmp     qword ptr [rax+rbp], 0                                         ; +0xee, 0x180017afe\njnz     short loc_180017B17                                            ; +0xf3, 0x180017b03\nmov     ecx, 40h ; '@'; Size                                           ; +0xf5, 0x180017b05\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xfa, 0x180017b0a\nmov     rcx, [rsi+20h]                                                 ; +0xff, 0x180017b0f\nmov     [rcx+rbp], rax                                                 ; +0x103, 0x180017b13\nmov     rax, [rsi+20h]                                                 ; +0x107, 0x180017b17\nmov     rbp, [rax+rbp]                                                 ; +0x10b, 0x180017b1b\nmov     [rsp+0A8h+var_78], rbp                                         ; +0x10f, 0x180017b1f\nmov     qword ptr [rbp+38h], 0                                         ; +0x114, 0x180017b24\nmov     rcx, [rsp+0A8h+var_30]                                         ; +0x11c, 0x180017b2c\ntest    rcx, rcx                                                       ; +0x121, 0x180017b31\njz      short loc_180017B42                                            ; +0x124, 0x180017b34\nmov     rax, [rcx]                                                     ; +0x126, 0x180017b36\nmov     rdx, rbp                                                       ; +0x129, 0x180017b39\ncall    qword ptr [rax]                                                ; +0x12c, 0x180017b3c\nmov     [rbp+38h], rax                                                 ; +0x12e, 0x180017b3e\ninc     qword ptr [rsi+38h]                                            ; +0x132, 0x180017b42\nmov     rcx, rdi; _Mtx_t                                               ; +0x136, 0x180017b46\ncall    cs:_Mtx_unlock                                                 ; +0x139, 0x180017b49\nlea     rcx, [rsi+90h]; _Cnd_t                                         ; +0x13f, 0x180017b4f\ncall    cs:_Cnd_signal                                                 ; +0x146, 0x180017b56\nnop                                                                    ; +0x14c, 0x180017b5c\nmov     rcx, [rsp+0A8h+var_30]                                         ; +0x14d, 0x180017b5d\ntest    rcx, rcx                                                       ; +0x152, 0x180017b62\njz      short loc_180017B78                                            ; +0x155, 0x180017b65\nmov     rax, [rcx]                                                     ; +0x157, 0x180017b67\nlea     rdx, [rsp+0A8h+var_68]                                         ; +0x15a, 0x180017b6a\ncmp     rcx, rdx                                                       ; +0x15f, 0x180017b6f\nsetnz   dl                                                             ; +0x162, 0x180017b72\ncall    qword ptr [rax+20h]                                            ; +0x165, 0x180017b75\nmov     rcx, [rsp+0A8h+var_28]                                         ; +0x168, 0x180017b78\nxor     rcx, rsp; StackCookie                                          ; +0x170, 0x180017b80\ncall    __security_check_cookie                                        ; +0x173, 0x180017b83\nmov     rbx, [rsp+0A8h+arg_10]                                         ; +0x178, 0x180017b88\nadd     rsp, 90h                                                       ; +0x180, 0x180017b90\npop     rdi                                                            ; +0x187, 0x180017b97\npop     rsi                                                            ; +0x188, 0x180017b98\npop     rbp                                                            ; +0x189, 0x180017b99\nretn                                                                   ; +0x18a, 0x180017b9a", "xrefs": ["<???> @ 0x18002fdf8", "<???> @ 0x18004aa94"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}