//
// sub_1800E8470 from 0x1800e8470 to 0x1800e8511 (161 bytes)
//
// 4 xrefs:
// > sub_1800BCAD0 @ 0x1800bcc4c
// > ??> @ 0x18018d3c4
// > ??> @ 0x18018d3d8
// > ??> @ 0x1801fff54
//
// 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:18 +0000
//
__int64 __fastcall sub_1800E8470(__int64 a1)
{
char v2; // r14
int v3; // edi
__int64 v4; // rsi
__int64 v5; // rdx
unsigned int v6; // ebp
v2 = 0;
if ( a1 )
{
sub_1801021C0(a1, 16);
v2 = 1;
}
v3 = 0;
if ( *(int *)(a1 + 1684) <= 0 )
{
LABEL_8:
v6 = 0;
}
else
{
v4 = 0;
while ( 1 )
{
v5 = *(_QWORD *)(v4 + *(_QWORD *)(a1 + 1696) + 48);
if ( v5 )
{
v6 = sub_1800BDAA0(*(_QWORD *)(a1 + 1648), v5);
if ( v6 )
break;
}
++v3;
v4 += 56;
if ( v3 >= *(_DWORD *)(a1 + 1684) )
goto LABEL_8;
}
}
if ( v2 )
sub_180102300(a1, 16);
return v6;
}