//
// LevelEditorLayer::updateToggledGroups from 0x461c50 to 0x461d0a (186 bytes)
//
// 1 xrefs:
// > LevelEditorLayer::updateGameObjects @ 0x46cec6
//
// 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:48:53 +0000
//
int __fastcall LevelEditorLayer::updateToggledGroups(int this)
{
_DWORD *v1; // r9
_DWORD *v2; // r7
int v3; // r8
unsigned int i; // r4
int v5; // r5
int v6; // r2
int v7; // r3
int v8; // r10
int v9; // r3
_DWORD *v10; // r2
int *v11; // r5
int *v12; // r6
int v13; // t1
v1 = (_DWORD *)(this + 12060);
v2 = (_DWORD *)(this + 11988);
v3 = this;
for ( i = 0; i != 10000; ++i )
{
if ( *(_BYTE *)(*v1 + i) )
{
v5 = *(_DWORD *)(*(_DWORD *)(v3 + 2284) + 4 * i);
if ( v5 )
{
this = GJEffectManager::isGroupEnabled(*(GJEffectManager **)(v3 + 1524), i);
v6 = 1 << (i & 0x1F);
v7 = *(_DWORD *)(*v2 + 4 * (i >> 5));
v8 = (v7 & v6) != 0;
if ( v8 == this )
{
v9 = (v7 & v6) != 0 ? v7 & ~v6 : v7 | v6;
*(_DWORD *)(*v2 + 4 * (i >> 5)) = v9;
v10 = *(_DWORD **)(v5 + 52);
if ( *v10 )
{
v11 = (int *)v10[3];
v12 = &v11[*v10 - 1];
while ( v11 <= v12 )
{
v13 = *v11++;
this = v13;
if ( !v13 )
break;
if ( !*(_BYTE *)(this + 1089) )
{
if ( v8 )
this = GameObject::groupWasEnabled(this);
else
this = GameObject::groupWasDisabled(this);
}
}
}
}
}
--*(_BYTE *)(*v1 + i);
}
}
return this;
}