//
// sub_1006602A0 from 0x1006602a0 to 0x100660332 (146 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_1006602A0(__int64 a1)
{
char *v1; // rbx
size_t v2; // rax
__int64 v3; // r14
char *v4; // r15
__int64 v5; // r12
int v6; // r13d
if ( (*(_BYTE *)a1 & 1) != 0 )
v1 = *(char **)(a1 + 16);
else
v1 = (char *)(a1 + 1);
v2 = strlen(v1);
v3 = 0;
if ( v2 )
{
v4 = &v1[v2];
do
{
v5 = byte_1008230B0[(unsigned __int8)*v1] + 1LL;
v6 = 0;
if ( v4 - v1 < v5 )
break;
if ( !sub_10065F320(v1, v5) )
break;
v1 += v5;
LODWORD(v3) = v3 + 1;
v6 = v3;
}
while ( v1 != v4 );
return v6;
}
return v3;
}