//
// sub_77C464 from 0x77c464 to 0x77c4b8 (84 bytes)
//
// 15 xrefs:
// > sub_77C6FA @ 0x77c9ac
// > sub_77CB5C @ 0x77d0c8
// > sub_77CB5C @ 0x77d19c
// > sub_77D3D0 @ 0x77d536
// > sub_77D87C @ 0x77e0e6
// > sub_77E100 @ 0x77e2b8
// > sub_77E8CC @ 0x77ea52
// > sub_77EC0C @ 0x77eef0
// > sub_77F4C0 @ 0x77f570
// > sub_77F970 @ 0x77fe86
// > sub_781096 @ 0x781098
// > sub_7810B0 @ 0x7810b2
// > ??> @ 0x7810c6
// > sub_781324 @ 0x781326
// > sub_78134E @ 0x781350
//
// 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_77C464(int a1)
{
unsigned __int8 *v1; // r1
int v2; // r4
unsigned __int8 *v3; // r6
int v4; // r3
int v5; // r5
int v6; // r5
v1 = *(unsigned __int8 **)(a1 + 12);
v2 = *v1;
if ( v2 == 95 )
{
v6 = 0;
}
else
{
if ( v2 == 110 )
return -1;
if ( (unsigned __int8)(v2 - 48) > 9u )
return -1;
v3 = v1 + 1;
v4 = 0;
do
{
v5 = 10 * v4 + v2;
*(_DWORD *)(a1 + 12) = v3;
v2 = *v3;
v1 = v3;
v4 = v5 - 48;
++v3;
}
while ( (unsigned __int8)(v2 - 48) <= 9u );
v6 = v5 - 47;
if ( v2 != 95 )
return -1;
}
*(_DWORD *)(a1 + 12) = v1 + 1;
return v6;
}