VrpIoctlDeviceDispatch
NTSTATUS __stdcall VrpIoctlDeviceDispatch(INT64 a1, _IRP *a2){
_IO_STACK_LOCATION *CurrentStackLocation;
int v4;
INT64 v5;
_GUID *v6;
unsigned int v7;
int v8;
int v9;
int v10;
NTSTATUS DifferencingHive;
int v12;
int v14;
int v15;
int v16;
int v17;
int v18;
int v19;
VOID *v20;
UINT64 *v21;
_VRP_JOB_CONTEXT *JobContext;
_GUID v23;
_LPGUID ActivityId[4];
_EVENT_DATA_DESCRIPTOR v25[2];
_VRP_JOB_CONTEXT **p_JobContext;
int v27;
int v28;
CurrentStackLocation = a2->Tail.CurrentStackLocation;
a2->IoStatus.Information = 0i64;
v23 = 0i64;
*(_OWORD *)ActivityId = 0i64;
v4 = *(_DWORD *)&CurrentStackLocation->Parameters.FileAttributes;
if( VRegEnabledInJob(&JobContext) && !VrpAllowContainerNesting )
{
v12 = -1073741808;
if( *(&stru_140C00F40 + 1162) > 2u )
{
v28 = 0;
p_JobContext = &JobContext;
LODWORD(JobContext) = v4;
v27 = 4;
tlgWriteTransfer_EtwWriteTransfer(
(__int64)&stru_140C00F40 + 4648,
(unsigned __int8 *)byte_1400231A9,
&v23,
0i64,
3u,
v25);
}
goto LABEL_9;
}
EtwActivityIdControl(1ui64, (_GUID *)ActivityId);
v7 = *(&stru_140C00F40 + 1162);
if( *(&stru_140C00F40 + 1162) > 4u )
{
v28 = 0;
p_JobContext = &JobContext;
LODWORD(JobContext) = v4;
v27 = 4;
tlgWriteTransfer_EtwWriteTransfer(
(__int64)&stru_140C00F40 + 4648,
(unsigned __int8 *)byte_14002315D,
&v23,
(const _GUID *)ActivityId,
3u,
v25);
v7 = *(&stru_140C00F40 + 1162);
}
v8 = v4 - 2228228;
if( !v8 )
{
LOBYTE(v5) = a2->RequestorMode;
DifferencingHive = VrpHandleIoctlInitializeJobForVreg(
a2->AssociatedIrp.MasterIrp,
CurrentStackLocation->Parameters.Options,
v5,
v6,
v20,
v21);
goto LABEL_8;
}
v9 = v8 - 4;
if( !v9 )
{
LOBYTE(v5) = a2->RequestorMode;
DifferencingHive = VrpHandleIoctlLoadDifferencingHive(
a2->AssociatedIrp.MasterIrp,
CurrentStackLocation->Parameters.Options,
v5,
v6,
v20,
v21);
goto LABEL_8;
}
v10 = v9 - 4;
if( !v10 )
{
DifferencingHive = VrpHandleIoctlCreateNamespaceNode(
a2->AssociatedIrp.MasterIrp,
CurrentStackLocation->Parameters.Options,
a2->RequestorMode,
v6,
v20,
v21);
LABEL_8:
v12 = DifferencingHive;
goto LABEL_9;
}
v14 = v10 - 4;
if( !v14 )
{
DifferencingHive = VrpHandleIoctlModifyFlags(
a2->AssociatedIrp.MasterIrp,
CurrentStackLocation->Parameters.Options,
a2->RequestorMode,
v6,
v20,
v21);
goto LABEL_8;
}
v15 = v14 - 4;
if( !v15 )
{
DifferencingHive = VrpHandleIoctlCreateMultipleNamespaceNodes(
a2->AssociatedIrp.MasterIrp,
CurrentStackLocation->Parameters.Options,
a2->RequestorMode);
goto LABEL_8;
}
v16 = v15 - 4;
if( !v16 )
{
DifferencingHive = VrpHandleIoctlUnloadDynamicallyLoadedHives(
a2->AssociatedIrp.MasterIrp,
CurrentStackLocation->Parameters.Options,
a2->RequestorMode,
v6,
v20,
v21);
goto LABEL_8;
}
v17 = v16 - 4;
if( !v17 )
{
DifferencingHive = VrpHandleIoctlGetVirtualRootKey();
goto LABEL_8;
}
v18 = v17 - 4;
if( !v18 )
{
DifferencingHive = VrpHandleIoctlLoadDifferencingHiveForHost(
a2->AssociatedIrp.MasterIrp,
CurrentStackLocation->Parameters.Options,
a2->RequestorMode,
v6);
goto LABEL_8;
}
if( v18 == 4 )
{
DifferencingHive = VrpHandleIoctlUnloadDifferencingHiveForHost(
a2->AssociatedIrp.MasterIrp,
CurrentStackLocation->Parameters.Options,
a2->RequestorMode,
v6);
goto LABEL_8;
}
if( v7 > 2 )
{
v19 = *(_DWORD *)&CurrentStackLocation->Parameters.FileAttributes;
v28 = 0;
LODWORD(JobContext) = v19;
v27 = 4;
p_JobContext = &JobContext;
tlgWriteTransfer_EtwWriteTransfer(
(__int64)&stru_140C00F40 + 4648,
(unsigned __int8 *)byte_140023131,
&v23,
0i64,
3u,
v25);
}
v12 = -1073741808;
LABEL_9:
a2->IoStatus.Status = v12;
IofCompleteRequest(a2, 0);
if( *(&stru_140C00F40 + 1162) > 4u )
{
v28 = 0;
p_JobContext = &JobContext;
LODWORD(JobContext) = v12;
v27 = 4;
tlgWriteTransfer_EtwWriteTransfer(
(__int64)&stru_140C00F40 + 4648,
(unsigned __int8 *)word_140023182,
&v23,
0i64,
3u,
v25);
}
return v12;
}Referenced by:
No references.