{"type": "func", "start": 4295541824, "end": 4295541904, "name": "GameStatsManager::countSecretChests", "pseudocode": "// \n// GameStatsManager::countSecretChests from 0x10008c440 to 0x10008c490 (80 bytes)\n// \n// 4 xrefs:\n// > SecretRewardsLayer::init @ 0x10063115d\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x100632280\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x1006322e7\n// > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x1006327a4\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; // rdi\n  int result; // eax\n  cocos2d::CCDictElement *m_pElements; // rcx\n  cocos2d::CCObject *m_pObject; // rdx\n\n  m_allTreasureRoomChests = a1->m_allTreasureRoomChests;\n  if ( !a2 )\n    return cocos2d::CCDictionary::count(m_allTreasureRoomChests);\n  result = 0;\n  if ( m_allTreasureRoomChests )\n  {\n    m_pElements = m_allTreasureRoomChests->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::countSecretChests from 0x10008c440 to 0x10008c490 (80 bytes)\n; \n; 4 xrefs:\n; > SecretRewardsLayer::init @ 0x10063115d\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x100632280\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x1006322e7\n; > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x1006327a4\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+158h]                                                ; +0x0, 0x10008c440\ntest    esi, esi                                                       ; +0x7, 0x10008c447\njz      cocos2d__CCDictionary__count                                   ; +0x9, 0x10008c449\nxor     eax, eax                                                       ; +0xf, 0x10008c44f\ntest    rdi, rdi                                                       ; +0x11, 0x10008c451\njz      short locret_10008C48F                                         ; +0x14, 0x10008c454\npush    rbp                                                            ; +0x16, 0x10008c456\nmov     rbp, rsp                                                       ; +0x17, 0x10008c457\nmov     rcx, [rdi+38h]                                                 ; +0x1a, 0x10008c45a\ntest    rcx, rcx                                                       ; +0x1e, 0x10008c45e\njz      short loc_10008C48E                                            ; +0x21, 0x10008c461\nxor     eax, eax                                                       ; +0x23, 0x10008c463\nnop     word ptr [rax+rax+00000000h]                                   ; +0x25, 0x10008c465\nmov     rdx, [rcx+108h]                                                ; +0x30, 0x10008c470\nxor     edi, edi                                                       ; +0x37, 0x10008c477\ncmp     [rdx+40h], esi                                                 ; +0x39, 0x10008c479\nmov     rcx, [rcx+120h]                                                ; +0x3c, 0x10008c47c\nsetz    dil                                                            ; +0x43, 0x10008c483\nadd     eax, edi                                                       ; +0x47, 0x10008c487\ntest    rcx, rcx                                                       ; +0x49, 0x10008c489\njnz     short loc_10008C470                                            ; +0x4c, 0x10008c48c\npop     rbp                                                            ; +0x4e, 0x10008c48e\nretn                                                                   ; +0x4f, 0x10008c48f", "xrefs": ["SecretRewardsLayer::init @ 0x10063115d", "SecretRewardsLayer::updateUnlockedLabel @ 0x100632280", "SecretRewardsLayer::updateUnlockedLabel @ 0x1006322e7", "SecretRewardsLayer::updateUnlockedGoldLabel @ 0x1006327a4"], "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"}