//
// sub_1004AAC70 from 0x1004aac70 to 0x1004aad00 (144 bytes)
//
// 1 xrefs:
// > ??> @ 0x100828270
//
// 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_1004AAC70(__int64 a1, void *__ptr, size_t __nitems)
{
__int64 v6; // x8
__int64 v7; // x19
v6 = *(_QWORD *)(a1 + 408);
if ( !v6 || (sub_1004D568C(v6 + 16) & 1) == 0 )
return sub_1004B56C4(*(FILE **)(a1 + 496), __ptr, __nitems);
sub_1004A8E7C(1);
v7 = sub_1004B56C4(*(FILE **)(a1 + 496), __ptr, __nitems);
sub_1004A8E7C(0);
return v7;
}