//
// sub_951DEC from 0x951dec to 0x951e30 (68 bytes)
//
// 4 xrefs:
// > sub_952008 @ 0x952046
// > sub_952008 @ 0x952068
// > sub_9520B0 @ 0x9524e2
// > sub_9520B0 @ 0x9525a4
//
// 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:05:24 +0000
//
unsigned __int8 *__fastcall sub_951DEC(unsigned __int8 *a1, unsigned int a2, int a3, _DWORD *a4)
{
unsigned __int8 *v4; // r6
int i; // r7
unsigned __int8 *v6; // r5
int v7; // lr
int v8; // r4
int v9; // r4
v4 = a1;
for ( i = 0; ; i = v8 + a3 * i )
{
v6 = v4;
if ( (unsigned int)v4 >= a2 )
break;
v7 = *v4++;
v8 = v7 - 48;
if ( (unsigned int)(v7 - 48) > 9 )
{
v9 = v7 - 97;
if ( (unsigned int)(v7 - 97) > 5 )
{
v9 = v7 - 65;
if ( (unsigned int)(v7 - 65) > 5 )
break;
}
v8 = v9 + 10;
}
if ( v8 >= a3 )
break;
}
if ( v6 == a1 )
return nullptr;
*a4 = i;
return v6;
}