//
// LevelBindingsLayer::onClose from 0x14044d1a0 to 0x14044d27a (218 bytes)
//
// 4 xrefs:
// > ??> @ 0x140793be8
// > ??> @ 0x1408cc368
// > ??> @ 0x1408cc3c0
// > ??> @ 0x140927560
//
// 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:32:25 +0000
//
__int64 __fastcall LevelBindingsLayer::onClose(__int64 a1, __int64 a2)
{
__int64 v4; // rbp
_QWORD *v5; // rbx
__int64 v6; // rcx
__int64 result; // rax
__int64 v8; // rdx
__int64 v9; // rbx
__int64 v10; // rdx
__int64 v11; // rdx
if ( *(_BYTE *)(a1 + 1193) )
{
v4 = *(_QWORD *)(a1 + 1184);
if ( !*(_BYTE *)(v4 + 24) )
{
v5 = *(_QWORD **)(v4 + 8);
sub_14038D0E0(v4 + 8, v4 + 8, v5[1]);
v5[1] = v5;
*v5 = v5;
v5[2] = v5;
*(_QWORD *)(v4 + 16) = 0;
*(_BYTE *)(v4 + 24) = 1;
}
}
v6 = *(_QWORD *)(a1 + 1096);
if ( v6 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 1032LL))(v6, 0);
result = SetupTriggerPopup::onClose(a1, a2);
v9 = *(_QWORD *)(a1 + 1072);
if ( v9 )
{
LOBYTE(v8) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 336LL))(v9, v8);
LOBYTE(v10) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 920LL))(v9, v10);
LOBYTE(v11) = 1;
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 992LL))(v9, v11);
}
return result;
}