{"type": "func", "start": 4295306928, "end": 4295307008, "name": "GameStatsManager::countSecretChests", "pseudocode": "// \n// GameStatsManager::countSecretChests from 0x100052eb0 to 0x100052f00 (80 bytes)\n// \n// 4 xrefs:\n// > SecretRewardsLayer::init @ 0x10070dd8d\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x10070eeb0\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x10070ef17\n// > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x10070f3d4\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:19:35 +0000\n// \n\n__int64 __fastcall GameStatsManager::countSecretChests(__int64 a1, int a2)\n{\n  __int64 v2; // rdi\n  __int64 result; // rax\n  __int64 v4; // rcx\n  __int64 v5; // rdx\n\n  v2 = *(_QWORD *)(a1 + 344);\n  if ( !a2 )\n    return cocos2d::CCDictionary::count(v2);\n  result = 0;\n  if ( v2 )\n  {\n    v4 = *(_QWORD *)(v2 + 56);\n    if ( v4 )\n    {\n      LODWORD(result) = 0;\n      do\n      {\n        v5 = *(_QWORD *)(v4 + 264);\n        v4 = *(_QWORD *)(v4 + 288);\n        result = (*(_DWORD *)(v5 + 64) == a2) + (unsigned int)result;\n      }\n      while ( v4 );\n    }\n  }\n  return result;\n}", "assembly": "; \n; GameStatsManager::countSecretChests from 0x100052eb0 to 0x100052f00 (80 bytes)\n; \n; 4 xrefs:\n; > SecretRewardsLayer::init @ 0x10070dd8d\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x10070eeb0\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x10070ef17\n; > SecretRewardsLayer::updateUnlockedGoldLabel @ 0x10070f3d4\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:19:35 +0000\n; \nmov     rdi, [rdi+158h]                                                ; +0x0, 0x100052eb0\ntest    esi, esi                                                       ; +0x7, 0x100052eb7\njz      cocos2d__CCDictionary__count                                   ; +0x9, 0x100052eb9\nxor     eax, eax                                                       ; +0xf, 0x100052ebf\ntest    rdi, rdi                                                       ; +0x11, 0x100052ec1\njz      short locret_100052EFF                                         ; +0x14, 0x100052ec4\npush    rbp                                                            ; +0x16, 0x100052ec6\nmov     rbp, rsp                                                       ; +0x17, 0x100052ec7\nmov     rcx, [rdi+38h]                                                 ; +0x1a, 0x100052eca\ntest    rcx, rcx                                                       ; +0x1e, 0x100052ece\njz      short loc_100052EFE                                            ; +0x21, 0x100052ed1\nxor     eax, eax                                                       ; +0x23, 0x100052ed3\nnop     word ptr [rax+rax+00000000h]                                   ; +0x25, 0x100052ed5\nmov     rdx, [rcx+108h]                                                ; +0x30, 0x100052ee0\nxor     edi, edi                                                       ; +0x37, 0x100052ee7\ncmp     [rdx+40h], esi                                                 ; +0x39, 0x100052ee9\nmov     rcx, [rcx+120h]                                                ; +0x3c, 0x100052eec\nsetz    dil                                                            ; +0x43, 0x100052ef3\nadd     eax, edi                                                       ; +0x47, 0x100052ef7\ntest    rcx, rcx                                                       ; +0x49, 0x100052ef9\njnz     short loc_100052EE0                                            ; +0x4c, 0x100052efc\npop     rbp                                                            ; +0x4e, 0x100052efe\nretn                                                                   ; +0x4f, 0x100052eff", "xrefs": ["SecretRewardsLayer::init @ 0x10070dd8d", "SecretRewardsLayer::updateUnlockedLabel @ 0x10070eeb0", "SecretRewardsLayer::updateUnlockedLabel @ 0x10070ef17", "SecretRewardsLayer::updateUnlockedGoldLabel @ 0x10070f3d4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}