WheapPersistPageForMemoryError

VOID __fastcall WheapPersistPageForMemoryError(INT64 a1){
  INT64 v1; 
  _DEVICE_OBJECT *v2; 
  _UNICODE_STRING *v3; 
  unsigned __int64 v4; 
  unsigned __int64 DataBlockObject; 
  if( (*(_BYTE *)(a1 + 104) & 0x20) != 0 )
  {
    v1 = WheapErrorContainsMemorySection(a1);
    if( v1 )
    {
      if( (*(_BYTE *)v1 & 2) != 0 )
      {
        v4 = *(_QWORD *)(v1 + 16);
        DataBlockObject = v4;
        if( !MmGetPageBadStatus(&DataBlockObject, v2, v3) )
        {
          DataBlockObject = v4 >> 12;
          HalSetEnvironmentVariableEx((PWCHAR)L"UncorrectedBadMemoryPage", &WheapHardwareErrorGuid, &DataBlockObject);
        }
      }
    }
  }
}

Referenced by:

WheaReportHwError