{"type": "func", "start": 4295587092, "end": 4295587240, "name": "GameLevelManager::getSavedLevelLists", "pseudocode": "// \n// GameLevelManager::getSavedLevelLists from 0x100097514 to 0x1000975a8 (148 bytes)\n// \n// 2 xrefs:\n// > LevelBrowserLayer::loadPage @ 0x10041721c\n// > LevelBrowserLayer::FLAlert_Clicked @ 0x100419720\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::getSavedLevelLists(GameLevelManager *a1, int a2)\n{\n  cocos2d::CCArray *v4; // x19\n  cocos2d::CCDictionary *m_favoriteLists; // x8\n  cocos2d::CCDictElement *m_pElements; // x21\n  cocos2d::CCObject *m_pObject; // x1\n\n  v4 = (cocos2d::CCArray *)sub_10024A15C(a1);\n  m_favoriteLists = a1->m_favoriteLists;\n  if ( m_favoriteLists )\n  {\n    m_pElements = m_favoriteLists->m_pElements;\n    while ( m_pElements )\n    {\n      m_pObject = m_pElements->m_pObject;\n      m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;\n      if ( a2 < 1 || m_pObject[6].m_uIndexInArray == a2 )\n        sub_10024A2D0(v4, m_pObject);\n    }\n  }\n  if ( (unsigned int)sub_10024A36C(v4) )\n    qsort(v4->data->arr, v4->data->num, 8u, (int (__cdecl *)(const void *, const void *))sub_100087A60);\n  return v4;\n}", "assembly": "; \n; GameLevelManager::getSavedLevelLists from 0x100097514 to 0x1000975a8 (148 bytes)\n; \n; 2 xrefs:\n; > LevelBrowserLayer::loadPage @ 0x10041721c\n; > LevelBrowserLayer::FLAlert_Clicked @ 0x100419720\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\nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x100097514\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x100097518\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x10009751c\nADD             X29, SP, #0x20                                         ; +0xc, 0x100097520\nMOV             X20, X1                                                ; +0x10, 0x100097524\nMOV             X21, X0                                                ; +0x14, 0x100097528\nBL              sub_10024A15C                                          ; +0x18, 0x10009752c\nMOV             X19, X0                                                ; +0x1c, 0x100097530\nLDR             X8, [X21,#0x180]                                       ; +0x20, 0x100097534\nCBZ             X8, loc_10009756C                                      ; +0x24, 0x100097538\nLDR             X21, [X8,#0x38]                                        ; +0x28, 0x10009753c\nCBZ             X21, loc_10009756C                                     ; +0x2c, 0x100097540\nLDR             X1, [X21,#0x108]                                       ; +0x30, 0x100097544\nLDR             X21, [X21,#0x120]                                      ; +0x34, 0x100097548\nCMP             W20, #1                                                ; +0x38, 0x10009754c\nB.LT            loc_100097560                                          ; +0x3c, 0x100097550\nLDR             W8, [X1,#0x170]                                        ; +0x40, 0x100097554\nCMP             W8, W20                                                ; +0x44, 0x100097558\nB.NE            loc_100097568                                          ; +0x48, 0x10009755c\nMOV             X0, X19                                                ; +0x4c, 0x100097560\nBL              sub_10024A2D0                                          ; +0x50, 0x100097564\nCBNZ            X21, loc_100097544                                     ; +0x54, 0x100097568\nMOV             X0, X19                                                ; +0x58, 0x10009756c\nBL              sub_10024A36C                                          ; +0x5c, 0x100097570\nCBZ             W0, loc_100097594                                      ; +0x60, 0x100097574\nLDR             X8, [X19,#0x38]                                        ; +0x64, 0x100097578\nLDR             X0, [X8,#0x10]; __base                                 ; +0x68, 0x10009757c\nLDR             W1, [X8]; __nel                                        ; +0x6c, 0x100097580\nADRL            X3, sub_100087A60; __compar                            ; +0x70, 0x100097584\nMOV             W2, #8; __width                                        ; +0x78, 0x10009758c\nBL              _qsort                                                 ; +0x7c, 0x100097590\nMOV             X0, X19                                                ; +0x80, 0x100097594\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x84, 0x100097598\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x88, 0x10009759c\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x8c, 0x1000975a0\nRET                                                                    ; +0x90, 0x1000975a4", "xrefs": ["LevelBrowserLayer::loadPage @ 0x10041721c", "LevelBrowserLayer::FLAlert_Clicked @ 0x100419720"], "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"}