//
// sub_1801135C0 from 0x1801135c0 to 0x1801136a6 (230 bytes)
//
// 4 xrefs:
// > sub_180113410 @ 0x180113438
// > sub_180113410 @ 0x180113458
// > sub_180113720 @ 0x180113903
// > ??> @ 0x180201d18
//
// 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:54:36 +0000
//
__int64 __fastcall sub_1801135C0(_DWORD **a1)
{
int v2; // ecx
__int64 v3; // rdx
v2 = *((_DWORD *)a1 + 3);
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 = *((int *)a1 + 2);
if ( (int)v3 < 0 )
{
memset(&(*a1)[4 * v3], 0, 16LL * -(int)v3);
v2 = *((_DWORD *)a1 + 3);
}
*((_DWORD *)a1 + 2) = 0;
if ( (int)abs32(v2) > 0 )
{
if ( v2 > 0 )
{
if ( *a1 )
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), *a1);
}
*a1 = nullptr;
*((_DWORD *)a1 + 3) = 0;
}
return 0;
}