RtlpLoadLanguageConfigList
NTSTATUS __stdcall RtlpLoadLanguageConfigList(_MUILANGCFGLIST **ConfigListRtrn, _MUIREGISTRYINFO *Installed){
_MUIREGISTRYINFO *v2;
_MUIREGISTRYINFO *v3;
void *v5;
UINT64 v6;
UINT64 v7;
NTSTATUS v8;
int v9;
void *v11;
_MUILANGCFGLIST *LanguageConfigList;
_UNICODE_STRING DestinationString;
_BYTE savedregs[40];
int LangSpecTypeRtrn;
INT16 LangSpecRtrn;
VOID *ChildHandle;
LangSpecTypeRtrn = (int)ConfigListRtrn;
LOBYTE(LangSpecTypeRtrn) = 0;
v3 = v2;
LangSpecRtrn = 0;
ChildHandle = 0i64;
v5 = 0i64;
DestinationString = 0i64;
if( Installed && v2 )
{
v5 = *(void **)Installed;
RtlInitUnicodeString(&DestinationString, L"\\Registry\\Machine\\Software\\Policies\\Microsoft\\MUI\\Settings");
if( LdrpOpenKey(
&DestinationString,
0i64,
v6,
&ChildHandle,
*(INT64 *)&DestinationString.Length,
(INT64)DestinationString.Buffer,
*(INT64 *)savedregs,
*(INT64 *)&savedregs[8]) >= 0 )
{
v9 = RtlpLoadPolicyLanguageSpec(ChildHandle, v3, (UINT8 *)&LangSpecTypeRtrn, &LangSpecRtrn);
if( v9 >= 0 )
goto LABEL_6;
NtClose((UINT64)ChildHandle);
ChildHandle = 0i64;
}
RtlInitUnicodeString(
&DestinationString,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\MUI\\Settings\\LanguageConfiguration");
v8 = LdrpOpenKey(
&DestinationString,
0i64,
v7,
&ChildHandle,
*(INT64 *)&DestinationString.Length,
(INT64)DestinationString.Buffer,
*(INT64 *)savedregs,
*(INT64 *)&savedregs[8]);
v9 = v8;
if( v8 < 0 )
{
if( v8 == -1073741772 )
v9 = 0;
}
else
{
v9 = RtlpPopulateLanguageConfigList(ChildHandle, (_MUILANGCFGLIST **)Installed, v3);
}
}
else
{
v9 = -1073741811;
}
LABEL_6:
if( ChildHandle )
NtClose((UINT64)ChildHandle);
if( v9 < 0 )
{
if( Installed )
{
v11 = *(void **)Installed;
if( *(void **)Installed != v5 )
{
if( v11 )
ExFreePoolWithTag(v11, 0);
goto LABEL_22;
}
}
}
else if( !*(_QWORD *)Installed )
{
LanguageConfigList = RtlpMuiRegCreateLanguageConfigList(1i64);
*(_QWORD *)Installed = LanguageConfigList;
if( !LanguageConfigList )
{
v9 = -1073741801;
LABEL_22:
*(_QWORD *)Installed = v5;
}
}
return v9;
}Referenced by:
No references.