{"type": "func", "start": 4295541904, "end": 4295541984, "name": "GameStatsManager::countUnlockedSecretChests", "pseudocode": "// \n// GameStatsManager::countUnlockedSecretChests from 0x10008c490 to 0x10008c4e0 (80 bytes)\n// \n// 4 xrefs:\n// > SecretRewardsLayer::init @ 0x100631146\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x10063226e\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x1006322d1\n// > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x10063278f\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 GameStatsManager::countUnlockedSecretChests(GameStatsManager *a1, GJRewardType a2)\n{\n  cocos2d::CCDictionary *m_treasureRoomChests; // rdi\n  int result; // eax\n  cocos2d::CCDictElement *m_pElements; // rcx\n  cocos2d::CCObject *m_pObject; // rdx\n\n  m_treasureRoomChests = a1->m_treasureRoomChests;\n  if ( !a2 )\n    return cocos2d::CCDictionary::count(m_treasureRoomChests);\n  result = 0;\n  if ( m_treasureRoomChests )\n  {\n    m_pElements = m_treasureRoomChests->m_pElements;\n    if ( m_pElements )\n    {\n      result = 0;\n      do\n      {\n        m_pObject = m_pElements->m_pObject;\n        m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;\n        result += m_pObject[1].m_uID == a2;\n      }\n      while ( m_pElements );\n    }\n  }\n  return result;\n}", "assembly": "; \n; GameStatsManager::countUnlockedSecretChests from 0x10008c490 to 0x10008c4e0 (80 bytes)\n; \n; 4 xrefs:\n; > SecretRewardsLayer::init @ 0x100631146\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x10063226e\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x1006322d1\n; > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x10063278f\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\nmov     rdi, [rdi+2F0h]                                                ; +0x0, 0x10008c490\ntest    esi, esi                                                       ; +0x7, 0x10008c497\njz      cocos2d__CCDictionary__count                                   ; +0x9, 0x10008c499\nxor     eax, eax                                                       ; +0xf, 0x10008c49f\ntest    rdi, rdi                                                       ; +0x11, 0x10008c4a1\njz      short locret_10008C4DF                                         ; +0x14, 0x10008c4a4\npush    rbp                                                            ; +0x16, 0x10008c4a6\nmov     rbp, rsp                                                       ; +0x17, 0x10008c4a7\nmov     rcx, [rdi+38h]                                                 ; +0x1a, 0x10008c4aa\ntest    rcx, rcx                                                       ; +0x1e, 0x10008c4ae\njz      short loc_10008C4DE                                            ; +0x21, 0x10008c4b1\nxor     eax, eax                                                       ; +0x23, 0x10008c4b3\nnop     word ptr [rax+rax+00000000h]                                   ; +0x25, 0x10008c4b5\nmov     rdx, [rcx+108h]                                                ; +0x30, 0x10008c4c0\nxor     edi, edi                                                       ; +0x37, 0x10008c4c7\ncmp     [rdx+40h], esi                                                 ; +0x39, 0x10008c4c9\nmov     rcx, [rcx+120h]                                                ; +0x3c, 0x10008c4cc\nsetz    dil                                                            ; +0x43, 0x10008c4d3\nadd     eax, edi                                                       ; +0x47, 0x10008c4d7\ntest    rcx, rcx                                                       ; +0x49, 0x10008c4d9\njnz     short loc_10008C4C0                                            ; +0x4c, 0x10008c4dc\npop     rbp                                                            ; +0x4e, 0x10008c4de\nretn                                                                   ; +0x4f, 0x10008c4df", "xrefs": ["SecretRewardsLayer::init @ 0x100631146", "SecretRewardsLayer::updateUnlockedLabel @ 0x10063226e", "SecretRewardsLayer::updateUnlockedLabel @ 0x1006322d1", "SecretRewardsLayer::updateUnlockedGoldLabel @ 0x10063278f"], "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"}