{"type": "func", "start": 5370674400, "end": 5370674579, "name": "GameStatsManager::hasUserCoin", "pseudocode": "// \n// GameStatsManager::hasUserCoin from 0x1401dfce0 to 0x1401dfd93 (179 bytes)\n// \n// 9 xrefs:\n// > LevelCell::loadCustomLevelCell @ 0x1400afd93\n// > EndLevelLayer::customSetup @ 0x1401343ed\n// > GameLevelManager::updateLevelRewards @ 0x140146598\n// > GameLevelManager::getLevelLeaderboard @ 0x14015846c\n// > GameStatsManager::dataLoaded @ 0x1401f2a8d\n// > GJBaseGameLayer::processItems @ 0x14021641f\n// > GJBaseGameLayer::hasUniqueCoin @ 0x140216860\n// > LevelInfoLayer::updateLabelValues @ 0x140300063\n// > <???> @ 0x1406cc48c\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\nbool GameStatsManager::hasUserCoin(GameStatsManager *a1, const char *a2)\n{\n  size_t v3; // r8\n  bool v4; // bl\n  void *v5; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v8; // [rsp+30h] [rbp-28h]\n\n  *(_OWORD *)Block = 0;\n  v8 = 0;\n  v3 = -1;\n  do\n    ++v3;\n  while ( a2[v3] );\n  sub_14003A930(Block, a2, v3);\n  v4 = cocos2d::CCDictionary::objectForKey(a1->m_verifiedUserCoins, 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        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v5);\n  }\n  return v4;\n}", "assembly": "; \n; GameStatsManager::hasUserCoin from 0x1401dfce0 to 0x1401dfd93 (179 bytes)\n; \n; 9 xrefs:\n; > LevelCell::loadCustomLevelCell @ 0x1400afd93\n; > EndLevelLayer::customSetup @ 0x1401343ed\n; > GameLevelManager::updateLevelRewards @ 0x140146598\n; > GameLevelManager::getLevelLeaderboard @ 0x14015846c\n; > GameStatsManager::dataLoaded @ 0x1401f2a8d\n; > GJBaseGameLayer::processItems @ 0x14021641f\n; > GJBaseGameLayer::hasUniqueCoin @ 0x140216860\n; > LevelInfoLayer::updateLabelValues @ 0x140300063\n; > <???> @ 0x1406cc48c\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\npush    rbx                                                            ; +0x0, 0x1401dfce0\nsub     rsp, 50h                                                       ; +0x2, 0x1401dfce2\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1401dfce6\nxor     rax, rsp                                                       ; +0xd, 0x1401dfced\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x1401dfcf0\nmov     rbx, rcx                                                       ; +0x15, 0x1401dfcf5\nxorps   xmm0, xmm0                                                     ; +0x18, 0x1401dfcf8\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x1b, 0x1401dfcfb\nxorps   xmm1, xmm1                                                     ; +0x20, 0x1401dfd00\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x23, 0x1401dfd03\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x29, 0x1401dfd09\ninc     r8                                                             ; +0x30, 0x1401dfd10\ncmp     byte ptr [rdx+r8], 0                                           ; +0x33, 0x1401dfd13\njnz     short loc_1401DFD10                                            ; +0x38, 0x1401dfd18\nlea     rcx, [rsp+58h+Block]                                           ; +0x3a, 0x1401dfd1a\ncall    sub_14003A930                                                  ; +0x3f, 0x1401dfd1f\nnop                                                                    ; +0x44, 0x1401dfd24\nlea     rdx, [rsp+58h+Block]                                           ; +0x45, 0x1401dfd25\nmov     rcx, [rbx+2D0h]                                                ; +0x4a, 0x1401dfd2a\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, 0x1401dfd31\ntest    rax, rax                                                       ; +0x57, 0x1401dfd37\nsetnz   bl                                                             ; +0x5a, 0x1401dfd3a\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x5d, 0x1401dfd3d\ncmp     rdx, 0Fh                                                       ; +0x62, 0x1401dfd42\njbe     short loc_1401DFD7D                                            ; +0x66, 0x1401dfd46\ninc     rdx                                                            ; +0x68, 0x1401dfd48\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x6b, 0x1401dfd4b\nmov     rax, rcx                                                       ; +0x70, 0x1401dfd50\ncmp     rdx, 1000h                                                     ; +0x73, 0x1401dfd53\njb      short loc_1401DFD78                                            ; +0x7a, 0x1401dfd5a\nadd     rdx, 27h ; '''                                                 ; +0x7c, 0x1401dfd5c\nmov     rcx, [rcx-8]                                                   ; +0x80, 0x1401dfd60\nsub     rax, rcx                                                       ; +0x84, 0x1401dfd64\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x87, 0x1401dfd67\ncmp     rax, 1Fh                                                       ; +0x8b, 0x1401dfd6b\njbe     short loc_1401DFD78                                            ; +0x8f, 0x1401dfd6f\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x91, 0x1401dfd71\nalign 8                                                                ; +0x97, 0x1401dfd77\ncall    j_j_free                                                       ; +0x98, 0x1401dfd78\nmovzx   eax, bl                                                        ; +0x9d, 0x1401dfd7d\nmov     rcx, [rsp+58h+var_18]                                          ; +0xa0, 0x1401dfd80\nxor     rcx, rsp; StackCookie                                          ; +0xa5, 0x1401dfd85\ncall    __security_check_cookie                                        ; +0xa8, 0x1401dfd88\nadd     rsp, 50h                                                       ; +0xad, 0x1401dfd8d\npop     rbx                                                            ; +0xb1, 0x1401dfd91\nretn                                                                   ; +0xb2, 0x1401dfd92", "xrefs": ["LevelCell::loadCustomLevelCell @ 0x1400afd93", "EndLevelLayer::customSetup @ 0x1401343ed", "GameLevelManager::updateLevelRewards @ 0x140146598", "GameLevelManager::getLevelLeaderboard @ 0x14015846c", "GameStatsManager::dataLoaded @ 0x1401f2a8d", "GJBaseGameLayer::processItems @ 0x14021641f", "GJBaseGameLayer::hasUniqueCoin @ 0x140216860", "LevelInfoLayer::updateLabelValues @ 0x140300063", "<???> @ 0x1406cc48c"], "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"}