//
// KeybindCapturePopup::updateConflictLabel from 0x1005b5160 to 0x1005b566c (1292 bytes)
//
// 1 xrefs:
// > KeybindCapturePopup::updateChordDisplay @ 0x1005b497a
//
// 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::updateConflictLabel(__int64 a1)
{
__int64 v2; // r13
bool v3; // r15
__int64 v4; // rax
unsigned int v5; // r14d
unsigned __int64 v6; // rdi
_DWORD *v7; // rax
unsigned __int64 v8; // r12
__int64 v9; // rax
const std::string::value_type *v10; // rax
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v11; // cl
std::string::size_type size; // rax
__int64 v13; // xmm0_8
bool v14; // zf
std::string::size_type v15; // rcx
char v16; // al
const char *v17; // rsi
__int64 v18; // rdi
std::string::pointer data; // rsi
__int64 v20; // rax
_DWORD *v21; // rdi
unsigned __int64 v22; // r12
unsigned int v23; // r13d
__int64 v24; // rax
unsigned int v25; // eax
const std::string::value_type *v26; // rsi
char v27; // al
__int64 v28; // rdi
char *v29; // rsi
_QWORD *v30; // rbx
const char *v31; // rsi
__int64 v32; // rdi
char v33; // [rsp+0h] [rbp-C0h] BYREF
char v34; // [rsp+1h] [rbp-BFh] BYREF
void *v35; // [rsp+10h] [rbp-B0h]
void *v36; // [rsp+18h] [rbp-A8h] BYREF
_BYTE *v37; // [rsp+20h] [rbp-A0h]
std::string v38; // [rsp+30h] [rbp-90h] BYREF
void *__p; // [rsp+50h] [rbp-70h] BYREF
_BYTE *v40; // [rsp+58h] [rbp-68h]
__int16 v41; // [rsp+6Ch] [rbp-54h] BYREF
char v42; // [rsp+6Eh] [rbp-52h]
std::string v43; // [rsp+70h] [rbp-50h] BYREF
float v44; // [rsp+94h] [rbp-2Ch]
*(_BYTE *)(a1 + 1056) = 0;
if ( !*(_DWORD *)(a1 + 1048) || !*(_QWORD *)(a1 + 1024) )
{
(*(void (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 1104) + 928LL))(
*(_QWORD *)(a1 + 1104),
" ");
return;
}
v2 = 0;
v3 = *(_QWORD *)(a1 + 1096) == 0;
v4 = GJKeybindManager::sharedState(a1);
v5 = GJKeybindManager::groupForAction(v4, *(unsigned int *)(a1 + 1040));
v6 = (unsigned __int64)&v36;
(*(void (__fastcall **)(void **, _QWORD, _QWORD))(**(_QWORD **)(a1 + 1024) + 24LL))(
&v36,
*(_QWORD *)(a1 + 1024),
*(unsigned int *)(a1 + 1048));
memset(&v38, 0, sizeof(v38));
v7 = v36;
if ( v37 != v36 )
{
LOBYTE(v44) = v3;
v8 = 0;
while ( 1 )
{
if ( v7[v8] == *(_DWORD *)(a1 + 1040) )
goto LABEL_5;
if ( !*(_BYTE *)(a1 + 1055) )
{
v9 = GJKeybindManager::sharedState(v6);
v6 = (unsigned int)GJKeybindManager::groupForAction(v9, *((unsigned int *)v36 + v8));
if ( !(unsigned __int8)GJKeybindManager::groupsConflict(v6, v5) )
goto LABEL_5;
}
if ( (*(_BYTE *)&v38.__r_.__value_.__s.0 & 1) != 0 )
break;
if ( *(_BYTE *)&v38.__r_.__value_.__l.0 >> 1 )
goto LABEL_13;
LABEL_14:
v10 = (const std::string::value_type *)GJKeybindManager::actionToString(*((unsigned int *)v36 + v8));
v6 = (unsigned __int64)&v38;
std::string::append(&v38, v10);
LABEL_5:
++v8;
v7 = v36;
if ( v8 >= (v37 - (_BYTE *)v36) >> 2 )
{
v11 = v38.__r_.__value_.__s.0;
size = v38.__r_.__value_.__l.__size_;
v3 = LOBYTE(v44);
goto LABEL_18;
}
}
if ( !v38.__r_.__value_.__l.__size_ )
goto LABEL_14;
LABEL_13:
std::string::append(&v38, ", ");
goto LABEL_14;
}
size = 0;
v11 = 0;
LABEL_18:
LOBYTE(v2) = v3;
v13 = *((unsigned int *)&unk_100A0D4D0 + v2);
v14 = (*(_BYTE *)&v11 & 1) == 0;
v15 = *(unsigned __int8 *)&v11 >> 1;
if ( !v14 )
v15 = size;
v16 = *(_BYTE *)(a1 + 1055);
if ( v15 )
{
v44 = *((float *)&unk_100A0D4D0 + v2);
*(_BYTE *)(a1 + 1056) = v16;
v17 = "Used by ";
if ( v16 )
v17 = "Already used by ";
std::operator+(&v43, v17, &v38);
v18 = *(_QWORD *)(a1 + 1104);
BYTE2(__p) = 50;
LOWORD(__p) = -26881;
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v18 + 1072LL))(v18, &__p);
if ( (*(_BYTE *)&v43.__r_.__value_.__s.0 & 1) != 0 )
data = v43.__r_.__value_.__l.__data_;
else
data = v43.__r_.__value_.__s.__data_;
(*(void (__fastcall **)(_QWORD, std::string::pointer))(**(_QWORD **)(a1 + 1104) + 928LL))(
*(_QWORD *)(a1 + 1104),
data);
cocos2d::CCLabelBMFont::limitLabelWidth(
*(_QWORD *)(a1 + 1104),
*(float *)(a1 + 732) + -40.0,
v44,
COERCE_DOUBLE(1036831949));
LABEL_40:
if ( (*(_BYTE *)&v43.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v43.__r_.__value_.__l.__data_);
goto LABEL_55;
}
if ( v16 )
{
v44 = *((float *)&unk_100A0D4D0 + v2);
v13 = 0;
memset(&v43, 0, sizeof(v43));
v20 = GJKeybindManager::sharedState(v6);
GJKeybindManager::actionsForChord(&__p, v20, *(unsigned int *)(a1 + 1048));
v21 = __p;
if ( v40 != __p )
{
v22 = 0;
while ( 1 )
{
v23 = v21[v22];
if ( v23 == *(_DWORD *)(a1 + 1040) )
goto LABEL_28;
if ( (unsigned __int8)GJKeybindManager::isMovementAction(v23) )
goto LABEL_28;
v24 = GJKeybindManager::sharedState(v23);
v25 = GJKeybindManager::groupForAction(v24, v23);
if ( !(unsigned __int8)GJKeybindManager::groupsConflict(v25, v5) )
goto LABEL_28;
if ( (*(_BYTE *)&v43.__r_.__value_.__s.0 & 1) != 0 )
break;
if ( *(_BYTE *)&v43.__r_.__value_.__l.0 >> 1 )
goto LABEL_36;
LABEL_37:
v26 = (const std::string::value_type *)GJKeybindManager::actionToString(v23);
std::string::append(&v43, v26);
LABEL_28:
++v22;
v21 = __p;
if ( v22 >= (v40 - (_BYTE *)__p) >> 2 )
goto LABEL_42;
}
if ( !v43.__r_.__value_.__l.__size_ )
goto LABEL_37;
LABEL_36:
std::string::append(&v43, ", ");
goto LABEL_37;
}
LABEL_42:
v27 = *(_BYTE *)&v43.__r_.__value_.__s.0 & 1;
if ( (*(_BYTE *)&v43.__r_.__value_.__s.0 & 1) != 0 )
{
if ( v43.__r_.__value_.__l.__size_ )
{
LABEL_44:
std::operator+(&v33, "Overrides ", &v43);
v28 = *(_QWORD *)(a1 + 1104);
v42 = 50;
v41 = -26881;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v28 + 1072LL))(v28, &v41);
if ( (v33 & 1) != 0 )
v29 = (char *)v35;
else
v29 = &v34;
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1104) + 928LL))(*(_QWORD *)(a1 + 1104), v29);
cocos2d::CCLabelBMFont::limitLabelWidth(
*(_QWORD *)(a1 + 1104),
*(float *)(a1 + 732) + -40.0,
v44,
COERCE_DOUBLE(1036831949));
if ( (v33 & 1) != 0 )
operator delete(v35);
if ( __p )
{
v40 = __p;
operator delete(__p);
}
goto LABEL_40;
}
}
else if ( *(_BYTE *)&v43.__r_.__value_.__l.0 >> 1 )
{
goto LABEL_44;
}
if ( v21 )
{
v40 = v21;
operator delete(v21);
v27 = *(_BYTE *)&v43.__r_.__value_.__s.0 & 1;
}
if ( v27 )
operator delete(v43.__r_.__value_.__l.__data_);
}
if ( *(_BYTE *)(a1 + 1053) == 1 && !*(_QWORD *)(a1 + 1096) )
{
v32 = *(_QWORD *)(a1 + 1104);
v43.__r_.__value_.__s.__data_[1] = -106;
*(_WORD *)&v43.__r_.__value_.__l.0 = -26986;
(*(void (__fastcall **)(__int64, std::string *, double))(*(_QWORD *)v32 + 1072LL))(v32, &v43, *(double *)&v13);
v30 = (_QWORD *)(a1 + 1104);
v13 = 1056964608;
(*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)*v30 + 160LL))(*v30, 0.5);
v31 = "Press again to set";
}
else
{
v30 = (_QWORD *)(a1 + 1104);
v31 = " ";
}
(*(void (__fastcall **)(_QWORD, const char *, double))(*(_QWORD *)*v30 + 928LL))(*v30, v31, *(double *)&v13);
LABEL_55:
if ( (*(_BYTE *)&v38.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v38.__r_.__value_.__l.__data_);
if ( v36 )
{
v37 = v36;
operator delete(v36);
}
}