//
// sub_1800553F0 from 0x1800553f0 to 0x180055489 (153 bytes)
//
// 4 xrefs:
// > sub_1800FB080 @ 0x1800fb1ea
// > sub_1801026E0 @ 0x180102954
// > sub_1801026E0 @ 0x180102a3d
// > ??> @ 0x1801f8ce8
//
// 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:19 +0000
//
__int64 __fastcall sub_1800553F0(__int64 a1)
{
int v1; // edi
__int64 i; // rbx
__int64 v4; // rax
__int64 v5; // rax
char v7; // [rsp+30h] [rbp+8h] BYREF
char v8; // [rsp+40h] [rbp+18h] BYREF
v1 = 0;
if ( *(int *)(a1 + 12) <= 0 )
return 2;
for ( i = 0; ; ++i )
{
if ( !*(_BYTE *)(i + *(_QWORD *)(a1 + 32)) )
{
v4 = *(_QWORD *)(a1 + 24);
v7 = 0;
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v4 + 8 * i) + 48LL))(*(_QWORD *)(v4 + 8 * i), &v7);
if ( v7 )
{
v5 = *(_QWORD *)(a1 + 24);
v8 = 0;
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v5 + 8 * i) + 64LL))(*(_QWORD *)(v5 + 8 * i), &v8);
if ( v8 )
break;
}
}
if ( ++v1 >= *(_DWORD *)(a1 + 12) )
return 2;
}
return 0;
}