RtlIpv4StringToAddressExW
NTSTATUS __stdcall RtlIpv4StringToAddressExW(PWCHAR AddressString, UINT8 Strict, in_addr *Address, UINT16 *Port){
WCHAR *v6;
unsigned __int16 v7;
unsigned __int16 v8;
WCHAR v9;
wint_t v10;
__int16 v11;
bool v12;
__int16 v13;
WCHAR *v14;
v14 = 0i64;
if( !AddressString || !Address || !Port || (int)RtlIpv4StringToAddressW(AddressString, Strict, &v14, Address) < 0 )
return -1073741811;
if( *v14 == 58 )
{
v6 = v14 + 1;
v7 = 10;
v8 = 0;
if( v14[1] == 48 )
{
v7 = 8;
v6 = v14 + 2;
if( ((v14[2] - 88) & 0xFFDF) == 0 )
{
v7 = 16;
v6 = v14 + 3;
}
}
v9 = *v6;
v10 = *v6;
if( !*v6 )
return -1073741811;
do
{
++v6;
if( v10 < 0x80u && (unsigned int)iswctype(v10, 4u) && (unsigned __int16)(v10 - 48) < v7 )
{
if( v10 + v8 * (unsigned int)v7 - 48 > 0xFFFF )
return -1073741811;
v11 = v8 * v7 - 48;
}
else
{
if( v7 != 16
|| v10 >= 0x80u
|| !(unsigned int)iswctype(v10, 0x80u)
|| v10 + 16 * v8 - ((unsigned int)iswctype(v10, 2u) != 0 ? 97 : 65) + 10 > 0xFFFFu )
{
return -1073741811;
}
v11 = 16 * v8;
v12 = (unsigned int)iswctype(v10, 2u) == 0;
v13 = 97;
if( v12 )
v13 = 65;
v10 = v10 - v13 + 10;
}
v8 = v10 + v11;
v10 = *v6;
}
while( *v6 );
if( !v9 )
return -1073741811;
}
else
{
if( *v14 )
return -1073741811;
v8 = 0;
}
*Port = __ROR2__(v8, 8);
return 0;
}Referenced by:
No references.