//
// ColorSelectLiveOverlay::updateColorLabel from 0xa65838 to 0xa659c0 (392 bytes)
//
// 3 xrefs:
// > ColorSelectLiveOverlay::init @ 0xa66710
// > ColorSelectLiveOverlay::onSelectTab @ 0xa66af0
// > ??> @ 0xd02e8
//
// 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:00:17 +0000
//
__int64 __fastcall ColorSelectLiveOverlay::updateColorLabel(ColorSelectLiveOverlay *this)
{
int v2; // w2
__int64 v3; // x20
__int64 v4; // x0
int v5; // w22
char *CString; // x0
size_t v7; // x0
char *v8; // x1
cocos2d::CCString *v10; // x0
__int64 v11; // x0
char *v12; // [xsp+48h] [xbp+48h]
__int64 v13[2]; // [xsp+50h] [xbp+50h] BYREF
void *v14; // [xsp+60h] [xbp+60h]
v2 = *((unsigned __int8 *)this + 856);
v3 = *((_QWORD *)this + 87);
v4 = *((_QWORD *)this + 86);
if ( !v2 )
v3 = v4;
if ( v3 )
{
v5 = *(_DWORD *)(v3 + 92);
}
else
{
v11 = *((_QWORD *)this + 83);
if ( !v11 )
goto LABEL_22;
v5 = *(_DWORD *)(v11 + 1024);
}
if ( v5 <= 0 )
{
LABEL_22:
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 106) + 928LL))(*((_QWORD *)this + 106), &byte_11E1A70);
return _stack_chk_guard;
}
v13[0] = 0;
v13[1] = 0;
v14 = nullptr;
if ( v5 <= 999 )
{
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)v5);
CString = (char *)cocos2d::CCString::getCString(v10);
}
else
{
CString = GJSpecialColorSelect::textForColorIdx((GJSpecialColorSelect *)(unsigned int)v5);
}
v12 = CString;
v7 = strlen(CString);
std::string::assign(v13, v12, v7);
if ( (v13[0] & 1) != 0 )
v8 = (char *)v14;
else
v8 = (char *)v13 + 1;
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 106) + 928LL))(*((_QWORD *)this + 106), v8);
if ( v3 )
{
if ( v5 <= 1004 || v5 == 1009 || v5 >= 1009 && (unsigned int)(v5 - 1013) <= 1 )
ColorSelectLiveOverlay::toggleControls((cocos2d::CCArray **)this, 1u);
else
ColorSelectLiveOverlay::toggleControls((cocos2d::CCArray **)this, 0);
}
if ( (v13[0] & 1) != 0 )
operator delete(v14);
return _stack_chk_guard;
}