//
// GJEffectManager::colorForGroupID from 0x5c4ba0 to 0x5c4c80 (224 bytes)
//
// 5 xrefs:
// > GameObject::groupColor @ 0x44edc8
// > LevelEditorLayer::updateObjectColors @ 0x461674
// > LevelEditorLayer::updateObjectColors @ 0x46186e
// > LevelEditorLayer::updateVisibility @ 0x46317c
// > LevelEditorLayer::updateVisibility @ 0x463380
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:52 +0000
//
int __fastcall GJEffectManager::colorForGroupID(GJEffectManager *a1, int a2, __int16 *a3, int a4)
{
int v6; // r0
unsigned int v7; // r1
unsigned int v8; // r3
_DWORD *v9; // r0
int v11; // r9
int i; // r4
int v13; // r0
unsigned int v14; // [sp+4h] [bp-18h] BYREF
unsigned int v15; // [sp+Ch] [bp-10h] BYREF
__int16 v16; // [sp+10h] [bp-Ch]
char v17; // [sp+12h] [bp-Ah]
v6 = *((_DWORD *)a1 + 112);
v14 = a2;
if ( a2 > 9998 )
v7 = 9999;
else
v7 = a2 & ~(a2 >> 31);
v14 = v7;
LOBYTE(v8) = *((_BYTE *)a3 + 2);
if ( ((1 << (v7 & 0x1F)) & *(_DWORD *)(v6 + 4 * (v7 >> 5))) != 0 )
{
LOWORD(v15) = *a3;
BYTE2(v15) = v8;
v9 = std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::find(
(_DWORD *)a1 + 72,
&v14);
if ( !v9 )
{
LABEL_8:
v16 = v15;
v8 = HIWORD(v15);
goto LABEL_9;
}
v11 = v9[4];
for ( i = v9[3]; ; i += 72 )
{
if ( i == v11 )
goto LABEL_8;
if ( *(_BYTE *)(i + 56) )
{
if ( a4 )
goto LABEL_19;
}
else if ( !*(_BYTE *)(i + 57) )
{
goto LABEL_19;
}
if ( *(_BYTE *)(i + 57) && !a4 )
{
LABEL_19:
v13 = GJEffectManager::colorForPulseEffect(a1, (unsigned __int8 *)&v15, i);
LOWORD(v15) = v13;
BYTE2(v15) = BYTE2(v13);
continue;
}
}
}
v16 = *a3;
LABEL_9:
v17 = v8;
return (unsigned __int8)v16 | (unsigned __int16)(HIBYTE(v16) << 8) | ((unsigned __int8)v8 << 16);
}