//
// sub_1004AE548 from 0x1004ae548 to 0x1004ae5a0 (88 bytes)
//
// 2 xrefs:
// > sub_1004D4A88 @ 0x1004d4ad4
// > sub_1004D4C60 @ 0x1004d4ca0
//
// 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
//
__int64 __fastcall sub_1004AE548(__int64 a1, __int64 a2)
{
__int64 result; // x0
if ( *(_BYTE *)(a1 + 408) )
return 0;
*(_QWORD *)a1 = a2;
result = sub_1004B5AD8(a1 + 400, 0);
if ( !(_DWORD)result )
{
result = sub_1004ADE0C(a1 + 16, a1);
if ( !(_DWORD)result )
*(_BYTE *)(a1 + 408) = 1;
}
return result;
}