//
// sub_100009BA4 from 0x100009ba4 to 0x100009c3c (152 bytes)
//
// 1 xrefs:
// > sub_100009A40 @ 0x100009ac0
//
// 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
//
char *__fastcall sub_100009BA4(char *result, unsigned int a2, int a3)
{
int v3; // w9
unsigned int v4; // w10
__int64 v5; // x13
char v6; // w8
if ( a2 < 0x64 )
{
v4 = a2;
}
else
{
v3 = a3 - 1;
do
{
v4 = a2 / 0x64;
v5 = 2LL * (a2 % 0x64);
result[v3] = a00010203040506[(unsigned int)v5 + 1];
result[v3 - 1] = a00010203040506[v5];
v3 -= 2;
LODWORD(v5) = a2 >> 4;
a2 /= 0x64u;
}
while ( (unsigned int)v5 > 0x270 );
}
if ( v4 > 9 )
{
result[1] = a00010203040506[2 * v4 + 1];
v6 = a00010203040506[2 * v4];
}
else
{
v6 = v4 | 0x30;
}
*result = v6;
return result;
}