//
// sub_180087D80 from 0x180087d80 to 0x180087e66 (230 bytes)
//
// 4 xrefs:
// > sub_180087E70 @ 0x180087e8a
// > sub_1800E1CA0 @ 0x1800e1d04
// > sub_1800E1CA0 @ 0x1800e1d1b
// > ??> @ 0x1801fa2a8
//
// 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 10:53:41 +0000
//
__int64 __fastcall sub_180087D80(_QWORD *a1)
{
int v2; // ecx
__int64 v3; // rdx
int v5; // [rsp+20h] [rbp-18h]
char v6; // [rsp+20h] [rbp-18h]
v2 = *((_DWORD *)a1 + 3);
if ( (abs32(v2) & 0x80000000) != 0 )
{
if ( *((int *)a1 + 2) > 0 )
return 28;
if ( v2 > 0 && *a1 )
{
v6 = 1;
sub_1800B6AA0(
*((_QWORD *)off_1801AED20 + 52),
*a1,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_memory.h",
255,
v6);
}
*a1 = 0;
v2 = 0;
*((_DWORD *)a1 + 3) = 0;
}
v3 = *((int *)a1 + 2);
if ( (int)v3 < 0 )
{
memset((void *)(*a1 + 16 * v3), 0, 16LL * -(int)v3);
v2 = *((_DWORD *)a1 + 3);
}
*((_DWORD *)a1 + 2) = 0;
if ( (int)abs32(v2) > 0 )
{
if ( v2 > 0 )
{
if ( *a1 )
{
LOBYTE(v5) = 1;
sub_1800B6AA0(
*((_QWORD *)off_1801AED20 + 52),
*a1,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_memory.h",
255,
v5);
}
}
*a1 = 0;
*((_DWORD *)a1 + 3) = 0;
}
return 0;
}