{"type": "func", "start": 5372072688, "end": 5372073137, "name": "MenuLayer::firstNetworkTest", "pseudocode": "// \n// MenuLayer::firstNetworkTest from 0x1403352f0 to 0x1403354b1 (449 bytes)\n// \n// 3 xrefs:\n// > MenuLayer::init @ 0x140335019\n// > <???> @ 0x1406d5114\n// > <???> @ 0x1406d5120\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 MenuLayer::firstNetworkTest(MenuLayer *a1)\n{\n  __int64 v1; // rbx\n  cocos2d::extension::CCHttpRequest *v2; // rdi\n  void **v3; // rax\n  void **v4; // rdx\n  __int64 v5; // r8\n  __int64 v6; // rdx\n  __int64 v7; // rcx\n  __int64 v8; // r8\n  __int64 v9; // r9\n  cocos2d::extension::CCHttpClient *Instance; // rax\n  void *v11; // rcx\n  void *v12; // [rsp+20h] [rbp-38h]\n  void *Block[2]; // [rsp+28h] [rbp-30h] BYREF\n  __int64 v14; // [rsp+38h] [rbp-20h]\n  unsigned __int64 v15; // [rsp+40h] [rbp-18h]\n\n  v1 = qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v12 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v12);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v1 = qword_1406C2EC0;\n  }\n  if ( !*(_BYTE *)(v1 + 968) )\n  {\n    *(_BYTE *)(v1 + 968) = 1;\n    *(_OWORD *)Block = 0;\n    v14 = 4;\n    v15 = 15;\n    strcpy((char *)Block, \"temp\");\n    v2 = (cocos2d::extension::CCHttpRequest *)operator new(0xE0u);\n    cocos2d::extension::CCHttpRequest::CCHttpRequest(v2);\n    v2->__vftable = (cocos2d::extension::CCHttpRequest_vtbl *)&cocos2d::extension::CCHttpRequest::`vftable';\n    cocos2d::extension::CCHttpRequest::setUrl(v2, \"https://www.google.com\");\n    *(_DWORD *)&v2->_shouldCancel = 1;\n    v2->_requestType = kHttpPost;\n    v2->_pTarget = (cocos2d::CCObject *)v1;\n    v2->_pSelector.ptr = (void (__cdecl *)(cocos2d::extension::CCHttpClient *, cocos2d::extension::CCHttpResponse *))GameLevelManager::onProcessHttpRequestCompleted;\n    cocos2d::CCObject::retain((cocos2d::CCObject *)v1);\n    v3 = Block;\n    if ( v15 <= 0xF )\n    {\n      v4 = Block;\n    }\n    else\n    {\n      v4 = (void **)Block[0];\n      v3 = (void **)Block[0];\n    }\n    v5 = -1;\n    do\n      ++v5;\n    while ( *((_BYTE *)v3 + v5) );\n    cocos2d::extension::CCHttpRequest::setRequestData(v2, (const char *)v4, v5);\n    cocos2d::extension::CCHttpRequest::setTag(v2, (const char *)&dword_14052CA10);\n    LODWORD(v2->_headers._Mypair._Myval2._Myend) = 56;\n    Instance = (cocos2d::extension::CCHttpClient *)cocos2d::extension::CCHttpClient::getInstance(v7, v6, v8, v9);\n    cocos2d::extension::CCHttpClient::send(Instance, v2);\n    cocos2d::CCObject::release(v2);\n    if ( v15 > 0xF )\n    {\n      v11 = Block[0];\n      if ( v15 + 1 >= 0x1000 )\n      {\n        v11 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v11);\n    }\n  }\n}", "assembly": "; \n; MenuLayer::firstNetworkTest from 0x1403352f0 to 0x1403354b1 (449 bytes)\n; \n; 3 xrefs:\n; > MenuLayer::init @ 0x140335019\n; > <???> @ 0x1406d5114\n; > <???> @ 0x1406d5120\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1403352f0\npush    rdi                                                            ; +0x5, 0x1403352f5\nsub     rsp, 50h                                                       ; +0x6, 0x1403352f6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1403352fa\nxor     rax, rsp                                                       ; +0x11, 0x140335301\nmov     [rsp+58h+var_10], rax                                          ; +0x14, 0x140335304\nmov     rbx, cs:qword_1406C2EC0                                        ; +0x19, 0x140335309\ntest    rbx, rbx                                                       ; +0x20, 0x140335310\njnz     short loc_140335344                                            ; +0x23, 0x140335313\nmov     ecx, 3D0h; Size                                                ; +0x25, 0x140335315\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2a, 0x14033531a\nmov     [rsp+58h+var_38], rax                                          ; +0x2f, 0x14033531f\nmov     rcx, rax                                                       ; +0x34, 0x140335324\ncall    sub_140141280                                                  ; +0x37, 0x140335327\nnop                                                                    ; +0x3c, 0x14033532c\nmov     cs:qword_1406C2EC0, rax                                        ; +0x3d, 0x14033532d\nmov     rdx, [rax]                                                     ; +0x44, 0x140335334\nmov     rcx, rax                                                       ; +0x47, 0x140335337\ncall    qword ptr [rdx+48h]                                            ; +0x4a, 0x14033533a\nmov     rbx, cs:qword_1406C2EC0                                        ; +0x4d, 0x14033533d\ncmp     byte ptr [rbx+3C8h], 0                                         ; +0x54, 0x140335344\njnz     loc_140335499                                                  ; +0x5b, 0x14033534b\nmov     byte ptr [rbx+3C8h], 1                                         ; +0x61, 0x140335351\nxorps   xmm0, xmm0                                                     ; +0x68, 0x140335358\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x6b, 0x14033535b\nmov     [rsp+58h+var_20], 4                                            ; +0x70, 0x140335360\nmov     [rsp+58h+var_18], 0Fh                                          ; +0x79, 0x140335369\nmov     eax, dword ptr cs:aTemp; \"temp\"                                ; +0x82, 0x140335372\nmov     dword ptr [rsp+58h+Block], eax                                 ; +0x88, 0x140335378\nmov     byte ptr [rsp+58h+Block+4], 0                                  ; +0x8c, 0x14033537c\nmov     ecx, 0E0h; Size                                                ; +0x91, 0x140335381\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x96, 0x140335386\nmov     rdi, rax                                                       ; +0x9b, 0x14033538b\nmov     [rsp+58h+var_38], rax                                          ; +0x9e, 0x14033538e\nmov     rcx, rax                                                       ; +0xa3, 0x140335393\ncall    cs:??0CCHttpRequest@extension@cocos2d@@QEAA@XZ; cocos2d::extension::CCHttpRequest::CCHttpRequest(void) ; +0xa6, 0x140335396\nlea     rax, ??_7CCHttpRequest@extension@cocos2d@@6B@; const cocos2d::extension::CCHttpRequest::`vftable' ; +0xac, 0x14033539c\nmov     [rdi], rax                                                     ; +0xb3, 0x1403353a3\nlea     rdx, aHttpsWwwGoogle; \"https://www.google.com\"                 ; +0xb6, 0x1403353a6\nmov     rcx, rdi                                                       ; +0xbd, 0x1403353ad\ncall    cs:?setUrl@CCHttpRequest@extension@cocos2d@@QEAAXPEBD@Z; cocos2d::extension::CCHttpRequest::setUrl(char const *) ; +0xc0, 0x1403353b0\nmov     dword ptr [rdi+0D4h], 1                                        ; +0xc6, 0x1403353b6\nmov     dword ptr [rdi+38h], 1                                         ; +0xd0, 0x1403353c0\nmov     [rdi+98h], rbx                                                 ; +0xd7, 0x1403353c7\nlea     rax, GameLevelManager__onProcessHttpRequestCompleted           ; +0xde, 0x1403353ce\nmov     [rdi+0A0h], rax                                                ; +0xe5, 0x1403353d5\nmov     rcx, rbx                                                       ; +0xec, 0x1403353dc\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xef, 0x1403353df\nlea     rax, [rsp+58h+Block]                                           ; +0xf5, 0x1403353e5\ncmp     [rsp+58h+var_18], 0Fh                                          ; +0xfa, 0x1403353ea\njbe     short loc_1403353FC                                            ; +0x100, 0x1403353f0\nmov     rdx, [rsp+58h+Block]                                           ; +0x102, 0x1403353f2\nmov     rax, rdx                                                       ; +0x107, 0x1403353f7\njmp     short loc_140335401                                            ; +0x10a, 0x1403353fa\nlea     rdx, [rsp+58h+Block]                                           ; +0x10c, 0x1403353fc\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x111, 0x140335401\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x118, 0x140335408\ninc     r8                                                             ; +0x120, 0x140335410\ncmp     byte ptr [rax+r8], 0                                           ; +0x123, 0x140335413\njnz     short loc_140335410                                            ; +0x128, 0x140335418\nmov     rcx, rdi                                                       ; +0x12a, 0x14033541a\ncall    cs:?setRequestData@CCHttpRequest@extension@cocos2d@@QEAAXPEBDI@Z; cocos2d::extension::CCHttpRequest::setRequestData(char const *,uint) ; +0x12d, 0x14033541d\nlea     rdx, dword_14052CA10                                           ; +0x133, 0x140335423\nmov     rcx, rdi                                                       ; +0x13a, 0x14033542a\ncall    cs:?setTag@CCHttpRequest@extension@cocos2d@@QEAAXPEBD@Z; cocos2d::extension::CCHttpRequest::setTag(char const *) ; +0x13d, 0x14033542d\nmov     dword ptr [rdi+0C8h], 38h ; '8'                                ; +0x143, 0x140335433\ncall    cs:?getInstance@CCHttpClient@extension@cocos2d@@SAPEAV123@XZ; cocos2d::extension::CCHttpClient::getInstance(void) ; +0x14d, 0x14033543d\nmov     rcx, rax                                                       ; +0x153, 0x140335443\nmov     rdx, rdi                                                       ; +0x156, 0x140335446\ncall    cs:?send@CCHttpClient@extension@cocos2d@@QEAAXPEAVCCHttpRequest@23@@Z; cocos2d::extension::CCHttpClient::send(cocos2d::extension::CCHttpRequest *) ; +0x159, 0x140335449\nmov     rcx, rdi                                                       ; +0x15f, 0x14033544f\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x162, 0x140335452\nnop                                                                    ; +0x168, 0x140335458\nmov     rdx, [rsp+58h+var_18]                                          ; +0x169, 0x140335459\ncmp     rdx, 0Fh                                                       ; +0x16e, 0x14033545e\njbe     short loc_140335499                                            ; +0x172, 0x140335462\ninc     rdx                                                            ; +0x174, 0x140335464\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x177, 0x140335467\nmov     rax, rcx                                                       ; +0x17c, 0x14033546c\ncmp     rdx, 1000h                                                     ; +0x17f, 0x14033546f\njb      short loc_140335494                                            ; +0x186, 0x140335476\nadd     rdx, 27h ; '''                                                 ; +0x188, 0x140335478\nmov     rcx, [rcx-8]                                                   ; +0x18c, 0x14033547c\nsub     rax, rcx                                                       ; +0x190, 0x140335480\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x193, 0x140335483\ncmp     rax, 1Fh                                                       ; +0x197, 0x140335487\njbe     short loc_140335494                                            ; +0x19b, 0x14033548b\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x19d, 0x14033548d\nalign 4                                                                ; +0x1a3, 0x140335493\ncall    j_j_free                                                       ; +0x1a4, 0x140335494\nmov     rcx, [rsp+58h+var_10]                                          ; +0x1a9, 0x140335499\nxor     rcx, rsp; StackCookie                                          ; +0x1ae, 0x14033549e\ncall    __security_check_cookie                                        ; +0x1b1, 0x1403354a1\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x1b6, 0x1403354a6\nadd     rsp, 50h                                                       ; +0x1bb, 0x1403354ab\npop     rdi                                                            ; +0x1bf, 0x1403354af\nretn                                                                   ; +0x1c0, 0x1403354b0", "xrefs": ["MenuLayer::init @ 0x140335019", "<???> @ 0x1406d5114", "<???> @ 0x1406d5120"], "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"}