ViPoolLogStackTrace

VOID __stdcall ViPoolLogStackTrace(VOID *Address, UINT64 NumberOfBytes){
  VOID **v2; 

  if( VfPoolTraces )
  {
    v2 = (VOID **)(VfPoolTraces
                 + ((unsigned __int64)(_InterlockedIncrement(&VfPoolTracesIndex) & (unsigned int)(VfPoolTracesLength - 1)) << 7));
    v2[2] = KeGetCurrentThread();
    *v2 = Address;
    v2[1] = (VOID *)NumberOfBytes;
    if( (VfOptionFlags & 2) != 0 )
    {
LABEL_3:
      v2[3] = 0i64;
      return;
    }
    if( KeGetCurrentIrql() > 1u || (unsigned int)RtlEnoughStackSpaceForStackCapture() )
    {
      ViPoolLogStackCallout(v2);
    }
    else if( KeExpandKernelStackAndCalloutEx((UINT64)ViPoolLogStackCallout, (INT64)v2, 0xE30ui64, 1, 0i64) < 0 )
    {
      goto LABEL_3;
    }
  }
}

Referenced by:

VfAllocPoolNotification
VfFreePoolNotification