{"type": "func", "start": 4300436320, "end": 4300436503, "name": "GameLevelManager::getCompletedGauntletLevels", "pseudocode": "// \n// GameLevelManager::getCompletedGauntletLevels from 0x100537360 to 0x100537417 (183 bytes)\n// \n// 0 xrefs:\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; // rax\n  int v2; // ebx\n  cocos2d::CCDictElement *m_pElements; // r13\n  cocos2d::CCObject *m_pObject; // rdi\n  GJGameLevel *v5; // rax\n  GJGameLevel *v6; // r12\n  GameStatsManager *v7; // rax\n\n  m_gauntletLevels = a1->m_gauntletLevels;\n  v2 = 0;\n  if ( m_gauntletLevels )\n  {\n    m_pElements = m_gauntletLevels->m_pElements;\n    if ( m_pElements )\n    {\n      v2 = 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            if ( v5->m_stars.random - v5->m_stars.seed <= 9\n              && v5->m_normalPercent.random - v5->m_normalPercent.seed == 100 )\n            {\n              v6 = v5;\n              v7 = GameStatsManager::sharedState();\n              v2 += GameStatsManager::hasCompletedLevel(v7, v6);\n            }\n          }\n        }\n      }\n      while ( m_pElements );\n    }\n  }\n  return v2;\n}", "assembly": "; \n; GameLevelManager::getCompletedGauntletLevels from 0x100537360 to 0x100537417 (183 bytes)\n; \n; 0 xrefs:\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\npush    rbp                                                            ; +0x0, 0x100537360\nmov     rbp, rsp                                                       ; +0x1, 0x100537361\npush    r15                                                            ; +0x4, 0x100537364\npush    r14                                                            ; +0x6, 0x100537366\npush    r13                                                            ; +0x8, 0x100537368\npush    r12                                                            ; +0xa, 0x10053736a\npush    rbx                                                            ; +0xc, 0x10053736c\npush    rax                                                            ; +0xd, 0x10053736d\nmov     rax, [rdi+1F0h]                                                ; +0xe, 0x10053736e\nxor     ebx, ebx                                                       ; +0x15, 0x100537375\ntest    rax, rax                                                       ; +0x17, 0x100537377\njz      loc_100537406                                                  ; +0x1a, 0x10053737a\nmov     r13, [rax+38h]                                                 ; +0x20, 0x100537380\ntest    r13, r13                                                       ; +0x24, 0x100537384\njz      loc_100537406                                                  ; +0x27, 0x100537387\nxor     ebx, ebx                                                       ; +0x2d, 0x10053738d\nlea     r14, _ZTIN7cocos2d8CCObjectE; `typeinfo for'cocos2d::CCObject  ; +0x2f, 0x10053738f\nlea     r15, _ZTI11GJGameLevel; `typeinfo for'GJGameLevel              ; +0x36, 0x100537396\njmp     short loc_1005373A5                                            ; +0x3d, 0x10053739d\nalign 20h                                                              ; +0x3f, 0x10053739f\ntest    r13, r13                                                       ; +0x40, 0x1005373a0\njz      short loc_100537406                                            ; +0x43, 0x1005373a3\nmov     rdi, [r13+108h]; lpsrc                                         ; +0x45, 0x1005373a5\nmov     r13, [r13+120h]                                                ; +0x4c, 0x1005373ac\ntest    rdi, rdi                                                       ; +0x53, 0x1005373b3\njz      short loc_1005373A0                                            ; +0x56, 0x1005373b6\nmov     rsi, r14; lpstype                                              ; +0x58, 0x1005373b8\nmov     rdx, r15; lpdtype                                              ; +0x5b, 0x1005373bb\nxor     ecx, ecx; s2d                                                  ; +0x5e, 0x1005373be\ncall    ___dynamic_cast                                                ; +0x60, 0x1005373c0\ntest    rax, rax                                                       ; +0x65, 0x1005373c5\njz      short loc_1005373A0                                            ; +0x68, 0x1005373c8\nmov     ecx, [rax+340h]                                                ; +0x6a, 0x1005373ca\nsub     ecx, [rax+344h]                                                ; +0x70, 0x1005373d0\ncmp     ecx, 9                                                         ; +0x76, 0x1005373d6\njg      short loc_1005373A0                                            ; +0x79, 0x1005373d9\nmov     ecx, [rax+2E8h]                                                ; +0x7b, 0x1005373db\nsub     ecx, [rax+2E4h]                                                ; +0x81, 0x1005373e1\ncmp     ecx, 64h ; 'd'                                                 ; +0x87, 0x1005373e7\njnz     short loc_1005373A0                                            ; +0x8a, 0x1005373ea\nmov     r12, rax                                                       ; +0x8c, 0x1005373ec\ncall    GameStatsManager__sharedState                                  ; +0x8f, 0x1005373ef\nmov     rdi, rax                                                       ; +0x94, 0x1005373f4\nmov     rsi, r12                                                       ; +0x97, 0x1005373f7\ncall    GameStatsManager__hasCompletedLevel                            ; +0x9a, 0x1005373fa\nmovzx   eax, al                                                        ; +0x9f, 0x1005373ff\nadd     ebx, eax                                                       ; +0xa2, 0x100537402\njmp     short loc_1005373A0                                            ; +0xa4, 0x100537404\nmov     eax, ebx                                                       ; +0xa6, 0x100537406\nadd     rsp, 8                                                         ; +0xa8, 0x100537408\npop     rbx                                                            ; +0xac, 0x10053740c\npop     r12                                                            ; +0xad, 0x10053740d\npop     r13                                                            ; +0xaf, 0x10053740f\npop     r14                                                            ; +0xb1, 0x100537411\npop     r15                                                            ; +0xb3, 0x100537413\npop     rbp                                                            ; +0xb5, 0x100537415\nretn                                                                   ; +0xb6, 0x100537416", "xrefs": [], "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"}