//
// sub_1004A0DD8 from 0x1004a0dd8 to 0x1004a0e78 (160 bytes)
//
// 2 xrefs:
// > sub_1004A0A1C @ 0x1004a0aa4
// > sub_10049E474 @ 0x10049f010
//
// 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:06:02 +0000
//
__int64 __fastcall sub_1004A0DD8(__int64 result)
{
int v1; // w8
__int64 v2; // x9
__int64 v3; // x19
unsigned int v4; // w20
__int64 v5; // x9
v1 = *(_DWORD *)(result + 1136);
*(_DWORD *)(result + 1136) = v1 != 1;
v2 = *(_QWORD *)(result + 680);
if ( v2 )
{
*(_BYTE *)(v2 + 1487) = v1 != 1;
}
else
{
v3 = result;
result = *(_QWORD *)(result + 688);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v4 = 0;
do
{
*(_BYTE *)(sub_1002E75A0(*(_QWORD *)(v3 + 688), v4++) + 1487) = *(_DWORD *)(v3 + 1136) != 0;
result = sub_1002E757C(*(_QWORD *)(v3 + 688));
}
while ( v4 < (unsigned int)result );
}
}
else
{
v5 = *(_QWORD *)(v3 + 1144);
if ( v5 )
*(_BYTE *)(v5 + 84) = v1 != 1;
}
}
return result;
}