//
// sub_63E048 from 0x63e048 to 0x63e190 (328 bytes)
//
// 2 xrefs:
// > sub_642BAC @ 0x642f6a
// > sub_642BAC @ 0x6433e8
//
// 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
//
bool __fastcall sub_63E048(const char *a1, const char *a2)
{
bool v2; // zf
bool v3; // r5
char *v6; // r7
const char *v7; // r0
char *v8; // r8
size_t v9; // r0
size_t v10; // r0
char *v11; // r4
_BOOL4 v12; // r4
char *v13; // r0
char *v14; // r5
_BOOL4 v15; // r0
char *v16; // r9
int v17; // [sp+0h] [bp-24h] BYREF
_BYTE buf[24]; // [sp+Ch] [bp-18h] BYREF
if ( !a1 )
return 0;
v2 = a2 == nullptr;
if ( a2 )
v2 = *a1 == 0;
v3 = v2;
if ( v2 )
return 0;
if ( !*a2 )
return 0;
v6 = off_ABAEB8(a1);
if ( !v6 )
return 0;
v7 = off_ABAEB8(a2);
v8 = (char *)v7;
if ( !v7 )
{
v12 = 0;
goto LABEL_20;
}
v9 = strlen(v7) - 1;
if ( v8[v9] == 46 )
v8[v9] = v3;
v10 = strlen(v6) - 1;
if ( v6[v10] == 46 )
v6[v10] = 0;
v11 = strchr(v6, 42);
if ( !v11 )
goto LABEL_28;
if ( inet_pton(2, v8, &v17) <= 0 && inet_pton(10, v8, buf) <= 0 )
{
v13 = strchr(v6, 46);
v14 = v13;
if ( v13 )
{
v15 = !strchr(v13 + 1, 46) || v11 > v14;
if ( !v15 && !sub_62AB64(v6, "xn--", 4) )
{
v16 = strchr(v8, 46);
if ( v16
&& sub_62AA74(v14, v16)
&& v16 - v8 >= v14 - v6
&& sub_62AB64(v6, v8, v11 - v6)
&& sub_62AB64(v11 + 1, &v16[-(v14 - (v11 + 1))], v14 - (v11 + 1)) )
{
v12 = 1;
goto LABEL_19;
}
goto LABEL_18;
}
}
LABEL_28:
v12 = sub_62AA74(v6, v8);
goto LABEL_19;
}
LABEL_18:
v12 = 0;
LABEL_19:
off_ABAEB0(v8);
LABEL_20:
off_ABAEB0(v6);
return v12;
}