//
// KeybindCapturePopup::updateChordDisplay from 0x1001a4e88 to 0x1001a4f7c (244 bytes)
//
// 6 xrefs:
// > KeybindCapturePopup::init @ 0x1001a4ca4
// > sub_1001A4D10 @ 0x1001a4d74
// > KeybindCapturePopup::inputKeySelected @ 0x1001a51f4
// > KeybindCapturePopup::keyDown @ 0x1001a59f8
// > KeybindCapturePopup::keyUp @ 0x1001a5a24
// > sub_1001A5A28 @ 0x1001a5a50
//
// This function is hookable on this platform (idp: arm, 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:00:02 +0000
//
__int64 __fastcall KeybindCapturePopup::updateChordDisplay(__int64 a1)
{
__int64 v2; // x0
const char *v3; // x1
std::string *v4; // x0
__int64 v5; // x20
std::string *p_p; // x1
void (*v7)(void); // x8
std::string __p; // [xsp+8h] [xbp-38h] BYREF
v2 = *(_QWORD *)(a1 + 1096);
if ( v2 )
{
if ( *(_BYTE *)(a1 + 1053) )
v3 = "Press again to set";
else
v3 = "Press Keys...";
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v2 + 928LL))(v2, v3);
}
v4 = (std::string *)*(unsigned int *)(a1 + 1048);
v5 = *(_QWORD *)(a1 + 1088);
if ( (_DWORD)v4 )
{
GJKeybindManager::chordToString(v4, &__p);
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v5 + 928LL))(v5, p_p);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
v7 = *(void (**)(void))(**(_QWORD **)(a1 + 1088) + 344LL);
}
else
{
(*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)v5 + 928LL))(*(_QWORD *)(a1 + 1088), " ");
v7 = *(void (**)(void))(**(_QWORD **)(a1 + 1088) + 344LL);
}
v7();
KeybindCapturePopup::updateConflictLabel(a1);
return KeybindCapturePopup::updateButtonStates(a1);
}