//
// sub_100643D10 from 0x100643d10 to 0x100643da8 (152 bytes)
//
// 0 xrefs:
//
// 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_100643D10(int *a1)
{
__int64 v1; // rbx
__int64 v2; // r15
int v3; // eax
__int64 v5; // r14
__int64 v6; // rcx
char v7; // al
v1 = *((_QWORD *)a1 + 3);
v2 = *((_QWORD *)a1 + 4);
if ( v1 == v2 )
return 0;
v3 = *a1;
if ( *a1 )
{
if ( v3 == 2 )
{
v1 = v2 - 16;
}
else if ( v3 != 1 )
{
sub_1007CD680(a1);
}
}
else
{
v5 = v1 + 16;
if ( v1 + 16 == v2 )
{
v6 = *((_QWORD *)a1 + 3);
}
else
{
do
{
v7 = sub_10064C310(v5, v1);
v6 = v5;
if ( !v7 )
v6 = v1;
v5 += 16;
v1 = v6;
}
while ( v5 != v2 );
}
v1 = v6;
}
return *(_QWORD *)v1;
}