//
// sub_1005F0258 from 0x1005f0258 to 0x1005f032c (212 bytes)
//
// 1 xrefs:
// > sub_100602BE8 @ 0x100602c9c
//
// 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_1005F0258(unsigned __int8 *a1, int a2)
{
unsigned __int8 v2; // w9
int v3; // w8
int v4; // w10
int v5; // w11
unsigned __int8 *v6; // x12
int v7; // t1
if ( !a1 )
return 19;
v2 = *a1;
if ( *a1 )
{
v3 = 0;
v4 = 0;
if ( a2 >= 1 )
v5 = a2;
else
v5 = -1;
v6 = a1 + 1;
do
{
if ( !v5 )
break;
--v5;
if ( (unsigned __int8)(v2 - 97) >= 0x1Au
&& (unsigned __int8)(v2 - 48) >= 0xAu
&& v2 != 32
&& (unsigned __int8)(v2 - 65) >= 0x1Au
&& (v2 > 0x3Fu || ((1LL << v2) & 0xA400FB8100000000LL) == 0) )
{
v4 = 1;
}
if ( (v2 & 0x80u) != 0 )
v3 = 1;
v7 = *v6++;
v2 = v7;
}
while ( v7 );
if ( v3 )
return 20;
}
else
{
v4 = 0;
}
if ( v4 )
return 22;
else
return 19;
}