//
// LevelEditorLayer::toggleGroupPreview from 0x1000c3580 to 0x1000c3697 (279 bytes)
//
// 1 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x1000c2e01
//
// 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 12:20:35 +0000
//
__int64 __fastcall LevelEditorLayer::toggleGroupPreview(_QWORD *a1, __int64 a2, unsigned __int8 a3)
{
__int64 v5; // rdi
__int64 result; // rax
__int64 v7; // r12
unsigned int *v8; // rax
_QWORD *v9; // r12
unsigned __int64 v10; // r13
unsigned int *v11; // rax
_QWORD *v12; // r12
unsigned __int64 v13; // r13
v5 = a1[269];
result = GJEffectManager::isGroupEnabled(v5, a2);
if ( (_BYTE)result != a3 )
{
*(_BYTE *)(a1[1830] + (int)a2) = 2;
v7 = *(_QWORD *)(a1[1798] + 8LL * (int)a2);
if ( v7 )
{
if ( a3 )
{
LABEL_4:
if ( v7 )
{
v8 = *(unsigned int **)(v7 + 56);
if ( *v8 )
{
v9 = *((_QWORD **)v8 + 2);
v10 = (unsigned __int64)&v9[*v8 - 1];
do
{
if ( !*v9 )
break;
GameObject::groupWasEnabled(*v9++);
}
while ( (unsigned __int64)v9 <= v10 );
}
}
return GJEffectManager::toggleGroup(a1[269], (unsigned int)a2, a3);
}
}
else
{
v7 = sub_1007FE900(v5);
*(_QWORD *)(a1[1798] + 8LL * (int)a2) = v7;
cocos2d::CCDictionary::setObject_1(a1[1797], v7, (int)a2);
if ( a3 )
goto LABEL_4;
}
if ( v7 )
{
v11 = *(unsigned int **)(v7 + 56);
if ( *v11 )
{
v12 = *((_QWORD **)v11 + 2);
v13 = (unsigned __int64)&v12[*v11 - 1];
do
{
if ( !*v12 )
break;
GameObject::groupWasDisabled(*v12++);
}
while ( (unsigned __int64)v12 <= v13 );
}
}
return GJEffectManager::toggleGroup(a1[269], (unsigned int)a2, a3);
}
return result;
}