WheapGetPolicyValue
NTSTATUS __stdcall WheapGetPolicyValue(UINT64 Type, UINT64 *Value){
int v3;
int v4;
int v5;
int v6;
int v7;
bool v8;
int v9;
int v10;
int v11;
int v12;
int v13;
if( (unsigned int)Type >= 0xD )
return -1073741811;
if( (unsigned int)Type <= 6 )
{
if( (_DWORD)Type == 6 )
{
v3 = 0;
v8 = WheaRegPolicyIgnoreDummyWrite == 0;
}
else
{
v3 = 0;
if( (_DWORD)Type )
{
v4 = Type - 1;
if( v4 )
{
v5 = v4 - 1;
if( v5 )
{
v6 = v5 - 1;
if( v6 )
{
v7 = v6 - 1;
if( v7 )
{
if( v7 == 1 )
*(_DWORD *)Value = WheapPolicyMemPfaTimeout / 0x989680ui64;
return 0;
}
v3 = WheapPolicyMemPfaThreshold;
}
else
{
v3 = WheapPolicyMemPfaPageCount;
}
goto LABEL_31;
}
v8 = WheapPolicyMemPfaDisable == 0;
}
else
{
v8 = *(&WheapErrorSourceTable + 58) == 0;
}
}
else
{
v8 = WheapPolicyDisableOffline == 0;
}
}
goto LABEL_30;
}
v9 = Type - 7;
if( !v9 )
{
v3 = 0;
v8 = WheapPolicyRestoreCmciEnabled == 0;
LABEL_30:
LOBYTE(v3) = !v8;
goto LABEL_31;
}
v10 = v9 - 1;
if( !v10 )
{
v3 = WheapPolicyRestoreCmciMaxAttempts;
goto LABEL_31;
}
v11 = v10 - 1;
if( !v11 )
{
v3 = WheapPolicyRestoreCmciErrorLimit;
goto LABEL_31;
}
v12 = v11 - 1;
if( !v12 )
{
v3 = WheapPolicyCmciThresholdCount;
goto LABEL_31;
}
v13 = v12 - 1;
if( !v13 )
{
v3 = WheapPolicyCmciThresholdTime;
goto LABEL_31;
}
if( v13 == 1 )
{
v3 = WheapPolicyCmciThresholdPollCount;
LABEL_31:
*(_DWORD *)Value = v3;
}
return 0;
}Referenced by:
WheapGetAllPolicyValues
WheapWmiExecutePolicyManagementMethod