//
// sub_1800D7B40 from 0x1800d7b40 to 0x1800d7b85 (69 bytes)
//
// 3 xrefs:
// > sub_1800E4740 @ 0x1800e4776
// > sub_1800FD770 @ 0x1800fd7c6
// > sub_1800FE610 @ 0x1800fea53
//
// 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_1800D7B40(__int64 a1, int a2, _DWORD *a3)
{
_QWORD *v3; // rcx
_QWORD *v4; // rax
if ( a3 )
{
v3 = (_QWORD *)(a1 + 384);
if ( a2 >= 0 )
{
v4 = (_QWORD *)*v3;
if ( (_QWORD *)*v3 != v3 )
{
if ( a2 <= 0 )
{
LABEL_7:
if ( v4 )
{
*a3 = *((_DWORD *)v4 + 36);
return 0;
}
}
else
{
while ( 1 )
{
v4 = (_QWORD *)*v4;
if ( v4 == v3 )
break;
if ( --a2 <= 0 )
goto LABEL_7;
}
}
}
}
}
return 31;
}