IopSymlinkEnforceEnabledTypes

NTSTATUS __stdcall IopSymlinkEnforceEnabledTypes(
        UINT8 SourceLocalDeviceObject,
        UINT8 TargetLocalDeviceObject,
        ECP_LIST *ECPList){
  char v3; 
  NTSTATUS result; 
  _DWORD *v8; 
  bool v9; 
  _QWORD *v10; 
  bool v11; 
  PVOID EcpContext; 
  v3 = IopSymlinkEnabledTypes;
  EcpContext = 0i64;
  if( IopSymlinkEnabledTypes == 15 )
    return 0;
  result = FsRtlFindExtraCreateParameter(ECPList, &GUID_ECP_NETWORK_OPEN_CONTEXT, &EcpContext, 0i64);
  if( (int)(result + 0x80000000) < 0 || result == -1073741275 )
  {
    v8 = EcpContext;
    if( EcpContext && (*((_DWORD *)EcpContext - 6) & 0x10) != 0 )
      return -1073740011;
    if( !SourceLocalDeviceObject )
    {
      if( !EcpContext )
        return -1073740011;
      SourceLocalDeviceObject = *((_DWORD *)EcpContext + 4) == 2;
    }
    if( !TargetLocalDeviceObject && !EcpContext )
    {
      result = FsRtlAllocateExtraCreateParameter(
                 &GUID_ECP_NETWORK_OPEN_CONTEXT,
                 0x1Cu,
                 0,
                 0i64,
                 0x69536F49u,
                 &EcpContext);
      if( result < 0 )
        return result;
      v8 = EcpContext;
      v10 = EcpContext;
      *(_OWORD *)EcpContext = 0i64;
      v10[2] = 0i64;
      *((_DWORD *)v10 + 6) = 0;
      *(_DWORD *)v10 = 28;
      FsRtlInsertExtraCreateParameter(ECPList, v10);
    }
    if( SourceLocalDeviceObject )
    {
      if( (v3 & 3) == 0 )
        return -1073740011;
      if( TargetLocalDeviceObject )
      {
        v9 = (v3 & 1) == 0;
        goto LABEL_10;
      }
      if( (v3 & 2) == 0 )
        v8[1] = 2;
      v11 = (v3 & 1) == 0;
    }
    else
    {
      if( (v3 & 0xC) == 0 )
        return -1073740011;
      if( TargetLocalDeviceObject )
      {
        v9 = (v3 & 4) == 0;
LABEL_10:
        if( !v9 )
          return 0;
        return -1073740011;
      }
      if( (v3 & 8) == 0 )
        v8[1] = 2;
      v11 = (v3 & 4) == 0;
    }
    if( v11 )
      v8[1] = 1;
    return 0;
  }
  return result;
}

Referenced by:

IopParseDevice