//
// EditorUI::updateEditButtonColor from 0x140114990 to 0x140114b17 (391 bytes)
//
// 5 xrefs:
// > EditorUI::activateScaleControl @ 0x140114c1c
// > EditorUI::deactivateScaleControl @ 0x140114dc9
// > EditorUI::activateTransformControl @ 0x14011524e
// > EditorUI::deactivateTransformControl @ 0x1401153ef
// > ??> @ 0x1406c9168
//
// 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
//
// Hidden C++ exception states: #wind=1
void EditorUI::updateEditButtonColor(EditorUI *a1, int a2, cocos2d::ccColor3B *a3)
{
cocos2d::CCString *v5; // rax
const char *CString; // rax
size_t v7; // r8
__int64 v8; // rbx
void *v9; // rcx
_QWORD *v10; // rbx
__int64 v11; // rcx
__int64 v12; // rcx
__int64 v13; // rcx
__int16 v14; // [rsp+20h] [rbp-48h] BYREF
GLubyte b; // [rsp+22h] [rbp-46h]
void *Block[2]; // [rsp+30h] [rbp-38h] BYREF
__m128i si128; // [rsp+40h] [rbp-28h]
if ( a1->m_editButtonDict )
{
v5 = cocos2d::CCString::createWithFormat("%i", a2);
CString = cocos2d::CCString::getCString(v5);
*(_OWORD *)Block = 0;
si128 = 0;
v7 = -1;
do
++v7;
while ( CString[v7] );
sub_14003A930(Block, CString, v7);
v8 = cocos2d::CCDictionary::objectForKey(a1->m_editButtonDict, Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v9 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v9 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v9);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);
LOBYTE(Block[0]) = 0;
if ( v8 )
{
v10 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 936LL))(v8);
v14 = *(_WORD *)&a3->r;
b = a3->b;
v11 = v10[78];
if ( v11 )
(**(void (__fastcall ***)(__int64, __int16 *))(v11 + 368))(v11 + 368, &v14);
v12 = v10[79];
if ( v12 )
(**(void (__fastcall ***)(__int64, __int16 *))(v12 + 320))(v12 + 320, &v14);
v13 = v10[81];
if ( v13 || (v13 = v10[80]) != 0 )
(**(void (__fastcall ***)(__int64, __int16 *))(v13 + 320))(v13 + 320, &v14);
}
}
}