IovUtilIsVerifiedDeviceStack

UINT64 __stdcall IovUtilIsVerifiedDeviceStack(DEVICE_OBJECT *DeviceObject){
  DEVICE_OBJECT *v1; 
  int v2; 
  unsigned int v4; 
  KIRQL v5; 
  DEVICE_OBJECT *v6; 
  int v7; 
  __int64 v8; 
  int v9; 
  int v10; 
  unsigned int v11; 
  v1 = DeviceObject;
  v2 = *(_DWORD *)(*((_QWORD *)DeviceObject + 39) + 32i64);
  if( v2 < 0 )
    return((unsigned int)v2 >> 30) & 1;
  v4 = 0;
  v5 = KeAcquireQueuedSpinLock(0xAui64);
  while( 1 )
  {
    v6 = v1;
    v1 = *(DEVICE_OBJECT **)(*((_QWORD *)v1 + 39) + 48i64);
    if( MmIsDriverVerifying(*((struct _DRIVER_OBJECT **)v6 + 1)) )
      v4 = 1;
    if( !v1 )
      break;
    v7 = *(_DWORD *)(*((_QWORD *)v1 + 39) + 32i64);
    if( v7 < 0 )
    {
      if( (v7 & 0x40000000) != 0 )
        v4 = 1;
      goto LABEL_10;
    }
  }
  do
  {
LABEL_10:
    v8 = *((_QWORD *)v6 + 39);
    v9 = *(_DWORD *)(v8 + 32);
    v10 = v9 | 0x40000000;
    v11 = v9 & 0xBFFFFFFF;
    if( !v4 )
      v10 = v11;
    *(_DWORD *)(v8 + 32) = v10 | 0x80000000;
    v6 = (DEVICE_OBJECT *)*((_QWORD *)v6 + 3);
  }
  while( v6 );
  KeReleaseQueuedSpinLock(0xAui64, v5);
  return v4;
}

Referenced by:

IovpSessionDataCreate
VfMajorTestStartedPdoStack