PiEventAllocateVetoBuffer

VOID *__stdcall PiEventAllocateVetoBuffer(
        PNP_DEVICE_DELETE_TYPE DeleteType,
        PNP_VETO_TYPE **VetoTypeOut,
        _UNICODE_STRING **VetoStringOut){
  VOID **CriticalMemory; 
  VOID **v5; 

  CriticalMemory = PnpAllocateCriticalMemory(DeleteType, PagedPool, 0x18ui64, 0x4D706E50u);
  if( CriticalMemory )
  {
    v5 = PnpAllocateCriticalMemory(DeleteType, PagedPool, 0x400ui64, 0x4D706E50u);
    if( v5 )
    {
      *(_DWORD *)CriticalMemory = 0;
      *(_OWORD *)(CriticalMemory + 1) = 0i64;
      *((_WORD *)CriticalMemory + 5) = 1024;
      CriticalMemory[2] = v5;
    }
    else
    {
      ExFreePoolWithTag(CriticalMemory, 0x4D706E50u);
      return 0i64;
    }
  }
  return CriticalMemory;
}

Referenced by:

PnpProcessQueryRemoveAndEject