//
// cocos2d::CCMenuItemToggle::setEnabled from 0x1003c1550 to 0x1003c15e7 (151 bytes)
//
// 1 xrefs:
// > ??> @ 0x10092b8d8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCMenuItemToggle::setEnabled(cocos2d::CCMenuItemToggle *a1, bool a2)
{
__int64 v2; // rax
__int64 v3; // rax
unsigned int *v4; // rax
_QWORD *v5; // r14
unsigned __int64 v6; // r15
if ( a1->m_bEnabled != a2 )
{
a1->m_bEnabled = a2;
v2 = *(_QWORD *)&a1[1].m_uID;
if ( v2 )
{
if ( (unsigned int)sub_100720070(v2) )
{
v3 = *(_QWORD *)&a1[1].m_uID;
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, bool))(*(_QWORD *)*v5 + 1040LL))(*v5, a2);
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
}
}
}
}
}
}