IopCheckStackForTransactionSupport

_DEVICE_OBJECT *__stdcall IopCheckStackForTransactionSupport(_DEVICE_OBJECT *DeviceObject){
  _DEVICE_OBJECT *v1; 
  KIRQL v3; 
  v1 = DeviceObject;
  if( (*((_DWORD *)DeviceObject + 12) & 0x40000) == 0 )
  {
    v3 = KeAcquireQueuedSpinLock(0xAui64);
    do
    {
      if( (*((_DWORD *)v1 + 12) & 0x40000) != 0 )
        break;
      v1 = (_DEVICE_OBJECT *)*((_QWORD *)v1 + 39);
      if( v1 )
        v1 = (_DEVICE_OBJECT *)*((_QWORD *)v1 + 6);
    }
    while( v1 );
    KeReleaseQueuedSpinLock(0xAui64, v3);
  }
  return v1;
}

Referenced by:

IopAllocateFoExtensionsOnCreate
IopRetrieveTransactionParameters