//
// sub_610148 from 0x610148 to 0x610210 (200 bytes)
//
// 2 xrefs:
// > sub_610224 @ 0x610322
// > sub_6105EC @ 0x6107de
//
// 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
//
const char *__fastcall sub_610148(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_626FC4("%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_ABAEBC(1u, 0xCu);
v15 = v14;
if ( v14 )
{
v14[2] = 1;
*v14 = a2;
time(v14 + 1);
if ( !v15[1] )
v15[1] = 1;
v16 = sub_62E3F4(*(_DWORD *)(a1 + 56), v7, v13 + 1, v15);
v17 = v16;
if ( v16 )
{
++*(_DWORD *)(v16 + 8);
off_ABAEB0(v7);
return (const char *)v17;
}
else
{
off_ABAEB0(v15);
off_ABAEB0(v7);
return nullptr;
}
}
else
{
off_ABAEB0(v7);
return nullptr;
}
}
return result;
}