//
// GJItemIcon::toggleEnabledState from 0x8bab2c to 0x8bac10 (228 bytes)
//
// 3 xrefs:
// > GJGarageLayer::onToggleItem @ 0x8bacbc
// > GJGarageLayer::setupSpecialPage @ 0x8c04c8
// > ??> @ 0xd7d70
//
// This function is hookable on this platform (idp: arm, 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:56:27 +0000
//
__int64 __fastcall GJItemIcon::toggleEnabledState(GJItemIcon *this, char a2)
{
__int64 v2; // x20
void (__fastcall *v3)(__int64, _BYTE *); // x2
unsigned int v4; // w19
cocos2d::CCArray *v5; // x20
unsigned int v6; // w1
__int64 v7; // x0
_BYTE v9[8]; // [xsp+30h] [xbp+30h] BYREF
if ( !*((_BYTE *)this + 620) )
{
v2 = *((_QWORD *)this + 75);
v3 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v2 + 960LL);
if ( a2 )
{
v9[0] = -1;
v9[1] = -1;
v9[2] = -1;
}
else
{
memset(v9, 100, 3);
}
v4 = 0;
v3(v2, v9);
v5 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 488LL))(v2);
if ( v5 )
{
while ( v4 < (unsigned int)cocos2d::CCArray::count(v5) )
{
v6 = v4++;
v7 = cocos2d::CCArray::objectAtIndex(v5, v6);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 344LL))(v7, 1);
}
}
}
return _stack_chk_guard;
}