//
// cocos2d::CCMenuItemToggle::setEnabled from 0x1003aa950 to 0x1003aa9e7 (151 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b340c0
//
// 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:29:23 +0000
//
void __fastcall cocos2d::CCMenuItemToggle::setEnabled(__int64 a1, unsigned __int8 a2)
{
__int64 v2; // rax
__int64 v3; // rax
unsigned int *v4; // rax
_QWORD *v5; // r14
unsigned __int64 v6; // r15
if ( *(_BYTE *)(a1 + 339) != a2 )
{
*(_BYTE *)(a1 + 339) = a2;
v2 = *(_QWORD *)(a1 + 384);
if ( v2 )
{
if ( (unsigned int)sub_1007FEF90(v2) )
{
v3 = *(_QWORD *)(a1 + 384);
if ( v3 )
{
v4 = *(unsigned int **)(v3 + 56);
if ( *v4 )
{
v5 = *((_QWORD **)v4 + 2);
v6 = (unsigned __int64)&v5[*v4 - 1];
do
{
if ( !*v5 )
break;
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v5 + 1056LL))(*v5, a2);
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
}
}
}
}
}
}