{"type": "func", "start": 5370667680, "end": 5370667942, "name": "GameStatsManager::hasCompletedStarLevel", "pseudocode": "// \n// GameStatsManager::hasCompletedStarLevel from 0x1401de2a0 to 0x1401de3a6 (262 bytes)\n// \n// 7 xrefs:\n// > LevelCell::loadCustomLevelCell @ 0x1400af85a\n// > GameStatsManager::completedStarLevel @ 0x1401de78f\n// > LevelInfoLayer::updateLabelValues @ 0x1402ffc17\n// > LevelPage::updateDynamicPage @ 0x14031af12\n// > PlayLayer::levelComplete @ 0x1403a8471\n// > <???> @ 0x1406cc3f0\n// > <???> @ 0x1406cc3fc\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\n// Hidden C++ exception states: #wind=1\nbool GameStatsManager::hasCompletedStarLevel(GameStatsManager *a1, GJGameLevel *a2)\n{\n  cocos2d::CCString *v3; // rax\n  const char *v4; // rcx\n  const char *CString; // rax\n  size_t v6; // r8\n  bool v7; // bl\n  void *v8; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v11; // [rsp+30h] [rbp-28h]\n\n  if ( a2->m_dailyID.random - a2->m_dailyID.seed <= 0 )\n  {\n    v4 = \"gstar_%i\";\n    if ( !a2->m_gauntletLevel )\n      v4 = \"star_%i\";\n    v3 = cocos2d::CCString::createWithFormat(v4, (unsigned int)(a2->m_levelID.random - a2->m_levelID.seed));\n  }\n  else\n  {\n    v3 = cocos2d::CCString::createWithFormat(\"dstar_%i\", (unsigned int)(a2->m_dailyID.random - a2->m_dailyID.seed));\n  }\n  CString = cocos2d::CCString::getCString(v3);\n  *(_OWORD *)Block = 0;\n  v11 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( CString[v6] );\n  sub_14003A930(Block, CString, v6);\n  v7 = cocos2d::CCDictionary::objectForKey(a1->m_completedLevels, Block) != 0;\n  if ( *((_QWORD *)&v11 + 1) > 0xFu )\n  {\n    v8 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v11 + 1) + 1LL) >= 0x1000 )\n    {\n      v8 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v8);\n  }\n  return v7;\n}", "assembly": "; \n; GameStatsManager::hasCompletedStarLevel from 0x1401de2a0 to 0x1401de3a6 (262 bytes)\n; \n; 7 xrefs:\n; > LevelCell::loadCustomLevelCell @ 0x1400af85a\n; > GameStatsManager::completedStarLevel @ 0x1401de78f\n; > LevelInfoLayer::updateLabelValues @ 0x1402ffc17\n; > LevelPage::updateDynamicPage @ 0x14031af12\n; > PlayLayer::levelComplete @ 0x1403a8471\n; > <???> @ 0x1406cc3f0\n; > <???> @ 0x1406cc3fc\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, 0x1401de2a0\nsub     rsp, 50h                                                       ; +0x2, 0x1401de2a2\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1401de2a6\nxor     rax, rsp                                                       ; +0xd, 0x1401de2ad\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x1401de2b0\nmov     rbx, rcx                                                       ; +0x15, 0x1401de2b5\nmov     eax, [rdx+36Ch]                                                ; +0x18, 0x1401de2b8\nsub     eax, [rdx+370h]                                                ; +0x1e, 0x1401de2be\ntest    eax, eax                                                       ; +0x24, 0x1401de2c4\njle     short loc_1401DE2D1                                            ; +0x26, 0x1401de2c6\nlea     rcx, aDstarI; \"dstar_%i\"                                       ; +0x28, 0x1401de2c8\njmp     short loc_1401DE2F6                                            ; +0x2f, 0x1401de2cf\nmov     eax, [rdx+148h]                                                ; +0x31, 0x1401de2d1\nmov     ecx, [rdx+14Ch]                                                ; +0x37, 0x1401de2d7\nsub     eax, ecx                                                       ; +0x3d, 0x1401de2dd\ncmp     byte ptr [rdx+2C9h], 0                                         ; +0x3f, 0x1401de2df\nlea     rcx, aGstarI; \"gstar_%i\"                                       ; +0x46, 0x1401de2e6\njnz     short loc_1401DE2F6                                            ; +0x4d, 0x1401de2ed\nlea     rcx, aStarI; \"star_%i\"                                         ; +0x4f, 0x1401de2ef\nmov     edx, eax                                                       ; +0x56, 0x1401de2f6\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x58, 0x1401de2f8\nmov     rcx, rax                                                       ; +0x5e, 0x1401de2fe\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x61, 0x1401de301\nxorps   xmm0, xmm0                                                     ; +0x67, 0x1401de307\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x6a, 0x1401de30a\nxorps   xmm1, xmm1                                                     ; +0x6f, 0x1401de30f\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x72, 0x1401de312\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x78, 0x1401de318\nnop                                                                    ; +0x7f, 0x1401de31f\ninc     r8                                                             ; +0x80, 0x1401de320\ncmp     byte ptr [rax+r8], 0                                           ; +0x83, 0x1401de323\njnz     short loc_1401DE320                                            ; +0x88, 0x1401de328\nmov     rdx, rax                                                       ; +0x8a, 0x1401de32a\nlea     rcx, [rsp+58h+Block]                                           ; +0x8d, 0x1401de32d\ncall    sub_14003A930                                                  ; +0x92, 0x1401de332\nnop                                                                    ; +0x97, 0x1401de337\nlea     rdx, [rsp+58h+Block]                                           ; +0x98, 0x1401de338\nmov     rcx, [rbx+2C8h]                                                ; +0x9d, 0x1401de33d\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 &) ; +0xa4, 0x1401de344\ntest    rax, rax                                                       ; +0xaa, 0x1401de34a\nsetnz   bl                                                             ; +0xad, 0x1401de34d\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0xb0, 0x1401de350\ncmp     rdx, 0Fh                                                       ; +0xb5, 0x1401de355\njbe     short loc_1401DE390                                            ; +0xb9, 0x1401de359\ninc     rdx                                                            ; +0xbb, 0x1401de35b\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0xbe, 0x1401de35e\nmov     rax, rcx                                                       ; +0xc3, 0x1401de363\ncmp     rdx, 1000h                                                     ; +0xc6, 0x1401de366\njb      short loc_1401DE38B                                            ; +0xcd, 0x1401de36d\nadd     rdx, 27h ; '''                                                 ; +0xcf, 0x1401de36f\nmov     rcx, [rcx-8]                                                   ; +0xd3, 0x1401de373\nsub     rax, rcx                                                       ; +0xd7, 0x1401de377\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xda, 0x1401de37a\ncmp     rax, 1Fh                                                       ; +0xde, 0x1401de37e\njbe     short loc_1401DE38B                                            ; +0xe2, 0x1401de382\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xe4, 0x1401de384\ndb 0CCh                                                                ; +0xea, 0x1401de38a\ncall    j_j_free                                                       ; +0xeb, 0x1401de38b\nmovzx   eax, bl                                                        ; +0xf0, 0x1401de390\nmov     rcx, [rsp+58h+var_18]                                          ; +0xf3, 0x1401de393\nxor     rcx, rsp; StackCookie                                          ; +0xf8, 0x1401de398\ncall    __security_check_cookie                                        ; +0xfb, 0x1401de39b\nadd     rsp, 50h                                                       ; +0x100, 0x1401de3a0\npop     rbx                                                            ; +0x104, 0x1401de3a4\nretn                                                                   ; +0x105, 0x1401de3a5", "xrefs": ["LevelCell::loadCustomLevelCell @ 0x1400af85a", "GameStatsManager::completedStarLevel @ 0x1401de78f", "LevelInfoLayer::updateLabelValues @ 0x1402ffc17", "LevelPage::updateDynamicPage @ 0x14031af12", "PlayLayer::levelComplete @ 0x1403a8471", "<???> @ 0x1406cc3f0", "<???> @ 0x1406cc3fc"], "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"}