//
// isLegalUTF8String from 0x5ea024 to 0x5ea062 (62 bytes)
//
// 1 xrefs:
// > llvm::ConvertUTF8toWide @ 0x5ea2c8
//
// 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
//
bool __fastcall isLegalUTF8String(unsigned __int8 **a1, unsigned __int8 *a2)
{
unsigned __int8 *v4; // r5
int v5; // r4
_BOOL4 result; // r0
while ( 1 )
{
v4 = *a1;
if ( *a1 == a2 )
return 1;
v5 = *((unsigned __int8 *)&unk_9B0840 + *v4 + 8) + 1;
if ( v5 > a2 - v4 )
break;
result = sub_5E9C70(*a1, *((unsigned __int8 *)&unk_9B0840 + *v4 + 8) + 1);
if ( !result )
return result;
*a1 = &v4[v5];
}
return 0;
}