//
// SetIDPopup::onClose from 0x1403a62a0 to 0x1403a633b (155 bytes)
//
// 3 xrefs:
// > SetIDPopup::keyBackClicked @ 0x1403a6349
// > SetIDPopup::init @ 0x1403a5854
// > ??> @ 0x1409237a4
//
// 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:31:19 +0000
//
__int64 __fastcall SetIDPopup::onClose(__int64 a1)
{
int v2; // ecx
int v3; // edx
int v4; // eax
int v5; // r8d
void (__fastcall ***v6)(_QWORD, __int64); // rcx
__int64 v7; // rdx
*(_QWORD *)(*(_QWORD *)(a1 + 664) + 600LL) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 664) + 1032LL))(*(_QWORD *)(a1 + 664), 0);
v2 = *(_DWORD *)(a1 + 672);
v3 = *(_DWORD *)(a1 + 684);
v4 = v3;
v5 = *(_DWORD *)(a1 + 680);
if ( v3 >= v2 )
v4 = *(_DWORD *)(a1 + 672);
if ( v5 <= v4 )
{
v5 = *(_DWORD *)(a1 + 672);
if ( v3 < v2 )
v5 = *(_DWORD *)(a1 + 684);
}
v6 = *(void (__fastcall ****)(_QWORD, __int64))(a1 + 696);
*(_DWORD *)(a1 + 672) = v5;
if ( v6 && !*(_BYTE *)(a1 + 677) )
(**v6)(v6, a1);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
LOBYTE(v7) = 1;
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 520LL))(a1, v7);
}