{"type": "func", "start": 5371024960, "end": 5371025642, "name": "GameLevelManager::onSuggestLevelStarsCompleted", "pseudocode": "// \n// GameLevelManager::onSuggestLevelStarsCompleted from 0x140235640 to 0x1402358ea (682 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::handleIt @ 0x14021a45c\n// > <???> @ 0x14091bfbc\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=4\nvoid __fastcall GameLevelManager::onSuggestLevelStarsCompleted(__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; // r12d\n  const void *v11; // rcx\n  unsigned __int64 v12; // r15\n  size_t v13; // r8\n  int v14; // ebx\n  const void *v15; // rcx\n  size_t v16; // r8\n  int v17; // ebx\n  _DWORD *v18; // rbx\n  float v19; // xmm0_4\n  __int64 v20; // rcx\n  void (__fastcall ***v21)(_QWORD, _QWORD, __int64); // rcx\n  void *v22; // [rsp+30h] [rbp-40h]\n  void *Block[2]; // [rsp+48h] [rbp-28h] BYREF\n  __int64 v24; // [rsp+58h] [rbp-18h]\n  unsigned __int64 v25; // [rsp+60h] [rbp-10h]\n\n  v6 = a3;\n  if ( a3[3] > 0xFu )\n    v6 = (_BYTE *)*a3;\n  *(_OWORD *)Block = 0;\n  v24 = 0;\n  v25 = 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 ( v25 > 0xF )\n  {\n    v9 = Block[0];\n    if ( v25 + 1 >= 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  v24 = 2;\n  v25 = 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  v14 = memcmp(v11, Block, v13);\n  if ( !v14 )\n  {\n    if ( v12 >= 2 )\n      v14 = v12 > 2;\n    else\n      v14 = -1;\n  }\n  if ( !v14 )\n    goto LABEL_31;\n  *(_OWORD *)Block = 0;\n  v24 = 2;\n  v25 = 15;\n  strcpy((char *)Block, \"-2\");\n  v15 = a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v15 = *a2;\n  v16 = v12;\n  if ( v12 > 2 )\n    v16 = 2;\n  v17 = memcmp(v15, Block, v16);\n  if ( !v17 )\n  {\n    if ( v12 >= 2 )\n      v17 = v12 > 2;\n    else\n      v17 = -1;\n  }\n  if ( !v17 )\n  {\n    v18 = (_DWORD *)qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v22 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v22);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v18 = (_DWORD *)qword_14090BFD0;\n    }\n    v18[268] = 0;\n    v19 = (float)((float)rand() / 32767.0) * 1000.0;\n    v18[267] = (int)v19;\n    v18[266] = (int)v19;\nLABEL_31:\n    v20 = *(_QWORD *)(a1 + 1488);\n    if ( v20 )\n      (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v20 + 8LL))(v20, SplitIntFromKey, 51);\n    goto LABEL_35;\n  }\n  v21 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 1488);\n  if ( v21 )\n    (**v21)(v21, SplitIntFromKey, 51);\nLABEL_35:\n  sub_14003D310((__int64)a2);\n  sub_14003D310((__int64)a3);\n}", "assembly": "; \n; GameLevelManager::onSuggestLevelStarsCompleted from 0x140235640 to 0x1402358ea (682 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::handleIt @ 0x14021a45c\n; > <???> @ 0x14091bfbc\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; \nmov     [rsp-38h+arg_18], rbx                                          ; +0x0, 0x140235640\npush    rbp                                                            ; +0x5, 0x140235645\npush    rsi                                                            ; +0x6, 0x140235646\npush    rdi                                                            ; +0x7, 0x140235647\npush    r12                                                            ; +0x8, 0x140235648\npush    r13                                                            ; +0xa, 0x14023564a\npush    r14                                                            ; +0xc, 0x14023564c\npush    r15                                                            ; +0xe, 0x14023564e\nmov     rbp, rsp                                                       ; +0x10, 0x140235650\nsub     rsp, 70h                                                       ; +0x13, 0x140235653\nmov     rax, cs:__security_cookie                                      ; +0x17, 0x140235657\nxor     rax, rsp                                                       ; +0x1e, 0x14023565e\nmov     [rbp+var_8], rax                                               ; +0x21, 0x140235661\nmov     r14, r8                                                        ; +0x25, 0x140235665\nmov     rdi, rdx                                                       ; +0x28, 0x140235668\nmov     r13, rcx                                                       ; +0x2b, 0x14023566b\nmov     [rbp+var_38], rdx                                              ; +0x2e, 0x14023566e\nmov     [rbp+var_30], r8                                               ; +0x32, 0x140235672\nmov     rbx, r8                                                        ; +0x36, 0x140235676\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x39, 0x140235679\njbe     short loc_140235683                                            ; +0x3e, 0x14023567e\nmov     rbx, [r8]                                                      ; +0x40, 0x140235680\nxorps   xmm0, xmm0                                                     ; +0x43, 0x140235683\nmovups  xmmword ptr [rbp+Block], xmm0                                  ; +0x46, 0x140235686\nxor     esi, esi                                                       ; +0x4a, 0x14023568a\nmov     [rbp+var_18], rsi                                              ; +0x4c, 0x14023568c\nmov     [rbp+var_10], rsi                                              ; +0x50, 0x140235690\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x54, 0x140235694\nnop     dword ptr [rax+rax+00h]                                        ; +0x5b, 0x14023569b\ninc     r8                                                             ; +0x60, 0x1402356a0\ncmp     [rbx+r8], sil                                                  ; +0x63, 0x1402356a3\njnz     short loc_1402356A0                                            ; +0x67, 0x1402356a7\nmov     rdx, rbx                                                       ; +0x69, 0x1402356a9\nlea     rcx, [rbp+Block]                                               ; +0x6c, 0x1402356ac\ncall    sub_14003D230                                                  ; +0x70, 0x1402356b0\nnop                                                                    ; +0x75, 0x1402356b5\nlea     rdx, [rbp+Block]                                               ; +0x76, 0x1402356b6\nmov     rcx, [r13+4B0h]                                                ; +0x7a, 0x1402356ba\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 &) ; +0x81, 0x1402356c1\nnop                                                                    ; +0x87, 0x1402356c7\nmov     rdx, [rbp+var_10]                                              ; +0x88, 0x1402356c8\ncmp     rdx, 0Fh                                                       ; +0x8c, 0x1402356cc\njbe     short loc_140235715                                            ; +0x90, 0x1402356d0\ninc     rdx                                                            ; +0x92, 0x1402356d2\nmov     rcx, [rbp+Block]; Block                                        ; +0x95, 0x1402356d5\nmov     rax, rcx                                                       ; +0x99, 0x1402356d9\ncmp     rdx, 1000h                                                     ; +0x9c, 0x1402356dc\njb      short loc_140235710                                            ; +0xa3, 0x1402356e3\nadd     rdx, 27h ; '''                                                 ; +0xa5, 0x1402356e5\nmov     rcx, [rcx-8]                                                   ; +0xa9, 0x1402356e9\nsub     rax, rcx                                                       ; +0xad, 0x1402356ed\nsub     rax, 8                                                         ; +0xb0, 0x1402356f0\ncmp     rax, 1Fh                                                       ; +0xb4, 0x1402356f4\njbe     short loc_140235710                                            ; +0xb8, 0x1402356f8\nmov     [rsp+70h+Reserved], rsi; Reserved                              ; +0xba, 0x1402356fa\nxor     r9d, r9d; LineNo                                               ; +0xbf, 0x1402356ff\nxor     r8d, r8d; FileName                                             ; +0xc2, 0x140235702\nxor     edx, edx; FunctionName                                         ; +0xc5, 0x140235705\nxor     ecx, ecx; Expression                                           ; +0xc7, 0x140235707\ncall    cs:_invoke_watson                                              ; +0xc9, 0x140235709\nalign 10h                                                              ; +0xcf, 0x14023570f\ncall    j_j_free                                                       ; +0xd0, 0x140235710\nmov     r8d, 1                                                         ; +0xd5, 0x140235715\nmov     rdx, rbx                                                       ; +0xdb, 0x14023571b\ncall    GameLevelManager__getSplitIntFromKey                           ; +0xde, 0x14023571e\nmov     r12d, eax                                                      ; +0xe3, 0x140235723\nxorps   xmm0, xmm0                                                     ; +0xe6, 0x140235726\nmovups  xmmword ptr [rbp+Block], xmm0                                  ; +0xe9, 0x140235729\nmov     eax, 2                                                         ; +0xed, 0x14023572d\nmov     [rbp+var_18], rax                                              ; +0xf2, 0x140235732\nmov     r8d, 0Fh                                                       ; +0xf6, 0x140235736\nmov     [rbp+var_10], r8                                               ; +0xfc, 0x14023573c\nmovzx   ecx, word ptr cs:a1; \"-1\"                                      ; +0x100, 0x140235740\nmov     word ptr [rbp+Block], cx                                       ; +0x107, 0x140235747\nmov     byte ptr [rbp+Block+2], 0                                      ; +0x10b, 0x14023574b\nlea     rdx, [rbp+Block]; Buf2                                         ; +0x10f, 0x14023574f\nmov     rcx, rdi                                                       ; +0x113, 0x140235753\ncmp     [rdi+18h], r8                                                  ; +0x116, 0x140235756\njbe     short loc_14023575F                                            ; +0x11a, 0x14023575a\nmov     rcx, [rdi]; Buf1                                               ; +0x11c, 0x14023575c\nmov     r15, [rdi+10h]                                                 ; +0x11f, 0x14023575f\nmov     r8, r15                                                        ; +0x123, 0x140235763\ncmp     rax, r15                                                       ; +0x126, 0x140235766\ncmovb   r8, rax; Size                                                  ; +0x129, 0x140235769\ncall    memcmp                                                         ; +0x12d, 0x14023576d\nmov     ebx, eax                                                       ; +0x132, 0x140235772\ntest    eax, eax                                                       ; +0x134, 0x140235774\njnz     short loc_140235791                                            ; +0x136, 0x140235776\nmov     eax, 2                                                         ; +0x138, 0x140235778\ncmp     r15, rax                                                       ; +0x13d, 0x14023577d\njnb     short loc_140235789                                            ; +0x140, 0x140235780\nmov     ebx, 0FFFFFFFFh                                                ; +0x142, 0x140235782\njmp     short loc_140235791                                            ; +0x147, 0x140235787\nxor     ebx, ebx                                                       ; +0x149, 0x140235789\ncmp     r15, rax                                                       ; +0x14b, 0x14023578b\nsetnbe  bl                                                             ; +0x14e, 0x14023578e\nmov     ecx, 0Fh                                                       ; +0x151, 0x140235791\ntest    ebx, ebx                                                       ; +0x156, 0x140235796\njz      loc_14023587D                                                  ; +0x158, 0x140235798\nxorps   xmm0, xmm0                                                     ; +0x15e, 0x14023579e\nmovups  xmmword ptr [rbp+Block], xmm0                                  ; +0x161, 0x1402357a1\nmov     r9d, 2                                                         ; +0x165, 0x1402357a5\nmov     [rbp+var_18], r9                                               ; +0x16b, 0x1402357ab\nmov     [rbp+var_10], rcx                                              ; +0x16f, 0x1402357af\nmovzx   eax, cs:word_1407577B4                                         ; +0x173, 0x1402357b3\nmov     word ptr [rbp+Block], ax                                       ; +0x17a, 0x1402357ba\nmov     byte ptr [rbp+Block+2], 0                                      ; +0x17e, 0x1402357be\nlea     rdx, [rbp+Block]; Buf2                                         ; +0x182, 0x1402357c2\nmov     rcx, rdi                                                       ; +0x186, 0x1402357c6\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x189, 0x1402357c9\njbe     short loc_1402357D3                                            ; +0x18e, 0x1402357ce\nmov     rcx, [rdi]; Buf1                                               ; +0x190, 0x1402357d0\nmov     r8, r15                                                        ; +0x193, 0x1402357d3\ncmp     r9, r15                                                        ; +0x196, 0x1402357d6\ncmovb   r8, r9; Size                                                   ; +0x199, 0x1402357d9\ncall    memcmp                                                         ; +0x19d, 0x1402357dd\nmov     ebx, eax                                                       ; +0x1a2, 0x1402357e2\ntest    eax, eax                                                       ; +0x1a4, 0x1402357e4\njnz     short loc_140235801                                            ; +0x1a6, 0x1402357e6\nmov     eax, 2                                                         ; +0x1a8, 0x1402357e8\ncmp     r15, rax                                                       ; +0x1ad, 0x1402357ed\njnb     short loc_1402357F9                                            ; +0x1b0, 0x1402357f0\nmov     ebx, 0FFFFFFFFh                                                ; +0x1b2, 0x1402357f2\njmp     short loc_140235801                                            ; +0x1b7, 0x1402357f7\nxor     ebx, ebx                                                       ; +0x1b9, 0x1402357f9\ncmp     r15, rax                                                       ; +0x1bb, 0x1402357fb\nsetnbe  bl                                                             ; +0x1be, 0x1402357fe\ntest    ebx, ebx                                                       ; +0x1c1, 0x140235801\njnz     loc_14023589A                                                  ; +0x1c3, 0x140235803\nmov     rbx, cs:qword_14090BFD0                                        ; +0x1c9, 0x140235809\ntest    rbx, rbx                                                       ; +0x1d0, 0x140235810\njnz     short loc_140235846                                            ; +0x1d3, 0x140235813\nmov     ecx, 6E8h; Size                                                ; +0x1d5, 0x140235815\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1da, 0x14023581a\nmov     [rbp+var_40], rax                                              ; +0x1df, 0x14023581f\nmov     rcx, rax                                                       ; +0x1e3, 0x140235823\ncall    GameManager__GameManager                                       ; +0x1e6, 0x140235826\nnop                                                                    ; +0x1eb, 0x14023582b\nmov     cs:qword_14090BFD0, rax                                        ; +0x1ec, 0x14023582c\nmov     rcx, [rax]                                                     ; +0x1f3, 0x140235833\nmov     rdx, [rcx+48h]                                                 ; +0x1f6, 0x140235836\nmov     rcx, rax                                                       ; +0x1fa, 0x14023583a\ncall    rdx                                                            ; +0x1fd, 0x14023583d\nmov     rbx, cs:qword_14090BFD0                                        ; +0x1ff, 0x14023583f\nmov     dword ptr [rbx+430h], 0                                        ; +0x206, 0x140235846\ncall    cs:rand                                                        ; +0x210, 0x140235850\nmovd    xmm0, eax                                                      ; +0x216, 0x140235856\ncvtdq2ps xmm0, xmm0                                                    ; +0x21a, 0x14023585a\ndivss   xmm0, cs:dword_140835BDC                                       ; +0x21d, 0x14023585d\nmulss   xmm0, cs:dword_140835AA4                                       ; +0x225, 0x140235865\ncvttss2si eax, xmm0                                                    ; +0x22d, 0x14023586d\nmov     [rbx+42Ch], eax                                                ; +0x231, 0x140235871\nmov     [rbx+428h], eax                                                ; +0x237, 0x140235877\nmov     rcx, [r13+5D0h]                                                ; +0x23d, 0x14023587d\ntest    rcx, rcx                                                       ; +0x244, 0x140235884\njz      short loc_1402358B5                                            ; +0x247, 0x140235887\nmov     rax, [rcx]                                                     ; +0x249, 0x140235889\nmov     r8d, 33h ; '3'                                                 ; +0x24c, 0x14023588c\nmov     edx, r12d                                                      ; +0x252, 0x140235892\ncall    qword ptr [rax+8]                                              ; +0x255, 0x140235895\njmp     short loc_1402358B5                                            ; +0x258, 0x140235898\nmov     rcx, [r13+5D0h]                                                ; +0x25a, 0x14023589a\ntest    rcx, rcx                                                       ; +0x261, 0x1402358a1\njz      short loc_1402358B5                                            ; +0x264, 0x1402358a4\nmov     rax, [rcx]                                                     ; +0x266, 0x1402358a6\nmov     r8d, 33h ; '3'                                                 ; +0x269, 0x1402358a9\nmov     edx, r12d                                                      ; +0x26f, 0x1402358af\ncall    qword ptr [rax]                                                ; +0x272, 0x1402358b2\nnop                                                                    ; +0x274, 0x1402358b4\nmov     rcx, rdi                                                       ; +0x275, 0x1402358b5\ncall    sub_14003D310                                                  ; +0x278, 0x1402358b8\nnop                                                                    ; +0x27d, 0x1402358bd\nmov     rcx, r14                                                       ; +0x27e, 0x1402358be\ncall    sub_14003D310                                                  ; +0x281, 0x1402358c1\nmov     rcx, [rbp+var_8]                                               ; +0x286, 0x1402358c6\nxor     rcx, rsp; StackCookie                                          ; +0x28a, 0x1402358ca\ncall    __security_check_cookie                                        ; +0x28d, 0x1402358cd\nmov     rbx, [rsp+70h+arg_18]                                          ; +0x292, 0x1402358d2\nadd     rsp, 70h                                                       ; +0x29a, 0x1402358da\npop     r15                                                            ; +0x29e, 0x1402358de\npop     r14                                                            ; +0x2a0, 0x1402358e0\npop     r13                                                            ; +0x2a2, 0x1402358e2\npop     r12                                                            ; +0x2a4, 0x1402358e4\npop     rdi                                                            ; +0x2a6, 0x1402358e6\npop     rsi                                                            ; +0x2a7, 0x1402358e7\npop     rbp                                                            ; +0x2a8, 0x1402358e8\nretn                                                                   ; +0x2a9, 0x1402358e9", "xrefs": ["GameLevelManager::handleIt @ 0x14021a45c", "<???> @ 0x14091bfbc"], "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"}