VrpIoctlDeviceDispatch

INT64 __fastcall VrpIoctlDeviceDispatch(INT64 a1, IRP *a2){
  __int64 v2; 
  _DWORD *a6; 
  int v5; 
  GUID *v6; 
  unsigned int v7; 
  int v8; 
  int v9; 
  int v10; 
  unsigned int DifferencingHive; 
  unsigned int v12; 
  int v14; 
  int v15; 
  int v16; 
  int v17; 
  int v18; 
  int v19; 
  UINT64 v20; 
  GUID v21; 
  GUID ActivityId; 
  struct _EVENT_DATA_DESCRIPTOR v23[2]; 
  UINT64 *v24; 
  int v25; 
  int v26; 
  v2 = *((_QWORD *)a2 + 23);
  a6 = (_DWORD *)((char *)a2 + 56);
  *((_QWORD *)a2 + 7) = 0i64;
  v21 = 0i64;
  ActivityId = 0i64;
  v5 = *(_DWORD *)(v2 + 24);
  if( (unsigned int)VRegEnabledInJob(&v20) && !VrpAllowContainerNesting )
  {
    v12 = -1073741808;
    if( (unsigned int)CallbackContext > 2 )
    {
      v26 = 0;
      v24 = &v20;
      LODWORD(v20) = v5;
      v25 = 4;
      tlgWriteTransfer_EtwWriteTransfer(
        (__int64)&CallbackContext,
        (unsigned __int8 *)byte_1400231A9,
        &v21,
        0i64,
        3u,
        v23);
    }
    goto LABEL_9;
  }
  EtwActivityIdControl(1u, &ActivityId);
  v7 = CallbackContext;
  if( (unsigned int)CallbackContext > 4 )
  {
    v26 = 0;
    v24 = &v20;
    LODWORD(v20) = v5;
    v25 = 4;
    tlgWriteTransfer_EtwWriteTransfer(
      (__int64)&CallbackContext,
      (unsigned __int8 *)byte_14002315D,
      &v21,
      &ActivityId,
      3u,
      v23);
    v7 = CallbackContext;
  }
  v8 = v5 - 2228228;
  if( !v8 )
  {
    DifferencingHive = VrpHandleIoctlInitializeJobForVreg(
                         *((PVOID *)a2 + 3),
                         *(unsigned int *)(v2 + 16),
                         *((_BYTE *)a2 + 64));
    goto LABEL_8;
  }
  v9 = v8 - 4;
  if( !v9 )
  {
    DifferencingHive = VrpHandleIoctlLoadDifferencingHive(
                         *((PVOID *)a2 + 3),
                         *(unsigned int *)(v2 + 16),
                         *((_BYTE *)a2 + 64));
    goto LABEL_8;
  }
  v10 = v9 - 4;
  if( !v10 )
  {
    DifferencingHive = VrpHandleIoctlCreateNamespaceNode(
                         *((PVOID *)a2 + 3),
                         *(unsigned int *)(v2 + 16),
                         *((_BYTE *)a2 + 64));
LABEL_8:
    v12 = DifferencingHive;
    goto LABEL_9;
  }
  v14 = v10 - 4;
  if( !v14 )
  {
    DifferencingHive = VrpHandleIoctlModifyFlags(*((PVOID *)a2 + 3), *(unsigned int *)(v2 + 16), *((_BYTE *)a2 + 64));
    goto LABEL_8;
  }
  v15 = v14 - 4;
  if( !v15 )
  {
    DifferencingHive = VrpHandleIoctlCreateMultipleNamespaceNodes(
                         *((PVOID *)a2 + 3),
                         *(unsigned int *)(v2 + 16),
                         *((_BYTE *)a2 + 64));
    goto LABEL_8;
  }
  v16 = v15 - 4;
  if( !v16 )
  {
    DifferencingHive = VrpHandleIoctlUnloadDynamicallyLoadedHives(
                         *((PVOID *)a2 + 3),
                         *(unsigned int *)(v2 + 16),
                         *((_BYTE *)a2 + 64));
    goto LABEL_8;
  }
  v17 = v16 - 4;
  if( !v17 )
  {
    DifferencingHive = VrpHandleIoctlGetVirtualRootKey(
                         *((_QWORD *)a2 + 3),
                         *(unsigned int *)(v2 + 16),
                         *((_BYTE *)a2 + 64),
                         (INT64)v6,
                         *((_QWORD **)a2 + 3),
                         a6);
    goto LABEL_8;
  }
  v18 = v17 - 4;
  if( !v18 )
  {
    DifferencingHive = VrpHandleIoctlLoadDifferencingHiveForHost(
                         *((PVOID *)a2 + 3),
                         *(unsigned int *)(v2 + 16),
                         *((_BYTE *)a2 + 64),
                         v6);
    goto LABEL_8;
  }
  if( v18 == 4 )
  {
    DifferencingHive = VrpHandleIoctlUnloadDifferencingHiveForHost(
                         *((PVOID *)a2 + 3),
                         *(unsigned int *)(v2 + 16),
                         *((_BYTE *)a2 + 64),
                         v6);
    goto LABEL_8;
  }
  if( v7 > 2 )
  {
    v19 = *(_DWORD *)(v2 + 24);
    v26 = 0;
    LODWORD(v20) = v19;
    v25 = 4;
    v24 = &v20;
    tlgWriteTransfer_EtwWriteTransfer((__int64)&CallbackContext, (unsigned __int8 *)byte_140023131, &v21, 0i64, 3u, v23);
  }
  v12 = -1073741808;
LABEL_9:
  *((_DWORD *)a2 + 12) = v12;
  IofCompleteRequest(a2, 0);
  if( (unsigned int)CallbackContext > 4 )
  {
    v26 = 0;
    v24 = &v20;
    LODWORD(v20) = v12;
    v25 = 4;
    tlgWriteTransfer_EtwWriteTransfer((__int64)&CallbackContext, (unsigned __int8 *)word_140023182, &v21, 0i64, 3u, v23);
  }
  return v12;
}

Referenced by:

No references.