//
// sub_4DE1C8 from 0x4de1c8 to 0x4de240 (120 bytes)
//
// 3 xrefs:
// > sub_B87DB4 @ 0xb8938c
// > sub_B87DB4 @ 0xb89ae4
// > sub_B87DB4 @ 0xb8a6b4
//
// 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
//
size_t __fastcall sub_4DE1C8(__int64 a1, const char **a2, const char **a3)
{
const char *v3; // x19
size_t result; // x0
size_t v6; // x2
const char *v7; // x1
int v8; // w2
v3 = *a2;
*a3 = *a2;
result = strlen(v3);
if ( result )
{
v6 = result - 1;
result = (unsigned __int8)v3[result - 1];
if ( (_DWORD)result == 46 )
v3[v6] = 0;
}
v7 = *a2;
while ( 1 )
{
v8 = *(unsigned __int8 *)v7++;
if ( !v8 )
break;
if ( (v8 & 0x80) != 0 )
return sub_B7B528(a1, "IDN support not present, can't parse Unicode domains\n");
}
return result;
}