//
// sub_1800D7CF0 from 0x1800d7cf0 to 0x1800d7d31 (65 bytes)
//
// 3 xrefs:
// > sub_1800DC1E0 @ 0x1800dc214
// > sub_1800E45F0 @ 0x1800e4637
// > sub_1800E6830 @ 0x1800e6884
//
// 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:54:12 +0000
//
__int64 __fastcall sub_1800D7CF0(__int64 a1, _DWORD *a2)
{
_QWORD *v4; // r9
int v5; // edx
_QWORD *v6; // r8
__int64 v7; // rax
int v8; // ecx
if ( !a2 )
return 31;
v4 = (_QWORD *)(a1 + 328);
v5 = 0;
v6 = *(_QWORD **)(a1 + 328);
if ( v6 != (_QWORD *)(a1 + 328) )
{
do
{
v7 = v6[2];
v8 = v5 + 1;
v6 = (_QWORD *)*v6;
if ( *(_DWORD *)(v7 + 24) == 1010 )
v8 = v5;
v5 = v8;
}
while ( v6 != v4 );
}
*a2 = v5;
return 0;
}