//
// sub_8201C8 from 0x8201c8 to 0x820290 (200 bytes)
//
// 2 xrefs:
// > sub_8202A4 @ 0x8203a2
// > sub_82066C @ 0x82085e
//
// 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:01:50 +0000
//
const char *__fastcall sub_8201C8(int a1, int a2, const char *a3, int a4)
{
const char *result; // r0
char *v7; // r8
int v8; // r3
bool v9; // zf
char *v10; // r2
int v11; // t1
bool v12; // zf
size_t v13; // r4
_DWORD *v14; // r0
_DWORD *v15; // r9
int v16; // r0
int v17; // r4
result = (const char *)sub_837044("%s:%d", a3, a4);
v7 = (char *)result;
if ( result )
{
v8 = *(unsigned __int8 *)result;
v9 = v8 == 58;
if ( v8 != 58 )
v9 = v8 == 0;
if ( !v9 )
{
v10 = (char *)result;
do
{
*v10 = *(_WORD *)(tolower_tab_ + 2 * (v8 + 1));
v11 = (unsigned __int8)*++v10;
v8 = v11;
v12 = v11 == 58;
if ( v11 != 58 )
v12 = v8 == 0;
}
while ( !v12 );
}
v13 = strlen(result);
v14 = off_D200BC(1u, 0xCu);
v15 = v14;
if ( v14 )
{
v14[2] = 1;
*v14 = a2;
time(v14 + 1);
if ( !v15[1] )
v15[1] = 1;
v16 = sub_83E474(*(_DWORD *)(a1 + 56), v7, v13 + 1, v15);
v17 = v16;
if ( v16 )
{
++*(_DWORD *)(v16 + 8);
off_D200B0(v7);
return (const char *)v17;
}
else
{
off_D200B0(v15);
off_D200B0(v7);
return nullptr;
}
}
else
{
off_D200B0(v7);
return nullptr;
}
}
return result;
}