//
// KeybindCapturePopup::updateConflictLabel from 0xcf6a78 to 0xcf7070 (1528 bytes)
//
// 2 xrefs:
// > KeybindCapturePopup::updateChordDisplay @ 0xcf7120
// > ??> @ 0xab3d0
//
// 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 13:06:49 +0000
//
__int64 __fastcall KeybindCapturePopup::updateConflictLabel(KeybindCapturePopup *this)
{
int v2; // w0
__int64 v3; // x1
GJKeybindManager *v4; // x0
float v5; // s8
GJKeybindManager *v6; // x0
__int64 v7; // x19
int v8; // w22
_DWORD *v9; // x1
_BYTE *v10; // x3
unsigned __int8 v11; // w0
__int64 v12; // x0
char *v13; // x0
int v14; // w0
const char *v15; // x0
__int64 v16; // x0
void (__fastcall *v17)(__int64, void **); // x2
char *v18; // x1
GJKeybindManager *v19; // x0
GJKeybindManager *v20; // x0
GJKeybindManager *v21; // x0
GJKeybindManager *v22; // x0
_DWORD *v23; // x0
_BYTE *v24; // x2
unsigned __int64 v25; // x19
unsigned int v26; // w21
_BOOL8 isMovementAction; // x0
GJKeybindManager *v28; // x0
GJKeybindManager *v29; // x0
__int64 v30; // x1
char *v31; // x0
int v32; // w2
__int64 v33; // x3
__int64 v35; // x0
void (__fastcall *v36)(__int64, void **); // x3
__int64 *v37; // x0
__int64 v38; // x2
void (__fastcall *v39)(__int64 *, _BYTE *); // x2
char *v40; // x1
_BYTE v41[8]; // [xsp+58h] [xbp+58h] BYREF
void *v42; // [xsp+60h] [xbp+60h] BYREF
_BYTE *v43; // [xsp+68h] [xbp+68h]
__int64 v44; // [xsp+78h] [xbp+78h] BYREF
__int64 v45; // [xsp+80h] [xbp+80h]
void *v46; // [xsp+88h] [xbp+88h]
__int64 v47; // [xsp+90h] [xbp+90h] BYREF
__int64 v48; // [xsp+98h] [xbp+98h]
void *v49; // [xsp+A0h] [xbp+A0h]
void *v50; // [xsp+A8h] [xbp+A8h] BYREF
_BYTE *v51; // [xsp+B0h] [xbp+B0h]
unsigned __int64 v52[2]; // [xsp+C0h] [xbp+C0h] BYREF
void *v53; // [xsp+D0h] [xbp+D0h]
__int64 v54; // [xsp+D8h] [xbp+D8h]
v2 = *((_DWORD *)this + 262);
v3 = _stack_chk_guard;
*((_BYTE *)this + 1056) = 0;
v54 = v3;
if ( !v2 || !*((_QWORD *)this + 128) )
{
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 138) + 928LL))(*((_QWORD *)this + 138), &byte_11E1A70);
return _stack_chk_guard;
}
v4 = *((GJKeybindManager **)this + 137);
if ( v4 )
v5 = 0.6;
else
v5 = 0.5;
v6 = (GJKeybindManager *)GJKeybindManager::sharedState(v4);
v7 = 0;
v8 = GJKeybindManager::groupForAction(v6, *((_DWORD *)this + 260));
(*(void (__fastcall **)(void **__return_ptr, _QWORD, _QWORD))(**((_QWORD **)this + 128) + 24LL))(
&v42,
*((_QWORD *)this + 128),
*((unsigned int *)this + 262));
v44 = 0;
v9 = v42;
v10 = v43;
v45 = 0;
v46 = nullptr;
if ( (v43 - (_BYTE *)v42) >> 2 )
{
while ( v9[v7] == *((_DWORD *)this + 260) )
{
LABEL_14:
if ( ++v7 >= (unsigned __int64)((v10 - (_BYTE *)v9) >> 2) )
goto LABEL_15;
}
if ( *((_BYTE *)this + 1055) )
{
v11 = v44;
if ( (v44 & 1) != 0 )
{
LABEL_9:
v12 = v45;
LABEL_10:
if ( v12 )
std::string::append((__int64)&v44, ", ");
v13 = GJKeybindManager::actionToString((GJKeybindManager *)*((unsigned int *)v42 + v7));
std::string::append((__int64)&v44, v13);
goto LABEL_13;
}
}
else
{
v19 = (GJKeybindManager *)GJKeybindManager::sharedState((GJKeybindManager *)*((unsigned __int8 *)this + 1055));
v20 = (GJKeybindManager *)GJKeybindManager::groupForAction(v19, *((_DWORD *)v42 + v7));
if ( !GJKeybindManager::groupsConflict(v20, v8) )
{
LABEL_13:
v9 = v42;
v10 = v43;
goto LABEL_14;
}
v11 = v44;
if ( (v44 & 1) != 0 )
goto LABEL_9;
}
v12 = v11 >> 1;
goto LABEL_10;
}
LABEL_15:
if ( (v44 & 1) != 0 )
{
if ( v45 )
{
LABEL_17:
v14 = *((unsigned __int8 *)this + 1055);
*((_BYTE *)this + 1056) = v14;
if ( v14 )
v15 = "Already used by ";
else
v15 = "Used by ";
std::operator+(v15, (__int64)&v44, v52);
v16 = *((_QWORD *)this + 138);
v17 = *(void (__fastcall **)(__int64, void **))(*(_QWORD *)v16 + 1072LL);
LOWORD(v50) = -26881;
BYTE2(v50) = 50;
v17(v16, &v50);
v18 = (char *)v52 + 1;
if ( (v52[0] & 1) != 0 )
v18 = (char *)v53;
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 138) + 928LL))(*((_QWORD *)this + 138), v18);
cocos2d::CCLabelBMFont::limitLabelWidth(
*((cocos2d::CCLabelBMFont **)this + 138),
*((float *)this + 183) - 40.0,
v5,
0.1);
if ( (v52[0] & 1) != 0 )
operator delete(v53);
goto LABEL_52;
}
}
else if ( (unsigned __int8)v44 >> 1 )
{
goto LABEL_17;
}
v21 = (GJKeybindManager *)*((unsigned __int8 *)this + 1055);
if ( *((_BYTE *)this + 1055) )
{
v47 = 0;
v48 = 0;
v49 = nullptr;
v22 = (GJKeybindManager *)GJKeybindManager::sharedState(v21);
GJKeybindManager::actionsForChord((__int64 *)&v50, v22, *((_DWORD *)this + 262));
v23 = v50;
v24 = v51;
if ( (v51 - (_BYTE *)v50) >> 2 )
{
v25 = 0;
do
{
v26 = v23[v25];
if ( *((_DWORD *)this + 260) != v26 )
{
isMovementAction = GJKeybindManager::isMovementAction((GJKeybindManager *)v26);
if ( !isMovementAction )
{
v28 = (GJKeybindManager *)GJKeybindManager::sharedState((GJKeybindManager *)isMovementAction);
v29 = (GJKeybindManager *)GJKeybindManager::groupForAction(v28, v26);
if ( GJKeybindManager::groupsConflict(v29, v8) )
{
v30 = (unsigned __int8)v47 >> 1;
if ( (v47 & 1) != 0 )
v30 = v48;
if ( v30 )
std::string::append((__int64)&v47, ", ");
v31 = GJKeybindManager::actionToString((GJKeybindManager *)v26);
std::string::append((__int64)&v47, v31);
}
}
v23 = v50;
v24 = v51;
}
++v25;
}
while ( v25 < (v24 - (_BYTE *)v23) >> 2 );
}
v32 = v47 & 1;
v33 = (unsigned __int8)v47 >> 1;
if ( v32 )
v33 = v48;
if ( v33 )
{
std::operator+("Overrides ", (__int64)&v47, v52);
v37 = *((__int64 **)this + 138);
v38 = *v37;
v41[0] = -1;
v41[1] = -106;
v39 = *(void (__fastcall **)(__int64 *, _BYTE *))(v38 + 1072);
v41[2] = 50;
v39(v37, v41);
v40 = (char *)v52 + 1;
if ( (v52[0] & 1) != 0 )
v40 = (char *)v53;
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 138) + 928LL))(*((_QWORD *)this + 138), v40);
cocos2d::CCLabelBMFont::limitLabelWidth(
*((cocos2d::CCLabelBMFont **)this + 138),
*((float *)this + 183) - 40.0,
v5,
0.1);
if ( (v52[0] & 1) != 0 )
operator delete(v53);
if ( v50 )
{
if ( v50 != v51 )
v51 += 4 * ~((unsigned __int64)(v51 - 4 - (_BYTE *)v50) >> 2);
operator delete(v50);
}
if ( (v47 & 1) != 0 )
operator delete(v49);
goto LABEL_52;
}
if ( v23 )
{
if ( v23 != (_DWORD *)v51 )
v51 += 4 * ~((unsigned __int64)(v51 - 4 - (_BYTE *)v23) >> 2);
operator delete(v23);
v32 = v47 & 1;
}
if ( v32 )
operator delete(v49);
}
if ( *((_BYTE *)this + 1053) && !*((_QWORD *)this + 137) )
{
v35 = *((_QWORD *)this + 138);
v36 = *(void (__fastcall **)(__int64, void **))(*(_QWORD *)v35 + 1072LL);
LOWORD(v50) = -26986;
BYTE2(v50) = -106;
v36(v35, &v50);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 138) + 160LL))(*((_QWORD *)this + 138), 0.5);
(*(void (__fastcall **)(_QWORD, const char *))(**((_QWORD **)this + 138) + 928LL))(
*((_QWORD *)this + 138),
"Press again to set");
}
else
{
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 138) + 928LL))(*((_QWORD *)this + 138), &byte_11E1A70);
}
LABEL_52:
if ( (v44 & 1) != 0 )
operator delete(v46);
if ( v42 )
{
if ( v42 != v43 )
v43 += 4 * ~((unsigned __int64)(v43 - 4 - (_BYTE *)v42) >> 2);
operator delete(v42);
}
return _stack_chk_guard;
}