WheapCommitPolicy
INT64 __fastcall WheapCommitPolicy(){
int RegistryKey;
char v1;
__int64 *v2;
unsigned int v3;
wchar_t **v4;
UINT64 ValueLength;
RegistryKey = RtlCheckRegistryKey(2ui64, (PWCHAR)L"WHEA\\Policy");
if( RegistryKey < 0 )
{
RegistryKey = RtlCreateRegistryKey(2u, (PWSTR)L"WHEA");
if( RegistryKey >= 0 )
RegistryKey = RtlCreateRegistryKey(2u, (PWSTR)L"WHEA\\Policy");
}
if( RegistryKey >= 0 )
{
v1 = 0;
v2 = WheaRegPolicyTableChanged;
v3 = 0;
v4 = &WheaRegPolicyTable;
while( 1 )
{
if( *(_BYTE *)v2 )
{
LODWORD(ValueLength) = 4;
v1 = 1;
RegistryKey = RtlWriteRegistryValue(2ui64, L"WHEA\\Policy", *v4, 4ui64, v4[1], ValueLength);
if( RegistryKey < 0 )
break;
}
++v3;
v2 = (__int64 *)((char *)v2 + 1);
v4 += 3;
if( v3 >= 0xD )
{
if( RegistryKey >= 0 && v1 )
WheapPfaReset();
break;
}
}
WheapLogPolicyTelemetry();
}
return(unsigned int)RegistryKey;
}Referenced by:
WheapWmiExecutePolicyManagementMethod