//
// sub_1800880E0 from 0x1800880e0 to 0x18008812f (79 bytes)
//
// 2 xrefs:
// > sub_180088B30 @ 0x180088b52
// > ??> @ 0x1801fa2c0
//
// 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:41 +0000
//
__int64 __fastcall sub_1800880E0(__int64 a1, int a2)
{
int v3; // eax
int v4; // ecx
__int64 v5; // r8
if ( !*(_DWORD *)(a1 + 52) )
return 0;
v3 = *(_DWORD *)(a1 + 24);
if ( !v3 )
return 0;
v4 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 4LL * (a2 & (v3 - 1)));
if ( v4 == -1 )
return 0;
v5 = *(_QWORD *)(a1 + 32);
while ( *(_DWORD *)(v5 + 16LL * v4) != a2 )
{
v4 = *(_DWORD *)(v5 + 16LL * v4 + 4);
if ( v4 == -1 )
return 0;
}
return *(_QWORD *)(v5 + 16LL * v4 + 8);
}