SmpUtilsGetControlDevice
NTSTATUS __stdcall SmpUtilsGetControlDevice(VOID **HandleOut, _DEVICE_OBJECT **DeviceObjectOut, PDEVICE_OBJECT *a3){
int v5;
_DEVICE_OBJECT *v6;
_DEVICE_OBJECT *v7;
UINT64 v9;
UINT64 ShareAccess;
UINT64 CreateDisposition;
UINT64 CreateOptions;
UINT64 v13;
_UNICODE_STRING DestinationString;
_IO_STATUS_BLOCK IoStatusBlock;
_OBJECT_ATTRIBUTES ObjectAttributes;
VOID *FileHandle;
PVOID Object;
*(&ObjectAttributes.Length + 1) = 0;
*(&ObjectAttributes.Attributes + 1) = 0;
FileHandle = 0i64;
DestinationString = 0i64;
IoStatusBlock = 0i64;
RtlInitUnicodeString(&DestinationString, L"\\Device\\RdyBoost");
LODWORD(v13) = 0;
ObjectAttributes.RootDirectory = 0i64;
LODWORD(CreateOptions) = 32;
LODWORD(CreateDisposition) = 1;
LODWORD(ShareAccess) = 7;
LODWORD(v9) = 0;
ObjectAttributes.Length = 48;
ObjectAttributes.Attributes = 576;
ObjectAttributes.ObjectName = &DestinationString;
*(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
v5 = ZwCreateFile(
&FileHandle,
0x12019Fui64,
&ObjectAttributes,
&IoStatusBlock,
0i64,
v9,
ShareAccess,
CreateDisposition,
CreateOptions,
0i64,
v13);
if( v5 >= 0 )
{
Object = 0i64;
v5 = ObReferenceObjectByHandle(FileHandle, 3ui64, 0i64, 0, &Object, 0i64);
if( v5 >= 0 )
{
LODWORD(v6) = IoGetRelatedDeviceObject((INT64)Object);
*a3 = v6;
v7 = (_DEVICE_OBJECT *)FileHandle;
FileHandle = 0i64;
v5 = 0;
*DeviceObjectOut = v7;
}
if( Object )
HalPutDmaAdapter((PADAPTER_OBJECT)Object);
}
if( FileHandle )
ZwClose((_HANDLE)FileHandle);
return v5;
}Referenced by:
SmcCacheManagerStart