//
// sub_856FBC from 0x856fbc to 0x857026 (106 bytes)
//
// 2 xrefs:
// > sub_85ADF0 @ 0x85af56
// > sub_85ADF0 @ 0x85b40a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:02:37 +0000
//
int __fastcall sub_856FBC(_BYTE *a1, unsigned __int8 *a2, int a3)
{
unsigned __int8 *v3; // r2
int v4; // r5
int v5; // r12
int v6; // t1
v3 = &a2[a3];
v4 = (unsigned __int8)*a1;
while ( a2 != v3 )
{
v6 = *a2++;
v5 = v6;
if ( v4 )
{
if ( v5 < (unsigned __int8)(v4 & 0xF0) || v5 >= ((4 * v4) & 0x30) + (v4 & 0xF0) + 16 )
return 1;
v4 = byte_C20ADC[(v4 & 3) + 21];
}
else if ( (v5 & 0x80) != 0 )
{
v4 = 140;
if ( (unsigned __int8)(v5 + 62) > 0x32u )
return 1;
if ( (unsigned int)v5 > 0xDF )
v4 = byte_C20ADC[v5 - 224];
}
}
*a1 = v4;
return 0;
}