//
// sub_1004AE6B4 from 0x1004ae6b4 to 0x1004ae714 (96 bytes)
//
// 1 xrefs:
// > sub_1004AECD4 @ 0x1004aeda0
//
// 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_1004AE6B4(__int64 result)
{
int v1; // w8
bool v2; // vf
__int64 v3; // x19
__int64 v4; // x1
v1 = *(_DWORD *)(result + 424);
v2 = __OFSUB__(v1--, 1);
*(_DWORD *)(result + 424) = v1;
if ( (v1 < 0) ^ v2 | (v1 == 0) )
{
v3 = result;
*(_DWORD *)(result + 424) = 0;
v4 = *(_QWORD *)(result + 416);
if ( v4 )
{
result = sub_1004B1970(
*((_QWORD *)off_1008524C8 + 54),
v4,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_geometry_mgr.cpp",
400,
1);
*(_QWORD *)(v3 + 416) = 0;
}
}
return result;
}