//
// sub_1800D5590 from 0x1800d5590 to 0x1800d561a (138 bytes)
//
// 3 xrefs:
// > sub_1800D5040 @ 0x1800d5163
// > sub_1800D5620 @ 0x1800d5630
// > ??> @ 0x1801ba7dc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
char *__fastcall sub_1800D5590(__int64 a1)
{
int v1; // r9d
char *v3; // r11
unsigned __int8 *v4; // rax
int v5; // ecx
int v6; // edx
v1 = 0;
if ( dword_1801AB180 <= 0 )
return nullptr;
while ( 1 )
{
v3 = (char *)qword_1801AB178 + 245 * v1;
v4 = (unsigned __int8 *)(v3 + 128);
do
{
v5 = v4[a1 - (_QWORD)(v3 + 128)];
v6 = *v4 - v5;
if ( v6 )
break;
++v4;
}
while ( v5 );
if ( !v6 )
break;
if ( ++v1 >= dword_1801AB180 )
return nullptr;
}
return (char *)qword_1801AB178 + 245 * v1;
}