{"type": "func", "start": 5371784288, "end": 5371784511, "name": "GameStatsManager::isSecretChestUnlocked", "pseudocode": "// \n// GameStatsManager::isSecretChestUnlocked from 0x1402eec60 to 0x1402eed3f (223 bytes)\n// \n// 7 xrefs:\n// > GameStatsManager::isItemUnlocked @ 0x1402e95e8\n// > GameStatsManager::unlockSecretChest @ 0x1402eed66\n// > SecretRewardsLayer::init @ 0x140569815\n// > SecretRewardsLayer::generateChestItems @ 0x14056b880\n// > SecretRewardsLayer::onGoldChest @ 0x14056cee5\n// > SecretRewardsLayer::onGoldChest @ 0x14056cf54\n// > <???> @ 0x14091e134\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 11:29:56 +0000\n// \n\n_BOOL8 __fastcall GameStatsManager::isSecretChestUnlocked(__int64 a1)\n{\n  cocos2d::CCString *v2; // rax\n  const char *CString; // rax\n  size_t v4; // r8\n  bool v5; // bl\n  void *v6; // rcx\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int128 v9; // [rsp+40h] [rbp-28h]\n\n  v2 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);\n  CString = cocos2d::CCString::getCString(v2);\n  *(_OWORD *)Block = 0;\n  v9 = 0;\n  v4 = -1;\n  do\n    ++v4;\n  while ( CString[v4] );\n  sub_14003D230(Block, CString, v4);\n  v5 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 864), Block) != 0;\n  if ( *((_QWORD *)&v9 + 1) > 0xFu )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v9 + 1) + 1LL) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v6);\n  }\n  return v5;\n}", "assembly": "; \n; GameStatsManager::isSecretChestUnlocked from 0x1402eec60 to 0x1402eed3f (223 bytes)\n; \n; 7 xrefs:\n; > GameStatsManager::isItemUnlocked @ 0x1402e95e8\n; > GameStatsManager::unlockSecretChest @ 0x1402eed66\n; > SecretRewardsLayer::init @ 0x140569815\n; > SecretRewardsLayer::generateChestItems @ 0x14056b880\n; > SecretRewardsLayer::onGoldChest @ 0x14056cee5\n; > SecretRewardsLayer::onGoldChest @ 0x14056cf54\n; > <???> @ 0x14091e134\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 11:29:56 +0000\n; \npush    rbx                                                            ; +0x0, 0x1402eec60\nsub     rsp, 60h                                                       ; +0x2, 0x1402eec62\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1402eec66\nxor     rax, rsp                                                       ; +0xd, 0x1402eec6d\nmov     [rsp+68h+var_18], rax                                          ; +0x10, 0x1402eec70\nmov     rbx, rcx                                                       ; +0x15, 0x1402eec75\nlea     rcx, word_1406ED6F8                                            ; +0x18, 0x1402eec78\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1f, 0x1402eec7f\nmov     rcx, rax                                                       ; +0x25, 0x1402eec85\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x28, 0x1402eec88\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x1402eec8e\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x31, 0x1402eec91\nxorps   xmm1, xmm1                                                     ; +0x36, 0x1402eec96\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x39, 0x1402eec99\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x3f, 0x1402eec9f\ninc     r8                                                             ; +0x46, 0x1402eeca6\ncmp     byte ptr [rax+r8], 0                                           ; +0x49, 0x1402eeca9\njnz     short loc_1402EECA6                                            ; +0x4e, 0x1402eecae\nmov     rdx, rax                                                       ; +0x50, 0x1402eecb0\nlea     rcx, [rsp+68h+Block]                                           ; +0x53, 0x1402eecb3\ncall    sub_14003D230                                                  ; +0x58, 0x1402eecb8\nnop                                                                    ; +0x5d, 0x1402eecbd\nlea     rdx, [rsp+68h+Block]                                           ; +0x5e, 0x1402eecbe\nmov     rcx, [rbx+360h]                                                ; +0x63, 0x1402eecc3\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x6a, 0x1402eecca\ntest    rax, rax                                                       ; +0x70, 0x1402eecd0\nsetnz   bl                                                             ; +0x73, 0x1402eecd3\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0x76, 0x1402eecd6\ncmp     rdx, 0Fh                                                       ; +0x7b, 0x1402eecdb\njbe     short loc_1402EED29                                            ; +0x7f, 0x1402eecdf\ninc     rdx                                                            ; +0x81, 0x1402eece1\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x84, 0x1402eece4\nmov     rax, rcx                                                       ; +0x89, 0x1402eece9\ncmp     rdx, 1000h                                                     ; +0x8c, 0x1402eecec\njb      short loc_1402EED24                                            ; +0x93, 0x1402eecf3\nadd     rdx, 27h ; '''                                                 ; +0x95, 0x1402eecf5\nmov     rcx, [rcx-8]                                                   ; +0x99, 0x1402eecf9\nsub     rax, rcx                                                       ; +0x9d, 0x1402eecfd\nsub     rax, 8                                                         ; +0xa0, 0x1402eed00\ncmp     rax, 1Fh                                                       ; +0xa4, 0x1402eed04\njbe     short loc_1402EED24                                            ; +0xa8, 0x1402eed08\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xaa, 0x1402eed0a\nxor     r9d, r9d; LineNo                                               ; +0xb3, 0x1402eed13\nxor     r8d, r8d; FileName                                             ; +0xb6, 0x1402eed16\nxor     edx, edx; FunctionName                                         ; +0xb9, 0x1402eed19\nxor     ecx, ecx; Expression                                           ; +0xbb, 0x1402eed1b\ncall    cs:_invoke_watson                                              ; +0xbd, 0x1402eed1d\nalign 4                                                                ; +0xc3, 0x1402eed23\ncall    j_j_free                                                       ; +0xc4, 0x1402eed24\nmovzx   eax, bl                                                        ; +0xc9, 0x1402eed29\nmov     rcx, [rsp+68h+var_18]                                          ; +0xcc, 0x1402eed2c\nxor     rcx, rsp; StackCookie                                          ; +0xd1, 0x1402eed31\ncall    __security_check_cookie                                        ; +0xd4, 0x1402eed34\nadd     rsp, 60h                                                       ; +0xd9, 0x1402eed39\npop     rbx                                                            ; +0xdd, 0x1402eed3d\nretn                                                                   ; +0xde, 0x1402eed3e", "xrefs": ["GameStatsManager::isItemUnlocked @ 0x1402e95e8", "GameStatsManager::unlockSecretChest @ 0x1402eed66", "SecretRewardsLayer::init @ 0x140569815", "SecretRewardsLayer::generateChestItems @ 0x14056b880", "SecretRewardsLayer::onGoldChest @ 0x14056cee5", "SecretRewardsLayer::onGoldChest @ 0x14056cf54", "<???> @ 0x14091e134"], "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"}