WheapProcessWorkQueueItem

NTSTATUS __stdcall WheapProcessWorkQueueItem(
        PVOID SystemInformation,
        UINT64 SystemInformationLength,
        UINT64 *ReturnedLength){
  __int64 v4; 
  unsigned int v5; 
  int v6; 
  NTSTATUS result; 
  UINT64 *v8; 
  if( WheapPreviousSessionFailure )
  {
    if( (*(_BYTE *)(SystemInformationLength + 144) & 2) != 0 && *(_DWORD *)(SystemInformationLength + 52) <= 1u )
    {
      v4 = *(_QWORD *)(SystemInformationLength + 32);
      if( v4 )
      {
        v5 = *(_DWORD *)(v4 + 40);
        if( v5 <= 9 )
        {
          v6 = 665;
          if( _bittest(&v6, v5) )
            WheapCreateLiveDumpFromPreviousSession(SystemInformationLength);
        }
      }
    }
  }
  if( WheapEventingInitialized )
  {
    WheapPredictiveFailureAnalysis((_WHEAP_ERROR_RECORD_WRAPPER *)SystemInformationLength);
    WheapGenerateETWEvents((WHEA_ERROR_RECORD *)(SystemInformationLength + 40));
    WheapFreeErrorRecord(SystemInformationLength);
  }
  else
  {
    KeWaitForSingleObject(&WheapWaitingETWEventLock, Executive, 0, 0, 0i64);
    v8 = (UINT64 *)qword_140C15DE8;
    if( *(__int64 **)qword_140C15DE8 != &WheapWaitingETWEvents )
      __fastfail(3u);
    *(_QWORD *)SystemInformationLength = &WheapWaitingETWEvents;
    *(_QWORD *)(SystemInformationLength + 8) = v8;
    *v8 = SystemInformationLength;
    qword_140C15DE8 = SystemInformationLength;
    return KeSetEvent(&WheapWaitingETWEventLock, 0);
  }
  return result;
}

Referenced by:

No references.