//
// ShareLevelSettingsLayer::onClose from 0x1406338b0 to 0x14063393c (140 bytes)
//
// 3 xrefs:
// > ShareLevelSettingsLayer::keyBackClicked @ 0x140633949
// > ShareLevelSettingsLayer::init @ 0x140632ea6
// > ??> @ 0x140930b9c
//
// 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:35:29 +0000
//
__int64 __fastcall ShareLevelSettingsLayer::onClose(_QWORD *a1)
{
__int64 v1; // rdi
float v3; // xmm0_4
__int64 v4; // rcx
__int64 v5; // rdx
v1 = a1[85];
if ( *(_DWORD *)(v1 + 1052) - *(_DWORD *)(v1 + 1056) == -1 )
{
v3 = (float)((float)rand() / 32767.0) * 1000.0;
*(_DWORD *)(v1 + 1056) = (int)v3;
*(_DWORD *)(v1 + 1052) = (int)v3 + 1;
}
v4 = a1[88];
if ( v4 )
ShareLevelLayer::updateNotifyToggles(v4);
(*(void (__fastcall **)(_QWORD *, _QWORD))(*a1 + 992LL))(a1, 0);
LOBYTE(v5) = 1;
return (*(__int64 (__fastcall **)(_QWORD *, __int64))(*a1 + 520LL))(a1, v5);
}