//
// EditorSoundConfigInfoLayer::onClose from 0x1401989c0 to 0x140198b98 (472 bytes)
//
// 2 xrefs:
// > ??> @ 0x14074e520
// > ??> @ 0x1409195f8
//
// 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:46 +0000
//
// Hidden C++ exception states: #wind=8
__int64 __fastcall EditorSoundConfigInfoLayer::onClose(__int64 a1, __int64 a2)
{
_QWORD *v4; // rcx
__int64 v5; // rdi
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rdi
__int64 v9; // rcx
__int64 v10; // rax
__int64 v11; // rcx
__int64 v12; // rcx
int v13; // eax
void *v15; // [rsp+30h] [rbp+8h]
void *v16; // [rsp+30h] [rbp+8h]
void *v17; // [rsp+30h] [rbp+8h]
v4 = *(_QWORD **)&qword_14090BFB0;
if ( *(_QWORD *)&qword_14090BFB0
|| (v15 = operator new(0x690u),
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v15),
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0),
(v4 = *(_QWORD **)&qword_14090BFB0) != nullptr) )
{
v5 = a1 + 1000;
if ( !a1 )
v5 = 0;
if ( !v4 )
{
v16 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v16);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v4 = *(_QWORD **)&qword_14090BFB0;
}
if ( v4[183] == v5 )
v4[183] = 0;
v6 = a1 + 1008;
if ( !a1 )
v6 = 0;
if ( v4[184] == v6 )
v4[184] = 0;
v7 = a1 + 1048;
if ( !a1 )
v7 = 0;
if ( v4[186] == v7 )
v4[186] = 0;
}
v8 = a1 + 1064;
if ( !a1 )
v8 = 0;
v9 = qword_14090C070;
if ( !qword_14090C070 )
{
v17 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v17);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v9 = qword_14090C070;
}
MusicDownloadManager::removeMusicDownloadDelegate(v9, v8);
v10 = *(_QWORD *)(a1 + 1216);
if ( v10 )
{
*(_QWORD *)(v10 + 600) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1216) + 1032LL))(*(_QWORD *)(a1 + 1216), 0);
*(_QWORD *)(a1 + 1216) = 0;
}
v11 = *(_QWORD *)(a1 + 1096);
if ( v11 )
LoadingCircle::fadeAndRemove(v11);
*(_QWORD *)(a1 + 1096) = 0;
v12 = *(_QWORD *)(a1 + 1088);
if ( v12 )
{
v13 = *(_DWORD *)(a1 + 1080);
if ( v13 == 2 || v13 == 1 )
cocos2d::CCNode::scheduleOnce(v12, FLAlertLayer::rebuildContentDeferred);
}
return SetupTriggerPopup::onClose(a1, a2);
}