{"type": "func", "start": 5371737648, "end": 5371737846, "name": "GameStatsManager::hasUserCoin", "pseudocode": "// \n// GameStatsManager::hasUserCoin from 0x1402e3630 to 0x1402e36f6 (198 bytes)\n// \n// 10 xrefs:\n// > LevelCell::loadCustomLevelCell @ 0x14014b5db\n// > EndLevelLayer::customSetup @ 0x140205520\n// > GameLevelManager::updateLevelRewards @ 0x14021dfd4\n// > GameLevelManager::getLevelLeaderboard @ 0x140238be0\n// > GameStatsManager::dataLoaded @ 0x1402f771d\n// > GJBaseGameLayer::processItems @ 0x14031d900\n// > GJBaseGameLayer::hasUniqueCoin @ 0x14031dd94\n// > LevelInfoLayer::updateLabelValues @ 0x140425d83\n// > PauseLayer::customSetup @ 0x1404d846b\n// > <???> @ 0x14091def4\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:49 +0000\n// \n\n_BOOL8 __fastcall GameStatsManager::hasUserCoin(__int64 a1, _BYTE *a2)\n{\n  size_t v3; // r8\n  bool v4; // bl\n  void *v5; // rcx\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int128 v8; // [rsp+40h] [rbp-28h]\n\n  *(_OWORD *)Block = 0;\n  v8 = 0;\n  v3 = -1;\n  do\n    ++v3;\n  while ( a2[v3] );\n  sub_14003D230(Block, a2, v3);\n  v4 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 720), Block) != 0;\n  if ( *((_QWORD *)&v8 + 1) > 0xFu )\n  {\n    v5 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v8 + 1) + 1LL) >= 0x1000 )\n    {\n      v5 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v5);\n  }\n  return v4;\n}", "assembly": "; \n; GameStatsManager::hasUserCoin from 0x1402e3630 to 0x1402e36f6 (198 bytes)\n; \n; 10 xrefs:\n; > LevelCell::loadCustomLevelCell @ 0x14014b5db\n; > EndLevelLayer::customSetup @ 0x140205520\n; > GameLevelManager::updateLevelRewards @ 0x14021dfd4\n; > GameLevelManager::getLevelLeaderboard @ 0x140238be0\n; > GameStatsManager::dataLoaded @ 0x1402f771d\n; > GJBaseGameLayer::processItems @ 0x14031d900\n; > GJBaseGameLayer::hasUniqueCoin @ 0x14031dd94\n; > LevelInfoLayer::updateLabelValues @ 0x140425d83\n; > PauseLayer::customSetup @ 0x1404d846b\n; > <???> @ 0x14091def4\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:49 +0000\n; \npush    rbx                                                            ; +0x0, 0x1402e3630\nsub     rsp, 60h                                                       ; +0x2, 0x1402e3632\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1402e3636\nxor     rax, rsp                                                       ; +0xd, 0x1402e363d\nmov     [rsp+68h+var_18], rax                                          ; +0x10, 0x1402e3640\nmov     rbx, rcx                                                       ; +0x15, 0x1402e3645\nxorps   xmm0, xmm0                                                     ; +0x18, 0x1402e3648\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x1b, 0x1402e364b\nxorps   xmm1, xmm1                                                     ; +0x20, 0x1402e3650\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x23, 0x1402e3653\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x29, 0x1402e3659\ninc     r8                                                             ; +0x30, 0x1402e3660\ncmp     byte ptr [rdx+r8], 0                                           ; +0x33, 0x1402e3663\njnz     short loc_1402E3660                                            ; +0x38, 0x1402e3668\nlea     rcx, [rsp+68h+Block]                                           ; +0x3a, 0x1402e366a\ncall    sub_14003D230                                                  ; +0x3f, 0x1402e366f\nnop                                                                    ; +0x44, 0x1402e3674\nlea     rdx, [rsp+68h+Block]                                           ; +0x45, 0x1402e3675\nmov     rcx, [rbx+2D0h]                                                ; +0x4a, 0x1402e367a\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 &) ; +0x51, 0x1402e3681\ntest    rax, rax                                                       ; +0x57, 0x1402e3687\nsetnz   bl                                                             ; +0x5a, 0x1402e368a\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0x5d, 0x1402e368d\ncmp     rdx, 0Fh                                                       ; +0x62, 0x1402e3692\njbe     short loc_1402E36E0                                            ; +0x66, 0x1402e3696\ninc     rdx                                                            ; +0x68, 0x1402e3698\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x6b, 0x1402e369b\nmov     rax, rcx                                                       ; +0x70, 0x1402e36a0\ncmp     rdx, 1000h                                                     ; +0x73, 0x1402e36a3\njb      short loc_1402E36DB                                            ; +0x7a, 0x1402e36aa\nadd     rdx, 27h ; '''                                                 ; +0x7c, 0x1402e36ac\nmov     rcx, [rcx-8]                                                   ; +0x80, 0x1402e36b0\nsub     rax, rcx                                                       ; +0x84, 0x1402e36b4\nsub     rax, 8                                                         ; +0x87, 0x1402e36b7\ncmp     rax, 1Fh                                                       ; +0x8b, 0x1402e36bb\njbe     short loc_1402E36DB                                            ; +0x8f, 0x1402e36bf\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x91, 0x1402e36c1\nxor     r9d, r9d; LineNo                                               ; +0x9a, 0x1402e36ca\nxor     r8d, r8d; FileName                                             ; +0x9d, 0x1402e36cd\nxor     edx, edx; FunctionName                                         ; +0xa0, 0x1402e36d0\nxor     ecx, ecx; Expression                                           ; +0xa2, 0x1402e36d2\ncall    cs:_invoke_watson                                              ; +0xa4, 0x1402e36d4\ndb 0CCh                                                                ; +0xaa, 0x1402e36da\ncall    j_j_free                                                       ; +0xab, 0x1402e36db\nmovzx   eax, bl                                                        ; +0xb0, 0x1402e36e0\nmov     rcx, [rsp+68h+var_18]                                          ; +0xb3, 0x1402e36e3\nxor     rcx, rsp; StackCookie                                          ; +0xb8, 0x1402e36e8\ncall    __security_check_cookie                                        ; +0xbb, 0x1402e36eb\nadd     rsp, 60h                                                       ; +0xc0, 0x1402e36f0\npop     rbx                                                            ; +0xc4, 0x1402e36f4\nretn                                                                   ; +0xc5, 0x1402e36f5", "xrefs": ["LevelCell::loadCustomLevelCell @ 0x14014b5db", "EndLevelLayer::customSetup @ 0x140205520", "GameLevelManager::updateLevelRewards @ 0x14021dfd4", "GameLevelManager::getLevelLeaderboard @ 0x140238be0", "GameStatsManager::dataLoaded @ 0x1402f771d", "GJBaseGameLayer::processItems @ 0x14031d900", "GJBaseGameLayer::hasUniqueCoin @ 0x14031dd94", "LevelInfoLayer::updateLabelValues @ 0x140425d83", "PauseLayer::customSetup @ 0x1404d846b", "<???> @ 0x14091def4"], "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"}