//
// EditorUI::updateEditButtonColor from 0x10003ea30 to 0x10003eb32 (258 bytes)
//
// 19 xrefs:
// > EditorUI::init @ 0x1000093b1
// > EditorUI::init @ 0x10000949e
// > EditorUI::deactivateScaleControl @ 0x10000bb33
// > EditorUI::deactivateTransformControl @ 0x10000bc1e
// > EditorUI::deleteObject @ 0x100032bc0
// > EditorUI::deleteObject @ 0x100032c3f
// > EditorUI::deselectAll @ 0x100032e71
// > EditorUI::deselectAll @ 0x100032ee6
// > EditorUI::selectAll @ 0x10003d125
// > EditorUI::selectAll @ 0x10003d19a
// > EditorUI::selectAllWithDirection @ 0x10003d51c
// > EditorUI::selectAllWithDirection @ 0x10003d591
// > EditorUI::activateRotationControl @ 0x10003d65b
// > EditorUI::activateScaleControl @ 0x10003ebe4
// > EditorUI::activateScaleControl @ 0x10003ec8e
// > EditorUI::activateScaleControl @ 0x10003ecf0
// > EditorUI::activateTransformControl @ 0x1000400ec
// > EditorUI::activateTransformControl @ 0x10004020f
// > EditorUI::activateTransformControl @ 0x100040239
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall EditorUI::updateEditButtonColor(EditorUI *a1, int a2, cocos2d::ccColor3B a3)
{
double v3; // xmm0_8
cocos2d::CCDictionary *m_editButtonDict; // r14
int v5; // ebx
cocos2d::CCString *v6; // rax
const char *CString; // r12
size_t v8; // rax
size_t v9; // r15
char *v10; // r13
size_t v11; // rbx
__int64 v12; // r14
ButtonSprite *v13; // rax
char v14; // [rsp+0h] [rbp-50h]
_QWORD __dst[2]; // [rsp+8h] [rbp-48h] BYREF
void *__p; // [rsp+18h] [rbp-38h]
int v17; // [rsp+24h] [rbp-2Ch]
m_editButtonDict = a1->m_editButtonDict;
if ( !m_editButtonDict )
return;
v5 = *(_DWORD *)&a3.r;
v6 = (cocos2d::CCString *)sub_1007AB580("%i", v14);
CString = cocos2d::CCString::getCString(v6);
v8 = strlen(CString);
if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v3);
v9 = v8;
if ( v8 >= 0x17 )
{
v17 = v5;
v11 = 26;
if ( (v8 | 7) != 0x17 )
v11 = (v8 | 7) + 1;
v10 = (char *)operator new(v11);
__p = v10;
__dst[0] = v11 + 1;
v5 = v17;
__dst[1] = v9;
}
else
{
LOBYTE(__dst[0]) = 2 * v8;
v10 = (char *)__dst + 1;
if ( !v8 )
goto LABEL_10;
}
memmove(v10, CString, v9);
LABEL_10:
v10[v9] = 0;
v12 = cocos2d::CCDictionary::objectForKey_1(m_editButtonDict, __dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( v12 )
{
v13 = (ButtonSprite *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 1056LL))(v12);
ButtonSprite::setColor(v13, (cocos2d::ccColor3B)v5);
}
}