VerifierIoWMIRegistrationControl

NTSTATUS __stdcall VerifierIoWMIRegistrationControl(_DEVICE_OBJECT *DeviceObject, UINT64 Action){
  int v2; 
  _VF_AVL_TREE_NODE *v4; 
  _VF_AVL_LOCK_CONTEXT Context[4]; 
  VOID *retaddr; 

  v2 = Action;
  if( !VfSafeMode && (Action & 0x80000000) != 0i64 )
  {
    switch( Action & 0x7FFFFFFF )
    {
      case 1ui64:
LABEL_7:
        ViTargetWMIRegister(DeviceObject, retaddr);
        break;
      case 2ui64:
        ViTargetWMIDeregister(DeviceObject, retaddr);
        break;
      case 3ui64:
        ViTargetWMIDeregister(DeviceObject, retaddr);
        goto LABEL_7;
    }
  }
  *(_OWORD *)Context = 0i64;
  if( (MmVerifierData & 0x10) != 0 && v2 >= 0 )
  {
    VfAvlInitializeLockContext(Context, Shared);
    v4 = VfAvlLookupTreeNode(&ViDevObjAvl, Context, DeviceObject, 0i64);
    if( v4 )
    {
      switch( v2 )
      {
        case 1:
          goto LABEL_14;
        case 2:
          _InterlockedAnd((volatile signed __int32 *)&v4[1], 0xFFFFFFFE);
          break;
        case 3:
LABEL_14:
          _InterlockedOr((volatile signed __int32 *)&v4[1], 1u);
          break;
      }
    }
    VfAvlCleanupLockContext(Context);
  }
  return((__int64(__fastcall *)(_DEVICE_OBJECT *, _QWORD))pXdvIoWMIRegistrationControl)(
           DeviceObject,
           (unsigned int)v2);
}

Referenced by:

No references.