//
// sub_10064E8F0 from 0x10064e8f0 to 0x10064eb26 (566 bytes)
//
// 3 xrefs:
// > sub_10064CC10 @ 0x10064cc32
// > sub_10064CC10 @ 0x10064cc8a
// > sub_10064CC10 @ 0x10064ceb4
//
// 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_10064E8F0(__int64 a1)
{
__int64 v2; // rdx
__int64 v3; // rsi
__int64 v4; // rcx
__int64 v5; // rdi
__int64 v6; // rdi
__int64 v7; // rdi
__int64 v8; // rsi
switch ( *(_DWORD *)(a1 + 32) )
{
case 1:
return 0x400000003LL;
case 2:
return 0x400000004LL;
case 3:
return 0x400000005LL;
case 4:
return 0x400000006LL;
case 5:
return 0x400000007LL;
case 6:
return 0x400000008LL;
case 7:
return 0x200000009LL;
case 8:
return 0x20000000ALL;
case 9:
return 0x20000000BLL;
case 0xA:
return (__int64)&dword_10000000C + 3;
case 0x14:
v2 = *(_QWORD *)(a1 + 16);
v3 = *(_QWORD *)(a1 + 24);
v4 = v3 - v2;
if ( v3 == v2 )
{
LABEL_7:
if ( !aOr[v4] )
return 0x400000001LL;
}
else
{
v5 = 0;
while ( aOr[v5] == *(_BYTE *)(v2 + v5) )
{
if ( v4 == ++v5 )
goto LABEL_7;
}
}
if ( v3 == v2 )
{
LABEL_12:
if ( !aAnd[v4] )
return 0x400000002LL;
}
else
{
v6 = 0;
while ( aAnd[v6] == *(_BYTE *)(v2 + v6) )
{
if ( v4 == ++v6 )
goto LABEL_12;
}
}
if ( v3 == v2 )
{
LABEL_17:
if ( !aDiv[v4] )
return 0x20000000CLL;
}
else
{
v7 = 0;
while ( aDiv[v7] == *(_BYTE *)(v2 + v7) )
{
if ( v4 == ++v7 )
goto LABEL_17;
}
}
if ( v3 != v2 )
{
v8 = 0;
while ( aMod[v8] == *(_BYTE *)(v2 + v8) )
{
if ( v4 == ++v8 )
goto LABEL_22;
}
return 0;
}
LABEL_22:
if ( aMod[v4] )
return 0;
return 0x20000000DLL;
default:
return 0;
}
}