//
// sub_1800C8970 from 0x1800c8970 to 0x1800c89eb (123 bytes)
//
// 2 xrefs:
// > ??> @ 0x18016c568
// > ??> @ 0x1801fe250
//
// 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:06 +0000
//
__int64 __fastcall sub_1800C8970(_QWORD *a1, _DWORD *a2)
{
_DWORD *v4; // rcx
if ( !a2 )
return 31;
v4 = (_DWORD *)a1[93];
if ( !v4 )
{
v4 = (_DWORD *)a1[92];
if ( !v4 )
{
if ( !a1[83] )
return sub_1800C7A30((__int64)a1, a2);
v4 = a1 + 14;
if ( a1 == (_QWORD *)-112LL )
return sub_1800C7A30((__int64)a1, a2);
}
}
if ( v4[154] <= v4[155] )
*a2 = v4[152];
else
*a2 = v4[153];
return 0;
}