//
// KeybindCapturePopup::onToggleController from 0x14044ed50 to 0x14044edfc (172 bytes)
//
// 4 xrefs:
// > KeybindCapturePopup::init @ 0x14044da78
// > ??> @ 0x1408cc5ac
// > ??> @ 0x1408cc5bc
// > ??> @ 0x140927638
//
// 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:26 +0000
//
void __fastcall KeybindCapturePopup::onToggleController(__int64 a1)
{
__int64 v2; // rcx
void *v3; // rdx
char v4; // di
void (__fastcall ***v5)(_QWORD, void *); // rcx
int v6; // eax
unsigned __int16 v7; // cx
char v8; // dl
unsigned __int16 v9; // ax
unsigned __int16 v10; // ax
v2 = *(_QWORD *)(a1 + 1056);
if ( v2 )
{
v3 = &unk_140703BF0;
v4 = *(_BYTE *)(v2 + 328);
*(_BYTE *)(v2 + 328) = v4 == 0;
v5 = (void (__fastcall ***)(_QWORD, void *))(*(_QWORD *)(v2 + 344) + 320LL);
if ( !v4 )
v3 = &unk_140703BD4;
(**v5)(v5, v3);
v6 = *(_DWORD *)(a1 + 1032);
if ( v6 )
{
v7 = *(_DWORD *)(a1 + 1032);
if ( (unsigned int)(unsigned __int16)v6 - 1001 <= 0x2B )
{
v8 = v6 & 1;
if ( v4 )
{
v10 = v6 - 1;
if ( v8 )
v10 = *(_DWORD *)(a1 + 1032);
v7 = v10;
}
else
{
v9 = v6 + 1;
if ( v8 )
v7 = v9;
}
*(_DWORD *)(a1 + 1032) = v7;
KeybindCapturePopup::updateChordDisplay(a1);
}
}
}
}