//
// sub_1800DAC90 from 0x1800dac90 to 0x1800dad58 (200 bytes)
//
// 4 xrefs:
// > sub_1800DAAD0 @ 0x1800daaeb
// > sub_1800DBD90 @ 0x1800dbdce
// > ??> @ 0x1801ff300
// > ??> @ 0x1801ff30c
//
// 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_1800DAC90(_DWORD **a1)
{
int v2; // ecx
int v3; // r8d
int v4; // eax
v2 = *((_DWORD *)a1 + 3);
v3 = v2;
if ( (abs32(v2) & 0x80000000) != 0 )
{
if ( *((int *)a1 + 2) > 0 )
return 28;
if ( v2 > 0 && *a1 )
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), *a1);
*a1 = nullptr;
v2 = 0;
*((_DWORD *)a1 + 3) = 0;
v3 = 0;
}
*((_DWORD *)a1 + 2) = 0;
v4 = -v2;
if ( v2 >= 0 )
v4 = v2;
if ( v4 > 0 )
{
if ( v3 > 0 )
{
if ( *a1 )
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), *a1);
}
*a1 = nullptr;
*((_DWORD *)a1 + 3) = 0;
}
return 0;
}