//
// sub_100549850 from 0x100549850 to 0x100549994 (324 bytes)
//
// 2 xrefs:
// > sub_100549994 @ 0x100549a8c
// > sub_100549E58 @ 0x10054a0a8
//
// 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
//
__int64 __fastcall sub_100549850(__int64 a1, __int64 a2, const char *a3, int a4)
{
__int64 v6; // x0
char *v7; // x19
_BYTE *i; // x22
__darwin_ct_rune_t v9; // w0
size_t v10; // x23
_QWORD *v11; // x0
_QWORD *v12; // x22
__int64 v13; // x0
__int64 v14; // x20
v6 = sub_1005628DC("%s:%d", a3, a4);
v7 = (char *)v6;
if ( !v6 )
return 0;
for ( i = (_BYTE *)v6; ; ++i )
{
v9 = (unsigned __int8)*i;
if ( !*i || v9 == 58 )
break;
*i = __tolower(v9);
}
v10 = strlen(v7);
v11 = off_10085DED0(1u, 0x18u);
v12 = v11;
if ( !v11 )
{
off_10085DEB8(v7);
return 0;
}
v11[2] = 1;
*v11 = a2;
time(v11 + 1);
if ( !v12[1] )
v12[1] = 1;
v13 = sub_10056BF80(*(_QWORD *)(a1 + 80), v7, v10 + 1, v12);
v14 = v13;
if ( !v13 )
{
off_10085DEB8(v12);
off_10085DEB8(v7);
return 0;
}
++*(_QWORD *)(v13 + 16);
off_10085DEB8(v7);
return v14;
}