//
// sub_10047CCB8 from 0x10047ccb8 to 0x10047cd44 (140 bytes)
//
// 2 xrefs:
// > EditorUI::colorSelectClosed @ 0x10047cc7c
// > EditorUI::colorSelectClosed @ 0x10047cca0
//
// This function is hookable on this platform (idp: arm, 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:05:44 +0000
//
__int64 __fastcall sub_10047CCB8(__int64 a1)
{
__int64 v2; // x0
__int64 result; // x0
__int64 v4; // x8
unsigned int *v5; // x9
__int64 v6; // x8
__int64 *v7; // x19
unsigned __int64 v8; // x20
v2 = *(_QWORD *)(a1 + 1496);
if ( v2 )
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1528LL))(v2, 65280);
result = sub_1002E757C(*(_QWORD *)(a1 + 896));
if ( (_DWORD)result )
{
v4 = *(_QWORD *)(a1 + 896);
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v7 = *((__int64 **)v5 + 2);
v8 = (unsigned __int64)&v7[v6 - 1];
do
{
result = *v7;
if ( !*v7 )
break;
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)result + 1528LL))(result, 65280);
++v7;
}
while ( (unsigned __int64)v7 <= v8 );
}
}
}
return result;
}