{"type": "func", "start": 5371017552, "end": 5371017856, "name": "GameLevelManager::markLevelAsDownloaded", "pseudocode": "// \n// GameLevelManager::markLevelAsDownloaded from 0x140233950 to 0x140233a80 (304 bytes)\n// \n// 4 xrefs:\n// > GameLevelManager::processOnDownloadLevelCompleted @ 0x1402334a2\n// > LevelListLayer::loadLevelsFinished @ 0x14042e774\n// > <???> @ 0x14091bf2c\n// > <???> @ 0x14091bf38\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 11:28:31 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall GameLevelManager::markLevelAsDownloaded(__int64 a1, unsigned int a2)\n{\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // r8\n  void *v7; // rcx\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int128 v9; // [rsp+40h] [rbp-28h]\n\n  if ( cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(a1 + 888)) >= 0x64 )\n  {\n    cocos2d::CCDictionary::getFirstKey(*(_QWORD *)(a1 + 888), Block);\n    cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 888), Block);\n    sub_14003D310((__int64)Block);\n  }\n  v4 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, a2);\n  CString = cocos2d::CCString::getCString(v4);\n  *(_OWORD *)Block = 0;\n  v9 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( CString[v6] );\n  sub_14003D230(Block, CString, v6);\n  cocos2d::CCDictionary::setObject(*(_QWORD *)(a1 + 888), *(_QWORD *)(a1 + 1648), Block);\n  if ( *((_QWORD *)&v9 + 1) > 0xFu )\n  {\n    v7 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v9 + 1) + 1LL) >= 0x1000 )\n    {\n      v7 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v7);\n  }\n}", "assembly": "; \n; GameLevelManager::markLevelAsDownloaded from 0x140233950 to 0x140233a80 (304 bytes)\n; \n; 4 xrefs:\n; > GameLevelManager::processOnDownloadLevelCompleted @ 0x1402334a2\n; > LevelListLayer::loadLevelsFinished @ 0x14042e774\n; > <???> @ 0x14091bf2c\n; > <???> @ 0x14091bf38\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 11:28:31 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140233950\npush    rdi                                                            ; +0x5, 0x140233955\nsub     rsp, 60h                                                       ; +0x6, 0x140233956\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14023395a\nxor     rax, rsp                                                       ; +0x11, 0x140233961\nmov     [rsp+68h+var_18], rax                                          ; +0x14, 0x140233964\nmov     edi, edx                                                       ; +0x19, 0x140233969\nmov     rbx, rcx                                                       ; +0x1b, 0x14023396b\nmov     rcx, [rcx+378h]                                                ; +0x1e, 0x14023396e\ncall    cs:?count@CCDictionary@cocos2d@@QEAAIXZ; cocos2d::CCDictionary::count(void) ; +0x25, 0x140233975\ncmp     eax, 64h ; 'd'                                                 ; +0x2b, 0x14023397b\njb      short loc_1402339B0                                            ; +0x2e, 0x14023397e\nlea     rdx, [rsp+68h+Block]                                           ; +0x30, 0x140233980\nmov     rcx, [rbx+378h]                                                ; +0x35, 0x140233985\ncall    cs:?getFirstKey@CCDictionary@cocos2d@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ; cocos2d::CCDictionary::getFirstKey(void) ; +0x3c, 0x14023398c\nnop                                                                    ; +0x42, 0x140233992\nlea     rdx, [rsp+68h+Block]                                           ; +0x43, 0x140233993\nmov     rcx, [rbx+378h]                                                ; +0x48, 0x140233998\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::removeObjectForKey(std::string const &) ; +0x4f, 0x14023399f\nnop                                                                    ; +0x55, 0x1402339a5\nlea     rcx, [rsp+68h+Block]                                           ; +0x56, 0x1402339a6\ncall    sub_14003D310                                                  ; +0x5b, 0x1402339ab\nmov     edx, edi                                                       ; +0x60, 0x1402339b0\nlea     rcx, word_1406ED6F8                                            ; +0x62, 0x1402339b2\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x69, 0x1402339b9\nmov     rcx, rax                                                       ; +0x6f, 0x1402339bf\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x72, 0x1402339c2\nxorps   xmm0, xmm0                                                     ; +0x78, 0x1402339c8\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x7b, 0x1402339cb\nxorps   xmm1, xmm1                                                     ; +0x80, 0x1402339d0\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x83, 0x1402339d3\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x89, 0x1402339d9\ninc     r8                                                             ; +0x90, 0x1402339e0\ncmp     byte ptr [rax+r8], 0                                           ; +0x93, 0x1402339e3\njnz     short loc_1402339E0                                            ; +0x98, 0x1402339e8\nmov     rdx, rax                                                       ; +0x9a, 0x1402339ea\nlea     rcx, [rsp+68h+Block]                                           ; +0x9d, 0x1402339ed\ncall    sub_14003D230                                                  ; +0xa2, 0x1402339f2\nnop                                                                    ; +0xa7, 0x1402339f7\nlea     r8, [rsp+68h+Block]                                            ; +0xa8, 0x1402339f8\nmov     rdx, [rbx+670h]                                                ; +0xad, 0x1402339fd\nmov     rcx, [rbx+378h]                                                ; +0xb4, 0x140233a04\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 &) ; +0xbb, 0x140233a0b\nnop                                                                    ; +0xc1, 0x140233a11\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0xc2, 0x140233a12\ncmp     rdx, 0Fh                                                       ; +0xc7, 0x140233a17\njbe     short loc_140233A65                                            ; +0xcb, 0x140233a1b\ninc     rdx                                                            ; +0xcd, 0x140233a1d\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0xd0, 0x140233a20\nmov     rax, rcx                                                       ; +0xd5, 0x140233a25\ncmp     rdx, 1000h                                                     ; +0xd8, 0x140233a28\njb      short loc_140233A60                                            ; +0xdf, 0x140233a2f\nadd     rdx, 27h ; '''                                                 ; +0xe1, 0x140233a31\nmov     rcx, [rcx-8]                                                   ; +0xe5, 0x140233a35\nsub     rax, rcx                                                       ; +0xe9, 0x140233a39\nsub     rax, 8                                                         ; +0xec, 0x140233a3c\ncmp     rax, 1Fh                                                       ; +0xf0, 0x140233a40\njbe     short loc_140233A60                                            ; +0xf4, 0x140233a44\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xf6, 0x140233a46\nxor     r9d, r9d; LineNo                                               ; +0xff, 0x140233a4f\nxor     r8d, r8d; FileName                                             ; +0x102, 0x140233a52\nxor     edx, edx; FunctionName                                         ; +0x105, 0x140233a55\nxor     ecx, ecx; Expression                                           ; +0x107, 0x140233a57\ncall    cs:_invoke_watson                                              ; +0x109, 0x140233a59\nalign 20h                                                              ; +0x10f, 0x140233a5f\ncall    j_j_free                                                       ; +0x110, 0x140233a60\nmov     rcx, [rsp+68h+var_18]                                          ; +0x115, 0x140233a65\nxor     rcx, rsp; StackCookie                                          ; +0x11a, 0x140233a6a\ncall    __security_check_cookie                                        ; +0x11d, 0x140233a6d\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x122, 0x140233a72\nadd     rsp, 60h                                                       ; +0x12a, 0x140233a7a\npop     rdi                                                            ; +0x12e, 0x140233a7e\nretn                                                                   ; +0x12f, 0x140233a7f", "xrefs": ["GameLevelManager::processOnDownloadLevelCompleted @ 0x1402334a2", "LevelListLayer::loadLevelsFinished @ 0x14042e774", "<???> @ 0x14091bf2c", "<???> @ 0x14091bf38"], "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"}