{"type": "func", "start": 5371730640, "end": 5371730937, "name": "GameStatsManager::hasCompletedStarLevel", "pseudocode": "// \n// GameStatsManager::hasCompletedStarLevel from 0x1402e1ad0 to 0x1402e1bf9 (297 bytes)\n// \n// 6 xrefs:\n// > LevelCell::loadCustomLevelCell @ 0x14014b062\n// > GameStatsManager::completedStarLevel @ 0x1402e1fff\n// > LevelInfoLayer::updateLabelValues @ 0x140425994\n// > LevelPage::updateDynamicPage @ 0x140444470\n// > PlayLayer::levelComplete @ 0x140506c5f\n// > <???> @ 0x14091de64\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// Hidden C++ exception states: #wind=1\n_BOOL8 __fastcall GameStatsManager::hasCompletedStarLevel(__int64 a1, __int64 a2)\n{\n  cocos2d::CCString *v3; // rax\n  bool v4; // zf\n  __int64 v5; // rdx\n  const char *v6; // rcx\n  const char *CString; // rax\n  size_t v8; // r8\n  bool v9; // bl\n  void *v10; // rcx\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int128 v13; // [rsp+40h] [rbp-28h]\n\n  if ( *(_DWORD *)(a2 + 992) - *(_DWORD *)(a2 + 996) <= 0 )\n  {\n    v4 = *(_BYTE *)(a2 + 721) == 0;\n    v5 = (unsigned int)(*(_DWORD *)(a2 + 328) - *(_DWORD *)(a2 + 332));\n    v6 = \"gstar_%i\";\n    if ( v4 )\n      v6 = \"star_%i\";\n    v3 = cocos2d::CCString::createWithFormat(v6, v5);\n  }\n  else\n  {\n    v3 = cocos2d::CCString::createWithFormat(\"%s%i\", \"dstar_\", *(_DWORD *)(a2 + 992) - *(_DWORD *)(a2 + 996));\n  }\n  CString = cocos2d::CCString::getCString(v3);\n  *(_OWORD *)Block = 0;\n  v13 = 0;\n  v8 = -1;\n  do\n    ++v8;\n  while ( CString[v8] );\n  sub_14003D230(Block, CString, v8);\n  v9 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 712), Block) != 0;\n  if ( *((_QWORD *)&v13 + 1) > 0xFu )\n  {\n    v10 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v13 + 1) + 1LL) >= 0x1000 )\n    {\n      v10 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v10);\n  }\n  return v9;\n}", "assembly": "; \n; GameStatsManager::hasCompletedStarLevel from 0x1402e1ad0 to 0x1402e1bf9 (297 bytes)\n; \n; 6 xrefs:\n; > LevelCell::loadCustomLevelCell @ 0x14014b062\n; > GameStatsManager::completedStarLevel @ 0x1402e1fff\n; > LevelInfoLayer::updateLabelValues @ 0x140425994\n; > LevelPage::updateDynamicPage @ 0x140444470\n; > PlayLayer::levelComplete @ 0x140506c5f\n; > <???> @ 0x14091de64\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, 0x1402e1ad0\nsub     rsp, 60h                                                       ; +0x2, 0x1402e1ad2\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1402e1ad6\nxor     rax, rsp                                                       ; +0xd, 0x1402e1add\nmov     [rsp+68h+var_18], rax                                          ; +0x10, 0x1402e1ae0\nmov     rbx, rcx                                                       ; +0x15, 0x1402e1ae5\nmov     r8d, [rdx+3E0h]                                                ; +0x18, 0x1402e1ae8\nsub     r8d, [rdx+3E4h]                                                ; +0x1f, 0x1402e1aef\ntest    r8d, r8d                                                       ; +0x26, 0x1402e1af6\njle     short loc_1402E1B11                                            ; +0x29, 0x1402e1af9\nlea     rdx, aDstar; \"dstar_\"                                          ; +0x2b, 0x1402e1afb\nlea     rcx, aSI_3; \"%s%i\"                                             ; +0x32, 0x1402e1b02\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x39, 0x1402e1b09\njmp     short loc_1402E1B3C                                            ; +0x3f, 0x1402e1b0f\nmov     eax, [rdx+148h]                                                ; +0x41, 0x1402e1b11\nsub     eax, [rdx+14Ch]                                                ; +0x47, 0x1402e1b17\ncmp     byte ptr [rdx+2D1h], 0                                         ; +0x4d, 0x1402e1b1d\nmov     edx, eax                                                       ; +0x54, 0x1402e1b24\nlea     rcx, aGstarI; \"gstar_%i\"                                       ; +0x56, 0x1402e1b26\njnz     short loc_1402E1B36                                            ; +0x5d, 0x1402e1b2d\nlea     rcx, aStarI; \"star_%i\"                                         ; +0x5f, 0x1402e1b2f\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x66, 0x1402e1b36\nmov     rcx, rax                                                       ; +0x6c, 0x1402e1b3c\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x6f, 0x1402e1b3f\nxorps   xmm0, xmm0                                                     ; +0x75, 0x1402e1b45\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x78, 0x1402e1b48\nxorps   xmm1, xmm1                                                     ; +0x7d, 0x1402e1b4d\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x80, 0x1402e1b50\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x86, 0x1402e1b56\nnop     dword ptr [rax]                                                ; +0x8d, 0x1402e1b5d\ninc     r8                                                             ; +0x90, 0x1402e1b60\ncmp     byte ptr [rax+r8], 0                                           ; +0x93, 0x1402e1b63\njnz     short loc_1402E1B60                                            ; +0x98, 0x1402e1b68\nmov     rdx, rax                                                       ; +0x9a, 0x1402e1b6a\nlea     rcx, [rsp+68h+Block]                                           ; +0x9d, 0x1402e1b6d\ncall    sub_14003D230                                                  ; +0xa2, 0x1402e1b72\nnop                                                                    ; +0xa7, 0x1402e1b77\nlea     rdx, [rsp+68h+Block]                                           ; +0xa8, 0x1402e1b78\nmov     rcx, [rbx+2C8h]                                                ; +0xad, 0x1402e1b7d\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 &) ; +0xb4, 0x1402e1b84\ntest    rax, rax                                                       ; +0xba, 0x1402e1b8a\nsetnz   bl                                                             ; +0xbd, 0x1402e1b8d\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0xc0, 0x1402e1b90\ncmp     rdx, 0Fh                                                       ; +0xc5, 0x1402e1b95\njbe     short loc_1402E1BE3                                            ; +0xc9, 0x1402e1b99\ninc     rdx                                                            ; +0xcb, 0x1402e1b9b\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0xce, 0x1402e1b9e\nmov     rax, rcx                                                       ; +0xd3, 0x1402e1ba3\ncmp     rdx, 1000h                                                     ; +0xd6, 0x1402e1ba6\njb      short loc_1402E1BDE                                            ; +0xdd, 0x1402e1bad\nadd     rdx, 27h ; '''                                                 ; +0xdf, 0x1402e1baf\nmov     rcx, [rcx-8]                                                   ; +0xe3, 0x1402e1bb3\nsub     rax, rcx                                                       ; +0xe7, 0x1402e1bb7\nsub     rax, 8                                                         ; +0xea, 0x1402e1bba\ncmp     rax, 1Fh                                                       ; +0xee, 0x1402e1bbe\njbe     short loc_1402E1BDE                                            ; +0xf2, 0x1402e1bc2\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xf4, 0x1402e1bc4\nxor     r9d, r9d; LineNo                                               ; +0xfd, 0x1402e1bcd\nxor     r8d, r8d; FileName                                             ; +0x100, 0x1402e1bd0\nxor     edx, edx; FunctionName                                         ; +0x103, 0x1402e1bd3\nxor     ecx, ecx; Expression                                           ; +0x105, 0x1402e1bd5\ncall    cs:_invoke_watson                                              ; +0x107, 0x1402e1bd7\nalign 2                                                                ; +0x10d, 0x1402e1bdd\ncall    j_j_free                                                       ; +0x10e, 0x1402e1bde\nmovzx   eax, bl                                                        ; +0x113, 0x1402e1be3\nmov     rcx, [rsp+68h+var_18]                                          ; +0x116, 0x1402e1be6\nxor     rcx, rsp; StackCookie                                          ; +0x11b, 0x1402e1beb\ncall    __security_check_cookie                                        ; +0x11e, 0x1402e1bee\nadd     rsp, 60h                                                       ; +0x123, 0x1402e1bf3\npop     rbx                                                            ; +0x127, 0x1402e1bf7\nretn                                                                   ; +0x128, 0x1402e1bf8", "xrefs": ["LevelCell::loadCustomLevelCell @ 0x14014b062", "GameStatsManager::completedStarLevel @ 0x1402e1fff", "LevelInfoLayer::updateLabelValues @ 0x140425994", "LevelPage::updateDynamicPage @ 0x140444470", "PlayLayer::levelComplete @ 0x140506c5f", "<???> @ 0x14091de64"], "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"}