//
// sub_100717BB4 from 0x100717bb4 to 0x100717c98 (228 bytes)
//
// 1 xrefs:
// > sub_1007174BC @ 0x1007176ec
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:13:00 +0000
//
__int64 __fastcall sub_100717BB4(unsigned __int64 __c, unsigned __int64 *a2)
{
unsigned __int64 v4; // x21
_BOOL4 v5; // w8
unsigned __int64 v6; // x8
unsigned __int64 v7; // x9
unsigned __int64 v8; // x9
v4 = *a2;
if ( (*a2 & 2) != 0 )
{
if ( __c <= 0x7F )
{
v5 = 0;
if ( (_DWORD)__c != 32 && (unsigned int)(__c - 48) >= 0xA && (__c & 0xFFFFFFDF) - 65 >= 0x1A )
v5 = memchr("'()+,-./:=?", __c, 0xCu) == nullptr;
}
else
{
v5 = 1;
}
if ( v5 )
v4 &= ~2uLL;
}
v6 = v4 & 0xFFFFFFFFFFFFFFEFLL;
if ( (v4 & 0x10) == 0 )
v6 = v4;
if ( __c <= 0x7F )
v6 = v4;
v7 = v6 & 0xFFFFFFFFFFFFFFFBLL;
if ( (v6 & 4) == 0 )
v7 = v6;
if ( __c > 0xFF )
v6 = v7;
v8 = v6 & 0xFFFFFFFFFFFFF7FFLL;
if ( (v6 & 0x800) == 0 )
v8 = v6;
if ( __c >> 16 )
v6 = v8;
if ( !v6 )
return 0xFFFFFFFFLL;
*a2 = v6;
return 1;
}