//
// sub_100252724 from 0x100252724 to 0x1002527e0 (188 bytes)
//
// 3 xrefs:
// > sub_100251B2C @ 0x100252244
// > sub_100251B2C @ 0x1002522d0
// > sub_100251B2C @ 0x100252360
//
// 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 11:01:32 +0000
//
__int64 __fastcall sub_100252724(__int64 a1, __int64 a2)
{
int v3; // w0
__int64 result; // x0
__int64 v5; // x8
__int64 v6; // x20
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(a1 + 1056) = v3;
CCMenuItemToggler::toggle(*(_QWORD *)(a1 + 1064), v3 == 0);
CCMenuItemToggler::toggle(*(_QWORD *)(a1 + 1072), *(_DWORD *)(a1 + 1056) == 1);
result = CCMenuItemToggler::toggle(*(_QWORD *)(a1 + 1080), *(_DWORD *)(a1 + 1056) == 2);
v5 = *(_QWORD *)(a1 + 680);
if ( v5 )
{
*(_DWORD *)(v5 + 1844) = *(_DWORD *)(a1 + 1056);
}
else
{
result = *(_QWORD *)(a1 + 688);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v6 = 0;
do
{
*(_DWORD *)(sub_1002E75A0(*(_QWORD *)(a1 + 688), v6) + 1844) = *(_DWORD *)(a1 + 1056);
v6 = (unsigned int)(v6 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 688));
}
while ( (unsigned int)v6 < (unsigned int)result );
}
}
}
return result;
}