//
// sub_1800DBA40 from 0x1800dba40 to 0x1800dbab2 (114 bytes)
//
// 2 xrefs:
// > sub_1800DB2E0 @ 0x1800db4f2
// > ??> @ 0x1801ff3e4
//
// 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:13 +0000
//
__int64 __fastcall sub_1800DBA40(__int64 a1, _OWORD *a2)
{
int v4; // ecx
int v5; // eax
int v6; // eax
__int64 result; // rax
v4 = *(_DWORD *)(a1 + 8) + 1;
v5 = abs32(*(_DWORD *)(a1 + 12));
if ( v4 <= v5 )
goto LABEL_7;
v6 = (int)(float)((float)v5 * 1.5);
if ( v4 <= v6 )
v4 = v6;
if ( v4 < 4 )
v4 = 4;
result = sub_1800DBCA0(a1, (unsigned int)v4);
if ( !(_DWORD)result )
{
LABEL_7:
*(_OWORD *)(*(_QWORD *)a1 + 16LL * (int)(*(_DWORD *)(a1 + 8))++) = *a2;
return 0;
}
return result;
}