{"type": "func", "start": 4298367572, "end": 4298367640, "name": "GameStatsManager::countSecretChests", "pseudocode": "// \n// GameStatsManager::countSecretChests from 0x10033e254 to 0x10033e298 (68 bytes)\n// \n// 4 xrefs:\n// > SecretRewardsLayer::init @ 0x1002e8cc8\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x1002e9b7c\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x1002e9bcc\n// > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x1002e9f74\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::countSecretChests(GameStatsManager *a1, GJRewardType a2)\n{\n  cocos2d::CCDictionary *m_allTreasureRoomChests; // x0\n  cocos2d::CCDictElement *m_pElements; // x8\n  void *next; // x9\n\n  m_allTreasureRoomChests = a1->m_allTreasureRoomChests;\n  if ( a2 )\n  {\n    if ( m_allTreasureRoomChests )\n    {\n      m_pElements = m_allTreasureRoomChests->m_pElements;\n      if ( m_pElements )\n      {\n        LODWORD(m_allTreasureRoomChests) = 0;\n        do\n        {\n          next = m_pElements->hh.next;\n          if ( m_pElements->m_pObject[1].m_uID == a2 )\n            LODWORD(m_allTreasureRoomChests) = (_DWORD)m_allTreasureRoomChests + 1;\n          m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;\n        }\n        while ( next );\n      }\n      else\n      {\n        LODWORD(m_allTreasureRoomChests) = 0;\n      }\n    }\n  }\n  else\n  {\n    LODWORD(m_allTreasureRoomChests) = cocos2d::CCDictionary::count(m_allTreasureRoomChests);\n  }\n  return (int)m_allTreasureRoomChests;\n}", "assembly": "; \n; GameStatsManager::countSecretChests from 0x10033e254 to 0x10033e298 (68 bytes)\n; \n; 4 xrefs:\n; > SecretRewardsLayer::init @ 0x1002e8cc8\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x1002e9b7c\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x1002e9bcc\n; > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x1002e9f74\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\nLDR             X0, [X0,#0x158]                                        ; +0x0, 0x10033e254\nCBZ             W1, loc_10033E28C                                      ; +0x4, 0x10033e258\nCBZ             X0, locret_10033E288                                   ; +0x8, 0x10033e25c\nLDR             X8, [X0,#0x38]                                         ; +0xc, 0x10033e260\nCBZ             X8, loc_10033E290                                      ; +0x10, 0x10033e264\nMOV             W0, #0                                                 ; +0x14, 0x10033e268\nLDR             X9, [X8,#0x120]                                        ; +0x18, 0x10033e26c\nLDR             X8, [X8,#0x108]                                        ; +0x1c, 0x10033e270\nLDR             W8, [X8,#0x40]                                         ; +0x20, 0x10033e274\nCMP             W8, W1                                                 ; +0x24, 0x10033e278\nCINC            W0, W0, EQ                                             ; +0x28, 0x10033e27c\nMOV             X8, X9                                                 ; +0x2c, 0x10033e280\nCBNZ            X9, loc_10033E26C                                      ; +0x30, 0x10033e284\nRET                                                                    ; +0x34, 0x10033e288\nB               cocos2d__CCDictionary__count                           ; +0x38, 0x10033e28c\nMOV             W0, #0                                                 ; +0x3c, 0x10033e290\nRET                                                                    ; +0x40, 0x10033e294", "xrefs": ["SecretRewardsLayer::init @ 0x1002e8cc8", "SecretRewardsLayer::updateUnlockedLabel @ 0x1002e9b7c", "SecretRewardsLayer::updateUnlockedLabel @ 0x1002e9bcc", "SecretRewardsLayer::updateUnlockedGoldLabel @ 0x1002e9f74"], "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"}