//
// sub_60B8E8 from 0x60b8e8 to 0x60b926 (62 bytes)
//
// 6 xrefs:
// > fmt::BasicFormatter::ParseArgIndex @ 0x60bab4
// > fmt::internal::PrintfParser::Format @ 0x60ce0c
// > fmt::internal::PrintfParser::Format @ 0x60ce88
// > fmt::internal::PrintfParser::Format @ 0x60cf26
// > fmt::BasicFormatter::format @ 0x60d2ce
// > fmt::BasicFormatter::format @ 0x60d2f2
//
// 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
//
int __fastcall sub_60B8E8(_DWORD *a1, int *a2)
{
int v2; // r3
unsigned __int8 *v3; // r4
int result; // r0
v2 = 0;
do
{
v3 = (unsigned __int8 *)(*a1)++;
if ( (unsigned int)*v3 - 48 + 10 * v2 < v2 )
v2 = -1;
else
v2 = *v3 - 48 + 10 * v2;
}
while ( (unsigned int)v3[1] - 48 <= 9 );
if ( v2 >= 0 )
return v2;
result = *a2;
if ( *a2 )
return 0;
*a2 = (int)"number is too big in format";
return result;
}