//
// EditorUI::resetSelectedObjectsColor from 0x1401bedd0 to 0x1401bee91 (193 bytes)
//
// 4 xrefs:
// > EditorUI::colorSelectClosed @ 0x1401bedb2
// > ??> @ 0x1408a24ac
// > ??> @ 0x1408a24bc
// > ??> @ 0x14091a51c
//
// 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 11:28:02 +0000
//
int __fastcall EditorUI::resetSelectedObjectsColor(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // rax
unsigned int *v4; // rbx
__int64 *v5; // rbx
__int64 *i; // rdi
__int64 v7; // rcx
__int16 v9; // [rsp+30h] [rbp+8h] BYREF
char v10; // [rsp+32h] [rbp+Ah]
v2 = *(_QWORD *)(a1 + 1568);
if ( v2 )
{
v9 = -256;
v10 = 0;
LODWORD(v3) = (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v2 + 1376LL))(v2, &v9);
}
else
{
LODWORD(v3) = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944));
if ( (_DWORD)v3 )
{
v3 = *(_QWORD *)(a1 + 944);
if ( v3 )
{
v4 = *(unsigned int **)(v3 + 56);
v3 = *v4;
if ( (_DWORD)v3 )
{
v5 = *((__int64 **)v4 + 2);
for ( i = &v5[v3 - 1]; v5 <= i; ++v5 )
{
v7 = *v5;
if ( !*v5 )
break;
v9 = -256;
v10 = 0;
LODWORD(v3) = (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v7 + 1376LL))(v7, &v9);
}
}
}
}
}
return v3;
}