{"type": "func", "start": 5370193184, "end": 5370193584, "name": "GameLevelManager::onReportLevelCompleted", "pseudocode": "// \n// GameLevelManager::onReportLevelCompleted from 0x14016a520 to 0x14016a6b0 (400 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::handleIt @ 0x1401435a5\n// > <???> @ 0x1406cad40\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=3\nvoid __fastcall GameLevelManager::onReportLevelCompleted(__int64 a1, const void **a2, const char *a3)\n{\n  const char *v6; // rcx\n  int v7; // r14d\n  const void *v8; // rcx\n  unsigned __int64 v9; // rbp\n  size_t v10; // r8\n  size_t v11; // rbx\n  cocos2d::CCString *v12; // rax\n  const char *CString; // rax\n  void *v14; // rcx\n  __int128 Buf2; // [rsp+30h] [rbp-58h] BYREF\n  __int128 v16; // [rsp+40h] [rbp-48h]\n\n  v6 = a3;\n  if ( *((_QWORD *)a3 + 3) > 0xFu )\n    v6 = *(const char **)a3;\n  v7 = atoi(v6);\n  Buf2 = 0;\n  *(_QWORD *)&v16 = 2;\n  *((_QWORD *)&v16 + 1) = 15;\n  strcpy((char *)&Buf2, \"-1\");\n  v8 = a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v8 = *a2;\n  v9 = (unsigned __int64)a2[2];\n  v10 = v9;\n  if ( v9 > 2 )\n    v10 = 2;\n  v11 = -1;\n  if ( !memcmp(v8, &Buf2, v10) && v9 == 2 )\n  {\n    v12 = cocos2d::CCString::createWithFormat(\"%i\", v7);\n    CString = cocos2d::CCString::getCString(v12);\n    Buf2 = 0;\n    v16 = 0;\n    do\n      ++v11;\n    while ( CString[v11] );\n    sub_14003A930(&Buf2, CString, v11);\n    cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 416), &Buf2);\n    if ( *((_QWORD *)&v16 + 1) > 0xFu )\n    {\n      v14 = (void *)Buf2;\n      if ( (unsigned __int64)(*((_QWORD *)&v16 + 1) + 1LL) >= 0x1000 )\n      {\n        v14 = *(void **)(Buf2 - 8);\n        if ( (unsigned __int64)(Buf2 - (_QWORD)v14 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v14);\n    }\n  }\n  sub_14003A830((__int64)a2);\n  sub_14003A830((__int64)a3);\n}", "assembly": "; \n; GameLevelManager::onReportLevelCompleted from 0x14016a520 to 0x14016a6b0 (400 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::handleIt @ 0x1401435a5\n; > <???> @ 0x1406cad40\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\nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x14016a520\npush    rbp                                                            ; +0x5, 0x14016a525\npush    rsi                                                            ; +0x6, 0x14016a526\npush    rdi                                                            ; +0x7, 0x14016a527\npush    r14                                                            ; +0x8, 0x14016a528\npush    r15                                                            ; +0xa, 0x14016a52a\nsub     rsp, 60h                                                       ; +0xc, 0x14016a52c\nmov     rax, cs:__security_cookie                                      ; +0x10, 0x14016a530\nxor     rax, rsp                                                       ; +0x17, 0x14016a537\nmov     [rsp+88h+var_38], rax                                          ; +0x1a, 0x14016a53a\nmov     rsi, r8                                                        ; +0x1f, 0x14016a53f\nmov     rdi, rdx                                                       ; +0x22, 0x14016a542\nmov     r15, rcx                                                       ; +0x25, 0x14016a545\nmov     [rsp+88h+var_68], rdx                                          ; +0x28, 0x14016a548\nmov     [rsp+88h+var_60], r8                                           ; +0x2d, 0x14016a54d\nmov     rcx, r8                                                        ; +0x32, 0x14016a552\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x35, 0x14016a555\njbe     short loc_14016A55F                                            ; +0x3a, 0x14016a55a\nmov     rcx, [r8]; String                                              ; +0x3c, 0x14016a55c\ncall    cs:atoi                                                        ; +0x3f, 0x14016a55f\nmov     r14d, eax                                                      ; +0x45, 0x14016a565\nxorps   xmm0, xmm0                                                     ; +0x48, 0x14016a568\nmovups  [rsp+88h+Buf2], xmm0                                           ; +0x4b, 0x14016a56b\nmov     edx, 2                                                         ; +0x50, 0x14016a570\nmov     qword ptr [rsp+88h+var_48], rdx                                ; +0x55, 0x14016a575\nmov     qword ptr [rsp+88h+var_48+8], 0Fh                              ; +0x5a, 0x14016a57a\nmov     eax, 312Dh                                                     ; +0x63, 0x14016a583\nmov     word ptr [rsp+88h+Buf2], ax                                    ; +0x68, 0x14016a588\nmov     byte ptr [rsp+88h+Buf2+2], 0                                   ; +0x6d, 0x14016a58d\nmov     rcx, rdi                                                       ; +0x72, 0x14016a592\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x75, 0x14016a595\njbe     short loc_14016A59F                                            ; +0x7a, 0x14016a59a\nmov     rcx, [rdi]; Buf1                                               ; +0x7c, 0x14016a59c\nmov     rbp, [rdi+10h]                                                 ; +0x7f, 0x14016a59f\nmov     r8, rbp                                                        ; +0x83, 0x14016a5a3\ncmp     rbp, rdx                                                       ; +0x86, 0x14016a5a6\ncmova   r8, rdx; Size                                                  ; +0x89, 0x14016a5a9\nlea     rdx, [rsp+88h+Buf2]; Buf2                                      ; +0x8d, 0x14016a5ad\ncall    memcmp                                                         ; +0x92, 0x14016a5b2\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x97, 0x14016a5b7\ntest    eax, eax                                                       ; +0x9e, 0x14016a5be\njnz     loc_14016A67E                                                  ; +0xa0, 0x14016a5c0\ncmp     rbp, 2                                                         ; +0xa6, 0x14016a5c6\njnb     short loc_14016A5D0                                            ; +0xaa, 0x14016a5ca\nmov     eax, ebx                                                       ; +0xac, 0x14016a5cc\njmp     short loc_14016A5D7                                            ; +0xae, 0x14016a5ce\njbe     short loc_14016A5DF                                            ; +0xb0, 0x14016a5d0\nmov     eax, 1                                                         ; +0xb2, 0x14016a5d2\ntest    eax, eax                                                       ; +0xb7, 0x14016a5d7\njnz     loc_14016A67E                                                  ; +0xb9, 0x14016a5d9\nmov     edx, r14d                                                      ; +0xbf, 0x14016a5df\nlea     rcx, aI_11; \"%i\"                                               ; +0xc2, 0x14016a5e2\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xc9, 0x14016a5e9\nmov     rcx, rax                                                       ; +0xcf, 0x14016a5ef\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xd2, 0x14016a5f2\nxorps   xmm0, xmm0                                                     ; +0xd8, 0x14016a5f8\nmovups  [rsp+88h+Buf2], xmm0                                           ; +0xdb, 0x14016a5fb\nxorps   xmm1, xmm1                                                     ; +0xe0, 0x14016a600\nmovdqu  [rsp+88h+var_48], xmm1                                         ; +0xe3, 0x14016a603\nnop     dword ptr [rax+00000000h]                                      ; +0xe9, 0x14016a609\ninc     rbx                                                            ; +0xf0, 0x14016a610\ncmp     byte ptr [rax+rbx], 0                                          ; +0xf3, 0x14016a613\njnz     short loc_14016A610                                            ; +0xf7, 0x14016a617\nmov     r8, rbx                                                        ; +0xf9, 0x14016a619\nmov     rdx, rax                                                       ; +0xfc, 0x14016a61c\nlea     rcx, [rsp+88h+Buf2]                                            ; +0xff, 0x14016a61f\ncall    sub_14003A930                                                  ; +0x104, 0x14016a624\nnop                                                                    ; +0x109, 0x14016a629\nlea     rdx, [rsp+88h+Buf2]                                            ; +0x10a, 0x14016a62a\nmov     rcx, [r15+1A0h]                                                ; +0x10f, 0x14016a62f\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 &) ; +0x116, 0x14016a636\nnop                                                                    ; +0x11c, 0x14016a63c\nmov     rdx, qword ptr [rsp+88h+var_48+8]                              ; +0x11d, 0x14016a63d\ncmp     rdx, 0Fh                                                       ; +0x122, 0x14016a642\njbe     short loc_14016A67E                                            ; +0x126, 0x14016a646\ninc     rdx                                                            ; +0x128, 0x14016a648\nmov     rcx, qword ptr [rsp+88h+Buf2]; Block                           ; +0x12b, 0x14016a64b\nmov     rax, rcx                                                       ; +0x130, 0x14016a650\ncmp     rdx, 1000h                                                     ; +0x133, 0x14016a653\njb      short loc_14016A678                                            ; +0x13a, 0x14016a65a\nadd     rdx, 27h ; '''                                                 ; +0x13c, 0x14016a65c\nmov     rcx, [rcx-8]                                                   ; +0x140, 0x14016a660\nsub     rax, rcx                                                       ; +0x144, 0x14016a664\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x147, 0x14016a667\ncmp     rax, 1Fh                                                       ; +0x14b, 0x14016a66b\njbe     short loc_14016A678                                            ; +0x14f, 0x14016a66f\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x151, 0x14016a671\nalign 8                                                                ; +0x157, 0x14016a677\ncall    j_j_free                                                       ; +0x158, 0x14016a678\nnop                                                                    ; +0x15d, 0x14016a67d\nmov     rcx, rdi                                                       ; +0x15e, 0x14016a67e\ncall    sub_14003A830                                                  ; +0x161, 0x14016a681\nnop                                                                    ; +0x166, 0x14016a686\nmov     rcx, rsi                                                       ; +0x167, 0x14016a687\ncall    sub_14003A830                                                  ; +0x16a, 0x14016a68a\nmov     rcx, [rsp+88h+var_38]                                          ; +0x16f, 0x14016a68f\nxor     rcx, rsp; StackCookie                                          ; +0x174, 0x14016a694\ncall    __security_check_cookie                                        ; +0x177, 0x14016a697\nmov     rbx, [rsp+88h+arg_18]                                          ; +0x17c, 0x14016a69c\nadd     rsp, 60h                                                       ; +0x184, 0x14016a6a4\npop     r15                                                            ; +0x188, 0x14016a6a8\npop     r14                                                            ; +0x18a, 0x14016a6aa\npop     rdi                                                            ; +0x18c, 0x14016a6ac\npop     rsi                                                            ; +0x18d, 0x14016a6ad\npop     rbp                                                            ; +0x18e, 0x14016a6ae\nretn                                                                   ; +0x18f, 0x14016a6af", "xrefs": ["GameLevelManager::handleIt @ 0x1401435a5", "<???> @ 0x1406cad40"], "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"}