//
// KeybindCapturePopup::updateConflictLabel from 0x1001a5200 to 0x1001a5660 (1120 bytes)
//
// 1 xrefs:
// > KeybindCapturePopup::updateChordDisplay @ 0x1001a4f5c
//
// 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:03 +0000
//
void __fastcall KeybindCapturePopup::updateConflictLabel(__int64 a1)
{
float v2; // s8
__int64 v3; // x0
int v4; // w20
_DWORD *v5; // x8
unsigned __int64 v6; // x22
__int64 v7; // x0
int v8; // w0
std::string::size_type size; // x8
const char *v10; // x0
std::string::size_type v11; // x8
int v12; // w8
const char *v13; // x0
__int64 v14; // x0
std::string *v15; // x1
__int64 v16; // x0
_DWORD *v17; // x0
unsigned __int64 v18; // x23
int v19; // w22
__int64 v20; // x0
int v21; // w0
std::string::size_type v22; // x8
const char *v23; // x0
std::string::size_type v24; // x9
char v25; // w8
__int64 v26; // x0
void **v27; // x1
_QWORD *v28; // x19
const char *v29; // x1
__int64 v30; // x0
__int16 v31; // [xsp+4h] [xbp-BCh] BYREF
char v32; // [xsp+6h] [xbp-BAh]
void *__p[2]; // [xsp+8h] [xbp-B8h] BYREF
char v34; // [xsp+1Fh] [xbp-A1h]
void *v35; // [xsp+20h] [xbp-A0h] BYREF
_BYTE *v36; // [xsp+28h] [xbp-98h]
std::string v37; // [xsp+38h] [xbp-88h] BYREF
std::string v38; // [xsp+50h] [xbp-70h] BYREF
_DWORD *v39; // [xsp+68h] [xbp-58h] BYREF
_BYTE *v40; // [xsp+70h] [xbp-50h]
*(_BYTE *)(a1 + 1056) = 0;
if ( !*(_DWORD *)(a1 + 1048) || !*(_QWORD *)(a1 + 1024) )
{
(*(void (__fastcall **)(_QWORD, const char *))(**(_QWORD **)(a1 + 1104) + 928LL))(*(_QWORD *)(a1 + 1104), " ");
return;
}
if ( *(_QWORD *)(a1 + 1096) )
v2 = 0.6;
else
v2 = 0.5;
v3 = GJKeybindManager::sharedState();
v4 = GJKeybindManager::groupForAction(v3, *(_DWORD *)(a1 + 1040));
(*(void (__fastcall **)(_DWORD **__return_ptr, _QWORD, _QWORD))(**(_QWORD **)(a1 + 1024) + 24LL))(
&v39,
*(_QWORD *)(a1 + 1024),
*(unsigned int *)(a1 + 1048));
memset(&v38, 0, sizeof(v38));
v5 = v39;
if ( v40 != (_BYTE *)v39 )
{
v6 = 0;
do
{
if ( v5[v6] != *(_DWORD *)(a1 + 1040) )
{
if ( (*(_BYTE *)(a1 + 1055) & 1) != 0
|| (v7 = GJKeybindManager::sharedState(),
v8 = GJKeybindManager::groupForAction(v7, v39[v6]),
GJKeybindManager::groupsConflict(v8, v4)) )
{
size = HIBYTE(v38.__r_.__value_.__r.__words[2]);
if ( (v38.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = v38.__r_.__value_.__l.__size_;
if ( size )
std::string::append(&v38, ", ");
v10 = GJKeybindManager::actionToString(v39[v6]);
std::string::append(&v38, v10);
}
}
++v6;
v5 = v39;
}
while ( v6 < (v40 - (_BYTE *)v39) >> 2 );
v11 = HIBYTE(v38.__r_.__value_.__r.__words[2]);
if ( (v38.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v11 = v38.__r_.__value_.__l.__size_;
if ( v11 )
{
v12 = *(unsigned __int8 *)(a1 + 1055);
*(_BYTE *)(a1 + 1056) = v12;
if ( v12 )
v13 = "Already used by ";
else
v13 = "Used by ";
std::operator+(&v37, v13, &v38);
v14 = *(_QWORD *)(a1 + 1104);
BYTE2(v35) = 50;
LOWORD(v35) = -26881;
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v14 + 1072LL))(v14, &v35);
if ( (v37.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v15 = &v37;
else
v15 = (std::string *)v37.__r_.__value_.__r.__words[0];
(*(void (__fastcall **)(_QWORD, std::string *))(**(_QWORD **)(a1 + 1104) + 928LL))(*(_QWORD *)(a1 + 1104), v15);
cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(a1 + 1104), *(float *)(a1 + 732) + -40.0, v2, 0.1);
LABEL_50:
if ( SHIBYTE(v37.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v37.__r_.__value_.__l.__data_);
goto LABEL_60;
}
}
if ( *(_BYTE *)(a1 + 1055) == 1 )
{
memset(&v37, 0, sizeof(v37));
v16 = GJKeybindManager::sharedState();
GJKeybindManager::actionsForChord(v16, *(_DWORD *)(a1 + 1048), &v35);
v17 = v35;
if ( v36 != v35 )
{
v18 = 0;
do
{
v19 = v17[v18];
if ( v19 != *(_DWORD *)(a1 + 1040) && !GJKeybindManager::isMovementAction(v17[v18]) )
{
v20 = GJKeybindManager::sharedState();
v21 = GJKeybindManager::groupForAction(v20, v19);
if ( GJKeybindManager::groupsConflict(v21, v4) )
{
v22 = HIBYTE(v37.__r_.__value_.__r.__words[2]);
if ( (v37.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v22 = v37.__r_.__value_.__l.__size_;
if ( v22 )
std::string::append(&v37, ", ");
v23 = GJKeybindManager::actionToString(v19);
std::string::append(&v37, v23);
}
}
++v18;
v17 = v35;
}
while ( v18 < (v36 - (_BYTE *)v35) >> 2 );
}
v24 = HIBYTE(v37.__r_.__value_.__r.__words[2]);
v25 = HIBYTE(v37.__r_.__value_.__r.__words[2]);
if ( (v37.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v24 = v37.__r_.__value_.__l.__size_;
if ( v24 )
{
std::operator+(__p, "Overrides ", &v37);
v26 = *(_QWORD *)(a1 + 1104);
v32 = 50;
v31 = -26881;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v26 + 1072LL))(v26, &v31);
if ( v34 >= 0 )
v27 = __p;
else
v27 = (void **)__p[0];
(*(void (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 1104) + 928LL))(*(_QWORD *)(a1 + 1104), v27);
cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(a1 + 1104), *(float *)(a1 + 732) + -40.0, v2, 0.1);
if ( v34 < 0 )
operator delete(__p[0]);
if ( v35 )
{
v36 = v35;
operator delete(v35);
}
goto LABEL_50;
}
if ( v17 )
{
v36 = v17;
operator delete(v17);
v25 = HIBYTE(v37.__r_.__value_.__r.__words[2]);
}
if ( v25 < 0 )
operator delete(v37.__r_.__value_.__l.__data_);
}
if ( *(_BYTE *)(a1 + 1053) == 1 && !*(_QWORD *)(a1 + 1096) )
{
v30 = *(_QWORD *)(a1 + 1104);
v37.__r_.__value_.__s.__data_[2] = -106;
LOWORD(v37.__r_.__value_.__l.__data_) = -26986;
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v30 + 1072LL))(v30, &v37);
v28 = (_QWORD *)(a1 + 1104);
(*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)*v28 + 160LL))(*v28, 0.5);
v29 = "Press again to set";
}
else
{
v28 = (_QWORD *)(a1 + 1104);
v29 = " ";
}
(*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)*v28 + 928LL))(*v28, v29);
LABEL_60:
if ( SHIBYTE(v38.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v38.__r_.__value_.__l.__data_);
if ( v39 )
{
v40 = v39;
operator delete(v39);
}
}