{"type": "func", "start": 4295624752, "end": 4295624928, "name": "GameLevelManager::markLevelAsDownloaded", "pseudocode": "// \n// GameLevelManager::markLevelAsDownloaded from 0x1000a0830 to 0x1000a08e0 (176 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::processOnDownloadLevelCompleted @ 0x1000a05f4\n// > GameLevelManager::markListAsDownloaded @ 0x1000a0904\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\nvoid __fastcall GameLevelManager::markLevelAsDownloaded(GameLevelManager *a1, int a2)\n{\n  cocos2d::CCDictionary *m_downloadedLevels; // x21\n  cocos2d::CCString *m_trueString; // x20\n  cocos2d::CCString *v6; // x0\n  char *CString; // x0\n  void *__p[2]; // [xsp+8h] [xbp-38h] BYREF\n  char v9; // [xsp+1Fh] [xbp-21h]\n\n  if ( cocos2d::CCDictionary::count(a1->m_downloadedLevels) >= 0x64 )\n  {\n    cocos2d::CCDictionary::getFirstKey(__p, a1->m_downloadedLevels);\n    cocos2d::CCDictionary::removeObjectForKey_1((int)a1->m_downloadedLevels, (char *)__p);\n    if ( v9 < 0 )\n      operator delete(__p[0]);\n  }\n  m_downloadedLevels = a1->m_downloadedLevels;\n  m_trueString = a1->m_trueString;\n  v6 = (cocos2d::CCString *)sub_100268F4C(\"%i\", a2);\n  CString = (char *)cocos2d::CCString::getCString(v6);\n  sub_100009900(__p, CString);\n  cocos2d::CCDictionary::setObject_1(m_downloadedLevels, m_trueString, __p);\n  if ( v9 < 0 )\n    operator delete(__p[0]);\n}", "assembly": "; \n; GameLevelManager::markLevelAsDownloaded from 0x1000a0830 to 0x1000a08e0 (176 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::processOnDownloadLevelCompleted @ 0x1000a05f4\n; > GameLevelManager::markListAsDownloaded @ 0x1000a0904\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x1000a0830\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x1000a0834\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x1000a0838\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x1000a083c\nADD             X29, SP, #0x40                                         ; +0x10, 0x1000a0840\nMOV             X19, X1                                                ; +0x14, 0x1000a0844\nMOV             X20, X0                                                ; +0x18, 0x1000a0848\nLDR             X0, [X0,#0x188]                                        ; +0x1c, 0x1000a084c\nBL              cocos2d__CCDictionary__count                           ; +0x20, 0x1000a0850\nCMP             W0, #0x64 ; 'd'                                        ; +0x24, 0x1000a0854\nB.CC            loc_1000A0884                                          ; +0x28, 0x1000a0858\nLDR             X0, [X20,#0x188]                                       ; +0x2c, 0x1000a085c\nADD             X8, SP, #0x40+__p                                      ; +0x30, 0x1000a0860\nBL              cocos2d__CCDictionary__getFirstKey                     ; +0x34, 0x1000a0864\nLDR             X0, [X20,#0x188]; int                                  ; +0x38, 0x1000a0868\nADD             X1, SP, #0x40+__p; __s                                 ; +0x3c, 0x1000a086c\nBL              cocos2d__CCDictionary__removeObjectForKey_1            ; +0x40, 0x1000a0870\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x44, 0x1000a0874\nTBZ             W8, #0x1F, loc_1000A0884                               ; +0x48, 0x1000a0878\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x4c, 0x1000a087c\nBL              __ZdlPv; operator delete(void *)                       ; +0x50, 0x1000a0880\nLDR             X21, [X20,#0x188]                                      ; +0x54, 0x1000a0884\nLDR             X20, [X20,#0x3A8]                                      ; +0x58, 0x1000a0888\nSTR             X19, [SP,#0x40+var_40]                                 ; +0x5c, 0x1000a088c\nADRL            X0, aI; \"%i\"                                           ; +0x60, 0x1000a0890\nBL              sub_100268F4C                                          ; +0x68, 0x1000a0898\nBL              cocos2d__CCString__getCString                          ; +0x6c, 0x1000a089c\nMOV             X1, X0; __s                                            ; +0x70, 0x1000a08a0\nADD             X0, SP, #0x40+__p; int                                 ; +0x74, 0x1000a08a4\nBL              sub_100009900                                          ; +0x78, 0x1000a08a8\nADD             X2, SP, #0x40+__p                                      ; +0x7c, 0x1000a08ac\nMOV             X0, X21                                                ; +0x80, 0x1000a08b0\nMOV             X1, X20                                                ; +0x84, 0x1000a08b4\nBL              cocos2d__CCDictionary__setObject_1                     ; +0x88, 0x1000a08b8\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x8c, 0x1000a08bc\nTBZ             W8, #0x1F, loc_1000A08CC                               ; +0x90, 0x1000a08c0\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x94, 0x1000a08c4\nBL              __ZdlPv; operator delete(void *)                       ; +0x98, 0x1000a08c8\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x9c, 0x1000a08cc\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xa0, 0x1000a08d0\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xa4, 0x1000a08d4\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xa8, 0x1000a08d8\nRET                                                                    ; +0xac, 0x1000a08dc", "xrefs": ["GameLevelManager::processOnDownloadLevelCompleted @ 0x1000a05f4", "GameLevelManager::markListAsDownloaded @ 0x1000a0904"], "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"}