{"type": "func", "start": 5371027664, "end": 5371028074, "name": "GameLevelManager::onSetLevelStarsCompleted", "pseudocode": "// \n// GameLevelManager::onSetLevelStarsCompleted from 0x1402360d0 to 0x14023626a (410 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::handleIt @ 0x140219a92\n// > <???> @ 0x14091bfe0\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:28:32 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall GameLevelManager::onSetLevelStarsCompleted(__int64 a1, const void **a2, _QWORD *a3)\n{\n  _BYTE *v6; // rbx\n  size_t v7; // r8\n  __int64 v8; // rcx\n  void *v9; // rcx\n  unsigned int SplitIntFromKey; // ebp\n  const void *v11; // rcx\n  unsigned __int64 v12; // rbx\n  size_t v13; // r8\n  void (__fastcall ***v14)(_QWORD, _QWORD, __int64); // rcx\n  __int64 v15; // rcx\n  void *Block[2]; // [rsp+40h] [rbp-58h] BYREF\n  __int128 v17; // [rsp+50h] [rbp-48h]\n\n  v6 = a3;\n  if ( a3[3] > 0xFu )\n    v6 = (_BYTE *)*a3;\n  *(_OWORD *)Block = 0;\n  v17 = 0;\n  v7 = -1;\n  do\n    ++v7;\n  while ( v6[v7] );\n  sub_14003D230(Block, v6, v7);\n  cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 1200), Block);\n  if ( *((_QWORD *)&v17 + 1) > 0xFu )\n  {\n    v9 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v17 + 1) + 1LL) >= 0x1000 )\n    {\n      v9 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v9);\n  }\n  SplitIntFromKey = GameLevelManager::getSplitIntFromKey(v8, v6, 1);\n  *(_OWORD *)Block = 0;\n  *(_QWORD *)&v17 = 2;\n  *((_QWORD *)&v17 + 1) = 15;\n  strcpy((char *)Block, \"-1\");\n  v11 = a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v11 = *a2;\n  v12 = (unsigned __int64)a2[2];\n  v13 = v12;\n  if ( v12 > 2 )\n    v13 = 2;\n  if ( !memcmp(v11, Block, v13) && v12 == 2 )\n  {\n    v15 = *(_QWORD *)(a1 + 1488);\n    if ( v15 )\n      (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v15 + 8LL))(v15, SplitIntFromKey, 8);\n  }\n  else\n  {\n    v14 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 1488);\n    if ( v14 )\n      (**v14)(v14, SplitIntFromKey, 8);\n  }\n  sub_14003D310((__int64)a2);\n  sub_14003D310((__int64)a3);\n}", "assembly": "; \n; GameLevelManager::onSetLevelStarsCompleted from 0x1402360d0 to 0x14023626a (410 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::handleIt @ 0x140219a92\n; > <???> @ 0x14091bfe0\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:28:32 +0000\n; \npush    rbx                                                            ; +0x0, 0x1402360d0\npush    rbp                                                            ; +0x2, 0x1402360d2\npush    rsi                                                            ; +0x3, 0x1402360d3\npush    rdi                                                            ; +0x4, 0x1402360d4\npush    r14                                                            ; +0x5, 0x1402360d5\nsub     rsp, 70h                                                       ; +0x7, 0x1402360d7\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x1402360db\nxor     rax, rsp                                                       ; +0x12, 0x1402360e2\nmov     [rsp+98h+var_38], rax                                          ; +0x15, 0x1402360e5\nmov     r14, r8                                                        ; +0x1a, 0x1402360ea\nmov     rsi, rdx                                                       ; +0x1d, 0x1402360ed\nmov     rdi, rcx                                                       ; +0x20, 0x1402360f0\nmov     [rsp+98h+var_68], rdx                                          ; +0x23, 0x1402360f3\nmov     [rsp+98h+var_60], r8                                           ; +0x28, 0x1402360f8\nmov     rbx, r8                                                        ; +0x2d, 0x1402360fd\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x30, 0x140236100\njbe     short loc_14023610A                                            ; +0x35, 0x140236105\nmov     rbx, [r8]                                                      ; +0x37, 0x140236107\nxorps   xmm0, xmm0                                                     ; +0x3a, 0x14023610a\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0x3d, 0x14023610d\nxorps   xmm1, xmm1                                                     ; +0x42, 0x140236112\nmovdqu  [rsp+98h+var_48], xmm1                                         ; +0x45, 0x140236115\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x4b, 0x14023611b\ninc     r8                                                             ; +0x52, 0x140236122\ncmp     byte ptr [rbx+r8], 0                                           ; +0x55, 0x140236125\njnz     short loc_140236122                                            ; +0x5a, 0x14023612a\nmov     rdx, rbx                                                       ; +0x5c, 0x14023612c\nlea     rcx, [rsp+98h+Block]                                           ; +0x5f, 0x14023612f\ncall    sub_14003D230                                                  ; +0x64, 0x140236134\nnop                                                                    ; +0x69, 0x140236139\nlea     rdx, [rsp+98h+Block]                                           ; +0x6a, 0x14023613a\nmov     rcx, [rdi+4B0h]                                                ; +0x6f, 0x14023613f\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::removeObjectForKey(std::string const &) ; +0x76, 0x140236146\nnop                                                                    ; +0x7c, 0x14023614c\nmov     rdx, qword ptr [rsp+98h+var_48+8]                              ; +0x7d, 0x14023614d\ncmp     rdx, 0Fh                                                       ; +0x82, 0x140236152\njbe     short loc_1402361A0                                            ; +0x86, 0x140236156\ninc     rdx                                                            ; +0x88, 0x140236158\nmov     rcx, [rsp+98h+Block]; Block                                    ; +0x8b, 0x14023615b\nmov     rax, rcx                                                       ; +0x90, 0x140236160\ncmp     rdx, 1000h                                                     ; +0x93, 0x140236163\njb      short loc_14023619B                                            ; +0x9a, 0x14023616a\nadd     rdx, 27h ; '''                                                 ; +0x9c, 0x14023616c\nmov     rcx, [rcx-8]                                                   ; +0xa0, 0x140236170\nsub     rax, rcx                                                       ; +0xa4, 0x140236174\nsub     rax, 8                                                         ; +0xa7, 0x140236177\ncmp     rax, 1Fh                                                       ; +0xab, 0x14023617b\njbe     short loc_14023619B                                            ; +0xaf, 0x14023617f\nmov     [rsp+98h+Reserved], 0; Reserved                                ; +0xb1, 0x140236181\nxor     r9d, r9d; LineNo                                               ; +0xba, 0x14023618a\nxor     r8d, r8d; FileName                                             ; +0xbd, 0x14023618d\nxor     edx, edx; FunctionName                                         ; +0xc0, 0x140236190\nxor     ecx, ecx; Expression                                           ; +0xc2, 0x140236192\ncall    cs:_invoke_watson                                              ; +0xc4, 0x140236194\ndb 0CCh                                                                ; +0xca, 0x14023619a\ncall    j_j_free                                                       ; +0xcb, 0x14023619b\nmov     r8d, 1                                                         ; +0xd0, 0x1402361a0\nmov     rdx, rbx                                                       ; +0xd6, 0x1402361a6\ncall    GameLevelManager__getSplitIntFromKey                           ; +0xd9, 0x1402361a9\nmov     ebp, eax                                                       ; +0xde, 0x1402361ae\nxorps   xmm0, xmm0                                                     ; +0xe0, 0x1402361b0\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0xe3, 0x1402361b3\nmov     edx, 2                                                         ; +0xe8, 0x1402361b8\nmov     qword ptr [rsp+98h+var_48], rdx                                ; +0xed, 0x1402361bd\nmov     qword ptr [rsp+98h+var_48+8], 0Fh                              ; +0xf2, 0x1402361c2\nmov     eax, 312Dh                                                     ; +0xfb, 0x1402361cb\nmov     word ptr [rsp+98h+Block], ax                                   ; +0x100, 0x1402361d0\nmov     byte ptr [rsp+98h+Block+2], 0                                  ; +0x105, 0x1402361d5\nmov     rcx, rsi                                                       ; +0x10a, 0x1402361da\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0x10d, 0x1402361dd\njbe     short loc_1402361E7                                            ; +0x112, 0x1402361e2\nmov     rcx, [rsi]; Buf1                                               ; +0x114, 0x1402361e4\nmov     rbx, [rsi+10h]                                                 ; +0x117, 0x1402361e7\nmov     r8, rbx                                                        ; +0x11b, 0x1402361eb\ncmp     rbx, rdx                                                       ; +0x11e, 0x1402361ee\ncmova   r8, rdx; Size                                                  ; +0x121, 0x1402361f1\nlea     rdx, [rsp+98h+Block]; Buf2                                     ; +0x125, 0x1402361f5\ncall    memcmp                                                         ; +0x12a, 0x1402361fa\ntest    eax, eax                                                       ; +0x12f, 0x1402361ff\njnz     short loc_14023620B                                            ; +0x131, 0x140236201\ncmp     rbx, 2                                                         ; +0x133, 0x140236203\njb      short loc_14023620B                                            ; +0x137, 0x140236207\njbe     short loc_140236226                                            ; +0x139, 0x140236209\nmov     rcx, [rdi+5D0h]                                                ; +0x13b, 0x14023620b\ntest    rcx, rcx                                                       ; +0x142, 0x140236212\njz      short loc_140236241                                            ; +0x145, 0x140236215\nmov     rax, [rcx]                                                     ; +0x147, 0x140236217\nmov     r8d, 8                                                         ; +0x14a, 0x14023621a\nmov     edx, ebp                                                       ; +0x150, 0x140236220\ncall    qword ptr [rax]                                                ; +0x152, 0x140236222\njmp     short loc_140236241                                            ; +0x154, 0x140236224\nmov     rcx, [rdi+5D0h]                                                ; +0x156, 0x140236226\ntest    rcx, rcx                                                       ; +0x15d, 0x14023622d\njz      short loc_140236241                                            ; +0x160, 0x140236230\nmov     rax, [rcx]                                                     ; +0x162, 0x140236232\nmov     r8d, 8                                                         ; +0x165, 0x140236235\nmov     edx, ebp                                                       ; +0x16b, 0x14023623b\ncall    qword ptr [rax+8]                                              ; +0x16d, 0x14023623d\nnop                                                                    ; +0x170, 0x140236240\nmov     rcx, rsi                                                       ; +0x171, 0x140236241\ncall    sub_14003D310                                                  ; +0x174, 0x140236244\nnop                                                                    ; +0x179, 0x140236249\nmov     rcx, r14                                                       ; +0x17a, 0x14023624a\ncall    sub_14003D310                                                  ; +0x17d, 0x14023624d\nmov     rcx, [rsp+98h+var_38]                                          ; +0x182, 0x140236252\nxor     rcx, rsp; StackCookie                                          ; +0x187, 0x140236257\ncall    __security_check_cookie                                        ; +0x18a, 0x14023625a\nadd     rsp, 70h                                                       ; +0x18f, 0x14023625f\npop     r14                                                            ; +0x193, 0x140236263\npop     rdi                                                            ; +0x195, 0x140236265\npop     rsi                                                            ; +0x196, 0x140236266\npop     rbp                                                            ; +0x197, 0x140236267\npop     rbx                                                            ; +0x198, 0x140236268\nretn                                                                   ; +0x199, 0x140236269", "xrefs": ["GameLevelManager::handleIt @ 0x140219a92", "<???> @ 0x14091bfe0"], "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"}