//
// LevelSettingsLayer::onClose from 0x100258240 to 0x100258344 (260 bytes)
//
// 4 xrefs:
// > LevelSettingsLayer::onLiveEdit @ 0x100257efd
// > LevelSettingsLayer::keyBackClicked @ 0x1002595f5
// > sub_100259600 @ 0x10025960c
// > LevelSettingsLayer::init @ 0x100256d1a
//
// 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:27:27 +0000
//
__int64 __fastcall LevelSettingsLayer::onClose(__int64 a1)
{
_QWORD *v2; // rdi
_QWORD *v3; // rdi
__int64 v4; // rax
__int64 v5; // rcx
__int64 v6; // rdx
void (__fastcall ***v7)(_QWORD); // rdi
v2 = *(_QWORD **)(a1 + 864);
if ( v2 )
{
v2[73] = 0;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v2 + 1160LL))(v2, 0);
}
v3 = *(_QWORD **)(a1 + 872);
if ( v3 )
{
v3[73] = 0;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v3 + 1160LL))(v3, 0);
}
v4 = *(_QWORD *)(a1 + 816);
if ( !*(_BYTE *)(v4 + 368) )
{
v5 = *(_QWORD *)(a1 + 704);
if ( v5 && *(_BYTE *)(v5 + 349) == 1 )
{
v6 = *(_QWORD *)(v4 + 384);
if ( *(_BYTE *)(v5 + 348) == 1 )
{
*(_DWORD *)(v6 + 608) = *(_DWORD *)(v5 + 344);
}
else
{
*(_DWORD *)(v6 + 608) = 0;
*(_DWORD *)(v6 + 604) = *(_DWORD *)(v5 + 344);
}
*(_BYTE *)(v4 + 416) = 1;
}
if ( *(_DWORD *)(v4 + 332) != *(_DWORD *)(a1 + 712) || *(_BYTE *)(v4 + 416) == 1 )
*(_BYTE *)(v4 + 416) = 0;
v7 = *(void (__fastcall ****)(_QWORD))(a1 + 848);
if ( v7 )
(**v7)(v7);
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
}