{"type": "func", "start": 4295592384, "end": 4295592568, "name": "GameLevelManager::getCompletedGauntletLevels", "pseudocode": "// \n// GameLevelManager::getCompletedGauntletLevels from 0x1000989c0 to 0x100098a78 (184 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::updateUserScore @ 0x1000a21d8\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\nint __fastcall GameLevelManager::getCompletedGauntletLevels(GameLevelManager *a1)\n{\n  cocos2d::CCDictionary *m_gauntletLevels; // x8\n  cocos2d::CCDictElement *m_pElements; // x23\n  int v3; // w19\n  cocos2d::CCObject *m_pObject; // x0\n  GJGameLevel *v5; // x0\n  GJGameLevel *v6; // x22\n  GameStatsManager *v7; // x0\n\n  m_gauntletLevels = a1->m_gauntletLevels;\n  if ( !m_gauntletLevels )\n    return 0;\n  m_pElements = m_gauntletLevels->m_pElements;\n  if ( !m_pElements )\n    return 0;\n  v3 = 0;\n  do\n  {\n    m_pObject = m_pElements->m_pObject;\n    m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;\n    if ( m_pObject )\n    {\n      v5 = (GJGameLevel *)__dynamic_cast(\n                            m_pObject,\n                            (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,\n                            (const struct __class_type_info *)&`typeinfo for'GJGameLevel,\n                            0);\n      if ( v5 )\n      {\n        v6 = v5;\n        if ( v5->m_stars.random - v5->m_stars.seed <= 9 && v5->m_normalPercent.random - v5->m_normalPercent.seed == 100 )\n        {\n          v7 = GameStatsManager::sharedState();\n          v3 += GameStatsManager::hasCompletedLevel(v7, v6);\n        }\n      }\n    }\n  }\n  while ( m_pElements );\n  return v3;\n}", "assembly": "; \n; GameLevelManager::getCompletedGauntletLevels from 0x1000989c0 to 0x100098a78 (184 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::updateUserScore @ 0x1000a21d8\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             X24, X23, [SP,#-0x10+var_30]!                          ; +0x0, 0x1000989c0\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1000989c4\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1000989c8\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1000989cc\nADD             X29, SP, #0x30                                         ; +0x10, 0x1000989d0\nLDR             X8, [X0,#0x1F0]                                        ; +0x14, 0x1000989d4\nCBZ             X8, loc_100098A5C                                      ; +0x18, 0x1000989d8\nLDR             X23, [X8,#0x38]                                        ; +0x1c, 0x1000989dc\nCBZ             X23, loc_100098A5C                                     ; +0x20, 0x1000989e0\nMOV             W19, #0                                                ; +0x24, 0x1000989e4\nADRL            X20, _ZTIN7cocos2d8CCObjectE; `typeinfo for'cocos2d::CCObject ; +0x28, 0x1000989e8\nADRL            X21, _ZTI11GJGameLevel; `typeinfo for'GJGameLevel      ; +0x30, 0x1000989f0\nLDR             X0, [X23,#0x108]; lpsrc                                ; +0x38, 0x1000989f8\nLDR             X23, [X23,#0x120]                                      ; +0x3c, 0x1000989fc\nCBZ             X0, loc_100098A54                                      ; +0x40, 0x100098a00\nMOV             X1, X20; lpstype                                       ; +0x44, 0x100098a04\nMOV             X2, X21; lpdtype                                       ; +0x48, 0x100098a08\nMOV             X3, #0; s2d                                            ; +0x4c, 0x100098a0c\nBL              ___dynamic_cast                                        ; +0x50, 0x100098a10\nCBZ             X0, loc_100098A54                                      ; +0x54, 0x100098a14\nMOV             X22, X0                                                ; +0x58, 0x100098a18\nLDR             W8, [X0,#0x340]                                        ; +0x5c, 0x100098a1c\nLDR             W9, [X0,#0x344]                                        ; +0x60, 0x100098a20\nSUB             W8, W8, W9                                             ; +0x64, 0x100098a24\nCMP             W8, #9                                                 ; +0x68, 0x100098a28\nB.GT            loc_100098A54                                          ; +0x6c, 0x100098a2c\nLDR             W8, [X22,#0x2E8]                                       ; +0x70, 0x100098a30\nLDR             W9, [X22,#0x2E4]                                       ; +0x74, 0x100098a34\nSUB             W8, W8, W9                                             ; +0x78, 0x100098a38\nCMP             W8, #0x64 ; 'd'                                        ; +0x7c, 0x100098a3c\nB.NE            loc_100098A54                                          ; +0x80, 0x100098a40\nBL              GameStatsManager__sharedState                          ; +0x84, 0x100098a44\nMOV             X1, X22                                                ; +0x88, 0x100098a48\nBL              GameStatsManager__hasCompletedLevel                    ; +0x8c, 0x100098a4c\nADD             W19, W19, W0                                           ; +0x90, 0x100098a50\nCBNZ            X23, loc_1000989F8                                     ; +0x94, 0x100098a54\nB               loc_100098A60                                          ; +0x98, 0x100098a58\nMOV             W19, #0                                                ; +0x9c, 0x100098a5c\nMOV             X0, X19                                                ; +0xa0, 0x100098a60\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xa4, 0x100098a64\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xa8, 0x100098a68\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xac, 0x100098a6c\nLDP             X24, X23, [SP+0x30+var_30],#0x40                       ; +0xb0, 0x100098a70\nRET                                                                    ; +0xb4, 0x100098a74", "xrefs": ["GameLevelManager::updateUserScore @ 0x1000a21d8"], "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"}