{"type": "func", "start": 4295672364, "end": 4295672612, "name": "GameLevelManager::getAllUsedSongIDs", "pseudocode": "// \n// GameLevelManager::getAllUsedSongIDs from 0x1000ac22c to 0x1000ac324 (248 bytes)\n// \n// 1 xrefs:\n// > MusicDownloadManager::clearUnusedSongs @ 0x100156228\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::CCDictionary *__fastcall GameLevelManager::getAllUsedSongIDs(GameLevelManager *a1)\n{\n  cocos2d::CCDictionary *v2; // x19\n  cocos2d::CCDictionary *m_onlineLevels; // x8\n  cocos2d::CCDictElement *m_pElements; // x20\n  cocos2d::CCObject *m_pObject; // x21\n  intptr_t m_unknown2; // x1\n  cocos2d::CCNode *v7; // x0\n  cocos2d::CCArray *m_localLevels; // x20\n  __int64 v9; // x21\n  __int64 v10; // x0\n  __int64 v11; // x22\n  intptr_t v12; // x1\n  cocos2d::CCNode *v13; // x0\n\n  v2 = cocos2d::CCDictionary::create();\n  m_onlineLevels = a1->m_onlineLevels;\n  if ( m_onlineLevels )\n  {\n    m_pElements = m_onlineLevels->m_pElements;\n    while ( m_pElements )\n    {\n      while ( 1 )\n      {\n        m_pObject = m_pElements->m_pObject;\n        m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;\n        if ( (m_pObject[17].m_unknown2 & 0x100) == 0 )\n        {\n          m_unknown2 = (unsigned int)m_pObject[10].m_unknown2;\n          if ( (int)m_unknown2 >= 1 && !cocos2d::CCDictionary::objectForKey(v2, m_unknown2) )\n            break;\n        }\n        if ( !m_pElements )\n          goto LABEL_9;\n      }\n      v7 = cocos2d::CCNode::create();\n      cocos2d::CCDictionary::setObject(v2, v7, m_pObject[10].m_unknown2);\n    }\n  }\nLABEL_9:\n  m_localLevels = LocalLevelManager::sharedState()->m_localLevels;\n  if ( (unsigned int)sub_10024A36C(m_localLevels) )\n  {\n    v9 = 0;\n    do\n    {\n      v10 = sub_10024A388(m_localLevels, v9);\n      if ( (*(_BYTE *)(v10 + 993) & 1) == 0 )\n      {\n        v11 = v10;\n        v12 = *(unsigned int *)(v10 + 600);\n        if ( (int)v12 >= 1 && !cocos2d::CCDictionary::objectForKey(v2, v12) )\n        {\n          v13 = cocos2d::CCNode::create();\n          cocos2d::CCDictionary::setObject(v2, v13, *(int *)(v11 + 600));\n        }\n      }\n      v9 = (unsigned int)(v9 + 1);\n    }\n    while ( (unsigned int)v9 < (unsigned int)sub_10024A36C(m_localLevels) );\n  }\n  return v2;\n}", "assembly": "; \n; GameLevelManager::getAllUsedSongIDs from 0x1000ac22c to 0x1000ac324 (248 bytes)\n; \n; 1 xrefs:\n; > MusicDownloadManager::clearUnusedSongs @ 0x100156228\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, 0x1000ac22c\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1000ac230\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1000ac234\nADD             X29, SP, #0x20                                         ; +0xc, 0x1000ac238\nMOV             X20, X0                                                ; +0x10, 0x1000ac23c\nBL              cocos2d__CCDictionary__create                          ; +0x14, 0x1000ac240\nMOV             X19, X0                                                ; +0x18, 0x1000ac244\nLDR             X8, [X20,#0x168]                                       ; +0x1c, 0x1000ac248\nCBZ             X8, loc_1000AC2A0                                      ; +0x20, 0x1000ac24c\nLDR             X20, [X8,#0x38]                                        ; +0x24, 0x1000ac250\nCBZ             X20, loc_1000AC2A0                                     ; +0x28, 0x1000ac254\nLDR             X21, [X20,#0x108]                                      ; +0x2c, 0x1000ac258\nLDR             X20, [X20,#0x120]                                      ; +0x30, 0x1000ac25c\nLDRB            W8, [X21,#0x3E1]                                       ; +0x34, 0x1000ac260\nTBNZ            W8, #0, loc_1000AC280                                  ; +0x38, 0x1000ac264\nLDR             W1, [X21,#0x258]                                       ; +0x3c, 0x1000ac268\nCMP             W1, #1                                                 ; +0x40, 0x1000ac26c\nB.LT            loc_1000AC280                                          ; +0x44, 0x1000ac270\nMOV             X0, X19                                                ; +0x48, 0x1000ac274\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x4c, 0x1000ac278\nCBZ             X0, loc_1000AC288                                      ; +0x50, 0x1000ac27c\nCBNZ            X20, loc_1000AC258                                     ; +0x54, 0x1000ac280\nB               loc_1000AC2A0                                          ; +0x58, 0x1000ac284\nBL              cocos2d__CCNode__create                                ; +0x5c, 0x1000ac288\nMOV             X1, X0                                                 ; +0x60, 0x1000ac28c\nLDRSW           X2, [X21,#0x258]                                       ; +0x64, 0x1000ac290\nMOV             X0, X19                                                ; +0x68, 0x1000ac294\nBL              cocos2d__CCDictionary__setObject                       ; +0x6c, 0x1000ac298\nCBNZ            X20, loc_1000AC258                                     ; +0x70, 0x1000ac29c\nBL              LocalLevelManager__sharedState                         ; +0x74, 0x1000ac2a0\nLDR             X20, [X0,#0x160]                                       ; +0x78, 0x1000ac2a4\nMOV             X0, X20                                                ; +0x7c, 0x1000ac2a8\nBL              sub_10024A36C                                          ; +0x80, 0x1000ac2ac\nCBZ             W0, loc_1000AC310                                      ; +0x84, 0x1000ac2b0\nMOV             W21, #0                                                ; +0x88, 0x1000ac2b4\nMOV             X0, X20                                                ; +0x8c, 0x1000ac2b8\nMOV             X1, X21                                                ; +0x90, 0x1000ac2bc\nBL              sub_10024A388                                          ; +0x94, 0x1000ac2c0\nLDRB            W8, [X0,#0x3E1]                                        ; +0x98, 0x1000ac2c4\nTBNZ            W8, #0, loc_1000AC2FC                                  ; +0x9c, 0x1000ac2c8\nMOV             X22, X0                                                ; +0xa0, 0x1000ac2cc\nLDR             W1, [X0,#0x258]                                        ; +0xa4, 0x1000ac2d0\nCMP             W1, #1                                                 ; +0xa8, 0x1000ac2d4\nB.LT            loc_1000AC2FC                                          ; +0xac, 0x1000ac2d8\nMOV             X0, X19                                                ; +0xb0, 0x1000ac2dc\nBL              cocos2d__CCDictionary__objectForKey                    ; +0xb4, 0x1000ac2e0\nCBNZ            X0, loc_1000AC2FC                                      ; +0xb8, 0x1000ac2e4\nBL              cocos2d__CCNode__create                                ; +0xbc, 0x1000ac2e8\nMOV             X1, X0                                                 ; +0xc0, 0x1000ac2ec\nLDRSW           X2, [X22,#0x258]                                       ; +0xc4, 0x1000ac2f0\nMOV             X0, X19                                                ; +0xc8, 0x1000ac2f4\nBL              cocos2d__CCDictionary__setObject                       ; +0xcc, 0x1000ac2f8\nADD             W21, W21, #1                                           ; +0xd0, 0x1000ac2fc\nMOV             X0, X20                                                ; +0xd4, 0x1000ac300\nBL              sub_10024A36C                                          ; +0xd8, 0x1000ac304\nCMP             W21, W0                                                ; +0xdc, 0x1000ac308\nB.CC            loc_1000AC2B8                                          ; +0xe0, 0x1000ac30c\nMOV             X0, X19                                                ; +0xe4, 0x1000ac310\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xe8, 0x1000ac314\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xec, 0x1000ac318\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xf0, 0x1000ac31c\nRET                                                                    ; +0xf4, 0x1000ac320", "xrefs": ["MusicDownloadManager::clearUnusedSongs @ 0x100156228"], "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"}