//
// sub_10060EC94 from 0x10060ec94 to 0x10060ef7c (744 bytes)
//
// 2 xrefs:
// > sub_10060E928 @ 0x10060e9ac
// > sub_10060E928 @ 0x10060ea30
//
// 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_10060EC94(__int64 a1, __int64 a2)
{
__int64 v3; // x19
__int64 v4; // x23
__int64 v5; // x24
char *v6; // x19
char *v7; // x20
char *v8; // x22
char *v9; // x0
char *v10; // x21
size_t v11; // x2
int *v12; // x10
const char *v13; // x0
__int64 v14; // x11
const char *v15; // x8
int v16; // w10
bool v17; // vf
int v18; // w10
const char *v19; // x1
__int64 v20; // x20
__int64 v21; // x21
size_t v22; // x2
int v23; // w0
int *v24; // x22
const char *v25; // x20
char *v26; // x0
char *v27; // x19
const char *v28; // x21
char *v29; // x0
int v30; // w0
size_t v31; // x2
v3 = 51;
switch ( *(_DWORD *)a2 )
{
case 1:
v4 = *(_QWORD *)(a1 + 8);
v5 = *(_QWORD *)(a2 + 8);
v6 = *(char **)(v5 + 8);
v7 = *(char **)(v4 + 8);
v8 = strchr(v6, 64);
v9 = strchr(v7, 64);
v10 = v9;
if ( !v9 )
return 53;
if ( v8 )
{
v11 = v8 - v6;
if ( v8 != v6 )
{
if ( v11 != v9 - v7 )
return 47;
if ( strncmp(v6, v7, v11) )
return 47;
}
v6 = v8 + 1;
LABEL_43:
v19 = v10 + 1;
v13 = v6;
goto LABEL_44;
}
if ( *v6 != 46 )
goto LABEL_43;
if ( *(_DWORD *)v4 > *(_DWORD *)v5 && !strcasecmp(v6, &v7[*(_DWORD *)v4 - *(_DWORD *)v5]) )
return 0;
else
return 47;
case 2:
v12 = *(int **)(a2 + 8);
v13 = *((const char **)v12 + 1);
if ( !*v13 )
return 0;
v14 = *(_QWORD *)(a1 + 8);
v15 = *(const char **)(v14 + 8);
LODWORD(v14) = *(_DWORD *)v14;
v16 = *v12;
v17 = __OFSUB__((_DWORD)v14, v16);
v18 = v14 - v16;
v19 = v15;
if ( !((v18 < 0) ^ v17 | (v18 == 0)) )
{
v19 = &v15[v18];
if ( *v13 != 46 && v15[v18 - 1] != 46 )
return 47;
}
LABEL_44:
if ( !strcasecmp(v13, v19) )
return 0;
else
return 47;
case 4:
v20 = *(_QWORD *)(a1 + 8);
v21 = *(_QWORD *)(a2 + 8);
if ( *(_DWORD *)(v20 + 8) && (sub_1005F3824(v20, 0) & 0x80000000) != 0 )
return 17;
if ( *(_DWORD *)(v21 + 8) && (sub_1005F3824(v21, 0) & 0x80000000) != 0 )
return 17;
v22 = *(int *)(v21 + 32);
v3 = 47;
if ( (int)v22 > *(_DWORD *)(v20 + 32) )
return v3;
v23 = memcmp(*(const void **)(v21 + 24), *(const void **)(v20 + 24), v22);
goto LABEL_19;
case 6:
v24 = *(int **)(a2 + 8);
v25 = *((const char **)v24 + 1);
v26 = strchr(*(char **)(*(_QWORD *)(a1 + 8) + 8LL), 58);
v27 = v26;
if ( !v26 )
return 53;
if ( v26[1] != 47 )
return 53;
if ( v26[2] != 47 )
return 53;
v28 = v26 + 3;
v29 = strchr(v26 + 3, 58);
if ( v29 || (v29 = strchr(v27 + 3, 47)) != nullptr )
v30 = (_DWORD)v29 - (_DWORD)v28;
else
v30 = strlen(v27 + 3);
if ( !v30 )
return 53;
v31 = *v24;
if ( *v25 == 46 )
{
if ( v30 > (int)v31 && !strncasecmp(&v27[v30 + 3LL - v31], v25, v31) )
return 0;
else
return 47;
}
else
{
v3 = 47;
if ( (_DWORD)v31 == v30 )
{
v23 = strncasecmp(v28, v25, v30);
LABEL_19:
if ( v23 )
return 47;
else
return 0;
}
}
return v3;
default:
return v3;
}
}