//
// KeybindCapturePopup::updateButtonStates from 0x1005b5750 to 0x1005b5979 (553 bytes)
//
// 1 xrefs:
// > KeybindCapturePopup::updateChordDisplay @ 0x1005b4982
//
// 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 12:32:40 +0000
//
void __fastcall KeybindCapturePopup::updateButtonStates(__int64 a1)
{
unsigned __int8 v2; // r14
__int64 v3; // rdi
__int64 v4; // r12
__int64 v5; // rcx
unsigned __int8 v6; // al
__int64 v7; // r15
unsigned int v8; // r14d
__int64 v9; // r15
unsigned __int8 v10; // r14
__int64 v11; // rdi
__int64 v12; // r15
__int64 v13; // rcx
unsigned __int8 v14; // al
__int64 v15; // r14
unsigned int v16; // ebx
__int64 v17; // r14
_WORD v18[2]; // [rsp+8h] [rbp-28h] BYREF
_WORD v19[18]; // [rsp+Ch] [rbp-24h] BYREF
if ( *(_DWORD *)(a1 + 1048) )
{
v2 = *(_BYTE *)(a1 + 1056) ^ 1;
v3 = *(_QWORD *)(a1 + 1112);
if ( !v3 )
goto LABEL_4;
goto LABEL_3;
}
v2 = 0;
v3 = *(_QWORD *)(a1 + 1112);
if ( v3 )
LABEL_3:
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 1056LL))(v3, v2);
LABEL_4:
v4 = *(_QWORD *)(a1 + 1128);
if ( !v4 )
goto LABEL_15;
v5 = *(_QWORD *)(a1 + 1096);
v6 = -(v2 | (v5 == 0)) | 0x4B;
if ( v2 )
{
LOBYTE(v19[1]) = -1;
v19[0] = -1;
v7 = *(_QWORD *)(v4 + 624);
v8 = v6;
if ( !v7 )
goto LABEL_13;
goto LABEL_12;
}
if ( v5 )
{
memset(v19, 125, 3);
v7 = *(_QWORD *)(v4 + 624);
v8 = v6;
if ( !v7 )
goto LABEL_13;
goto LABEL_12;
}
LOBYTE(v19[1]) = -106;
v19[0] = -26986;
v7 = *(_QWORD *)(v4 + 624);
v8 = v6;
if ( v7 )
{
LABEL_12:
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 1024LL))(v7, v8);
(*(void (__fastcall **)(__int64, _WORD *))(*(_QWORD *)v7 + 1072LL))(v7, v19);
}
LABEL_13:
v9 = *(_QWORD *)(v4 + 648);
if ( v9 )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v9 + 912LL))(*(_QWORD *)(v4 + 648), v8);
(*(void (__fastcall **)(__int64, _WORD *))(*(_QWORD *)v9 + 960LL))(v9, v19);
}
LABEL_15:
v10 = *(_BYTE *)(a1 + 1052);
v11 = *(_QWORD *)(a1 + 1120);
if ( v11 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v11 + 1056LL))(v11, v10 ^ 1u);
v12 = *(_QWORD *)(a1 + 1136);
if ( v12 )
{
v13 = *(_QWORD *)(a1 + 1096);
v14 = ((v10 & (v13 != 0)) - 1) | 0x4B;
if ( v10 )
{
if ( v13 )
{
memset(v18, 125, 3);
v15 = *(_QWORD *)(v12 + 624);
v16 = v14;
if ( !v15 )
goto LABEL_24;
}
else
{
LOBYTE(v18[1]) = -106;
v18[0] = -26986;
v15 = *(_QWORD *)(v12 + 624);
v16 = v14;
if ( !v15 )
{
LABEL_24:
v17 = *(_QWORD *)(v12 + 648);
if ( v17 )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v17 + 912LL))(*(_QWORD *)(v12 + 648), v16);
(*(void (__fastcall **)(__int64, _WORD *))(*(_QWORD *)v17 + 960LL))(v17, v18);
}
return;
}
}
}
else
{
LOBYTE(v18[1]) = -1;
v18[0] = -1;
v15 = *(_QWORD *)(v12 + 624);
v16 = v14;
if ( !v15 )
goto LABEL_24;
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v15 + 1024LL))(v15, v16);
(*(void (__fastcall **)(__int64, _WORD *))(*(_QWORD *)v15 + 1072LL))(v15, v18);
goto LABEL_24;
}
}