{"type": "func", "start": 5370806512, "end": 5370806846, "name": "GJAccountManager::ProcessHttpRequest", "pseudocode": "// \n// GJAccountManager::ProcessHttpRequest from 0x1402000f0 to 0x14020023e (334 bytes)\n// \n// 9 xrefs:\n// > GJAccountManager::registerAccount @ 0x140200928\n// > GJAccountManager::loginAccount @ 0x140200ecc\n// > GJAccountManager::getAccountBackupURL @ 0x140201627\n// > GJAccountManager::backupAccount @ 0x140201dff\n// > GJAccountManager::getAccountSyncURL @ 0x140202585\n// > GJAccountManager::syncAccount @ 0x140202ae9\n// > GJAccountManager::updateAccountSettings @ 0x140203e8d\n// > <???> @ 0x1406cca8c\n// > <???> @ 0x1406cca98\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=4\nvoid __fastcall GJAccountManager::ProcessHttpRequest(\n        cocos2d::CCObject *a1,\n        const char *a2,\n        const char *a3,\n        const char *a4,\n        int a5)\n{\n  cocos2d::extension::CCHttpRequest *v9; // rbx\n  const char *v10; // rdx\n  const char *v11; // rax\n  const char *v12; // rdx\n  __int64 v13; // r8\n  const char *v14; // rdx\n  __int64 v15; // rdx\n  __int64 v16; // rcx\n  __int64 v17; // r8\n  __int64 v18; // r9\n  cocos2d::extension::CCHttpClient *Instance; // rax\n\n  v9 = (cocos2d::extension::CCHttpRequest *)operator new(0xE0u);\n  cocos2d::extension::CCHttpRequest::CCHttpRequest(v9);\n  v9->__vftable = (cocos2d::extension::CCHttpRequest_vtbl *)&cocos2d::extension::CCHttpRequest::`vftable';\n  v10 = a2;\n  if ( *((_QWORD *)a2 + 3) > 0xFu )\n    v10 = *(const char **)a2;\n  cocos2d::extension::CCHttpRequest::setUrl(v9, v10);\n  v9->_requestType = kHttpPost;\n  v9->_pTarget = a1;\n  v9->_pSelector.ptr = (void (__cdecl *)(cocos2d::extension::CCHttpClient *, cocos2d::extension::CCHttpResponse *))GJAccountManager::onProcessHttpRequestCompleted;\n  if ( a1 )\n    cocos2d::CCObject::retain(a1);\n  if ( (unsigned int)(a5 - 20) <= 1 )\n    *(_DWORD *)&v9->_shouldCancel = 600;\n  v11 = a3;\n  if ( *((_QWORD *)a3 + 3) <= 0xFu )\n  {\n    v12 = a3;\n  }\n  else\n  {\n    v11 = *(const char **)a3;\n    v12 = *(const char **)a3;\n  }\n  v13 = -1;\n  do\n    ++v13;\n  while ( v11[v13] );\n  cocos2d::extension::CCHttpRequest::setRequestData(v9, v12, v13);\n  v14 = a4;\n  if ( *((_QWORD *)a4 + 3) > 0xFu )\n    v14 = *(const char **)a4;\n  cocos2d::extension::CCHttpRequest::setTag(v9, v14);\n  LODWORD(v9->_headers._Mypair._Myval2._Myend) = a5;\n  Instance = (cocos2d::extension::CCHttpClient *)cocos2d::extension::CCHttpClient::getInstance(v16, v15, v17, v18);\n  cocos2d::extension::CCHttpClient::send(Instance, v9);\n  cocos2d::CCObject::release(v9);\n  sub_14003A830((__int64)a2);\n  sub_14003A830((__int64)a3);\n  sub_14003A830((__int64)a4);\n}", "assembly": "; \n; GJAccountManager::ProcessHttpRequest from 0x1402000f0 to 0x14020023e (334 bytes)\n; \n; 9 xrefs:\n; > GJAccountManager::registerAccount @ 0x140200928\n; > GJAccountManager::loginAccount @ 0x140200ecc\n; > GJAccountManager::getAccountBackupURL @ 0x140201627\n; > GJAccountManager::backupAccount @ 0x140201dff\n; > GJAccountManager::getAccountSyncURL @ 0x140202585\n; > GJAccountManager::syncAccount @ 0x140202ae9\n; > GJAccountManager::updateAccountSettings @ 0x140203e8d\n; > <???> @ 0x1406cca8c\n; > <???> @ 0x1406cca98\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\npush    rbx                                                            ; +0x0, 0x1402000f0\npush    rsi                                                            ; +0x2, 0x1402000f2\npush    rdi                                                            ; +0x3, 0x1402000f3\npush    r14                                                            ; +0x4, 0x1402000f4\npush    r15                                                            ; +0x6, 0x1402000f6\nsub     rsp, 50h                                                       ; +0x8, 0x1402000f8\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x1402000fc\nxor     rax, rsp                                                       ; +0x13, 0x140200103\nmov     [rsp+78h+var_38], rax                                          ; +0x16, 0x140200106\nmov     r14, r9                                                        ; +0x1b, 0x14020010b\nmov     rdi, r8                                                        ; +0x1e, 0x14020010e\nmov     r15, rdx                                                       ; +0x21, 0x140200111\nmov     rsi, rcx                                                       ; +0x24, 0x140200114\nmov     [rsp+78h+var_50], rdx                                          ; +0x27, 0x140200117\nmov     [rsp+78h+var_48], r8                                           ; +0x2c, 0x14020011c\nmov     [rsp+78h+var_40], r9                                           ; +0x31, 0x140200121\nmov     ecx, 0E0h; Size                                                ; +0x36, 0x140200126\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3b, 0x14020012b\nmov     rbx, rax                                                       ; +0x40, 0x140200130\nmov     [rsp+78h+var_58], rax                                          ; +0x43, 0x140200133\nmov     rcx, rax                                                       ; +0x48, 0x140200138\ncall    cs:??0CCHttpRequest@extension@cocos2d@@QEAA@XZ; cocos2d::extension::CCHttpRequest::CCHttpRequest(void) ; +0x4b, 0x14020013b\nlea     rax, ??_7CCHttpRequest@extension@cocos2d@@6B@; const cocos2d::extension::CCHttpRequest::`vftable' ; +0x51, 0x140200141\nmov     [rbx], rax                                                     ; +0x58, 0x140200148\nmov     rdx, r15                                                       ; +0x5b, 0x14020014b\ncmp     qword ptr [r15+18h], 0Fh                                       ; +0x5e, 0x14020014e\njbe     short loc_140200158                                            ; +0x63, 0x140200153\nmov     rdx, [r15]                                                     ; +0x65, 0x140200155\nmov     rcx, rbx                                                       ; +0x68, 0x140200158\ncall    cs:?setUrl@CCHttpRequest@extension@cocos2d@@QEAAXPEBD@Z; cocos2d::extension::CCHttpRequest::setUrl(char const *) ; +0x6b, 0x14020015b\nmov     dword ptr [rbx+38h], 1                                         ; +0x71, 0x140200161\nmov     [rbx+98h], rsi                                                 ; +0x78, 0x140200168\nlea     rax, GJAccountManager__onProcessHttpRequestCompleted           ; +0x7f, 0x14020016f\nmov     [rbx+0A0h], rax                                                ; +0x86, 0x140200176\ntest    rsi, rsi                                                       ; +0x8d, 0x14020017d\njz      short loc_14020018B                                            ; +0x90, 0x140200180\nmov     rcx, rsi                                                       ; +0x92, 0x140200182\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x95, 0x140200185\nmov     esi, [rsp+78h+arg_20]                                          ; +0x9b, 0x14020018b\nlea     eax, [rsi-14h]                                                 ; +0xa2, 0x140200192\ncmp     eax, 1                                                         ; +0xa5, 0x140200195\nja      short loc_1402001A4                                            ; +0xa8, 0x140200198\nmov     dword ptr [rbx+0D4h], 258h                                     ; +0xaa, 0x14020019a\nmov     rax, rdi                                                       ; +0xb4, 0x1402001a4\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0xb7, 0x1402001a7\njbe     short loc_1402001B6                                            ; +0xbc, 0x1402001ac\nmov     rax, [rdi]                                                     ; +0xbe, 0x1402001ae\nmov     rdx, rax                                                       ; +0xc1, 0x1402001b1\njmp     short loc_1402001B9                                            ; +0xc4, 0x1402001b4\nmov     rdx, rdi                                                       ; +0xc6, 0x1402001b6\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xc9, 0x1402001b9\ninc     r8                                                             ; +0xd0, 0x1402001c0\ncmp     byte ptr [rax+r8], 0                                           ; +0xd3, 0x1402001c3\njnz     short loc_1402001C0                                            ; +0xd8, 0x1402001c8\nmov     rcx, rbx                                                       ; +0xda, 0x1402001ca\ncall    cs:?setRequestData@CCHttpRequest@extension@cocos2d@@QEAAXPEBDI@Z; cocos2d::extension::CCHttpRequest::setRequestData(char const *,uint) ; +0xdd, 0x1402001cd\nmov     rdx, r14                                                       ; +0xe3, 0x1402001d3\ncmp     qword ptr [r14+18h], 0Fh                                       ; +0xe6, 0x1402001d6\njbe     short loc_1402001E0                                            ; +0xeb, 0x1402001db\nmov     rdx, [r14]                                                     ; +0xed, 0x1402001dd\nmov     rcx, rbx                                                       ; +0xf0, 0x1402001e0\ncall    cs:?setTag@CCHttpRequest@extension@cocos2d@@QEAAXPEBD@Z; cocos2d::extension::CCHttpRequest::setTag(char const *) ; +0xf3, 0x1402001e3\nmov     [rbx+0C8h], esi                                                ; +0xf9, 0x1402001e9\ncall    cs:?getInstance@CCHttpClient@extension@cocos2d@@SAPEAV123@XZ; cocos2d::extension::CCHttpClient::getInstance(void) ; +0xff, 0x1402001ef\nmov     rcx, rax                                                       ; +0x105, 0x1402001f5\nmov     rdx, rbx                                                       ; +0x108, 0x1402001f8\ncall    cs:?send@CCHttpClient@extension@cocos2d@@QEAAXPEAVCCHttpRequest@23@@Z; cocos2d::extension::CCHttpClient::send(cocos2d::extension::CCHttpRequest *) ; +0x10b, 0x1402001fb\nmov     rcx, rbx                                                       ; +0x111, 0x140200201\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x114, 0x140200204\nnop                                                                    ; +0x11a, 0x14020020a\nmov     rcx, r15                                                       ; +0x11b, 0x14020020b\ncall    sub_14003A830                                                  ; +0x11e, 0x14020020e\nnop                                                                    ; +0x123, 0x140200213\nmov     rcx, rdi                                                       ; +0x124, 0x140200214\ncall    sub_14003A830                                                  ; +0x127, 0x140200217\nnop                                                                    ; +0x12c, 0x14020021c\nmov     rcx, r14                                                       ; +0x12d, 0x14020021d\ncall    sub_14003A830                                                  ; +0x130, 0x140200220\nmov     rcx, [rsp+78h+var_38]                                          ; +0x135, 0x140200225\nxor     rcx, rsp; StackCookie                                          ; +0x13a, 0x14020022a\ncall    __security_check_cookie                                        ; +0x13d, 0x14020022d\nadd     rsp, 50h                                                       ; +0x142, 0x140200232\npop     r15                                                            ; +0x146, 0x140200236\npop     r14                                                            ; +0x148, 0x140200238\npop     rdi                                                            ; +0x14a, 0x14020023a\npop     rsi                                                            ; +0x14b, 0x14020023b\npop     rbx                                                            ; +0x14c, 0x14020023c\nretn                                                                   ; +0x14d, 0x14020023d", "xrefs": ["GJAccountManager::registerAccount @ 0x140200928", "GJAccountManager::loginAccount @ 0x140200ecc", "GJAccountManager::getAccountBackupURL @ 0x140201627", "GJAccountManager::backupAccount @ 0x140201dff", "GJAccountManager::getAccountSyncURL @ 0x140202585", "GJAccountManager::syncAccount @ 0x140202ae9", "GJAccountManager::updateAccountSettings @ 0x140203e8d", "<???> @ 0x1406cca8c", "<???> @ 0x1406cca98"], "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"}