//
// EditorSoundConfigInfoLayer::onClose from 0x1008f95a0 to 0x1008f96f4 (340 bytes)
//
// 1 xrefs:
// > ??> @ 0x100bb5ff0
//
// 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
//
__int64 __fastcall EditorSoundConfigInfoLayer::onClose(__int64 a1, __int64 a2)
{
__int64 v3; // rax
__int64 v4; // rdx
_QWORD *v5; // rdi
__int64 v6; // rdi
__int64 v7; // rdi
if ( GameLevelManager::sharedState() )
{
if ( *(_QWORD *)(GameLevelManager::sharedState() + 1336) == a1 + 1016 )
{
*(_QWORD *)(GameLevelManager::sharedState() + 1336) = 0;
if ( *(_QWORD *)(GameLevelManager::sharedState() + 1344) != a1 + 1024 )
{
LABEL_4:
if ( *(_QWORD *)(GameLevelManager::sharedState() + 1360) != a1 + 1064 )
goto LABEL_5;
LABEL_15:
*(_QWORD *)(GameLevelManager::sharedState() + 1360) = 0;
goto LABEL_5;
}
}
else if ( *(_QWORD *)(GameLevelManager::sharedState() + 1344) != a1 + 1024 )
{
goto LABEL_4;
}
*(_QWORD *)(GameLevelManager::sharedState() + 1344) = 0;
if ( *(_QWORD *)(GameLevelManager::sharedState() + 1360) != a1 + 1064 )
goto LABEL_5;
goto LABEL_15;
}
LABEL_5:
v3 = MusicDownloadManager::sharedState();
MusicDownloadManager::removeMusicDownloadDelegate(v3, a1 + 1080);
v5 = *(_QWORD **)(a1 + 1232);
if ( v5 )
{
v5[73] = 0;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v5 + 1160LL))(v5, 0);
*(_QWORD *)(a1 + 1232) = 0;
}
v6 = *(_QWORD *)(a1 + 1112);
if ( v6 )
LoadingCircle::fadeAndRemove(v6);
*(_QWORD *)(a1 + 1112) = 0;
v7 = *(_QWORD *)(a1 + 1104);
if ( v7 && (unsigned int)(*(_DWORD *)(a1 + 1096) - 1) <= 1 )
sub_1008F18A0(v7);
return SetupTriggerPopup::onClose(a1, a2, v4);
}