//
// sub_10072FC10 from 0x10072fc10 to 0x10072fca8 (152 bytes)
//
// 1 xrefs:
// > sub_10072DFE0 @ 0x10072ea62
//
// 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 12:36:21 +0000
//
unsigned __int64 __fastcall sub_10072FC10(int *a1)
{
unsigned __int64 *v1; // rbx
unsigned __int64 *v2; // r15
int v3; // eax
unsigned __int64 *v5; // r14
unsigned __int64 *v6; // rcx
bool v7; // al
v1 = *((unsigned __int64 **)a1 + 1);
v2 = *((unsigned __int64 **)a1 + 2);
if ( v1 == v2 )
return 0;
v3 = *a1;
if ( *a1 )
{
if ( v3 == 2 )
{
v1 = v2 - 2;
}
else if ( v3 != 1 )
{
sub_1009A92C0(a1);
}
}
else
{
v5 = v1 + 2;
if ( v1 + 2 == v2 )
{
v6 = *((unsigned __int64 **)a1 + 1);
}
else
{
do
{
v7 = sub_100728F40(v5, v1);
v6 = v5;
if ( !v7 )
v6 = v1;
v5 += 2;
v1 = v6;
}
while ( v5 != v2 );
}
v1 = v6;
}
return *v1;
}