//
// sub_10065F320 from 0x10065f320 to 0x10065f3b9 (153 bytes)
//
// 8 xrefs:
// > sub_10065F2F0 @ 0x10065f316
// > sub_10065F440 @ 0x10065f48c
// > sub_10065F4C0 @ 0x10065f50d
// > sub_10065F540 @ 0x10065f5c2
// > sub_10065F750 @ 0x10065f7dd
// > sub_10065F920 @ 0x10065fa34
// > sub_1006602A0 @ 0x100660306
// > cocos2d::cc_utf8_strlen @ 0x100660466
//
// 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
//
_BOOL8 __fastcall sub_10065F320(char *a1, int a2)
{
char *v2; // rax
char v3; // al
char v5; // cl
v2 = &a1[a2];
switch ( a2 )
{
case 1:
v3 = *a1;
LABEL_3:
if ( v3 < -62 )
return 0;
return (unsigned __int8)v3 < 0xF5u;
case 2:
goto LABEL_9;
case 3:
goto LABEL_7;
case 4:
if ( *(v2 - 1) > -65 )
return 0;
--v2;
LABEL_7:
if ( *(v2 - 1) <= -65 )
{
--v2;
LABEL_9:
v5 = *(v2 - 1);
if ( v5 <= -65 )
{
v3 = *a1;
switch ( *a1 )
{
case -32:
v3 = -32;
if ( (unsigned __int8)v5 >= 0xA0u )
return (unsigned __int8)v3 < 0xF5u;
return 0;
case -19:
v3 = -19;
if ( (unsigned __int8)v5 <= 0x9Fu )
return (unsigned __int8)v3 < 0xF5u;
return 0;
case -16:
v3 = -16;
if ( (unsigned __int8)v5 >= 0x90u )
return (unsigned __int8)v3 < 0xF5u;
return 0;
case -12:
v3 = -12;
if ( (unsigned __int8)v5 <= 0x8Fu )
return (unsigned __int8)v3 < 0xF5u;
return 0;
default:
goto LABEL_3;
}
}
}
return 0;
default:
return 0;
}
}