VfIrpSendSynchronousIrp
UINT64 __fastcall VfIrpSendSynchronousIrp(
_DEVICE_OBJECT *DeviceObject,
_IO_STACK_LOCATION *TopStackLocation,
UINT64 Untouchable,
INT64 InitialStatus,
UINT64 InitialInformation,
UINT64 *FinalInformation,
INT64 *FinalStatus){
int v7;
int v8;
DEVICE_OBJECT *AttachedDeviceReference;
_IRP *Irp;
_IRP *v12;
__int64 v14;
__int128 v15;
__int128 v16;
__int128 v17;
__int64 v18;
NTSTATUS v19;
struct _KEVENT Event;
v7 = InitialStatus;
v8 = Untouchable;
memset(&Event, 0, sizeof(Event));
if( FinalInformation )
*FinalInformation = 0i64;
if( FinalStatus )
*(_DWORD *)FinalStatus = 0;
AttachedDeviceReference = IoGetAttachedDeviceReference(DeviceObject);
Irp = IoAllocateIrpEx(AttachedDeviceReference, *((_BYTE *)AttachedDeviceReference + 76), 0);
v12 = Irp;
if( Irp )
{
if( v8 )
IovUtilWatermarkIrp(Irp, 2ui64);
*((_DWORD *)v12 + 12) = v7;
*((_QWORD *)v12 + 7) = InitialInformation;
KeInitializeEvent(&Event, SynchronizationEvent, 0);
v14 = *((_QWORD *)v12 + 23);
v15 = *((_OWORD *)TopStackLocation + 1);
*(_OWORD *)(v14 - 72) = *(_OWORD *)TopStackLocation;
v16 = *((_OWORD *)TopStackLocation + 2);
*(_OWORD *)(v14 - 56) = v15;
v17 = *((_OWORD *)TopStackLocation + 3);
*(_OWORD *)(v14 - 40) = v16;
*(_QWORD *)&v16 = *((_QWORD *)TopStackLocation + 8);
*(_OWORD *)(v14 - 24) = v17;
*(_QWORD *)(v14 - 8) = v16;
v18 = *((_QWORD *)v12 + 23);
*(_QWORD *)(v18 - 16) = ViIrpSynchronousCompletionRoutine;
*(_QWORD *)(v18 - 8) = &Event;
*(_BYTE *)(v18 - 69) = -32;
v19 = IofCallDriver(AttachedDeviceReference, v12);
HalPutDmaAdapter((PADAPTER_OBJECT)AttachedDeviceReference);
if( v19 == 259 )
{
KeWaitForSingleObject(&Event, Executive, 0, 0, 0i64);
v19 = *((_DWORD *)v12 + 12);
}
if( FinalStatus )
*(_DWORD *)FinalStatus = v19;
if( FinalInformation )
*FinalInformation = *((_QWORD *)v12 + 7);
IoFreeIrp(v12);
return 1i64;
}
else
{
HalPutDmaAdapter((PADAPTER_OBJECT)AttachedDeviceReference);
return 0i64;
}
}Referenced by:
VfPnpTestStartedPdoStack
VfPowerTestStartedPdoStack
VfWmiTestStartedPdoStack