{"type": "func", "start": 5370807760, "end": 5370807968, "name": "GJAccountManager::addDLToActive", "pseudocode": "// \n// GJAccountManager::addDLToActive from 0x1402005d0 to 0x1402006a0 (208 bytes)\n// \n// 6 xrefs:\n// > GJAccountManager::registerAccount @ 0x140200787\n// > GJAccountManager::loginAccount @ 0x140200bd7\n// > GJAccountManager::backupAccount @ 0x140201a3a\n// > GJAccountManager::syncAccount @ 0x140202989\n// > GJAccountManager::updateAccountSettings @ 0x140203c1b\n// > <???> @ 0x1406ccac8\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=1\nvoid GJAccountManager::addDLToActive(GJAccountManager *a1, const char *a2)\n{\n  __int64 v4; // rsi\n  size_t v5; // r8\n  void *v6; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v8; // [rsp+30h] [rbp-28h]\n\n  v4 = cocos2d::CCNode::create();\n  *(_OWORD *)Block = 0;\n  v8 = 0;\n  v5 = -1;\n  do\n    ++v5;\n  while ( a2[v5] );\n  sub_14003A930(Block, a2, v5);\n  cocos2d::CCDictionary::setObject(a1->m_activeDownloads, v4, Block);\n  if ( *((_QWORD *)&v8 + 1) > 0xFu )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v8 + 1) + 1LL) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v6);\n  }\n}", "assembly": "; \n; GJAccountManager::addDLToActive from 0x1402005d0 to 0x1402006a0 (208 bytes)\n; \n; 6 xrefs:\n; > GJAccountManager::registerAccount @ 0x140200787\n; > GJAccountManager::loginAccount @ 0x140200bd7\n; > GJAccountManager::backupAccount @ 0x140201a3a\n; > GJAccountManager::syncAccount @ 0x140202989\n; > GJAccountManager::updateAccountSettings @ 0x140203c1b\n; > <???> @ 0x1406ccac8\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_10], rbx                                              ; +0x0, 0x1402005d0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1402005d5\npush    rdi                                                            ; +0xa, 0x1402005da\nsub     rsp, 50h                                                       ; +0xb, 0x1402005db\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1402005df\nxor     rax, rsp                                                       ; +0x16, 0x1402005e6\nmov     [rsp+58h+var_18], rax                                          ; +0x19, 0x1402005e9\nmov     rbx, rdx                                                       ; +0x1e, 0x1402005ee\nmov     rdi, rcx                                                       ; +0x21, 0x1402005f1\ncall    cs:?create@CCNode@cocos2d@@SAPEAV12@XZ; cocos2d::CCNode::create(void) ; +0x24, 0x1402005f4\nmov     rsi, rax                                                       ; +0x2a, 0x1402005fa\nxorps   xmm0, xmm0                                                     ; +0x2d, 0x1402005fd\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x30, 0x140200600\nxorps   xmm1, xmm1                                                     ; +0x35, 0x140200605\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x38, 0x140200608\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x3e, 0x14020060e\ninc     r8                                                             ; +0x45, 0x140200615\ncmp     byte ptr [rbx+r8], 0                                           ; +0x48, 0x140200618\njnz     short loc_140200615                                            ; +0x4d, 0x14020061d\nmov     rdx, rbx                                                       ; +0x4f, 0x14020061f\nlea     rcx, [rsp+58h+Block]                                           ; +0x52, 0x140200622\ncall    sub_14003A930                                                  ; +0x57, 0x140200627\nnop                                                                    ; +0x5c, 0x14020062c\nlea     r8, [rsp+58h+Block]                                            ; +0x5d, 0x14020062d\nmov     rdx, rsi                                                       ; +0x62, 0x140200632\nmov     rcx, [rdi+140h]                                                ; +0x65, 0x140200635\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x6c, 0x14020063c\nnop                                                                    ; +0x72, 0x140200642\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x73, 0x140200643\ncmp     rdx, 0Fh                                                       ; +0x78, 0x140200648\njbe     short loc_140200683                                            ; +0x7c, 0x14020064c\ninc     rdx                                                            ; +0x7e, 0x14020064e\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x81, 0x140200651\nmov     rax, rcx                                                       ; +0x86, 0x140200656\ncmp     rdx, 1000h                                                     ; +0x89, 0x140200659\njb      short loc_14020067E                                            ; +0x90, 0x140200660\nadd     rdx, 27h ; '''                                                 ; +0x92, 0x140200662\nmov     rcx, [rcx-8]                                                   ; +0x96, 0x140200666\nsub     rax, rcx                                                       ; +0x9a, 0x14020066a\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x9d, 0x14020066d\ncmp     rax, 1Fh                                                       ; +0xa1, 0x140200671\njbe     short loc_14020067E                                            ; +0xa5, 0x140200675\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xa7, 0x140200677\nalign 2                                                                ; +0xad, 0x14020067d\ncall    j_j_free                                                       ; +0xae, 0x14020067e\nmov     rcx, [rsp+58h+var_18]                                          ; +0xb3, 0x140200683\nxor     rcx, rsp; StackCookie                                          ; +0xb8, 0x140200688\ncall    __security_check_cookie                                        ; +0xbb, 0x14020068b\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xc0, 0x140200690\nmov     rsi, [rsp+58h+arg_18]                                          ; +0xc5, 0x140200695\nadd     rsp, 50h                                                       ; +0xca, 0x14020069a\npop     rdi                                                            ; +0xce, 0x14020069e\nretn                                                                   ; +0xcf, 0x14020069f", "xrefs": ["GJAccountManager::registerAccount @ 0x140200787", "GJAccountManager::loginAccount @ 0x140200bd7", "GJAccountManager::backupAccount @ 0x140201a3a", "GJAccountManager::syncAccount @ 0x140202989", "GJAccountManager::updateAccountSettings @ 0x140203c1b", "<???> @ 0x1406ccac8"], "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"}