//
// sub_1002E6258 from 0x1002e6258 to 0x1002e62c8 (112 bytes)
//
// 2 xrefs:
// > sub_1002E5208 @ 0x1002e5a10
// > sub_1002E5208 @ 0x1002e5bb0
//
// 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:02:50 +0000
//
__int64 __fastcall sub_1002E6258(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v4; // x8
char v5; // w9
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v4 = *(_QWORD *)(a1 + 664);
if ( (_DWORD)result == 1 )
{
*(_BYTE *)(v4 + 394) ^= 1u;
}
else
{
v5 = *(_BYTE *)(v4 + 393);
*(_BYTE *)(v4 + 393) = (v5 & 1) == 0;
if ( (v5 & 1) != 0 )
*(_BYTE *)(v4 + 394) = 0;
return sub_1002E62F0(a1);
}
return result;
}