{"type": "func", "start": 5370674784, "end": 5370674963, "name": "GameStatsManager::hasPendingUserCoin", "pseudocode": "// \n// GameStatsManager::hasPendingUserCoin from 0x1401dfe60 to 0x1401dff13 (179 bytes)\n// \n// 8 xrefs:\n// > LevelCell::loadCustomLevelCell @ 0x1400afde8\n// > EndLevelLayer::customSetup @ 0x140134438\n// > GameLevelManager::updateLevelRewards @ 0x140146585\n// > GameLevelManager::getLevelLeaderboard @ 0x1401584b6\n// > GJBaseGameLayer::processItems @ 0x1402164ea\n// > GJBaseGameLayer::hasUniqueCoin @ 0x1402168a7\n// > LevelInfoLayer::updateLabelValues @ 0x1403000b7\n// > <???> @ 0x1406cc4a4\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::hasPendingUserCoin(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_pendingUserCoins, 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::hasPendingUserCoin from 0x1401dfe60 to 0x1401dff13 (179 bytes)\n; \n; 8 xrefs:\n; > LevelCell::loadCustomLevelCell @ 0x1400afde8\n; > EndLevelLayer::customSetup @ 0x140134438\n; > GameLevelManager::updateLevelRewards @ 0x140146585\n; > GameLevelManager::getLevelLeaderboard @ 0x1401584b6\n; > GJBaseGameLayer::processItems @ 0x1402164ea\n; > GJBaseGameLayer::hasUniqueCoin @ 0x1402168a7\n; > LevelInfoLayer::updateLabelValues @ 0x1403000b7\n; > <???> @ 0x1406cc4a4\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, 0x1401dfe60\nsub     rsp, 50h                                                       ; +0x2, 0x1401dfe62\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1401dfe66\nxor     rax, rsp                                                       ; +0xd, 0x1401dfe6d\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x1401dfe70\nmov     rbx, rcx                                                       ; +0x15, 0x1401dfe75\nxorps   xmm0, xmm0                                                     ; +0x18, 0x1401dfe78\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x1b, 0x1401dfe7b\nxorps   xmm1, xmm1                                                     ; +0x20, 0x1401dfe80\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x23, 0x1401dfe83\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x29, 0x1401dfe89\ninc     r8                                                             ; +0x30, 0x1401dfe90\ncmp     byte ptr [rdx+r8], 0                                           ; +0x33, 0x1401dfe93\njnz     short loc_1401DFE90                                            ; +0x38, 0x1401dfe98\nlea     rcx, [rsp+58h+Block]                                           ; +0x3a, 0x1401dfe9a\ncall    sub_14003A930                                                  ; +0x3f, 0x1401dfe9f\nnop                                                                    ; +0x44, 0x1401dfea4\nlea     rdx, [rsp+58h+Block]                                           ; +0x45, 0x1401dfea5\nmov     rcx, [rbx+2D8h]                                                ; +0x4a, 0x1401dfeaa\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, 0x1401dfeb1\ntest    rax, rax                                                       ; +0x57, 0x1401dfeb7\nsetnz   bl                                                             ; +0x5a, 0x1401dfeba\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x5d, 0x1401dfebd\ncmp     rdx, 0Fh                                                       ; +0x62, 0x1401dfec2\njbe     short loc_1401DFEFD                                            ; +0x66, 0x1401dfec6\ninc     rdx                                                            ; +0x68, 0x1401dfec8\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x6b, 0x1401dfecb\nmov     rax, rcx                                                       ; +0x70, 0x1401dfed0\ncmp     rdx, 1000h                                                     ; +0x73, 0x1401dfed3\njb      short loc_1401DFEF8                                            ; +0x7a, 0x1401dfeda\nadd     rdx, 27h ; '''                                                 ; +0x7c, 0x1401dfedc\nmov     rcx, [rcx-8]                                                   ; +0x80, 0x1401dfee0\nsub     rax, rcx                                                       ; +0x84, 0x1401dfee4\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x87, 0x1401dfee7\ncmp     rax, 1Fh                                                       ; +0x8b, 0x1401dfeeb\njbe     short loc_1401DFEF8                                            ; +0x8f, 0x1401dfeef\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x91, 0x1401dfef1\nalign 8                                                                ; +0x97, 0x1401dfef7\ncall    j_j_free                                                       ; +0x98, 0x1401dfef8\nmovzx   eax, bl                                                        ; +0x9d, 0x1401dfefd\nmov     rcx, [rsp+58h+var_18]                                          ; +0xa0, 0x1401dff00\nxor     rcx, rsp; StackCookie                                          ; +0xa5, 0x1401dff05\ncall    __security_check_cookie                                        ; +0xa8, 0x1401dff08\nadd     rsp, 50h                                                       ; +0xad, 0x1401dff0d\npop     rbx                                                            ; +0xb1, 0x1401dff11\nretn                                                                   ; +0xb2, 0x1401dff12", "xrefs": ["LevelCell::loadCustomLevelCell @ 0x1400afde8", "EndLevelLayer::customSetup @ 0x140134438", "GameLevelManager::updateLevelRewards @ 0x140146585", "GameLevelManager::getLevelLeaderboard @ 0x1401584b6", "GJBaseGameLayer::processItems @ 0x1402164ea", "GJBaseGameLayer::hasUniqueCoin @ 0x1402168a7", "LevelInfoLayer::updateLabelValues @ 0x1403000b7", "<???> @ 0x1406cc4a4"], "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"}