{"type": "func", "start": 5371003792, "end": 5371004260, "name": "GameLevelManager::onUpdateEditorSoundDescriptionCompleted", "pseudocode": "// \n// GameLevelManager::onUpdateEditorSoundDescriptionCompleted from 0x140230390 to 0x140230564 (468 bytes)\n// \n// 3 xrefs:\n// > GameLevelManager::handleIt @ 0x14021a9ca\n// > <???> @ 0x14091bea8\n// > <???> @ 0x14091beb4\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:30 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall GameLevelManager::onUpdateEditorSoundDescriptionCompleted(__int64 a1, const void **a2, _QWORD *a3)\n{\n  unsigned int v6; // r15d\n  unsigned __int64 v7; // rax\n  size_t v8; // rax\n  size_t v9; // r8\n  _QWORD *v10; // rdx\n  const char *v11; // rcx\n  char *v12; // r8\n  const void *v13; // rcx\n  size_t v14; // r8\n  const char *v15; // rcx\n  void (__fastcall ***v16)(_QWORD, _QWORD, __int64); // rcx\n  __int64 v17; // rcx\n  char *String[2]; // [rsp+48h] [rbp-40h] BYREF\n  __int128 v19; // [rsp+58h] [rbp-30h]\n\n  sub_1400CF7C0((__int64 *)(a1 + 824), a3);\n  v6 = 0;\n  v7 = a3[2];\n  if ( v7 > 8 )\n  {\n    *(_OWORD *)String = 0;\n    v19 = 0;\n    v8 = v7 - 8;\n    v9 = -1;\n    if ( v8 != -1 )\n      v9 = v8;\n    v10 = a3;\n    if ( a3[3] > 0xFu )\n      v10 = (_QWORD *)*a3;\n    sub_14003D230(String, v10 + 1, v9);\n    v11 = (const char *)String;\n    if ( *((_QWORD *)&v19 + 1) > 0xFu )\n      v11 = String[0];\n    v6 = atoi(v11);\n    if ( *((_QWORD *)&v19 + 1) > 0xFu )\n    {\n      v12 = String[0];\n      if ( (unsigned __int64)(*((_QWORD *)&v19 + 1) + 1LL) >= 0x1000 )\n      {\n        v12 = *((char **)String[0] - 1);\n        if ( (unsigned __int64)(String[0] - v12 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v12);\n    }\n  }\n  *(_OWORD *)String = 0;\n  *(_QWORD *)&v19 = 2;\n  *((_QWORD *)&v19 + 1) = 15;\n  strcpy((char *)String, \"-1\");\n  v13 = a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v13 = *a2;\n  v14 = (size_t)a2[2];\n  if ( v14 > 2 )\n    v14 = 2;\n  if ( !memcmp(v13, String, v14) && a2[2] == (const void *)2 )\n    goto LABEL_24;\n  v15 = (const char *)a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v15 = (const char *)*a2;\n  if ( atoi(v15) < 0 )\n  {\nLABEL_24:\n    v17 = *(_QWORD *)(a1 + 1488);\n    if ( v17 )\n      (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v17 + 8LL))(v17, v6, 73);\n  }\n  else\n  {\n    v16 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 1488);\n    if ( v16 )\n      (**v16)(v16, v6, 73);\n  }\n  sub_14003D310((__int64)a2);\n  sub_14003D310((__int64)a3);\n}", "assembly": "; \n; GameLevelManager::onUpdateEditorSoundDescriptionCompleted from 0x140230390 to 0x140230564 (468 bytes)\n; \n; 3 xrefs:\n; > GameLevelManager::handleIt @ 0x14021a9ca\n; > <???> @ 0x14091bea8\n; > <???> @ 0x14091beb4\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:30 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x140230390\npush    rdi                                                            ; +0x5, 0x140230395\npush    r14                                                            ; +0x6, 0x140230396\npush    r15                                                            ; +0x8, 0x140230398\nsub     rsp, 70h                                                       ; +0xa, 0x14023039a\nmov     rax, cs:__security_cookie                                      ; +0xe, 0x14023039e\nxor     rax, rsp                                                       ; +0x15, 0x1402303a5\nmov     [rsp+88h+var_20], rax                                          ; +0x18, 0x1402303a8\nmov     rdi, r8                                                        ; +0x1d, 0x1402303ad\nmov     rbx, rdx                                                       ; +0x20, 0x1402303b0\nmov     r14, rcx                                                       ; +0x23, 0x1402303b3\nmov     [rsp+88h+var_50], rdx                                          ; +0x26, 0x1402303b6\nmov     [rsp+88h+var_48], r8                                           ; +0x2b, 0x1402303bb\nadd     rcx, 338h                                                      ; +0x30, 0x1402303c0\nmov     rdx, r8                                                        ; +0x37, 0x1402303c7\ncall    sub_1400CF7C0                                                  ; +0x3a, 0x1402303ca\nxor     r15d, r15d                                                     ; +0x3f, 0x1402303cf\nmov     rax, [rdi+10h]                                                 ; +0x42, 0x1402303d2\ncmp     rax, 8                                                         ; +0x46, 0x1402303d6\njbe     loc_14023048E                                                  ; +0x4a, 0x1402303da\nxorps   xmm0, xmm0                                                     ; +0x50, 0x1402303e0\nmovups  xmmword ptr [rsp+88h+String], xmm0                             ; +0x53, 0x1402303e3\nxorps   xmm1, xmm1                                                     ; +0x58, 0x1402303e8\nmovdqu  [rsp+88h+var_30], xmm1                                         ; +0x5b, 0x1402303eb\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x61, 0x1402303f1\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x65, 0x1402303f5\ncmp     rax, r8                                                        ; +0x6c, 0x1402303fc\ncmovb   r8, rax                                                        ; +0x6f, 0x1402303ff\nmov     rdx, rdi                                                       ; +0x73, 0x140230403\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x76, 0x140230406\njbe     short loc_140230410                                            ; +0x7b, 0x14023040b\nmov     rdx, [rdi]                                                     ; +0x7d, 0x14023040d\nadd     rdx, 8                                                         ; +0x80, 0x140230410\nlea     rcx, [rsp+88h+String]                                          ; +0x84, 0x140230414\ncall    sub_14003D230                                                  ; +0x89, 0x140230419\nlea     rcx, [rsp+88h+String]                                          ; +0x8e, 0x14023041e\ncmp     qword ptr [rsp+88h+var_30+8], 0Fh                              ; +0x93, 0x140230423\ncmova   rcx, [rsp+88h+String]; String                                  ; +0x99, 0x140230429\ncall    cs:atoi                                                        ; +0x9f, 0x14023042f\nmov     r15d, eax                                                      ; +0xa5, 0x140230435\nmov     rdx, qword ptr [rsp+88h+var_30+8]                              ; +0xa8, 0x140230438\ncmp     rdx, 0Fh                                                       ; +0xad, 0x14023043d\njbe     short loc_14023048E                                            ; +0xb1, 0x140230441\ninc     rdx                                                            ; +0xb3, 0x140230443\nmov     r8, [rsp+88h+String]                                           ; +0xb6, 0x140230446\nmov     rcx, r8                                                        ; +0xbb, 0x14023044b\ncmp     rdx, 1000h                                                     ; +0xbe, 0x14023044e\njb      short loc_140230486                                            ; +0xc5, 0x140230455\nadd     rdx, 27h ; '''                                                 ; +0xc7, 0x140230457\nmov     r8, [r8-8]                                                     ; +0xcb, 0x14023045b\nsub     rcx, r8                                                        ; +0xcf, 0x14023045f\nsub     rcx, 8                                                         ; +0xd2, 0x140230462\ncmp     rcx, 1Fh                                                       ; +0xd6, 0x140230466\njbe     short loc_140230486                                            ; +0xda, 0x14023046a\nmov     [rsp+88h+Reserved], 0; Reserved                                ; +0xdc, 0x14023046c\nxor     r9d, r9d; LineNo                                               ; +0xe5, 0x140230475\nxor     r8d, r8d; FileName                                             ; +0xe8, 0x140230478\nxor     edx, edx; FunctionName                                         ; +0xeb, 0x14023047b\nxor     ecx, ecx; Expression                                           ; +0xed, 0x14023047d\ncall    cs:_invoke_watson                                              ; +0xef, 0x14023047f\nalign 2                                                                ; +0xf5, 0x140230485\nmov     rcx, r8; Block                                                 ; +0xf6, 0x140230486\ncall    j_j_free                                                       ; +0xf9, 0x140230489\nxorps   xmm0, xmm0                                                     ; +0xfe, 0x14023048e\nmovups  xmmword ptr [rsp+88h+String], xmm0                             ; +0x101, 0x140230491\nmov     edx, 2                                                         ; +0x106, 0x140230496\nmov     qword ptr [rsp+88h+var_30], rdx                                ; +0x10b, 0x14023049b\nmov     qword ptr [rsp+88h+var_30+8], 0Fh                              ; +0x110, 0x1402304a0\nmov     eax, 312Dh                                                     ; +0x119, 0x1402304a9\nmov     word ptr [rsp+88h+String], ax                                  ; +0x11e, 0x1402304ae\nmov     byte ptr [rsp+88h+String+2], 0                                 ; +0x123, 0x1402304b3\nmov     rcx, rbx                                                       ; +0x128, 0x1402304b8\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x12b, 0x1402304bb\njbe     short loc_1402304C5                                            ; +0x130, 0x1402304c0\nmov     rcx, [rbx]; Buf1                                               ; +0x132, 0x1402304c2\nmov     r8, [rbx+10h]                                                  ; +0x135, 0x1402304c5\ncmp     r8, rdx                                                        ; +0x139, 0x1402304c9\ncmova   r8, rdx; Size                                                  ; +0x13c, 0x1402304cc\nlea     rdx, [rsp+88h+String]; Buf2                                    ; +0x140, 0x1402304d0\ncall    memcmp                                                         ; +0x145, 0x1402304d5\ntest    eax, eax                                                       ; +0x14a, 0x1402304da\njnz     short loc_1402304E5                                            ; +0x14c, 0x1402304dc\ncmp     qword ptr [rbx+10h], 2                                         ; +0x14e, 0x1402304de\njz      short loc_140230518                                            ; +0x153, 0x1402304e3\nmov     rcx, rbx                                                       ; +0x155, 0x1402304e5\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x158, 0x1402304e8\njbe     short loc_1402304F2                                            ; +0x15d, 0x1402304ed\nmov     rcx, [rbx]; String                                             ; +0x15f, 0x1402304ef\ncall    cs:atoi                                                        ; +0x162, 0x1402304f2\ntest    eax, eax                                                       ; +0x168, 0x1402304f8\njs      short loc_140230518                                            ; +0x16a, 0x1402304fa\nmov     rcx, [r14+5D0h]                                                ; +0x16c, 0x1402304fc\ntest    rcx, rcx                                                       ; +0x173, 0x140230503\njz      short loc_140230534                                            ; +0x176, 0x140230506\nmov     rax, [rcx]                                                     ; +0x178, 0x140230508\nmov     r8d, 49h ; 'I'                                                 ; +0x17b, 0x14023050b\nmov     edx, r15d                                                      ; +0x181, 0x140230511\ncall    qword ptr [rax]                                                ; +0x184, 0x140230514\njmp     short loc_140230534                                            ; +0x186, 0x140230516\nmov     rcx, [r14+5D0h]                                                ; +0x188, 0x140230518\ntest    rcx, rcx                                                       ; +0x18f, 0x14023051f\njz      short loc_140230534                                            ; +0x192, 0x140230522\nmov     rax, [rcx]                                                     ; +0x194, 0x140230524\nmov     r8d, 49h ; 'I'                                                 ; +0x197, 0x140230527\nmov     edx, r15d                                                      ; +0x19d, 0x14023052d\ncall    qword ptr [rax+8]                                              ; +0x1a0, 0x140230530\nnop                                                                    ; +0x1a3, 0x140230533\nmov     rcx, rbx                                                       ; +0x1a4, 0x140230534\ncall    sub_14003D310                                                  ; +0x1a7, 0x140230537\nnop                                                                    ; +0x1ac, 0x14023053c\nmov     rcx, rdi                                                       ; +0x1ad, 0x14023053d\ncall    sub_14003D310                                                  ; +0x1b0, 0x140230540\nmov     rcx, [rsp+88h+var_20]                                          ; +0x1b5, 0x140230545\nxor     rcx, rsp; StackCookie                                          ; +0x1ba, 0x14023054a\ncall    __security_check_cookie                                        ; +0x1bd, 0x14023054d\nmov     rbx, [rsp+88h+arg_18]                                          ; +0x1c2, 0x140230552\nadd     rsp, 70h                                                       ; +0x1ca, 0x14023055a\npop     r15                                                            ; +0x1ce, 0x14023055e\npop     r14                                                            ; +0x1d0, 0x140230560\npop     rdi                                                            ; +0x1d2, 0x140230562\nretn                                                                   ; +0x1d3, 0x140230563", "xrefs": ["GameLevelManager::handleIt @ 0x14021a9ca", "<???> @ 0x14091bea8", "<???> @ 0x14091beb4"], "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"}