//
// EditorSoundBrowserLayer::onSaveActive from 0x14018fee0 to 0x140190072 (402 bytes)
//
// 2 xrefs:
// > EditorSoundBrowserLayer::init @ 0x14018e81f
// > ??> @ 0x140919268
//
// 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:27:42 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall EditorSoundBrowserLayer::onSaveActive(_DWORD *a1)
{
__int64 v2; // rax
__int64 v3; // rbx
_DWORD *v4; // rcx
__int128 v6; // [rsp+50h] [rbp-39h] BYREF
__int64 v7; // [rsp+60h] [rbp-29h]
__int64 v8; // [rsp+68h] [rbp-21h]
__int128 v9; // [rsp+70h] [rbp-19h] BYREF
__int64 v10; // [rsp+80h] [rbp-9h]
__int64 v11; // [rsp+88h] [rbp-1h]
char v12[14]; // [rsp+90h] [rbp+7h] BYREF
__int16 v13; // [rsp+9Eh] [rbp+15h]
__int64 v14; // [rsp+A0h] [rbp+17h]
__int64 v15; // [rsp+A8h] [rbp+1Fh]
__int128 v16; // [rsp+B0h] [rbp+27h] BYREF
__int64 v17; // [rsp+C0h] [rbp+37h]
__int64 v18; // [rsp+C8h] [rbp+3Fh]
a1[296] = 1;
v6 = 0;
v7 = 6;
v8 = 15;
strcpy((char *)&v6, "Create");
v9 = 0;
v10 = 0;
v11 = 0;
*(_QWORD *)&v9 = sub_14003D460(0x20u);
v10 = 23;
v11 = 31;
strcpy((char *)v9, "Save Active as New Pack");
v14 = 12;
v15 = 15;
strcpy(v12, "Pack name...");
v12[13] = 0;
v13 = 0;
v16 = 0;
v17 = 0;
v18 = 15;
LOBYTE(v16) = 0;
v2 = SetTextPopup::create((unsigned int)&v16, (unsigned int)v12, 20, (unsigned int)&v9, (__int64)&v6, 0, 0, 0, 1, 0);
v3 = v2;
v4 = a1 + 256;
if ( !a1 )
v4 = nullptr;
*(_QWORD *)(v2 + 752) = v4;
*(_DWORD *)(v2 + 592) = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 96LL))(a1) + 1;
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 1064LL))(v3);
}