{"type": "func", "start": 4300436128, "end": 4300436311, "name": "GameLevelManager::getCompletedGauntletDemons", "pseudocode": "// \n// GameLevelManager::getCompletedGauntletDemons from 0x1005372a0 to 0x100537357 (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::getCompletedGauntletDemons(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 == 10\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::getCompletedGauntletDemons from 0x1005372a0 to 0x100537357 (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, 0x1005372a0\nmov     rbp, rsp                                                       ; +0x1, 0x1005372a1\npush    r15                                                            ; +0x4, 0x1005372a4\npush    r14                                                            ; +0x6, 0x1005372a6\npush    r13                                                            ; +0x8, 0x1005372a8\npush    r12                                                            ; +0xa, 0x1005372aa\npush    rbx                                                            ; +0xc, 0x1005372ac\npush    rax                                                            ; +0xd, 0x1005372ad\nmov     rax, [rdi+1F0h]                                                ; +0xe, 0x1005372ae\nxor     ebx, ebx                                                       ; +0x15, 0x1005372b5\ntest    rax, rax                                                       ; +0x17, 0x1005372b7\njz      loc_100537346                                                  ; +0x1a, 0x1005372ba\nmov     r13, [rax+38h]                                                 ; +0x20, 0x1005372c0\ntest    r13, r13                                                       ; +0x24, 0x1005372c4\njz      loc_100537346                                                  ; +0x27, 0x1005372c7\nxor     ebx, ebx                                                       ; +0x2d, 0x1005372cd\nlea     r14, _ZTIN7cocos2d8CCObjectE; `typeinfo for'cocos2d::CCObject  ; +0x2f, 0x1005372cf\nlea     r15, _ZTI11GJGameLevel; `typeinfo for'GJGameLevel              ; +0x36, 0x1005372d6\njmp     short loc_1005372E5                                            ; +0x3d, 0x1005372dd\nalign 20h                                                              ; +0x3f, 0x1005372df\ntest    r13, r13                                                       ; +0x40, 0x1005372e0\njz      short loc_100537346                                            ; +0x43, 0x1005372e3\nmov     rdi, [r13+108h]; lpsrc                                         ; +0x45, 0x1005372e5\nmov     r13, [r13+120h]                                                ; +0x4c, 0x1005372ec\ntest    rdi, rdi                                                       ; +0x53, 0x1005372f3\njz      short loc_1005372E0                                            ; +0x56, 0x1005372f6\nmov     rsi, r14; lpstype                                              ; +0x58, 0x1005372f8\nmov     rdx, r15; lpdtype                                              ; +0x5b, 0x1005372fb\nxor     ecx, ecx; s2d                                                  ; +0x5e, 0x1005372fe\ncall    ___dynamic_cast                                                ; +0x60, 0x100537300\ntest    rax, rax                                                       ; +0x65, 0x100537305\njz      short loc_1005372E0                                            ; +0x68, 0x100537308\nmov     ecx, [rax+340h]                                                ; +0x6a, 0x10053730a\nsub     ecx, [rax+344h]                                                ; +0x70, 0x100537310\ncmp     ecx, 0Ah                                                       ; +0x76, 0x100537316\njnz     short loc_1005372E0                                            ; +0x79, 0x100537319\nmov     ecx, [rax+2E8h]                                                ; +0x7b, 0x10053731b\nsub     ecx, [rax+2E4h]                                                ; +0x81, 0x100537321\ncmp     ecx, 64h ; 'd'                                                 ; +0x87, 0x100537327\njnz     short loc_1005372E0                                            ; +0x8a, 0x10053732a\nmov     r12, rax                                                       ; +0x8c, 0x10053732c\ncall    GameStatsManager__sharedState                                  ; +0x8f, 0x10053732f\nmov     rdi, rax                                                       ; +0x94, 0x100537334\nmov     rsi, r12                                                       ; +0x97, 0x100537337\ncall    GameStatsManager__hasCompletedLevel                            ; +0x9a, 0x10053733a\nmovzx   eax, al                                                        ; +0x9f, 0x10053733f\nadd     ebx, eax                                                       ; +0xa2, 0x100537342\njmp     short loc_1005372E0                                            ; +0xa4, 0x100537344\nmov     eax, ebx                                                       ; +0xa6, 0x100537346\nadd     rsp, 8                                                         ; +0xa8, 0x100537348\npop     rbx                                                            ; +0xac, 0x10053734c\npop     r12                                                            ; +0xad, 0x10053734d\npop     r13                                                            ; +0xaf, 0x10053734f\npop     r14                                                            ; +0xb1, 0x100537351\npop     r15                                                            ; +0xb3, 0x100537353\npop     rbp                                                            ; +0xb5, 0x100537355\nretn                                                                   ; +0xb6, 0x100537356", "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"}