//
// EditorUI::updateEditButtonColor from 0x100612aa0 to 0x100612ba2 (258 bytes)
//
// 10 xrefs:
// > EditorUI::activateRotationControl @ 0x10060eb0b
// > EditorUI::deactivateTransformControl @ 0x1006111fc
// > sub_100611790 @ 0x1006117de
// > EditorUI::activateTransformControl @ 0x10061188c
// > EditorUI::activateTransformControl @ 0x10061193d
// > EditorUI::activateScaleControl @ 0x100612c46
// > EditorUI::activateScaleControl @ 0x100612cd9
// > EditorUI::activateScaleControl @ 0x100612d3b
// > EditorUI::deactivateScaleControl @ 0x100612ecc
// > EditorUI::showTransformControl @ 0x10061355f
//
// 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:34:35 +0000
//
void __fastcall EditorUI::updateEditButtonColor(__int64 a1, __int64 a2, int a3)
{
__int64 v3; // r14
__int64 v5; // rax
const char *CString; // r12
size_t v7; // rax
size_t v8; // r15
char *v9; // r13
size_t v10; // rbx
__int64 v11; // r14
_QWORD *v12; // rax
char v13; // [rsp+0h] [rbp-50h]
_QWORD __dst[2]; // [rsp+8h] [rbp-48h] BYREF
void *__p; // [rsp+18h] [rbp-38h]
int v16; // [rsp+24h] [rbp-2Ch]
v3 = *(_QWORD *)(a1 + 816);
if ( !v3 )
return;
v5 = sub_10088E820("%i", v13);
CString = (const char *)cocos2d::CCString::getCString(v5);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v8 = v7;
if ( v7 >= 0x17 )
{
v16 = a3;
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
v9 = (char *)operator new(v10);
__p = v9;
__dst[0] = v10 + 1;
a3 = v16;
__dst[1] = v8;
}
else
{
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( !v7 )
goto LABEL_10;
}
memmove(v9, CString, v8);
LABEL_10:
v9[v8] = 0;
v11 = cocos2d::CCDictionary::objectForKey(v3, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( v11 )
{
v12 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 1072LL))(v11);
ButtonSprite::setColor(v12, a3);
}
}