//
// SetIDPopup::onCancel from 0x1403a61f0 to 0x1403a6292 (162 bytes)
//
// 2 xrefs:
// > SetIDPopup::init @ 0x1403a5dda
// > ??> @ 0x140923798
//
// 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::onCancel(__int64 a1)
{
__int64 v1; // rax
int v3; // ecx
int v4; // edx
int v5; // eax
int v6; // r8d
void (__fastcall ***v7)(_QWORD, __int64); // rcx
__int64 v8; // rdx
v1 = *(_QWORD *)(a1 + 664);
*(_BYTE *)(a1 + 677) = 1;
*(_QWORD *)(v1 + 600) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 664) + 1032LL))(*(_QWORD *)(a1 + 664), 0);
v3 = *(_DWORD *)(a1 + 672);
v4 = *(_DWORD *)(a1 + 684);
v5 = v4;
v6 = *(_DWORD *)(a1 + 680);
if ( v4 >= v3 )
v5 = *(_DWORD *)(a1 + 672);
if ( v6 <= v5 )
{
v6 = *(_DWORD *)(a1 + 672);
if ( v4 < v3 )
v6 = *(_DWORD *)(a1 + 684);
}
v7 = *(void (__fastcall ****)(_QWORD, __int64))(a1 + 696);
*(_DWORD *)(a1 + 672) = v6;
if ( v7 && !*(_BYTE *)(a1 + 677) )
(**v7)(v7, a1);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
LOBYTE(v8) = 1;
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 520LL))(a1, v8);
}