//
// GameLevelManager::onDeleteServerEditorSoundCompleted from 0x140230570 to 0x140230749 (473 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x14021a98f
// > ??> @ 0x14091bec0
//
// 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::onDeleteServerEditorSoundCompleted(__int64 a1, const char *a2, _QWORD *a3)
{
unsigned int v6; // esi
unsigned int v7; // r12d
unsigned __int64 v8; // rax
size_t v9; // rax
size_t v10; // r8
_QWORD *v11; // rdx
const char *v12; // rcx
char *v13; // r8
const char *v14; // rcx
int v15; // ebp
const char *v16; // rcx
size_t v17; // r8
void (__fastcall ***v18)(_QWORD, _QWORD); // rcx
__int64 v19; // rcx
char *String[2]; // [rsp+48h] [rbp-50h] BYREF
__int128 v21; // [rsp+58h] [rbp-40h]
v6 = 0;
sub_1400CF7C0((__int64 *)(a1 + 824), a3);
v7 = 0;
v8 = a3[2];
if ( v8 > 7 )
{
*(_OWORD *)String = 0;
v21 = 0;
v9 = v8 - 7;
v10 = -1;
if ( v9 != -1 )
v10 = v9;
v11 = a3;
if ( a3[3] > 0xFu )
v11 = (_QWORD *)*a3;
sub_14003D230(String, (char *)v11 + 7, v10);
v12 = (const char *)String;
if ( *((_QWORD *)&v21 + 1) > 0xFu )
v12 = String[0];
v7 = atoi(v12);
if ( *((_QWORD *)&v21 + 1) > 0xFu )
{
v13 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v21 + 1) + 1LL) >= 0x1000 )
{
v13 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v13);
}
}
v14 = a2;
if ( *((_QWORD *)a2 + 3) > 0xFu )
v14 = *(const char **)a2;
v15 = atoi(v14);
*(_OWORD *)String = 0;
*(_QWORD *)&v21 = 2;
*((_QWORD *)&v21 + 1) = 15;
strcpy((char *)String, "-1");
v16 = a2;
if ( *((_QWORD *)a2 + 3) > 0xFu )
v16 = *(const char **)a2;
v17 = *((_QWORD *)a2 + 2);
if ( v17 > 2 )
v17 = 2;
if ( !memcmp(v16, String, v17) && *((_QWORD *)a2 + 2) == 2 || v15 < 0 )
{
v19 = *(_QWORD *)(a1 + 1472);
if ( v15 == -21 )
v6 = -21;
if ( v19 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)v19 + 8LL))(v19, v7, v6);
}
else
{
v18 = *(void (__fastcall ****)(_QWORD, _QWORD))(a1 + 1472);
if ( v18 )
(**v18)(v18, v7);
}
sub_14003D310((__int64)a2);
sub_14003D310((__int64)a3);
}