RtlpMuiRegLangInfoMatchesSpec
char __fastcall RtlpMuiRegLangInfoMatchesSpec(__int64 a1, __int64 a2, char a3, __int16 a4){
__int64 v4;
char v5;
wchar_t *v8;
int v9;
__int64 v12;
__int64 v13;
const WCHAR *v14;
__int64 v15;
__int64 v16;
const WCHAR *v17;
wchar_t *v18;
UINT64 v19;
__int64 v20;
const wchar_t *v21;
__int64 v22;
struct _UNICODE_STRING DestinationString;
UINT64 Lcid;
v4 = a4;
v5 = 1;
LODWORD(Lcid) = 0;
v8 = 0i64;
DestinationString = 0i64;
if( a3 == 1 )
{
v9 = *(unsigned __int16 *)(a2 + 4);
if( (_WORD)v9 )
return v9 == a4;
v12 = *(__int16 *)(a2 + 6);
if( (v12 & 0x8000u) == 0i64 )
{
v13 = *(_QWORD *)(a1 + 32);
if( v13 && (int)v12 < *(unsigned __int16 *)(v13 + 6) )
v14 = (const WCHAR *)(*(_QWORD *)(v13 + 24) + 2i64 * *(__int16 *)(*(_QWORD *)(v13 + 16) + 2 * v12));
else
v14 = 0i64;
if( v14 )
{
RtlInitUnicodeString(&DestinationString, v14, v13);
if( RtlCultureNameToLCID(&DestinationString, &Lcid) )
return(_WORD)Lcid == (unsigned __int16)v4;
}
}
return 0;
}
if( a3 == 3 )
{
v15 = *(__int16 *)(a2 + 6);
if( (v15 & 0x8000u) != 0i64 )
{
if( *(_WORD *)(a2 + 4) )
{
v18 = (wchar_t *)MuiRegAllocArray(a1, 0x55u);
v8 = v18;
if( v18 )
{
v19 = *(unsigned __int16 *)(a2 + 4);
DestinationString.Buffer = v18;
*(_DWORD *)&DestinationString.Length = 11141120;
if( RtlLCIDToCultureName(v19, &DestinationString) )
{
LABEL_26:
v20 = *(_QWORD *)(a1 + 32);
if( v20 && (v4 & 0x8000u) == 0i64 && (int)v4 < *(unsigned __int16 *)(v20 + 6) )
v21 = (const wchar_t *)(*(_QWORD *)(v20 + 24) + 2i64 * *(__int16 *)(*(_QWORD *)(v20 + 16) + 2 * v4));
else
v21 = 0i64;
if( !v21 || wcsicmp(DestinationString.Buffer, v21) )
v5 = 0;
if( v8 )
ExFreePoolWithTag(v8, 0);
return v5;
}
ExFreePoolWithTag(v8, 0);
}
}
}
else
{
if( (_WORD)v15 == a4 )
return v5;
v16 = *(_QWORD *)(a1 + 32);
if( v16 && (int)v15 < *(unsigned __int16 *)(v16 + 6) )
v17 = (const WCHAR *)(*(_QWORD *)(v16 + 24) + 2i64 * *(__int16 *)(*(_QWORD *)(v16 + 16) + 2 * v15));
else
v17 = 0i64;
if( v17 )
{
RtlInitUnicodeString(&DestinationString, v17, v16);
goto LABEL_26;
}
}
}
else if( a3 == 2 && a4 >= 0 )
{
v22 = *(_QWORD *)(a1 + 24);
if( a4 < (int)*(unsigned __int16 *)(v22 + 6) )
return a2 == *(_QWORD *)(v22 + 16) + 28i64 * a4;
}
return 0;
}Referenced by:
RtlpMuiRegConfigMatchesInstalled