//
// CustomizeObjectLayer::updateCustomColorLabels from 0x1001f7b90 to 0x1001f7c7b (235 bytes)
//
// 5 xrefs:
// > CustomizeObjectLayer::init @ 0x1001f6365
// > CustomizeObjectLayer::onUpdateCustomColor @ 0x1001f7b0e
// > CustomizeObjectLayer::onNextColorChannel @ 0x1001f8154
// > CustomizeObjectLayer::updateCurrentSelection @ 0x1001f8486
// > CustomizeObjectLayer::colorSetupClosed @ 0x1001f89f8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall CustomizeObjectLayer::updateCustomColorLabels(CustomizeObjectLayer *a1)
{
__m128 v1; // xmm0
cocos2d::CCString *v2; // rax
const char *CString; // r14
CCTextInputNode *m_customColorInput; // rbx
size_t v5; // rax
size_t v6; // r15
char *v7; // r12
size_t v8; // r13
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
v2 = (cocos2d::CCString *)sub_1007AB580("%i", __dst[0]);
CString = cocos2d::CCString::getCString(v2);
ButtonSprite::setString(a1->m_customColorButtonSprite, CString);
m_customColorInput = a1->m_customColorInput;
v5 = strlen(CString);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(*(double *)v1.i64);
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
__dst[0] = v8 + 1;
__dst[1] = v6;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( v5 )
LABEL_8:
memmove(v7, CString, v6);
v7[v6] = 0;
CCTextInputNode::setString(m_customColorInput, (__int64)__dst, v1);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
}