{"type": "func", "start": 5370674976, "end": 5370675180, "name": "GameStatsManager::hasSecretCoin", "pseudocode": "// \n// GameStatsManager::hasSecretCoin from 0x1401dff20 to 0x1401dffec (204 bytes)\n// \n// 18 xrefs:\n// > EndLevelLayer::customSetup @ 0x140134395\n// > GameManager::verifyCoinUnlocks @ 0x14017e645\n// > GameManager::verifyCoinUnlocks @ 0x14017e66d\n// > GameManager::verifyCoinUnlocks @ 0x14017e695\n// > GameManager::verifyCoinUnlocks @ 0x14017e760\n// > GameManager::verifyCoinUnlocks @ 0x14017e788\n// > GameManager::verifyCoinUnlocks @ 0x14017e7b0\n// > GameManager::verifyCoinUnlocks @ 0x14017e809\n// > GameManager::verifyCoinUnlocks @ 0x14017e857\n// > GameManager::verifyCoinUnlocks @ 0x14017e8a5\n// > GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddc38\n// > GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddc8f\n// > GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddcec\n// > GJBaseGameLayer::processItems @ 0x140216616\n// > GJBaseGameLayer::hasUniqueCoin @ 0x140216824\n// > LevelAreaInnerLayer::init @ 0x1402c6caa\n// > LevelPage::updateDynamicPage @ 0x14031afff\n// > <???> @ 0x1406cc4b0\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::hasSecretCoin(GameStatsManager *a1, const char *a2)\n{\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rax\n  size_t v5; // r8\n  bool v6; // bl\n  void *v7; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v10; // [rsp+30h] [rbp-28h]\n\n  v3 = cocos2d::CCString::createWithFormat(\"unique_%s\", a2);\n  CString = cocos2d::CCString::getCString(v3);\n  *(_OWORD *)Block = 0;\n  v10 = 0;\n  v5 = -1;\n  do\n    ++v5;\n  while ( CString[v5] );\n  sub_14003A930(Block, CString, v5);\n  v6 = cocos2d::CCDictionary::objectForKey(a1->m_playerStats, Block) != 0;\n  if ( *((_QWORD *)&v10 + 1) > 0xFu )\n  {\n    v7 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v10 + 1) + 1LL) >= 0x1000 )\n    {\n      v7 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v7);\n  }\n  return v6;\n}", "assembly": "; \n; GameStatsManager::hasSecretCoin from 0x1401dff20 to 0x1401dffec (204 bytes)\n; \n; 18 xrefs:\n; > EndLevelLayer::customSetup @ 0x140134395\n; > GameManager::verifyCoinUnlocks @ 0x14017e645\n; > GameManager::verifyCoinUnlocks @ 0x14017e66d\n; > GameManager::verifyCoinUnlocks @ 0x14017e695\n; > GameManager::verifyCoinUnlocks @ 0x14017e760\n; > GameManager::verifyCoinUnlocks @ 0x14017e788\n; > GameManager::verifyCoinUnlocks @ 0x14017e7b0\n; > GameManager::verifyCoinUnlocks @ 0x14017e809\n; > GameManager::verifyCoinUnlocks @ 0x14017e857\n; > GameManager::verifyCoinUnlocks @ 0x14017e8a5\n; > GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddc38\n; > GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddc8f\n; > GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddcec\n; > GJBaseGameLayer::processItems @ 0x140216616\n; > GJBaseGameLayer::hasUniqueCoin @ 0x140216824\n; > LevelAreaInnerLayer::init @ 0x1402c6caa\n; > LevelPage::updateDynamicPage @ 0x14031afff\n; > <???> @ 0x1406cc4b0\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, 0x1401dff20\nsub     rsp, 50h                                                       ; +0x2, 0x1401dff22\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1401dff26\nxor     rax, rsp                                                       ; +0xd, 0x1401dff2d\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x1401dff30\nmov     rbx, rcx                                                       ; +0x15, 0x1401dff35\nlea     rcx, aUniqueS; \"unique_%s\"                                     ; +0x18, 0x1401dff38\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1f, 0x1401dff3f\nmov     rcx, rax                                                       ; +0x25, 0x1401dff45\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x28, 0x1401dff48\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x1401dff4e\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x31, 0x1401dff51\nxorps   xmm1, xmm1                                                     ; +0x36, 0x1401dff56\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x39, 0x1401dff59\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x3f, 0x1401dff5f\ninc     r8                                                             ; +0x46, 0x1401dff66\ncmp     byte ptr [rax+r8], 0                                           ; +0x49, 0x1401dff69\njnz     short loc_1401DFF66                                            ; +0x4e, 0x1401dff6e\nmov     rdx, rax                                                       ; +0x50, 0x1401dff70\nlea     rcx, [rsp+58h+Block]                                           ; +0x53, 0x1401dff73\ncall    sub_14003A930                                                  ; +0x58, 0x1401dff78\nnop                                                                    ; +0x5d, 0x1401dff7d\nlea     rdx, [rsp+58h+Block]                                           ; +0x5e, 0x1401dff7e\nmov     rcx, [rbx+240h]                                                ; +0x63, 0x1401dff83\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, 0x1401dff8a\ntest    rax, rax                                                       ; +0x70, 0x1401dff90\nsetnz   bl                                                             ; +0x73, 0x1401dff93\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x76, 0x1401dff96\ncmp     rdx, 0Fh                                                       ; +0x7b, 0x1401dff9b\njbe     short loc_1401DFFD6                                            ; +0x7f, 0x1401dff9f\ninc     rdx                                                            ; +0x81, 0x1401dffa1\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x84, 0x1401dffa4\nmov     rax, rcx                                                       ; +0x89, 0x1401dffa9\ncmp     rdx, 1000h                                                     ; +0x8c, 0x1401dffac\njb      short loc_1401DFFD1                                            ; +0x93, 0x1401dffb3\nadd     rdx, 27h ; '''                                                 ; +0x95, 0x1401dffb5\nmov     rcx, [rcx-8]                                                   ; +0x99, 0x1401dffb9\nsub     rax, rcx                                                       ; +0x9d, 0x1401dffbd\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xa0, 0x1401dffc0\ncmp     rax, 1Fh                                                       ; +0xa4, 0x1401dffc4\njbe     short loc_1401DFFD1                                            ; +0xa8, 0x1401dffc8\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xaa, 0x1401dffca\ndb 0CCh                                                                ; +0xb0, 0x1401dffd0\ncall    j_j_free                                                       ; +0xb1, 0x1401dffd1\nmovzx   eax, bl                                                        ; +0xb6, 0x1401dffd6\nmov     rcx, [rsp+58h+var_18]                                          ; +0xb9, 0x1401dffd9\nxor     rcx, rsp; StackCookie                                          ; +0xbe, 0x1401dffde\ncall    __security_check_cookie                                        ; +0xc1, 0x1401dffe1\nadd     rsp, 50h                                                       ; +0xc6, 0x1401dffe6\npop     rbx                                                            ; +0xca, 0x1401dffea\nretn                                                                   ; +0xcb, 0x1401dffeb", "xrefs": ["EndLevelLayer::customSetup @ 0x140134395", "GameManager::verifyCoinUnlocks @ 0x14017e645", "GameManager::verifyCoinUnlocks @ 0x14017e66d", "GameManager::verifyCoinUnlocks @ 0x14017e695", "GameManager::verifyCoinUnlocks @ 0x14017e760", "GameManager::verifyCoinUnlocks @ 0x14017e788", "GameManager::verifyCoinUnlocks @ 0x14017e7b0", "GameManager::verifyCoinUnlocks @ 0x14017e809", "GameManager::verifyCoinUnlocks @ 0x14017e857", "GameManager::verifyCoinUnlocks @ 0x14017e8a5", "GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddc38", "GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddc8f", "GameStatsManager::getCollectedCoinsForLevel @ 0x1401ddcec", "GJBaseGameLayer::processItems @ 0x140216616", "GJBaseGameLayer::hasUniqueCoin @ 0x140216824", "LevelAreaInnerLayer::init @ 0x1402c6caa", "LevelPage::updateDynamicPage @ 0x14031afff", "<???> @ 0x1406cc4b0"], "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"}