//
// SetupSpawnPopup::onSelectRemap from 0x1405f58c0 to 0x1405f5981 (193 bytes)
//
// 2 xrefs:
// > SetupSpawnPopup::updateRemapButtons @ 0x1405f5668
// > ??> @ 0x14092f48c
//
// 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:07 +0000
//
void __fastcall SetupSpawnPopup::onSelectRemap(__int64 a1, __int64 a2)
{
int v3; // eax
__int64 v4; // r8
unsigned int v5; // edx
__int64 v6; // rcx
if ( !*(_BYTE *)(a1 + 1000) )
{
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = *(_QWORD *)(a1 + 1016);
if ( (*(_QWORD *)(a1 + 1024) - v4) >> 3 <= (unsigned __int64)v3 )
sub_1405F59E0();
v5 = *(_DWORD *)(v4 + 8LL * v3);
v6 = v4 + 8LL * v3;
if ( *(_QWORD *)(a1 + 1040) == __PAIR64__(*(_DWORD *)(v6 + 4), v5) )
{
*(_QWORD *)(a1 + 1040) = 0;
}
else
{
*(_DWORD *)(a1 + 1040) = v5;
*(_DWORD *)(a1 + 1044) = *(_DWORD *)(v6 + 4);
SetupTriggerPopup::updateValue(a1, 0xFFFFFFFFLL);
SetupTriggerPopup::updateValue(a1, 4294967294LL);
}
SetupSpawnPopup::queueUpdateButtons(a1);
}
}