//
// SetupShaderEffectPopup::toggleGroup from 0x1405ea290 to 0x1405ea3b3 (291 bytes)
//
// 4 xrefs:
// > ??> @ 0x140801e28
// > ??> @ 0x1408e2924
// > ??> @ 0x1408e295c
// > ??> @ 0x14092eef8
//
// 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:35:03 +0000
//
__int64 __fastcall SetupShaderEffectPopup::toggleGroup(cocos2d::CCDictionary **a1, __int64 a2, unsigned __int8 a3)
{
unsigned int v4; // ebp
cocos2d::CCArray *GroupContainer; // r15
unsigned int i; // edi
unsigned int *v7; // rbx
int v8; // eax
struct cocos2d::CCObject *v9; // rax
struct cocos2d::CCObject *v10; // rsi
__int64 v11; // rbx
unsigned __int8 v12; // al
__int64 v13; // rdx
v4 = a3;
GroupContainer = (cocos2d::CCArray *)SetupTriggerPopup::getGroupContainer(a1, a2);
(*(void (__fastcall **)(cocos2d::CCArray *, _QWORD))(*(_QWORD *)GroupContainer + 64LL))(GroupContainer, v4);
for ( i = 0; i < cocos2d::CCArray::count(GroupContainer); ++i )
{
v7 = (unsigned int *)cocos2d::CCArray::objectAtIndex(GroupContainer, i);
if ( !cocos2d::CCDictionary::objectForKey(a1[119], v7[2]) )
(*(void (__fastcall **)(unsigned int *, _QWORD))(*(_QWORD *)v7 + 336LL))(v7, (unsigned __int8)v4);
v8 = (*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)v7 + 56LL))(v7);
v9 = cocos2d::CCDictionary::objectForKey(a1[95], v8);
v10 = v9;
if ( v9 )
{
v11 = *(_QWORD *)v9;
v12 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 344LL))(v9);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(v11 + 920))(v10, v12);
}
}
if ( (*((float (__fastcall **)(cocos2d::CCDictionary **, __int64))*a1 + 146))(a1, 513) == 0.0 )
return SetupTriggerPopup::toggleDisableButtons(a1, 0);
LOBYTE(v13) = 1;
return SetupTriggerPopup::toggleDisableButtons(a1, v13);
}