//
// sub_100608040 from 0x100608040 to 0x1006080e4 (164 bytes)
//
// 1 xrefs:
// > sub_1005FFA90 @ 0x100600554
//
// 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_100608040(__int64 a1, char *__s, unsigned __int64 a3, int a4)
{
size_t v5; // x22
v5 = a3;
if ( !__s )
return 4294967294LL;
if ( a3 )
{
if ( memchr(__s, 0, a3 - (a3 > 1)) )
return 4294967294LL;
}
else
{
v5 = strlen(__s);
}
if ( v5 >= 2 && !__s[v5 - 1] )
--v5;
return sub_100607C2C(a1, __s, v5, a4, 1, nullptr);
}