//
// sub_1008AC540 from 0x1008ac540 to 0x1008ac630 (240 bytes)
//
// 1 xrefs:
// > sub_1001EA5B0 @ 0x1001ea932
//
// This function is hookable on this platform (idp: pc, 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 12:37:19 +0000
//
__int64 __fastcall sub_1008AC540(_QWORD *a1, void *a2, __int64 a3, unsigned __int64 a4)
{
__int64 result; // rax
__int64 v7; // rdx
unsigned int v8; // ebx
if ( !a1 )
return 4294967194LL;
result = 4294967196LL;
if ( a1[18] )
{
v7 = a1[16] + 1LL;
if ( v7 != a1[13] || a1[13] == 0xFFFF )
{
a1[17] += a1[32] + a1[31] + a1[30] + 46LL;
a1[16] = v7;
result = sub_1008AB770((__int64)a1, a1 + 22, a1 + 39, a3, a4, 0, 0, 0, 0);
a1[18] = (_DWORD)result == 0;
if ( a2 )
{
v8 = result;
memcpy(a2, a1 + 22, 0x88u);
return v8;
}
}
}
return result;
}