//
// GameLevelManager::onUpdateEditorSoundDescriptionCompleted from 0x140230390 to 0x140230564 (468 bytes)
//
// 3 xrefs:
// > GameLevelManager::handleIt @ 0x14021a9ca
// > ??> @ 0x14091bea8
// > ??> @ 0x14091beb4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:28:30 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall GameLevelManager::onUpdateEditorSoundDescriptionCompleted(__int64 a1, const void **a2, _QWORD *a3)
{
unsigned int v6; // r15d
unsigned __int64 v7; // rax
size_t v8; // rax
size_t v9; // r8
_QWORD *v10; // rdx
const char *v11; // rcx
char *v12; // r8
const void *v13; // rcx
size_t v14; // r8
const char *v15; // rcx
void (__fastcall ***v16)(_QWORD, _QWORD, __int64); // rcx
__int64 v17; // rcx
char *String[2]; // [rsp+48h] [rbp-40h] BYREF
__int128 v19; // [rsp+58h] [rbp-30h]
sub_1400CF7C0((__int64 *)(a1 + 824), a3);
v6 = 0;
v7 = a3[2];
if ( v7 > 8 )
{
*(_OWORD *)String = 0;
v19 = 0;
v8 = v7 - 8;
v9 = -1;
if ( v8 != -1 )
v9 = v8;
v10 = a3;
if ( a3[3] > 0xFu )
v10 = (_QWORD *)*a3;
sub_14003D230(String, v10 + 1, v9);
v11 = (const char *)String;
if ( *((_QWORD *)&v19 + 1) > 0xFu )
v11 = String[0];
v6 = atoi(v11);
if ( *((_QWORD *)&v19 + 1) > 0xFu )
{
v12 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v19 + 1) + 1LL) >= 0x1000 )
{
v12 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v12 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v12);
}
}
*(_OWORD *)String = 0;
*(_QWORD *)&v19 = 2;
*((_QWORD *)&v19 + 1) = 15;
strcpy((char *)String, "-1");
v13 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v13 = *a2;
v14 = (size_t)a2[2];
if ( v14 > 2 )
v14 = 2;
if ( !memcmp(v13, String, v14) && a2[2] == (const void *)2 )
goto LABEL_24;
v15 = (const char *)a2;
if ( (unsigned __int64)a2[3] > 0xF )
v15 = (const char *)*a2;
if ( atoi(v15) < 0 )
{
LABEL_24:
v17 = *(_QWORD *)(a1 + 1488);
if ( v17 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v17 + 8LL))(v17, v6, 73);
}
else
{
v16 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 1488);
if ( v16 )
(**v16)(v16, v6, 73);
}
sub_14003D310((__int64)a2);
sub_14003D310((__int64)a3);
}