{"type": "func", "start": 4299017388, "end": 4299017456, "name": "GameStatsManager::countSecretChests", "pseudocode": "// \n// GameStatsManager::countSecretChests from 0x1003dccac to 0x1003dccf0 (68 bytes)\n// \n// 4 xrefs:\n// > SecretRewardsLayer::init @ 0x100383e50\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x100384d04\n// > SecretRewardsLayer::updateUnlockedLabel @ 0x100384d54\n// > sub_1003850CC @ 0x1003850fc\n// \n// This function is hookable on this platform (idp: arm, 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 11:04:19 +0000\n// \n\n__int64 __fastcall GameStatsManager::countSecretChests(__int64 a1, int a2)\n{\n  __int64 result; // x0\n  __int64 v3; // x8\n  __int64 v4; // x9\n\n  result = *(_QWORD *)(a1 + 344);\n  if ( !a2 )\n    return cocos2d::CCDictionary::count(result);\n  if ( result )\n  {\n    v3 = *(_QWORD *)(result + 56);\n    if ( v3 )\n    {\n      LODWORD(result) = 0;\n      do\n      {\n        v4 = *(_QWORD *)(v3 + 288);\n        if ( *(_DWORD *)(*(_QWORD *)(v3 + 264) + 64LL) == a2 )\n          result = (unsigned int)(result + 1);\n        else\n          result = (unsigned int)result;\n        v3 = *(_QWORD *)(v3 + 288);\n      }\n      while ( v4 );\n    }\n    else\n    {\n      return 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; GameStatsManager::countSecretChests from 0x1003dccac to 0x1003dccf0 (68 bytes)\n; \n; 4 xrefs:\n; > SecretRewardsLayer::init @ 0x100383e50\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x100384d04\n; > SecretRewardsLayer::updateUnlockedLabel @ 0x100384d54\n; > sub_1003850CC @ 0x1003850fc\n; \n; This function is hookable on this platform (idp: arm, 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 11:04:19 +0000\n; \nLDR             X0, [X0,#0x158]                                        ; +0x0, 0x1003dccac\nCBZ             W1, loc_1003DCCE4                                      ; +0x4, 0x1003dccb0\nCBZ             X0, locret_1003DCCE0                                   ; +0x8, 0x1003dccb4\nLDR             X8, [X0,#0x38]                                         ; +0xc, 0x1003dccb8\nCBZ             X8, loc_1003DCCE8                                      ; +0x10, 0x1003dccbc\nMOV             W0, #0                                                 ; +0x14, 0x1003dccc0\nLDR             X9, [X8,#0x120]                                        ; +0x18, 0x1003dccc4\nLDR             X8, [X8,#0x108]                                        ; +0x1c, 0x1003dccc8\nLDR             W8, [X8,#0x40]                                         ; +0x20, 0x1003dcccc\nCMP             W8, W1                                                 ; +0x24, 0x1003dccd0\nCINC            W0, W0, EQ                                             ; +0x28, 0x1003dccd4\nMOV             X8, X9                                                 ; +0x2c, 0x1003dccd8\nCBNZ            X9, loc_1003DCCC4                                      ; +0x30, 0x1003dccdc\nRET                                                                    ; +0x34, 0x1003dcce0\nB               cocos2d__CCDictionary__count                           ; +0x38, 0x1003dcce4\nMOV             W0, #0                                                 ; +0x3c, 0x1003dcce8\nRET                                                                    ; +0x40, 0x1003dccec", "xrefs": ["SecretRewardsLayer::init @ 0x100383e50", "SecretRewardsLayer::updateUnlockedLabel @ 0x100384d04", "SecretRewardsLayer::updateUnlockedLabel @ 0x100384d54", "sub_1003850CC @ 0x1003850fc"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}