//
// sub_18001BC50 from 0x18001bc50 to 0x18001bcd6 (134 bytes)
//
// 5 xrefs:
// > sub_1800183A0 @ 0x1800183b6
// > sub_180018DF0 @ 0x18001bba1
// > sub_18001CAB0 @ 0x18001cad0
// > sub_18001CAB0 @ 0x18001cb58
// > ??> @ 0x1801f7314
//
// 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
//
__int64 __fastcall sub_18001BC50(__int64 a1)
{
int v2; // r8d
int v3; // eax
__int64 v4; // rcx
sub_1800D5500();
v2 = *(_DWORD *)(a1 + 2292);
v3 = *(_DWORD *)(a1 + 3068);
do
{
v4 = *(unsigned __int8 *)(v3 + a1 + 656);
if ( (int)v4 < v2 )
goto LABEL_6;
*(_DWORD *)(a1 + 3068) = ++v3;
if ( v3 >= *(_DWORD *)(a1 + 2284) )
goto LABEL_7;
}
while ( v3 < 255 );
if ( (int)v4 < v2 )
{
LABEL_6:
*(_QWORD *)(a1 + 17440) = *(_QWORD *)(*(_QWORD *)(a1 + 632) + 16 * v4 + 8);
sub_18001CBE0(a1);
return 0;
}
LABEL_7:
*(_WORD *)(a1 + 3048) = 256;
return 19;
}