static @Nullable List<ProcessInfo> parseWMICOutput(@NotNull String output,
                                                     @NotNull Map<Long, String> processOwners,
                                                     @Nullable String currentUser) {
    List<ProcessInfo> result = new ArrayList<>();
    String[] lines = StringUtil.splitByLinesDontTrim(output);
    if (lines.length == 0) return null;

    String header = lines[0];
    int commandLineStart = header.indexOf("CommandLine");
    if (commandLineStart == -1) return null;

    int pidStart = header.indexOf("ProcessId");
    if (pidStart == -1) return null;

    int parentPidStart = header.indexOf("ParentProcessId");
    if (parentPidStart == -1) return null;

    int executablePathStart = header.indexOf("ExecutablePath");
    if (executablePathStart == -1) return null;


    for (int i = 1; i < lines.length; i++) {
      String line = lines[i];

      int pid = StringUtil.parseInt(line.substring(pidStart).trim(), -1);
      if (pid == -1 || pid == 0) continue;

      int parentPid = StringUtil.parseInt(line.substring(parentPidStart, pidStart).trim(), -1);

      String executablePath = line.substring(executablePathStart, parentPidStart).trim();

      String name = line.substring(0, commandLineStart).trim();
      if (name.isEmpty()) continue;

      String commandLine = line.substring(commandLineStart, executablePathStart).trim();
      String args = "";

      if (commandLine.isEmpty()) {
        commandLine = name;
      }
      else {
        args = extractCommandLineArgs(commandLine, name);
      }

      String processUser = processOwners.get((long)pid);
      ThreeState isOwnedByCurrentUser = currentUser != null ? ThreeState.fromBoolean(currentUser.equals(processUser)) : ThreeState.UNSURE;
      result.add(new ProcessInfo(pid, commandLine, name, args, executablePath, parentPid, processUser, isOwnedByCurrentUser));
    }
    return result;
  }
static @Nullable List<ProcessInfo> parseWMICOutput(@NotNull String output,
                                                     @NotNull Map<Long, String> processOwners,
                                                     @Nullable String currentUser)