//
// EditorSoundConfigInfoLayer::deleteEditorSoundFailed from 0x1008f9b40 to 0x1008f9c21 (225 bytes)
//
// 2 xrefs:
// > sub_1008F9C40 @ 0x1008f9c4c
// > ??> @ 0x100bb6098
//
// 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 12:37:59 +0000
//
void __fastcall EditorSoundConfigInfoLayer::deleteEditorSoundFailed(__int64 a1, int a2, int a3)
{
__int64 v4; // rax
char *v5; // rax
const char *v6; // rsi
__int64 v7; // rcx
__int64 v8; // rax
__int128 v9; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
v4 = *(_QWORD *)(a1 + 1088);
if ( !v4 || *(_DWORD *)(v4 + 316) == a2 )
{
v5 = (char *)operator new(0x38u);
if ( a3 == -21 )
{
qmemcpy(v5, "Featured or popular sound packs cannot be deleted.", 50);
v6 = "Cannot Delete";
v7 = 50;
}
else
{
qmemcpy(v5, "Could not delete this sound pack from the server.", 49);
v6 = "Delete Failed";
v7 = 49;
}
v5[v7] = 0;
__p = v5;
*(_QWORD *)&v9 = 57;
*((_QWORD *)&v9 + 1) = v7;
v8 = sub_100493AB0(0, (__int64)v6, &v9, (__int64)"OK", 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1312LL))(v8);
if ( (v9 & 1) != 0 )
operator delete(__p);
}
}