{"type": "func", "start": 4295586764, "end": 4295587064, "name": "GameLevelManager::getSavedLevels", "pseudocode": "// \n// GameLevelManager::getSavedLevels from 0x1000973cc to 0x1000974f8 (300 bytes)\n// \n// 4 xrefs:\n// > GameLevelManager::limitSavedLevels @ 0x100099e58\n// > LevelBrowserLayer::loadPage @ 0x1004171c0\n// > LevelBrowserLayer::FLAlert_Clicked @ 0x1004195a0\n// > LevelBrowserLayer::FLAlert_Clicked @ 0x1004195d4\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\ncocos2d::CCArray *__fastcall GameLevelManager::getSavedLevels(GameLevelManager *a1, bool a2, int a3)\n{\n  _BOOL4 v4; // w21\n  cocos2d::CCArray *v6; // x19\n  cocos2d::CCArray *v7; // x23\n  unsigned int v8; // w25\n  int v9; // w26\n  int v10; // w0\n  cocos2d::CCString *v11; // x0\n  char *CString; // x0\n  cocos2d::CCDictionary *m_onlineLevels; // x24\n  __int64 v14; // x24\n  void *__p[2]; // [xsp+8h] [xbp-58h] BYREF\n  char v17; // [xsp+1Fh] [xbp-41h]\n\n  v4 = a2;\n  v6 = (cocos2d::CCArray *)sub_10024A15C(a1);\n  v7 = cocos2d::CCDictionary::allKeys(a1->m_onlineLevels);\n  if ( (unsigned int)sub_10024A36C(v7) )\n  {\n    v8 = 0;\n    v9 = -1;\n    do\n    {\n      v10 = sub_10024A36C(v7);\n      v11 = (cocos2d::CCString *)sub_10024A388(v7, (unsigned int)(v10 + v9));\n      CString = (char *)cocos2d::CCString::getCString(v11);\n      m_onlineLevels = a1->m_onlineLevels;\n      sub_100009900(__p, CString);\n      v14 = cocos2d::CCDictionary::objectForKey_1(m_onlineLevels, __p);\n      if ( v17 < 0 )\n        operator delete(__p[0]);\n      if ( (*(_BYTE *)(v14 + 993) & 1) == 0\n        && (!v4 || *(_BYTE *)(v14 + 796) == 1)\n        && (a3 < 1 || *(_DWORD *)(v14 + 800) == a3) )\n      {\n        sub_10024A2D0(v6, v14);\n      }\n      ++v8;\n      --v9;\n    }\n    while ( v8 < (unsigned int)sub_10024A36C(v7) );\n  }\n  if ( (unsigned int)sub_10024A36C(v6) )\n    qsort(v6->data->arr, v6->data->num, 8u, (int (__cdecl *)(const void *, const void *))sub_100087A3C);\n  return v6;\n}", "assembly": "; \n; GameLevelManager::getSavedLevels from 0x1000973cc to 0x1000974f8 (300 bytes)\n; \n; 4 xrefs:\n; > GameLevelManager::limitSavedLevels @ 0x100099e58\n; > LevelBrowserLayer::loadPage @ 0x1004171c0\n; > LevelBrowserLayer::FLAlert_Clicked @ 0x1004195a0\n; > LevelBrowserLayer::FLAlert_Clicked @ 0x1004195d4\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, #0x70                                          ; +0x0, 0x1000973cc\nSTP             X26, X25, [SP,#0x60+var_40]                            ; +0x4, 0x1000973d0\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x1000973d4\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x1000973d8\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x1000973dc\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x1000973e0\nADD             X29, SP, #0x60                                         ; +0x18, 0x1000973e4\nMOV             X20, X2                                                ; +0x1c, 0x1000973e8\nMOV             X21, X1                                                ; +0x20, 0x1000973ec\nMOV             X22, X0                                                ; +0x24, 0x1000973f0\nBL              sub_10024A15C                                          ; +0x28, 0x1000973f4\nMOV             X19, X0                                                ; +0x2c, 0x1000973f8\nLDR             X0, [X22,#0x168]                                       ; +0x30, 0x1000973fc\nBL              cocos2d__CCDictionary__allKeys                         ; +0x34, 0x100097400\nMOV             X23, X0                                                ; +0x38, 0x100097404\nBL              sub_10024A36C                                          ; +0x3c, 0x100097408\nCBZ             W0, loc_1000974B0                                      ; +0x40, 0x10009740c\nMOV             W25, #0                                                ; +0x44, 0x100097410\nMOV             W26, #0xFFFFFFFF                                       ; +0x48, 0x100097414\nMOV             X0, X23                                                ; +0x4c, 0x100097418\nBL              sub_10024A36C                                          ; +0x50, 0x10009741c\nADD             W1, W0, W26                                            ; +0x54, 0x100097420\nMOV             X0, X23                                                ; +0x58, 0x100097424\nBL              sub_10024A388                                          ; +0x5c, 0x100097428\nBL              cocos2d__CCString__getCString                          ; +0x60, 0x10009742c\nMOV             X1, X0; __s                                            ; +0x64, 0x100097430\nLDR             X24, [X22,#0x168]                                      ; +0x68, 0x100097434\nADD             X0, SP, #0x60+__p; int                                 ; +0x6c, 0x100097438\nBL              sub_100009900                                          ; +0x70, 0x10009743c\nADD             X1, SP, #0x60+__p                                      ; +0x74, 0x100097440\nMOV             X0, X24                                                ; +0x78, 0x100097444\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x7c, 0x100097448\nMOV             X24, X0                                                ; +0x80, 0x10009744c\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0x84, 0x100097450\nTBZ             W8, #0x1F, loc_100097460                               ; +0x88, 0x100097454\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x8c, 0x100097458\nBL              __ZdlPv; operator delete(void *)                       ; +0x90, 0x10009745c\nLDRB            W8, [X24,#0x3E1]                                       ; +0x94, 0x100097460\nTBNZ            W8, #0, loc_100097498                                  ; +0x98, 0x100097464\nCBZ             W21, loc_100097478                                     ; +0x9c, 0x100097468\nLDRB            W8, [X24,#0x31C]                                       ; +0xa0, 0x10009746c\nCMP             W8, #1                                                 ; +0xa4, 0x100097470\nB.NE            loc_100097498                                          ; +0xa8, 0x100097474\nCMP             W20, #1                                                ; +0xac, 0x100097478\nB.LT            loc_10009748C                                          ; +0xb0, 0x10009747c\nLDR             W8, [X24,#0x320]                                       ; +0xb4, 0x100097480\nCMP             W8, W20                                                ; +0xb8, 0x100097484\nB.NE            loc_100097498                                          ; +0xbc, 0x100097488\nMOV             X0, X19                                                ; +0xc0, 0x10009748c\nMOV             X1, X24                                                ; +0xc4, 0x100097490\nBL              sub_10024A2D0                                          ; +0xc8, 0x100097494\nADD             W25, W25, #1                                           ; +0xcc, 0x100097498\nMOV             X0, X23                                                ; +0xd0, 0x10009749c\nBL              sub_10024A36C                                          ; +0xd4, 0x1000974a0\nSUB             W26, W26, #1                                           ; +0xd8, 0x1000974a4\nCMP             W25, W0                                                ; +0xdc, 0x1000974a8\nB.CC            loc_100097418                                          ; +0xe0, 0x1000974ac\nMOV             X0, X19                                                ; +0xe4, 0x1000974b0\nBL              sub_10024A36C                                          ; +0xe8, 0x1000974b4\nCBZ             W0, loc_1000974D8                                      ; +0xec, 0x1000974b8\nLDR             X8, [X19,#0x38]                                        ; +0xf0, 0x1000974bc\nLDR             X0, [X8,#0x10]; __base                                 ; +0xf4, 0x1000974c0\nLDR             W1, [X8]; __nel                                        ; +0xf8, 0x1000974c4\nADRL            X3, sub_100087A3C; __compar                            ; +0xfc, 0x1000974c8\nMOV             W2, #8; __width                                        ; +0x104, 0x1000974d0\nBL              _qsort                                                 ; +0x108, 0x1000974d4\nMOV             X0, X19                                                ; +0x10c, 0x1000974d8\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x110, 0x1000974dc\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x114, 0x1000974e0\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x118, 0x1000974e4\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x11c, 0x1000974e8\nLDP             X26, X25, [SP,#0x60+var_40]                            ; +0x120, 0x1000974ec\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x124, 0x1000974f0\nRET                                                                    ; +0x128, 0x1000974f4", "xrefs": ["GameLevelManager::limitSavedLevels @ 0x100099e58", "LevelBrowserLayer::loadPage @ 0x1004171c0", "LevelBrowserLayer::FLAlert_Clicked @ 0x1004195a0", "LevelBrowserLayer::FLAlert_Clicked @ 0x1004195d4"], "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"}