public f325e9d950e6 cached
139 files
2.4 MB
638.2k tokens
2239 symbols
1 requests
Download .txt
Showing preview only (2,552K chars total). Download the full file or copy to clipboard to get everything.
Repository: Ameliorated-LLC/trusted-uninstaller-cli
Branch: public
Commit: f325e9d950e6
Files: 139
Total size: 2.4 MB

Directory structure:
gitextract_dcyh09z4/

├── .gitea/
│   └── workflows/
│       └── github_mirror.yaml
├── .gitignore
├── Core/
│   ├── Actions/
│   │   ├── CmdAction.cs
│   │   ├── CoreActions.cs
│   │   ├── RegistryKeyAction.cs
│   │   ├── RegistryValueAction.cs
│   │   ├── RunAction.cs
│   │   ├── ServiceAction.cs
│   │   ├── TaskKillAction.cs
│   │   └── UninstallTaskStatus.cs
│   ├── Core.projitems
│   ├── Core.shproj
│   ├── Core.shproj.DotSettings
│   ├── Exceptions/
│   │   └── UnexpectedException.cs
│   ├── Helper/
│   │   ├── Interop/
│   │   │   └── Helper.cs
│   │   ├── client-helper.sln
│   │   ├── client-helper.vcxproj
│   │   ├── client-helper.vcxproj.filters
│   │   ├── dllmain.cpp
│   │   ├── framework.h
│   │   ├── pch.cpp
│   │   └── pch.h
│   ├── Miscellaneous/
│   │   ├── Serializables.cs
│   │   ├── StreamReaderWithPosition.cs
│   │   └── XmlDeserializer.cs
│   ├── Services/
│   │   ├── Config.cs
│   │   ├── Log.cs
│   │   └── Output.cs
│   └── Utilities/
│       ├── IdManagers.cs
│       ├── StringUtils.cs
│       └── Wrap.cs
├── Interprocess/
│   ├── InterLink.cs
│   ├── Interprocess.projitems
│   ├── Interprocess.shproj
│   ├── JsonSerializables.cs
│   ├── LevelController.cs
│   ├── Levels.cs
│   ├── Serialization.cs
│   ├── SynchronousIOCanceler.cs
│   └── Threads.cs
├── LICENSE.md
├── ManagedWimLib/
│   ├── Compressors/
│   │   ├── Compressor.cs
│   │   └── Decompressor.cs
│   ├── Helper.cs
│   ├── IterateCallback.cs
│   ├── ManagedWimLib.csproj
│   ├── ManagedWimLib.netfx.targets
│   ├── NUGET_README.md
│   ├── NativeStructs.cs
│   ├── NugetPack.cmd
│   ├── ProgressCallback.cs
│   ├── WimLibException.cs
│   ├── WimLibLoadManager.cs
│   ├── WimLibLoader.cs
│   └── WimStruct.cs
├── README.md
├── TrustedUninstaller.CLI/
│   ├── CLI.cs
│   ├── CommandLine.cs
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── TrustedUninstaller.CLI.csproj
│   └── app.manifest
├── TrustedUninstaller.Shared/
│   ├── Actions/
│   │   ├── AppxAction.cs
│   │   ├── CmdAction.cs
│   │   ├── DownloadAction.cs
│   │   ├── FileAction.cs
│   │   ├── LanguageAction.cs
│   │   ├── LineInFileAction.cs
│   │   ├── PowershellAction.cs
│   │   ├── RegistryKeyAction.cs
│   │   ├── RegistryValueAction.cs
│   │   ├── RunAction.cs
│   │   ├── ScheduledTaskAction.cs
│   │   ├── ServiceAction.cs
│   │   ├── ShortcutAction.cs
│   │   ├── SoftwareAction.cs
│   │   ├── SystemPackageAction.cs
│   │   ├── TaskAction.cs
│   │   ├── TaskKillAction.cs
│   │   ├── UpdateAction.cs
│   │   ├── UserAction.cs
│   │   └── WriteStatusAction.cs
│   ├── AmeliorationUtil.cs
│   ├── AugmentedProcess.cs
│   ├── ControlWriter.cs
│   ├── Defender.cs
│   ├── Exceptions/
│   │   ├── ErrorHandlingException.cs
│   │   ├── InvalidRegistryEntryException.cs
│   │   └── TaskInProgressException.cs
│   ├── Globals.cs
│   ├── ISO.cs
│   ├── NativeProcess.cs
│   ├── NtStatus.cs
│   ├── OOBE.cs
│   ├── Parser/
│   │   ├── PlaybookParser.cs
│   │   └── TaskActionResolver.cs
│   ├── Playbook.cs
│   ├── Predicates/
│   │   └── IPredicate.cs
│   ├── ProcessPrivilege.cs
│   ├── Properties/
│   │   ├── AssemblyInfo.cs
│   │   ├── uefi-ntfs-ame-old.img
│   │   └── uefi-ntfs-ame.img
│   ├── ProviderStatus.cs
│   ├── Requirements.cs
│   ├── Tasks/
│   │   ├── ITaskAction.cs
│   │   ├── OutputProcessor.cs
│   │   ├── TaskAction.cs
│   │   ├── TaskList.cs
│   │   ├── UninstallTask.cs
│   │   ├── UninstallTaskPrivilege.cs
│   │   └── UninstallTaskStatus.cs
│   ├── TrustedUninstaller.Shared.csproj
│   ├── USB/
│   │   ├── BZip2.cs
│   │   ├── Drive.cs
│   │   ├── Drivers.cs
│   │   ├── Format.cs
│   │   ├── ISO.cs
│   │   ├── ISOWIM.cs
│   │   ├── InterMethods.cs
│   │   ├── Interop.cs
│   │   ├── OSDownload.cs
│   │   └── USB.cs
│   ├── WimLib/
│   │   ├── Compressors/
│   │   │   ├── Compressor.cs
│   │   │   └── Decompressor.cs
│   │   ├── DynLoader/
│   │   │   ├── DynLoaderBase.cs
│   │   │   ├── LoadManagerBase.cs
│   │   │   ├── NativeMethods.cs
│   │   │   ├── PlatformConvention.cs
│   │   │   └── SafeLibHandle.cs
│   │   ├── Helper.cs
│   │   ├── IterateCallback.cs
│   │   ├── NativeStructs.cs
│   │   ├── ProgressCallback.cs
│   │   ├── WimLibException.cs
│   │   ├── WimLibLoadManager.cs
│   │   ├── WimLibLoader.cs
│   │   └── WimStruct.cs
│   ├── WimWrapper.cs
│   └── WinUtil.cs
└── TrustedUninstaller.sln

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitea/workflows/github_mirror.yaml
================================================
name: GitHub Mirror

on:
  push:
    branches:
      - public

jobs:
  mirror_to_github:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Mirror to GitHub
        env:
          GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
        run: |
          git checkout public
          git reset --hard origin/public
          git push --force --tags https://${GITHUBTOKEN}@github.com/Ameliorated-LLC/trusted-uninstaller-cli public:public

================================================
FILE: .gitignore
================================================
# AME GUI Resource Playbooks
TrustedUninstaller.GUI/resources/Shared-PB/*
TrustedUninstaller.GUI/resources/W10-PB/*
TrustedUninstaller.GUI/resources/W11-PB/*

# GUI Builder Temp Files
TrustedUninstaller.GUI/gui-builder/Compiled.txt
TrustedUninstaller.GUI/gui-builder/BuildOut-*

!*.gitkeep

# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Mono auto generated files
mono_crash.*

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# Visual Studio Trace Files
*.e2e

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json

# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Nuget personal access tokens and Credentials
nuget.config

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak

# SQL Server files
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# CodeRush personal settings
.cr/personal

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Tabs Studio
*.tss

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog

# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Local History for Visual Studio
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb

# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp

# JetBrains Rider
.idea/
*.sln.iml

### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig

# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt

### vs ###

# User-specific files

# User-specific files (MonoDevelop/Xamarin Studio)

# Mono auto generated files

# Build results

# Visual Studio 2015/2017 cache/options directory
# Uncomment if you have tasks that create the project's static files in wwwroot

# Visual Studio 2017 auto generated files

# MSTest test Results

# NUnit

# Build Results of an ATL Project

# Benchmark Results

# .NET Core

# StyleCop

# Files built by Visual Studio

# Chutzpah Test files

# Visual C++ cache files

# Visual Studio profiler

# Visual Studio Trace Files

# TFS 2012 Local Workspace

# Guidance Automation Toolkit

# ReSharper is a .NET coding add-in

# TeamCity is a build add-in

# DotCover is a Code Coverage Tool

# AxoCover is a Code Coverage Tool

# Coverlet is a free, cross platform Code Coverage Tool
coverage*[.json, .xml, .info]

# Visual Studio code coverage results

# NCrunch

# MightyMoose

# Web workbench (sass)

# Installshield output folder

# DocProject is a documentation generator add-in

# Click-Once directory

# Publish Web Output
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted

# NuGet Packages
# NuGet Symbol Packages
# The packages folder can be ignored because of Package Restore
# except build/, which is used as an MSBuild target.
# Uncomment if necessary however generally it will be regenerated when needed
# NuGet v3's project.json files produces more ignorable files

# Microsoft Azure Build Output

# Microsoft Azure Emulator

# Windows Store app package directories and files

# Visual Studio cache files
# files ending in .cache can be ignored
# but keep track of directories ending in .cache

# Others

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)

# RIA/Silverlight projects

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)

# SQL Server files

# Business Intelligence projects

# Microsoft Fakes

# GhostDoc plugin setting file

# Node.js Tools for Visual Studio

# Visual Studio 6 build log

# Visual Studio 6 workspace options file

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)

# Visual Studio LightSwitch build output

# Paket dependency manager

# FAKE - F# Make

# CodeRush personal settings

# Python Tools for Visual Studio (PTVS)

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Tabs Studio

# Telerik's JustMock configuration file

# BizTalk build output

# OpenCover UI analysis results

# Azure Stream Analytics local run output

# MSBuild Binary and Structured Log

# NVidia Nsight GPU debugger configuration file

# MFractors (Xamarin productivity tool) working folder

# Local History for Visual Studio

# BeatPulse healthcheck temp database

# Backup folder for Package Reference Convert tool in Visual Studio 2017

# Ionide (cross platform F# VS Code tools) working folder

================================================
FILE: Core/Actions/CmdAction.cs
================================================
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Core.Exceptions;
using YamlDotNet.Serialization;

namespace Core.Actions
{
    public class CmdAction : ICoreAction
    {
        [YamlMember(typeof(string), Alias = "command")]
        public string Command { get; set; }
        
        [YamlMember(typeof(string), Alias = "timeout")]
        public int? Timeout { get; set; }
        
        [YamlMember(typeof(string), Alias = "wait")]
        public bool Wait { get; set; } = true;
        
        [YamlMember(typeof(string), Alias = "weight")]
        public int ProgressWeight { get; set; } = 1;
        
        public int GetProgressWeight() => ProgressWeight;

        private bool InProgress { get; set; }
        public void ResetProgress() => InProgress = false;

        private int? ExitCode { get; set; }

        public string? StandardError { get; set; }

        public string StandardOutput { get; set; }

        public string ErrorString() => $"CmdAction failed to run command '{Command}'.";
        
        public UninstallTaskStatus GetStatus()
        {
            if (InProgress)
            {
                return UninstallTaskStatus.InProgress;
            }

            return ExitCode == null ? UninstallTaskStatus.ToDo: UninstallTaskStatus.Completed;
        }
        
        public void RunTask(bool logExceptions = true)
        {
            ExitCode = null;

            RunAsProcess();
        }

        private void RunAsProcess()
        {
            var process = new Process();
            var startInfo = new ProcessStartInfo
            {
                WindowStyle = ProcessWindowStyle.Normal,
                FileName = "cmd.exe",
                Arguments = "/C " + $"\"{this.Command}\"",
                UseShellExecute = false,
                RedirectStandardError = true,
                RedirectStandardOutput = true,
                CreateNoWindow = true
            };
            if (!Wait)
            {
                startInfo.RedirectStandardError = false;
                startInfo.RedirectStandardOutput = false;
                startInfo.WindowStyle = ProcessWindowStyle.Hidden;
                startInfo.UseShellExecute = true;
            }
                
            process.StartInfo = startInfo;
            process.Start();
                
            if (!Wait)
            {
                process.Dispose();
                return;
            }
            
            var error = new StringBuilder();
            process.OutputDataReceived += ProcOutputHandler;
            process.ErrorDataReceived += delegate(object sender, DataReceivedEventArgs args)
            {
                if (!String.IsNullOrEmpty(args.Data))
                    error.AppendLine(args.Data);
                else
                    error.AppendLine();
            };
            
            process.BeginOutputReadLine();
            process.BeginErrorReadLine();

            if (Timeout != null)
            {
                var exited = process.WaitForExit(Timeout.Value);
                if (!exited)
                {
                    process.Kill();
                    throw new TimeoutException($"Command '{Command}' timeout exceeded.");
                }
            }
            else
            {
                bool exited = process.WaitForExit(30000);

                // WaitForExit alone seems to not be entirely reliable
                while (!exited && CmdRunning(process.Id))
                {
                    exited = process.WaitForExit(30000);
                }
            }
            
            int exitCode = 0;
            try
            {
                exitCode = process.ExitCode;
            }
            catch (Exception ex)
            {

            }
            
            if (exitCode != 0)
            {
                StandardError = error.ToString();
                
                this.ExitCode = exitCode;
            }
            else
            {
                ExitCode = 0;
            }
            
            process.CancelOutputRead();
            process.CancelErrorRead();
            process.Dispose();
        }
        
        private static bool CmdRunning(int id)
        {
            try
            {
                return Process.GetProcessesByName("cmd").Any(x => x.Id == id);
            }
            catch (Exception)
            {
                return false;
            }
        }
        
        private void ProcOutputHandler(object sendingProcess, DataReceivedEventArgs outLine)
        {

        }
    }
}


================================================
FILE: Core/Actions/CoreActions.cs
================================================
using System.Threading.Tasks;

namespace Core.Actions
{
    public interface ICoreAction
    {
        public void RunTask(bool logExceptions);
    }
    public static class CoreActions
    {
        public static void SafeRun(ICoreAction action, bool logExceptions = false)
        {
            Wrap.ExecuteSafe(() => action.RunTask(logExceptions), logExceptions);
        }
    }
}


================================================
FILE: Core/Actions/RegistryKeyAction.cs
================================================
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Principal;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Win32;
using Core.Exceptions;
using YamlDotNet.Serialization;


namespace Core.Actions
{
    public enum RegistryKeyOperation
    {
        Delete = 0,
        Add = 1
    }
    public class RegistryKeyAction : ICoreAction
    {
        public void RunTaskOnMainThread() { throw new NotImplementedException(); }
        [YamlMember(typeof(string), Alias = "path")]
        public string KeyName { get; set; }

        [YamlMember(typeof(RegistryKeyOperation), Alias = "operation")]
        public RegistryKeyOperation Operation { get; set; } = RegistryKeyOperation.Delete;
        
        [YamlMember(typeof(string), Alias = "weight")]
        public int ProgressWeight { get; set; } = 1;
        public int GetProgressWeight() => ProgressWeight;
        
        static Dictionary<RegistryHive, UIntPtr> HiveKeys = new Dictionary<RegistryHive, UIntPtr> {
            { RegistryHive.ClassesRoot, new UIntPtr(0x80000000u) },
            { RegistryHive.CurrentConfig, new UIntPtr(0x80000005u) },
            { RegistryHive.CurrentUser, new UIntPtr(0x80000001u) },
            //{ RegistryHive.DynData, new UIntPtr(0x80000006u) },
            { RegistryHive.LocalMachine, new UIntPtr(0x80000002u) },
            { RegistryHive.PerformanceData, new UIntPtr(0x80000004u) },
            { RegistryHive.Users, new UIntPtr(0x80000003u) }
        };
        [DllImport("advapi32.dll", SetLastError = true)]
        private static extern int RegOpenKeyEx(UIntPtr hKey, string subKey, int ulOptions, int samDesired, out UIntPtr hkResult);
  
        [DllImport("advapi32.dll", EntryPoint = "RegDeleteKeyEx", SetLastError = true)]
        private static extern int RegDeleteKeyEx(
            UIntPtr hKey,
            string lpSubKey,
            uint samDesired, // see Notes below
            uint Reserved);
        private static void DeleteKeyTreeWin32(string key, RegistryHive hive)
        {
            var openedKey = RegistryKey.OpenBaseKey(hive, RegistryView.Default).OpenSubKey(key);
            if (openedKey == null)
                return;

            openedKey.GetSubKeyNames().ToList().ForEach(subKey => DeleteKeyTreeWin32(key + "\\" + subKey, hive));
            openedKey.Close();

            RegDeleteKeyEx(HiveKeys[hive], key, 0x0100, 0);
        }
        
        private bool InProgress { get; set; }
        public void ResetProgress() => InProgress = false;
        
        public string ErrorString() => $"RegistryKeyAction failed to {Operation.ToString().ToLower()} key '{KeyName}'.";
        
        private List<RegistryKey> GetRoots()
        {
            var hive = KeyName.Split('\\').GetValue(0).ToString().ToUpper();
            var list = new List<RegistryKey>();

            list.Add(hive switch
            {
                "HKCU" => RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default),
                "HKEY_CURRENT_USER" => RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default),
                "HKLM" => RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default),
                "HKEY_LOCAL_MACHINE" => RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default),
                "HKCR" => RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Default),
                "HKEY_CLASSES_ROOT" => RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Default),
                "HKU" => RegistryKey.OpenBaseKey(RegistryHive.Users, RegistryView.Default),
                "HKEY_USERS" => RegistryKey.OpenBaseKey(RegistryHive.Users, RegistryView.Default),
                _ => throw new ArgumentException($"Key '{KeyName}' does not specify a valid registry hive.")
            });
            return list;
        }

        public string GetSubKey() => KeyName.Substring(KeyName.IndexOf('\\') + 1);

        private RegistryKey? OpenSubKey(RegistryKey root)
        {
            var subKeyPath = GetSubKey();
            
            if (subKeyPath == null) throw new ArgumentException($"Key '{KeyName}' is invalid.");
            
            return root.OpenSubKey(subKeyPath, true);
        }

        public UninstallTaskStatus GetStatus()
        {
            try
            {
                var roots = GetRoots();

                foreach (var _root in roots)
                {
                    var root = _root;
                    var subKey = GetSubKey();
                    
                    var openedSubKey = root.OpenSubKey(subKey);

                    if (Operation == RegistryKeyOperation.Delete && openedSubKey != null)
                    {
                        return UninstallTaskStatus.ToDo;
                    }
                    if (Operation == RegistryKeyOperation.Add && openedSubKey == null)
                    {
                        return UninstallTaskStatus.ToDo;
                    }
                }
            }
            catch (Exception e)
            {
                Log.EnqueueExceptionSafe(e);
                return UninstallTaskStatus.ToDo;
            }
            return UninstallTaskStatus.Completed;
        }

        public void RunTask(bool logExceptions = true)
        {
            var roots = GetRoots();

            foreach (var _root in roots)
            {
                var root = _root;
                var subKey = GetSubKey();

                try
                {
                    if (Operation == RegistryKeyOperation.Add && root.OpenSubKey(subKey) == null)
                    {
                        root.CreateSubKey(subKey);
                    }
                    if (Operation == RegistryKeyOperation.Delete)
                    {
                        try
                        {
                            root.DeleteSubKeyTree(subKey, false);
                        }
                        catch (Exception e)
                        {
                            Log.EnqueueExceptionSafe(LogType.Warning, e, ("Key", root?.Name + "\\" + subKey));

                            var rootHive = root.Name.Split('\\').First() switch
                            {
                                "HKEY_CURRENT_USER" => RegistryHive.CurrentUser,
                                "HKEY_LOCAL_MACHINE" => RegistryHive.LocalMachine,
                                "HKEY_CLASSES_ROOT" => RegistryHive.ClassesRoot,
                                "HKEY_USERS" => RegistryHive.Users,
                                _ => throw new ArgumentException($"Unable to parse: " + root.Name.Split('\\').First())
                            };
                            
                            DeleteKeyTreeWin32(root.Name.StartsWith("HKEY_USERS") ? root.Name.Split('\\')[1] + "\\" + subKey: subKey, rootHive);
                        }
                    }
                }
                catch (Exception e)
                {
                    if (logExceptions)
                        Log.EnqueueExceptionSafe(e, ("Key", root?.Name + "\\" + subKey));
                }
            }
        }
    }
}


================================================
FILE: Core/Actions/RegistryValueAction.cs
================================================
#nullable enable
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Win32;
using Core.Exceptions;
using YamlDotNet.Serialization;


namespace Core.Actions
{
    public enum RegistryValueOperation
    {
        Delete = 0,
        Add = 1,
        // This indicates to skip the action if the specified value does not already exist
        Set = 2
    }

    public enum RegistryValueType
    {
        REG_SZ = RegistryValueKind.String,
        REG_MULTI_SZ = RegistryValueKind.MultiString,
        REG_EXPAND_SZ = RegistryValueKind.ExpandString,
        REG_DWORD = RegistryValueKind.DWord,
        REG_QWORD = RegistryValueKind.QWord,
        REG_BINARY = RegistryValueKind.Binary,
        REG_NONE = RegistryValueKind.None,
        REG_UNKNOWN = RegistryValueKind.Unknown
    }

    public class RegistryValueAction : ICoreAction
    {
        [YamlMember(typeof(string), Alias = "path")]
        public string KeyName { get; set; }

        [YamlMember(typeof(string), Alias = "value")]
        public string Value { get; set; } = "";
        
        [YamlMember(typeof(object), Alias = "data")]
        public object? Data { get; set; }
        
        [YamlMember(typeof(RegistryValueType), Alias = "type")]
        public RegistryValueType Type { get; set; }

        [YamlMember(typeof(RegistryValueOperation), Alias = "operation")]
        public RegistryValueOperation Operation { get; set; } = RegistryValueOperation.Add;
        
        [YamlMember(typeof(string), Alias = "weight")]
        public int ProgressWeight { get; set; } = 1;
        public int GetProgressWeight()
        {
            /*
            int roots;
            try
            {
                roots = GetRoots().Count;
            }
            catch (Exception e)
            {

                roots = 1;
            }
            */

            return ProgressWeight;
        }
        
        private bool InProgress { get; set; }
        public void ResetProgress() => InProgress = false;
        
        public string ErrorString() => $"RegistryValueAction failed to {Operation.ToString().ToLower()} value '{Value}' in key '{KeyName}'";
        
        private List<RegistryKey> GetRoots()
        {
            var hive = KeyName.Split('\\').GetValue(0).ToString().ToUpper();
            var list = new List<RegistryKey>();

            list.Add(hive switch
            {
                "HKCU" => RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default),
                "HKEY_CURRENT_USER" => RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default),
                "HKLM" => RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default),
                "HKEY_LOCAL_MACHINE" => RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default),
                "HKCR" => RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Default),
                "HKEY_CLASSES_ROOT" => RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Default),
                "HKU" => RegistryKey.OpenBaseKey(RegistryHive.Users, RegistryView.Default),
                "HKEY_USERS" => RegistryKey.OpenBaseKey(RegistryHive.Users, RegistryView.Default),
                _ => throw new ArgumentException($"Key '{KeyName}' does not specify a valid registry hive.")
            });
            return list;
        }

        public string GetSubKey() => KeyName.Substring(KeyName.IndexOf('\\') + 1);

        private RegistryKey? OpenSubKey(RegistryKey root)
        {
            var subKeyPath = GetSubKey();
            
            if (subKeyPath == null) throw new ArgumentException($"Key '{KeyName}' is invalid.");
            
            return root.OpenSubKey(subKeyPath, true);
        }

        public object? GetCurrentValue(RegistryKey root)
        {
            var subkey = GetSubKey();
            return Registry.GetValue(root.Name + "\\" + subkey, Value, null);
        }
        
        public static byte[] StringToByteArray(string hex) {
            return Enumerable.Range(0, hex.Length)
                .Where(x => x % 2 == 0)
                .Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
                .ToArray();
        }

        public UninstallTaskStatus GetStatus()
        {
            try
            {
                var roots = GetRoots();

                foreach (var _root in roots)
                {
                    var root = _root;
                    var subKey = GetSubKey();
                    
                    var openedSubKey = root.OpenSubKey(subKey);

                    if (openedSubKey == null && (Operation == RegistryValueOperation.Set || Operation == RegistryValueOperation.Delete))
                        continue;
                    if (openedSubKey == null) return UninstallTaskStatus.ToDo;

                    var value = openedSubKey.GetValue(Value);

                    if (value == null)
                    {
                        if (Operation == RegistryValueOperation.Set || Operation == RegistryValueOperation.Delete)
                            continue;

                        return UninstallTaskStatus.ToDo;
                    }
                    if (Operation == RegistryValueOperation.Delete) return UninstallTaskStatus.ToDo;

                    if (Data == null) return UninstallTaskStatus.ToDo;


                    bool matches;
                    try
                    {
                        matches = Type switch
                        {
                            RegistryValueType.REG_SZ =>
                                Data.ToString() == value.ToString(),
                            RegistryValueType.REG_EXPAND_SZ =>
                                // RegistryValueOptions.DoNotExpandEnvironmentNames above did not seem to work.
                                Environment.ExpandEnvironmentVariables(Data.ToString()) == value.ToString(),
                            RegistryValueType.REG_MULTI_SZ =>
                                Data.ToString() == "" ?
                                    ((string[])value).SequenceEqual(new string[] { }) :
                                    ((string[])value).SequenceEqual(Data.ToString().Split(new string[] { "\\0" }, StringSplitOptions.None)),
                            RegistryValueType.REG_DWORD =>
                                unchecked((int)Convert.ToUInt32(Data)) == (int)value,
                            RegistryValueType.REG_QWORD =>
                                Convert.ToUInt64(Data) == (ulong)value,
                            RegistryValueType.REG_BINARY =>
                                ((byte[])value).SequenceEqual(StringToByteArray(Data.ToString())),
                            RegistryValueType.REG_NONE =>
                                ((byte[])value).SequenceEqual(new byte[0]),
                            RegistryValueType.REG_UNKNOWN =>
                                Data.ToString() == value.ToString(),
                            _ => throw new ArgumentException("Impossible.")
                        };
                    }
                    catch (InvalidCastException)
                    {
                        matches = false;
                    }
                    if (!matches) return UninstallTaskStatus.ToDo;
                }
            }
            catch (Exception e)
            {
                Log.EnqueueExceptionSafe(e);
                return UninstallTaskStatus.ToDo;
            }

            return UninstallTaskStatus.Completed;
        }

        public void RunTask(bool logExceptions = true)
        {
            
            var roots = GetRoots();

            foreach (var _root in roots)
            {
                var root = _root;
                var subKey = GetSubKey();
                try
                {
                    if (GetCurrentValue(root) == Data) continue;

                    if (root.OpenSubKey(subKey) == null && Operation == RegistryValueOperation.Set) continue;
                    if (root.OpenSubKey(subKey) == null && Operation == RegistryValueOperation.Add) root.CreateSubKey(subKey);

                    if (Operation == RegistryValueOperation.Delete)
                    {
                        var key = root.OpenSubKey(subKey, true);
                        key?.DeleteValue(Value);
                        continue;
                    }

                    if (Type == RegistryValueType.REG_BINARY)
                    {
                        var data = StringToByteArray(Data.ToString());

                        Registry.SetValue(root.Name + "\\" + subKey, Value, data, (RegistryValueKind)Type);
                    }
                    else if (Type == RegistryValueType.REG_DWORD)
                    {
                        // DWORD values using the highest bit set fail without this, for example '2962489444'.
                        // See https://stackoverflow.com/questions/6608400/how-to-put-a-dword-in-the-registry-with-the-highest-bit-set;
                        var value = unchecked((int)Convert.ToUInt32(Data));
                        Registry.SetValue(root.Name + "\\" + subKey, Value, value, (RegistryValueKind)Type);
                    }
                    else if (Type == RegistryValueType.REG_QWORD)
                    {
                        Registry.SetValue(root.Name + "\\" + subKey, Value, Convert.ToUInt64(Data), (RegistryValueKind)Type);
                    }
                    else if (Type == RegistryValueType.REG_NONE)
                    {
                        byte[] none = new byte[0];

                        Registry.SetValue(root.Name + "\\" + subKey, Value, none, (RegistryValueKind)Type);
                    }
                    else if (Type == RegistryValueType.REG_MULTI_SZ)
                    {
                        string[] data;
                        if (Data.ToString() == "") data = new string[] { };
                        else data = Data.ToString().Split(new string[] { "\\0" }, StringSplitOptions.None);

                        Registry.SetValue(root.Name + "\\" + subKey, Value, data, (RegistryValueKind)Type);
                    }
                    else
                    {
                        Registry.SetValue(root.Name + "\\" + subKey, Value, Data, (RegistryValueKind)Type);
                    }
                }
                catch (Exception e)
                {
                    if (logExceptions)
                        Log.EnqueueExceptionSafe(e, ("Key", root?.Name + "\\" + subKey), ("Value", Value));
                }
            }
            return;
        }
    }
}


================================================
FILE: Core/Actions/RunAction.cs
================================================
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using YamlDotNet.Serialization;

namespace Core.Actions
{
    public class RunAction : ICoreAction
    {
        [YamlMember(typeof(string), Alias = "path")]
        public string RawPath { get; set; } = null;
       
        [YamlMember(typeof(string), Alias = "exe")]
        public string Exe { get; set; } 

        [YamlMember(typeof(string), Alias = "args")]
        public string? Arguments { get; set; }

        [YamlMember(typeof(bool), Alias = "baseDir")]
        public bool BaseDir { get; set; } = false;
        
        [YamlMember(typeof(bool), Alias = "exeDir")]
        public bool ExeDir { get; set; } = false;

        [YamlMember(typeof(bool), Alias = "createWindow")]
        public bool CreateWindow { get; set; } = false;
        
        [YamlMember(typeof(bool), Alias = "showOutput")]
        public bool ShowOutput { get; set; } = true;
        
        [YamlMember(typeof(bool), Alias = "showError")]
        public bool ShowError { get; set; } = true;
        
        [YamlMember(typeof(int), Alias = "timeout")]
        public int? Timeout { get; set; }

        [YamlMember(typeof(string), Alias = "wait")]
        public bool Wait { get; set; } = true;
        
        [YamlMember(typeof(string), Alias = "weight")]
        public int ProgressWeight { get; set; } = 5;
        public int GetProgressWeight() => ProgressWeight;

        private bool InProgress { get; set; } = false;
        public void ResetProgress() => InProgress = false;
        private bool HasExited { get; set; } = false;
        //public int ExitCode { get; set; }
        public string? Output { get; private set; }
        private string? StandardError { get; set; }
        
        public string ErrorString() => String.IsNullOrEmpty(Arguments) ? $"RunAction failed to execute '{Exe}'." : $"RunAction failed to execute '{Exe}' with arguments '{Arguments}'.";
        
        public static bool ExistsInPath(string fileName)
        {
            if (File.Exists(fileName))
                return true;

            var values = Environment.GetEnvironmentVariable("PATH");
            foreach (var path in values.Split(Path.PathSeparator))
            {
                var fullPath = Path.Combine(path, fileName);
                if (File.Exists(fullPath))
                    return true;
                if (!fileName.EndsWith(".exe", StringComparison.OrdinalIgnoreCase) && File.Exists(fullPath + ".exe"))
                    return true;
            }
            return false;
        }
        
        public UninstallTaskStatus GetStatus()
        {
            if (InProgress)
            {
                return UninstallTaskStatus.InProgress;
            }

            return HasExited || !Wait ?  UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo;
        }

        public void RunTask(bool logExceptions = true)
        {
            if (RawPath != null) RawPath = Environment.ExpandEnvironmentVariables(RawPath);
            InProgress = true;
            
            var currentDir = Directory.GetCurrentDirectory();
            
            if (BaseDir) RawPath = currentDir;

            string file = null;
            if (RawPath != null && File.Exists(Path.Combine(Environment.ExpandEnvironmentVariables(RawPath), Exe)))
                file = Path.Combine(Environment.ExpandEnvironmentVariables(RawPath), Exe);
            else if (ExistsInPath(Exe) || File.Exists(Environment.ExpandEnvironmentVariables(Exe)))
                file = Environment.ExpandEnvironmentVariables(Exe);

            if (file == null)
                throw new FileNotFoundException($"Executable not found.");

            RunAsProcess(file);

            InProgress = false;
            return;
        }

        private void RunAsProcess(string file)
        {
            var startInfo = new ProcessStartInfo
            {
                CreateNoWindow = !this.CreateWindow,
                UseShellExecute = false,
                WindowStyle = ProcessWindowStyle.Normal,
                RedirectStandardError = true,
                RedirectStandardOutput = true,
                FileName = file,
            };
            if (Arguments != null) startInfo.Arguments = Environment.ExpandEnvironmentVariables(Arguments);

            if (!Wait)
            {
                startInfo.RedirectStandardError = false;
                startInfo.RedirectStandardOutput = false;
                startInfo.WindowStyle = ProcessWindowStyle.Hidden;
                startInfo.UseShellExecute = true;
            }

            if (!ShowOutput)
                startInfo.RedirectStandardOutput = false;
            if (!ShowError)
                startInfo.RedirectStandardError = false;

            var exeProcess = new Process
            {
                StartInfo = startInfo,
                EnableRaisingEvents = true
            };

            exeProcess.Start();

            if (!Wait)
            {
                exeProcess.Dispose();
                return;
            }

            if (ShowOutput)
                exeProcess.OutputDataReceived += ProcOutputHandler;
            if (ShowError)
                exeProcess.ErrorDataReceived += ProcOutputHandler;

            if (ShowOutput)
                exeProcess.BeginOutputReadLine();
            if (ShowError)
                exeProcess.BeginErrorReadLine();

            if (Timeout.HasValue)
            {
                var exited = exeProcess.WaitForExit(Timeout.Value);
                if (!exited)
                {
                    exeProcess.Kill();
                    throw new TimeoutException($"Executable run timeout exceeded.");
                }
            }
            else
            {
                bool exited = exeProcess.WaitForExit(30000);

                // WaitForExit alone seems to not be entirely reliable
                while (!exited && ExeRunning(exeProcess.ProcessName, exeProcess.Id))
                {
                    exited = exeProcess.WaitForExit(30000);
                }
            }

            HasExited = true;

            if (ShowOutput)
                exeProcess.CancelOutputRead();
            if (ShowError)
                exeProcess.CancelErrorRead();
            
            exeProcess.Dispose();
        }
        
        private static bool ExeRunning(string name, int id)
        {
            try
            {
                return Process.GetProcessesByName(name).Any(x => x.Id == id);
            }
            catch (Exception)
            {
                return false;
            }
        }

        private void ProcOutputHandler(object sendingProcess, DataReceivedEventArgs outLine)
        {
        }
    }
}


================================================
FILE: Core/Actions/ServiceAction.cs
================================================
#nullable enable
using System;
using System.Collections.Specialized;
using System.Configuration.Install;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Management;
using System.ServiceProcess;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Win32;
using Core.Exceptions;
using YamlDotNet.Serialization;
using Core;

namespace Core.Actions
{
    public enum ServiceOperation
    {
        Stop,
        Continue,
        Start,
        Pause,
        Delete,
        Change
    }
    public class ServiceAction : ICoreAction
    {
        public void RunTaskOnMainThread() { throw new NotImplementedException(); }
        [YamlMember(typeof(ServiceOperation), Alias = "operation")]
        public ServiceOperation Operation { get; set; } = ServiceOperation.Delete;
        
        [YamlMember(typeof(string), Alias = "name")]
        public string ServiceName { get; set; } = null!;
        
        [YamlMember(typeof(int), Alias = "startup")]
        public int? Startup { get; set; }
        
        [YamlMember(typeof(bool), Alias = "deleteStop")]
        public bool DeleteStop { get; set; } = true;
        
        [YamlMember(typeof(bool), Alias = "deleteUsingRegistry")]
        public bool RegistryDelete { get; set; } = false;
        
        [YamlMember(typeof(string), Alias = "device")]
        public bool Device { get; set; } = false;
        
        [YamlMember(typeof(string), Alias = "weight")]
        public int ProgressWeight { get; set; } = 4;
        public int GetProgressWeight() => ProgressWeight;
        
        private bool InProgress { get; set; }
        public void ResetProgress() => InProgress = false;

        public string ErrorString() => $"ServiceAction failed to {Operation.ToString().ToLower()} service {ServiceName}.";
        
        private ServiceController? GetService()
        {
            if (ServiceName.EndsWith("*") && ServiceName.StartsWith("*")) return ServiceController.GetServices()
                .FirstOrDefault(service => service.ServiceName.IndexOf(ServiceName.Trim('*'), StringComparison.CurrentCultureIgnoreCase) >= 0);
            if (ServiceName.EndsWith("*")) return ServiceController.GetServices()
                .FirstOrDefault(service => service.ServiceName.StartsWith(ServiceName.TrimEnd('*'), StringComparison.CurrentCultureIgnoreCase));
            if (ServiceName.StartsWith("*")) return ServiceController.GetServices()
                .FirstOrDefault(service => service.ServiceName.EndsWith(ServiceName.TrimStart('*'), StringComparison.CurrentCultureIgnoreCase));
            
            return ServiceController.GetServices()
                .FirstOrDefault(service => service.ServiceName.Equals(ServiceName, StringComparison.CurrentCultureIgnoreCase));
        }
        private ServiceController? GetDevice()
        {
            if (ServiceName.EndsWith("*") && ServiceName.StartsWith("*")) return ServiceController.GetDevices()
                .FirstOrDefault(service => service.ServiceName.IndexOf(ServiceName.Trim('*'), StringComparison.CurrentCultureIgnoreCase) >= 0);
            if (ServiceName.EndsWith("*")) return ServiceController.GetDevices()
                .FirstOrDefault(service => service.ServiceName.StartsWith(ServiceName.TrimEnd('*'), StringComparison.CurrentCultureIgnoreCase));
            if (ServiceName.StartsWith("*")) return ServiceController.GetDevices()
                .FirstOrDefault(service => service.ServiceName.EndsWith(ServiceName.TrimStart('*'), StringComparison.CurrentCultureIgnoreCase));
            
            return ServiceController.GetDevices()
                .FirstOrDefault(service => service.ServiceName.Equals(ServiceName, StringComparison.CurrentCultureIgnoreCase));
        }

        public UninstallTaskStatus GetStatus()
        {
            if (InProgress) return UninstallTaskStatus.InProgress;

            if (Operation == ServiceOperation.Change && Startup.HasValue)
            {
                // TODO: Implement dev log. Example:
                // if (Registry.LocalMachine.OpenSubKey($@"SYSTEM\CurrentControlSet\Services\{ServiceName}") == null) WriteToDevLog($"Warning: Service name '{ServiceName}' not found in registry.");

                var root = Registry.LocalMachine.OpenSubKey($@"SYSTEM\CurrentControlSet\Services\{ServiceName}");
                if (root == null) return UninstallTaskStatus.Completed;

                var value = root.GetValue("Start");

                return (int)value == Startup.Value ? UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo;
            }
            
            ServiceController? serviceController;
            if (Device) serviceController = GetDevice();
            else serviceController = GetService();
            
            if (Operation == ServiceOperation.Delete && RegistryDelete)
            {
                // TODO: Implement dev log. Example:
                // if (Registry.LocalMachine.OpenSubKey($@"SYSTEM\CurrentControlSet\Services\{ServiceName}") == null) WriteToDevLog($"Warning: Service name '{ServiceName}' not found in registry.");

                var root = Registry.LocalMachine.OpenSubKey($@"SYSTEM\CurrentControlSet\Services\{ServiceName}");
                return root == null ? UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo;
            }

            return Operation switch
            {
                ServiceOperation.Stop =>
                    serviceController == null ||
                    serviceController?.Status == ServiceControllerStatus.Stopped
                    || serviceController?.Status == ServiceControllerStatus.StopPending ?
                        UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
                ServiceOperation.Continue =>
                    serviceController == null ||
                    serviceController?.Status == ServiceControllerStatus.Running
                    || serviceController?.Status == ServiceControllerStatus.ContinuePending ?
                        UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
                ServiceOperation.Start =>
                    serviceController?.Status == ServiceControllerStatus.StartPending
                    || serviceController?.Status == ServiceControllerStatus.Running ?
                        UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
                ServiceOperation.Pause =>
                    serviceController == null ||
                    serviceController?.Status == ServiceControllerStatus.Paused
                    || serviceController?.Status == ServiceControllerStatus.PausePending ?
                        UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
                ServiceOperation.Delete =>
                    serviceController == null || Win32.ServiceEx.IsPendingDeleteOrDeleted(serviceController.ServiceName) ?
                        UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
                _ => throw new ArgumentOutOfRangeException("Argument out of Range", new ArgumentOutOfRangeException())
            };
        }

        private readonly string[] RegexNoKill = { "DcomLaunch" }; 
        
        public void RunTask(bool logExceptions = true)
        {
            if (Operation == ServiceOperation.Change && !Startup.HasValue) throw new ArgumentException("Startup property must be specified with the change operation.");
            if (Operation == ServiceOperation.Change && (Startup.Value > 4  || Startup.Value < 0)) throw new ArgumentException("Startup property must be between 1 and 4.");

            if (Operation == ServiceOperation.Change)
            {
                var action = new RegistryValueAction()
                {
                    KeyName = $@"HKLM\SYSTEM\CurrentControlSet\Services\{ServiceName}", 
                    Value = "Start", 
                    Data = Startup.Value, 
                    Type = RegistryValueType.REG_DWORD, 
                    Operation = RegistryValueOperation.Set
                };
                action.RunTask();
                
                InProgress = false;
                return;
            }
            
            ServiceController? service;

            if (Device) service = GetDevice();
            else service = GetService();

            if (service == null)
            {
                if (Operation == ServiceOperation.Start)
                    throw new ArgumentException("Service " + ServiceName + " not found.");
                
                return;
            }

            InProgress = true;

            if ((Operation == ServiceOperation.Delete && DeleteStop) || Operation == ServiceOperation.Stop)
            {
                try
                {
                    foreach (ServiceController dependentService in service.DependentServices.Where(x => x.Status != ServiceControllerStatus.Stopped))
                    {
                        if (RegexNoKill.Any(regex => Regex.Match(dependentService.ServiceName, regex, RegexOptions.IgnoreCase).Success))
                            continue;
                        
                        if (dependentService.Status != ServiceControllerStatus.StopPending && dependentService.Status != ServiceControllerStatus.Stopped)
                        {
                            try
                            {
                                dependentService.Stop();
                            }
                            catch (Exception e)
                            {
                                dependentService.Refresh();
                                if (dependentService.Status != ServiceControllerStatus.Stopped && dependentService.Status != ServiceControllerStatus.StopPending && logExceptions)
                                    Log.EnqueueExceptionSafe(LogType.Warning, e, "Dependent service stop failed.", ("Service", ServiceName), ("Dependent Service", dependentService.ServiceName));
                            }
                        }

                        try
                        {
                            dependentService.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromMilliseconds(5000));
                        }
                        catch (Exception e)
                        {
                            dependentService.Refresh();
                            if (service.Status != ServiceControllerStatus.Stopped && logExceptions)
                                Log.EnqueueSafe(LogType.Warning, "Dependent service stop timeout exceeded.", null, ("Service", ServiceName), ("Dependent Service", dependentService.ServiceName));
                        }
                        
                        try
                        {
                            var killServ = new TaskKillAction()
                            {
                                ProcessID = Win32.ServiceEx.GetServiceProcessId(dependentService.ServiceName)
                            };
                            killServ.RunTask(logExceptions);
                        }
                        catch (Exception e)
                        {
                            dependentService.Refresh();
                            if (dependentService.Status != ServiceControllerStatus.Stopped && logExceptions)
                                Log.EnqueueSafe(LogType.Warning, "Could not kill dependent service.", null, ("Service", ServiceName), ("Dependent Service", dependentService.ServiceName));
                        }
                    }
                }
                catch (Exception e)
                {
                    if (logExceptions) 
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Unexpected error while killing dependent services.", ("Service", ServiceName));
                }
            }

            if (Operation == ServiceOperation.Delete)
            {
                if (DeleteStop && service.Status != ServiceControllerStatus.StopPending && service.Status != ServiceControllerStatus.Stopped)
                {
                    if (RegexNoKill.Any(regex => Regex.Match(ServiceName, regex, RegexOptions.IgnoreCase).Success))
                    {
                        if (logExceptions) 
                            Log.EnqueueSafe(LogType.Warning, "Skipped stopping critical service.", null, ("Service", ServiceName));
                    }
                    else
                    {

                        try
                        {
                            service.Stop();
                        }
                        catch (Exception e)
                        {
                            service.Refresh();
                            if (service.Status != ServiceControllerStatus.Stopped && service.Status != ServiceControllerStatus.StopPending && logExceptions)
                                Log.EnqueueExceptionSafe(LogType.Warning, e, "Service stop failed.", ("Service", ServiceName));
                        }

                        try
                        {
                            service.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromMilliseconds(5000));
                        }
                        catch (Exception e)
                        {
                            service.Refresh();
                            if (service.Status != ServiceControllerStatus.Stopped && logExceptions)
                                Log.EnqueueExceptionSafe(LogType.Warning, e, "Service stop timeout exceeded.", ("Service", ServiceName));
                        }
                        try
                        {
                            var killServ = new TaskKillAction()
                            {
                                ProcessID = Win32.ServiceEx.GetServiceProcessId(service.ServiceName)
                            };
                            killServ.RunTask(logExceptions);
                        }
                        catch (Exception e)
                        {
                            service.Refresh();
                            if (service.Status != ServiceControllerStatus.Stopped && logExceptions)
                                Log.EnqueueExceptionSafe(LogType.Warning, e, "Could not kill service.", ("Service", ServiceName));
                        }
                    }
                }
                
                if (RegistryDelete)
                {
                    var action = new RegistryKeyAction()
                    {
                        KeyName = $@"HKLM\SYSTEM\CurrentControlSet\Services\{ServiceName}",
                        Operation = RegistryKeyOperation.Delete
                    };
                    action.RunTask();
                }
                else
                {
                    try
                    {
                        ServiceInstaller ServiceInstallerObj = new ServiceInstaller();
                        ServiceInstallerObj.Context = new InstallContext();
                        ServiceInstallerObj.ServiceName = service.ServiceName; 
                        ServiceInstallerObj.Uninstall(null);
                    }
                    catch (Exception e)
                    {
                        if (logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, e, "Service uninstall failed.", ("Service", ServiceName));
                    }
                }

            } else if (Operation == ServiceOperation.Start)
            {
                try
                {
                    service.Start();
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Running && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Service start failed.", ("Service", ServiceName));
                }
                
                try
                {
                    service.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromMilliseconds(5000));
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Running && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Service start timeout exceeded.", ("Service", ServiceName));
                }
            } else if (Operation == ServiceOperation.Stop)
            {
                if (RegexNoKill.Any(regex => Regex.Match(ServiceName, regex, RegexOptions.IgnoreCase).Success))
                {
                    Log.EnqueueSafe(LogType.Warning, "Skipped stopping critical service.", null, ("Service", ServiceName));
                    return;
                }
                
                try
                {
                    service.Stop();
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Stopped && service.Status != ServiceControllerStatus.StopPending && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Service stop failed.", ("Service", ServiceName));
                }

                try
                {
                    service.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromMilliseconds(5000));
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Stopped && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Service stop timeout exceeded.", ("Service", ServiceName));
                }
                try
                {
                    var killServ = new TaskKillAction()
                    {
                        ProcessID = Win32.ServiceEx.GetServiceProcessId(service.ServiceName)
                    };
                    killServ.RunTask(logExceptions);
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Stopped && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Could not kill dependent service.", ("Service", ServiceName));
                }
            } else if (Operation == ServiceOperation.Pause)
            {
                try
                {
                    service.Pause();
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Paused && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Service pause failed.", ("Service", ServiceName));
                }

                try
                {
                    service.WaitForStatus(ServiceControllerStatus.Paused, TimeSpan.FromMilliseconds(5000));
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Paused && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Service pause timeout exceeded.", ("Service", ServiceName));
                }
            }
            else if (Operation == ServiceOperation.Continue)
            {
                try
                {
                    service.Pause();
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Running && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Service continue failed.", ("Service", ServiceName));
                }
                
                try
                {
                    service.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromMilliseconds(5000));
                }
                catch (Exception e)
                {
                    service.Refresh();
                    if (service.Status != ServiceControllerStatus.Running && logExceptions)
                        Log.EnqueueExceptionSafe(LogType.Warning, e, "Service continue timeout exceeded.", ("Service", ServiceName));
                }
            }

            service?.Dispose();
            Thread.Sleep(100);
            
            InProgress = false;
            return;
        }
    }
}


================================================
FILE: Core/Actions/TaskKillAction.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Management;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using YamlDotNet.Serialization;
using Core;

namespace Core.Actions
{
    class TaskKillAction : ICoreAction
    {
        [DllImport("kernel32.dll", SetLastError=true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        static extern bool TerminateProcess(IntPtr hProcess, uint uExitCode);
        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern IntPtr OpenProcess(ProcessAccessFlags dwDesiredAccess,
            bool bInheritHandle, int dwProcessId);
        
        public enum ProcessAccessFlags : uint
        {
            QueryLimitedInformation = 0x1000
        }
        
        [DllImport("kernel32.dll", SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        static extern bool CloseHandle(IntPtr hObject);
        
        [YamlMember(typeof(string), Alias = "name")]
        public string? ProcessName { get; set; }
        
        [YamlMember(typeof(string), Alias = "pathContains")]
        public string? PathContains { get; set; }
        
        [YamlMember(typeof(string), Alias = "weight")]
        public int ProgressWeight { get; set; } = 2;
        public int GetProgressWeight() => ProgressWeight;

        private bool InProgress { get; set; }
        public void ResetProgress() => InProgress = false;
        
        public int? ProcessID { get; set; }
        
        public string ErrorString()
        {
            string text = $"TaskKillAction failed to kill processes matching '{ProcessName}'.";

            try
            {
                var processes = GetProcess().Select(process => process.ProcessName).Distinct().ToList();
                if (processes.Count > 1)
                {
                    text = $"TaskKillAction failed to kill processes:";
                    foreach (var process in processes)
                    {
                        text += "|NEWLINE|" + process;
                    }
                }
                else if (processes.Count == 1) text = $"TaskKillAction failed to kill process {processes[0]}.";
            } catch (Exception) { }

            return text;
        }

        public UninstallTaskStatus GetStatus()
        {
            if (InProgress)
            {
                return UninstallTaskStatus.InProgress;
            }

            List<Process> processToTerminate = new List<Process>();
            if (ProcessID.HasValue)
            {
                try { processToTerminate.Add(Process.GetProcessById((int)ProcessID)); } catch (Exception) { } 
            }
            else
            {
                processToTerminate = GetProcess().ToList();
            }

            return processToTerminate.Any() ? UninstallTaskStatus.ToDo : UninstallTaskStatus.Completed;
        }

        private List<Process> GetProcess()
        {
            if (ProcessID.HasValue)
            {
                var list = new List<Process>();
                try
                {
                    var process = Process.GetProcessById(ProcessID.Value);
                    if (ProcessName == null || process.ProcessName.Equals(ProcessName, StringComparison.OrdinalIgnoreCase))
                        list.Add(process);
                    else
                        return list;
                }
                catch (Exception e)
                {
                    return list;
                } 
            }
            
            if (ProcessName == null)
            {
                return new List<Process>();
            }
            
            if (ProcessName.EndsWith("*") && ProcessName.StartsWith("*")) return Process.GetProcesses().ToList()
                .Where(process => process.ProcessName.IndexOf(ProcessName.Trim('*'), StringComparison.CurrentCultureIgnoreCase) >= 0).ToList();
            if (ProcessName.EndsWith("*")) return Process.GetProcesses()
                .Where(process => process.ProcessName.StartsWith(ProcessName.TrimEnd('*'), StringComparison.CurrentCultureIgnoreCase)).ToList();
            if (ProcessName.StartsWith("*")) return Process.GetProcesses()
                .Where(process => process.ProcessName.EndsWith(ProcessName.TrimStart('*'), StringComparison.CurrentCultureIgnoreCase)).ToList();

            return Process.GetProcessesByName(ProcessName).ToList();
        } 
        [DllImport("kernel32.dll", SetLastError=true)]
        static extern bool IsProcessCritical(IntPtr hProcess, ref bool Critical);
        
        private readonly string[] RegexNoKill = { "lsass", "csrss", "winlogon", "TrustedUninstaller\\.CLI", "dwm", "conhost", "ame.?wizard", "ame.?assassin" };
        // These processes give access denied errors when getting their handle for IsProcessCritical.
        // TODO: Investigate how to properly acquire permissions.
        private readonly string[] RegexNotCritical = { "SecurityHealthService", "wscsvc", "MsMpEng", "SgrmBroker" };
        public void RunTask(bool logExceptions = true)
        {
            InProgress = true;
            
            if (string.IsNullOrEmpty(ProcessName) && ProcessID.HasValue)
            {

            }
            else
            {
                if (ProcessName != null && RegexNoKill.Any(regex => Regex.Match(ProcessName, regex, RegexOptions.IgnoreCase).Success))
                {
                    return;
                }
            }
            
            if (ProcessName != null)
            {
                //If the service is svchost, we stop the service instead of killing it.
                if (ProcessName.Equals("svchost", StringComparison.OrdinalIgnoreCase))
                {
                    try
                    {
                        if (ProcessID.HasValue)
                        {
                            foreach (var serviceName in Win32.ServiceEx.GetServicesFromProcessId(ProcessID.Value))
                            {
                                try
                                {
                                    var stopServ = new ServiceAction()
                                    {
                                        ServiceName = serviceName,
                                        Operation = ServiceOperation.Stop
                                    };
                                    stopServ.RunTask();
                                }
                                catch (Exception e)
                                {
                                    if (logExceptions)
                                        Log.EnqueueExceptionSafe(e, "Could not kill service " + serviceName);
                                }
                            }
                        }
                        else
                        {
                            foreach (var process in GetProcess())
                            {
                                foreach (var serviceName in Win32.ServiceEx.GetServicesFromProcessId(process.Id))
                                {
                                    try
                                    {
                                        var stopServ = new ServiceAction()
                                        {
                                            ServiceName = serviceName,
                                            Operation = ServiceOperation.Stop

                                        };
                                        stopServ.RunTask();
                                    }
                                    catch (Exception e)
                                    {
                                        if (logExceptions)
                                            Log.EnqueueExceptionSafe(e, "Could not kill service " + serviceName);
                                    }
                                }
                            }
                        }
                    }
                    catch (NullReferenceException e)
                    {
                        if (logExceptions)
                            Log.EnqueueExceptionSafe(e, $"Could not find service with PID {ProcessID.Value}.");
                    }

                    int i;
                    for (i = 0; i <= 6 && GetProcess().Any(); i++)
                    {
                        Thread.Sleep(100 * i);
                    }
                    if (i < 6)
                    {
                        InProgress = false;
                        return;
                    }
                }

                if (PathContains != null && !ProcessID.HasValue)
                {
                    var processes = GetProcess();

                    foreach (var process in processes.Where(x =>
                             {
                                 try
                                 {
                                     return x.MainModule.FileName.Contains(PathContains);
                                 }
                                 catch (Exception e)
                                 {
                                     return false;
                                 }
                             }))
                    {

                        if (!RegexNotCritical.Any(x => Regex.Match(process.ProcessName, x, RegexOptions.IgnoreCase).Success))
                        {
                            bool isCritical = false;
                            IntPtr hprocess = OpenProcess(ProcessAccessFlags.QueryLimitedInformation, false, process.Id);
                            IsProcessCritical(hprocess, ref isCritical);
                            CloseHandle(hprocess);
                            if (isCritical)
                            {
                                continue;
                            }
                        }
                        try
                        {
                            if (!TerminateProcess(process.Handle, 1) && logExceptions)
                                Log.EnqueueExceptionSafe(new Win32Exception(), $"Could not find service with PID {ProcessID.Value}.");
                        }
                        catch (Exception e)
                        {
                            if (logExceptions)
                                Log.EnqueueExceptionSafe(e);
                        }
                        try
                        {
                            process.WaitForExit(1000);
                        }
                        catch (Exception e)
                        {
                            if (logExceptions)
                                Log.EnqueueExceptionSafe(e);
                        }

                        if (process.ProcessName == "explorer") continue;

                        int i = 0;

                        while (i <= 3 && GetProcess().Any(x => x.Id == process.Id && x.ProcessName == process.ProcessName))
                        {
                            Wrap.ExecuteSafe(() => TerminateProcess(process.Handle, 1));
                            process.WaitForExit(500);
 
                            Thread.Sleep(100);
                            i++;
                        }
                        if (i >= 3 && logExceptions) Log.EnqueueSafe(LogType.Error, "Task kill timeout exceeded.", new SerializableTrace());

                    }
                    InProgress = false;
                    return;
                }
            }
            if (ProcessID.HasValue)
            {
                var process = Process.GetProcessById(ProcessID.Value);
                if (ProcessName != null && ProcessName.Equals("explorer", StringComparison.OrdinalIgnoreCase))
                {
                    try {
                        if (!TerminateProcess(process.Handle, 1) && logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, new Win32Exception(), "TerminateProcess failed with error code.", ("Process", ProcessName));

                        try
                        {
                            process.WaitForExit(1000);
                        }
                        catch (Exception e)
                        {
                            if (logExceptions)
                                Log.EnqueueExceptionSafe(LogType.Warning, e, "Error waiting for process exit.", ("Process", ProcessName));
                        }
                    }
                    catch (Exception e)
                    {
                        if (logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, e, "Could not open process handle.", ("Process", ProcessName));
                    }
                }
                else
                {
                    if (!RegexNotCritical.Any(x => Regex.Match(process.ProcessName, x, RegexOptions.IgnoreCase).Success))
                    {
                        bool isCritical = false;
                        try
                        {
                            IntPtr hprocess = OpenProcess(ProcessAccessFlags.QueryLimitedInformation, false, process.Id);
                            IsProcessCritical(hprocess, ref isCritical);
                            CloseHandle(hprocess);
                        }
                        catch (InvalidOperationException e)
                        {
                            if (logExceptions)
                                Log.EnqueueExceptionSafe(LogType.Warning, e, "Could not check if process is critical.", ("Process", ProcessName));
                            return;
                        }
                        if (isCritical)
                        {
                            Console.WriteLine($"{process.ProcessName} is a critical process, skipping...");
                            return;
                        }
                    }
                    try
                    {
                        if (!TerminateProcess(process.Handle, 1) && logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, new Win32Exception(), "TerminateProcess failed with error code.", ("Process", ProcessName));
                    }
                    catch (Exception e)
                    {
                        if (logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, e, "Could not open process handle.", ("Process", ProcessName));
                    }
                    try
                    {
                        process.WaitForExit(1000);
                    }
                    catch (Exception e)
                    {
                        if (logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, e, "Error waiting for process exit.", ("Process", ProcessName));
                    }
                }
                
                int i = 0;
                
                while (i <= 3 && GetProcess().Any(x => x.Id == process.Id && x.ProcessName == process.ProcessName))
                {
                    try
                    {
                        try
                        {
                            TerminateProcess(process.Handle, 1);
                        }
                        catch (Exception e)
                        {
                        }

                        process.WaitForExit(500);
                    }
                    catch (Exception e)
                    {
                    }
                    Thread.Sleep(100);
                    i++;
                }
                if (i >= 3 && logExceptions) Log.EnqueueSafe(LogType.Warning, "Task kill timeout exceeded.", new SerializableTrace(), ("Process", ProcessName));
            }
            else
            {
                var processes = GetProcess();

                foreach (var process in processes)
                {
                    if (!RegexNotCritical.Any(x => Regex.Match(process.ProcessName, x, RegexOptions.IgnoreCase).Success))
                    {
                        bool isCritical = false;
                        try
                        {
                            IntPtr hprocess = OpenProcess(ProcessAccessFlags.QueryLimitedInformation, false, process.Id);
                            IsProcessCritical(hprocess, ref isCritical);
                            CloseHandle(hprocess);
                        }
                        catch (InvalidOperationException e)
                        {
                            if (logExceptions)
                                Log.EnqueueExceptionSafe(LogType.Warning, e, "Could not check if process is critical.", ("Process", ProcessName));
                            continue;
                        }
                        if (isCritical)
                        {
                            continue;
                        }
                    }
                    try
                    {
                        if (!TerminateProcess(process.Handle, 1) && logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, new Win32Exception(), "TerminateProcess failed with error code.", ("Process", ProcessName));
                    }
                    catch (Exception e)
                    {
                        if (logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, e, "Could not open process handle.", ("Process", ProcessName));
                    }
                    try
                    {
                        process.WaitForExit(1000);
                    }
                    catch (Exception e)
                    {
                        if (logExceptions)
                            Log.EnqueueExceptionSafe(LogType.Warning, e, "Error waiting for process exit.", ("Process", ProcessName));
                    }
                    
                    if (process.ProcessName == "explorer") continue;

                    int i = 0;

                    while (i <= 3 && GetProcess().Any(x => x.Id == process.Id && x.ProcessName == process.ProcessName))
                    {
                        try
                        {
                            try
                            {
                                TerminateProcess(process.Handle, 1);
                            }
                            catch (Exception e)
                            {
                            }

                            process.WaitForExit(500);
                        }
                        catch (Exception e)
                        {
                        }
                        Thread.Sleep(100);
                        i++;
                    }
                    if (i >= 3 && logExceptions) Log.EnqueueSafe(LogType.Warning, "Task kill timeout exceeded.", new SerializableTrace(), ("Process", ProcessName));
                }
            }
            
            InProgress = false;
            return;
        }
    }
}


================================================
FILE: Core/Actions/UninstallTaskStatus.cs
================================================
namespace Core.Actions
{
    public enum UninstallTaskStatus
    {
        Completed,
        InProgress,
        ToDo
    }
}

================================================
FILE: Core/Core.projitems
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
    <HasSharedItems>true</HasSharedItems>
    <SharedGUID>EED9CB45-0811-459B-B543-34865080843E</SharedGUID>
  </PropertyGroup>
  <PropertyGroup Label="Configuration">
    <Import_RootNamespace>Core</Import_RootNamespace>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="$(MSBuildThisFileDirectory)Actions\CmdAction.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Actions\CoreActions.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Actions\RegistryKeyAction.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Actions\RegistryValueAction.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Actions\RunAction.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Actions\ServiceAction.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Actions\TaskKillAction.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Actions\UninstallTaskStatus.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Exceptions\UnexpectedException.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Helper\Interop\Helper.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Miscellaneous\Serializables.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Miscellaneous\StreamReaderWithPosition.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Miscellaneous\XmlDeserializer.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Services\Config.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Services\Log.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Services\Output.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Utilities\IdManagers.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Utilities\StringUtils.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Utilities\Wrap.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Win32\Win32.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="$(MSBuildThisFileDirectory)Helper\x64\Release\client-helper.dll">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
</Project>

================================================
FILE: Core/Core.shproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup Label="Globals">
        <ProjectGuid>{DEBB633C-F189-49AE-92DD-4EB71CECCF90}</ProjectGuid>
        <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
    </PropertyGroup>
    <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
            Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props"/>
    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props"/>
    <Import Project="Core.projitems" Label="Shared"/>
    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets"/>
</Project>


================================================
FILE: Core/Core.shproj.DotSettings
================================================
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
	<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=exceptions/@EntryIndexedValue">True</s:Boolean>
	<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=helper/@EntryIndexedValue">True</s:Boolean>
	<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=services/@EntryIndexedValue">True</s:Boolean>
	<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=utilities/@EntryIndexedValue">True</s:Boolean>
	<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=win32/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

================================================
FILE: Core/Exceptions/UnexpectedException.cs
================================================
using System;

namespace Core.Exceptions
{
    public class UnexpectedException : Exception
    {
        public UnexpectedException() : base() {}
        public UnexpectedException(string message) : base(message) {}
        public UnexpectedException(string message, Exception innerException) : base(message, innerException) {}
    }
}

================================================
FILE: Core/Helper/Interop/Helper.cs
================================================
using System;
using System.Globalization;
using System.Runtime.InteropServices;

namespace Core
{
    public static class Helper
    {
        [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
        [return: MarshalAs(UnmanagedType.BStr)]
        public static extern string FormatVolume(string letter, string formatType, uint allocationSize, string volumeLabel);

        [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
        [return: MarshalAs(UnmanagedType.BStr)]
        public static extern string DeletePartitions(uint driveIndex);

        /// <summary>
        /// Only supports REG_SZ, REG_MULTI_SZ (I think), DWORD, and QWORD value types.
        /// </summary>
        [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
        [return: MarshalAs(UnmanagedType.BStr)]
        public static extern string GetValue(IntPtr data, string key, string valueName);

        /// <summary>
        /// Gets all REG_SZ, REG_MULTI_SZ (I think), DWORD, and QWORD value types.
        /// The values are delimited by '\n', and the value name is separated from
        /// the value with the following 3 wide string: ":|:"
        /// </summary>
        [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
        [return: MarshalAs(UnmanagedType.BStr)]
        public static extern string GetValues(IntPtr data, string key);

        public static ulong GetDWordValue(IntPtr data, string key, string valueName) =>
            uint.Parse(GetValue(data, key, valueName), NumberStyles.HexNumber);

        public static ulong GetQWordValue(IntPtr data, string key, string valueName) =>
            ulong.Parse(GetValue(data, key, valueName), NumberStyles.HexNumber);
    }
}

================================================
FILE: Core/Helper/client-helper.sln
================================================

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33815.320
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client-helper", "client-helper.vcxproj", "{05923F4D-3076-42D0-A9B1-048AD50DF078}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x64 = Debug|x64
		Debug|x86 = Debug|x86
		Release|x64 = Release|x64
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{05923F4D-3076-42D0-A9B1-048AD50DF078}.Debug|x64.ActiveCfg = Release|x64
		{05923F4D-3076-42D0-A9B1-048AD50DF078}.Debug|x64.Build.0 = Release|x64
		{05923F4D-3076-42D0-A9B1-048AD50DF078}.Debug|x86.ActiveCfg = Debug|Win32
		{05923F4D-3076-42D0-A9B1-048AD50DF078}.Debug|x86.Build.0 = Debug|Win32
		{05923F4D-3076-42D0-A9B1-048AD50DF078}.Release|x64.ActiveCfg = Release|x64
		{05923F4D-3076-42D0-A9B1-048AD50DF078}.Release|x64.Build.0 = Release|x64
		{05923F4D-3076-42D0-A9B1-048AD50DF078}.Release|x86.ActiveCfg = Release|Win32
		{05923F4D-3076-42D0-A9B1-048AD50DF078}.Release|x86.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {35C6C359-0DA1-42E3-B516-582ADACF61E1}
	EndGlobalSection
EndGlobal


================================================
FILE: Core/Helper/client-helper.vcxproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <VCProjectVersion>16.0</VCProjectVersion>
    <Keyword>Win32Proj</Keyword>
    <ProjectGuid>{05923f4d-3076-42d0-a9b1-048ad50df078}</ProjectGuid>
    <RootNamespace>clienthelper</RootNamespace>
    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;_DEBUG;CLIENTHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableUAC>false</EnableUAC>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;NDEBUG;CLIENTHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableUAC>false</EnableUAC>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_DEBUG;CLIENTHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableUAC>false</EnableUAC>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>NDEBUG;CLIENTHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
      <LanguageStandard>Default</LanguageStandard>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableUAC>false</EnableUAC>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClInclude Include="framework.h" />
    <ClInclude Include="pch.h" />
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="dllmain.cpp" />
    <ClCompile Include="pch.cpp">
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
    </ClCompile>
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

================================================
FILE: Core/Helper/client-helper.vcxproj.filters
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Filter Include="Source Files">
      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
      <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
    </Filter>
    <Filter Include="Header Files">
      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
      <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
    </Filter>
    <Filter Include="Resource Files">
      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="framework.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="pch.h">
      <Filter>Header Files</Filter>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="dllmain.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="pch.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
  </ItemGroup>
</Project>

================================================
FILE: Core/Helper/dllmain.cpp
================================================
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}



================================================
FILE: Core/Helper/framework.h
================================================
#pragma once

#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>


================================================
FILE: Core/Helper/pch.cpp
================================================
#define _CRT_SECURE_NO_WARNINGS

#include "pch.h"


struct offsets {
    long  block_size;
    char  block_type[2]; // "lf" "il" "ri"
    short count;
    long  first;
    long  hash;
};

struct key_block {
    long  block_size;
    char  block_type[2]; // "nk"
    char  dummya[18];
    int   subkey_count;
    char  dummyb[4];
    int   subkeys;
    char  dummyc[4];
    int   value_count;
    int   offsets;
    char  dummyd[28];
    short len;
    short du;
    char  name;
};

struct value_block {
    long  block_size;
    char  block_type[2]; // "vk"
    short name_len;
    long  size;
    long  offset;
    long  value_type;
    short flags;
    short dummy;
    char  name;
};

LPWSTR walk(char* path, key_block* key, char* targetKey, int targetKeyLen, char* targetValue, bool firstLoop) {
    static  char* root, * full;
    if (firstLoop) {
        root = (char*)key - 0x20;
        full = path;
    }

    // add current key name to printed path
    memcpy(path++, "\\", 2); memcpy(path, &key->name, key->len); path += key->len;

    *path = 0;

    int pathLen = strlen(full);

    if (pathLen >= 6 && (pathLen - 6 > targetKeyLen || !(_strnicmp(full + 6, targetKey, pathLen - 6) == 0)))
        return NULL;

    if (pathLen < 6 || pathLen - 6 < targetKeyLen || !(_strnicmp(full + 6, targetKey, targetKeyLen) == 0)) {
        // for simplicity we can imagine keys as directories in filesystem and values
        // as files.
        // and since we already dumped values for this dir we will now iterate 
        // thru subdirectories in the same way

        offsets* item = (offsets*)(root + key->subkeys);

        for (int i = 0;i < item->count;i++) {
            // in case of too many subkeys this list contain just other lists
            offsets* subitem = (offsets*)((&item->first)[i] + root);

            // usual directory traversal  
            if (item->block_type[1] == 'f' || item->block_type[1] == 'h') {
                // for now we skip hash codes (used by regedit for faster search)
                LPWSTR result = walk(path, (key_block*)((&item->first)[i * 2] + root), targetKey, targetKeyLen, targetValue, false);
                if (result != NULL)
                    return result;
                
            }
            else for (int j = 0;j < subitem->count;j++) {
                // also ms had chosen to skip hashes altogether in this case 
                LPWSTR result = walk(path, (key_block*)((&subitem->first)[item->block_type[1] == 'i' ? j * 2 : j] + root), targetKey, targetKeyLen, targetValue, false);
                if (result != NULL)
                    return result;
            }
        }

        return NULL;
    }

    long totalSize = 0;
    for (int o = 0; targetValue == NULL && o < key->value_count;o++) {
        value_block* val = (value_block*)(((int*)(key->offsets + root + 4))[o] + root);

        int length = val->size & 0xffff;
        totalSize += length;
    }

    // print all contained values
    wchar_t* unicodeResult = targetValue == NULL ? new wchar_t[totalSize] {0} : NULL;

    for (int o = 0;o < key->value_count;o++) {

        value_block* val = (value_block*)(((int*)(key->offsets + root + 4))[o] + root);

        // we skip nodes without values
        if (!val->offset)  continue;

        // data are usually in separate blocks without types
        char* data = root + val->offset + 4;
        // but for small values MS added optimization where 
        // if bit 31 is set data are contained wihin the key itself to save space
        if (val->size & 1 << 31) {
            data = (char*)&val->offset;
        }

        // notice that we use memcopy for key/value names everywhere instead of strcat
        // reason is that malware/wiruses often write non nulterminated strings to
        // hide from win32 api
        //*path = '\\'; if (!val->name_len) *path = ' ';
        //memcpy(path + 1, &val->name, val->name_len); path[val->name_len + 1] = 0;

        //printf("%s [%d] = ", full, val->value_type);

        int length = val->size & 0xffff;

        //printf("%i\n", val->value_type);

        if (val->value_type != 1 && val->value_type != 7 &&
            val->value_type != 4 && val->value_type != 11)
            continue;

        if (targetValue == NULL) {
            // print types 1 and 7 as unicode strings  
            if (val->value_type == 1 || val->value_type == 7) {
                
                char* ansiResult = new char[length + 1] {0};

                for (int i = 0; i < length; i++) {
                    char concat[1];
                    sprintf(concat, "%c", data[i]);
                    strcat(ansiResult, concat);
                }


                size_t size = strlen(ansiResult) + 1;
                wchar_t* unicodePart = new wchar_t[size];

                size_t outSize;
                mbstowcs_s(&outSize, unicodePart, size, ansiResult, size - 1);

                char* name = new char[val->name_len + 1] {0};
                memcpy(name, &val->name, val->name_len); name[val->name_len] = 0;
                
                size_t nameSize = strlen(name) + 1;
                wchar_t* unicodeName = new wchar_t[nameSize] {0};
                mbstowcs_s(&outSize, unicodeName, nameSize, name, nameSize - 1);

                if (o != 0)
                    wcscat(unicodeResult, L"\n");

                wcscat(unicodeResult, unicodeName);
                wcscat(unicodeResult, L":|:");
                wcscat(unicodeResult, unicodePart);

                delete[] ansiResult;
                delete[] unicodePart;
                delete[] name;
                delete[] unicodeName;
            }
            else {
                char* ansiResult = new char[(length * 2) + 1] {0};

                unsigned int bits[4];
                unsigned int longBits[8];

                bool skip = false;

                int i;
                for (i = 0; i < length; i++) {
                    if (length == 4) {
                        bits[i] = data[i];
                        continue;
                    }
                    if (length == 8) {
                        longBits[i] = data[i];
                        continue;
                    }

                    skip = true;
                    delete[] ansiResult;
                    break;
                    char concat[12];
                    sprintf(concat, "%02X", data[i]);
                    strcat(ansiResult, concat);
                }
                if (skip)
                    continue;

                if (length == 4) {
                    unsigned int result = (bits[0] << 24) | (bits[1] << 16) | (bits[2] << 8) | bits[3];

                    unsigned int resultat = 0;
                    char* source, * destination;
                    int i;

                    source = (char*)&result;
                    destination = ((char*)&resultat) + sizeof(unsigned int);
                    for (i = 0; i < sizeof(unsigned int); i++)
                        *(--destination) = *(source++);

                    sprintf(ansiResult, "%X", resultat);
                }
                else if (length == 8) {
                    unsigned int shortPart = (longBits[0] << 24) | (longBits[1] << 16) | (longBits[2] << 8) | longBits[3];
                    unsigned int longPart = (longBits[4] << 24) | (longBits[5] << 16) | (longBits[6] << 8) | longBits[7];
                    unsigned long long result = (long long)shortPart << 32 | longPart;

                    unsigned long long resultat = 0;
                    char* source, * destination;
                    int i;

                    source = (char*)&result;
                    destination = ((char*)&resultat) + sizeof(unsigned long long);
                    for (i = 0; i < sizeof(unsigned long long); i++)
                        *(--destination) = *(source++);

                    sprintf(ansiResult, "%I64X", resultat);
                }

                size_t size = strlen(ansiResult) + 1;
                wchar_t* unicodePart = new wchar_t[size];

                size_t outSize;
                mbstowcs_s(&outSize, unicodePart, size, ansiResult, size - 1);

                char* name = new char[val->name_len + 1] {0};
                memcpy(name, &val->name, val->name_len); name[val->name_len] = 0;

                size_t nameSize = strlen(name) + 1;
                wchar_t* unicodeName = new wchar_t[nameSize] {0};
                mbstowcs_s(&outSize, unicodeName, nameSize, name, nameSize - 1);

                if (o != 0)
                    wcscat(unicodeResult, L"\n");

                wcscat(unicodeResult, unicodeName);
                wcscat(unicodeResult, L":|:");
                wcscat(unicodeResult, unicodePart);

                delete[] ansiResult;
                delete[] unicodePart;
                delete[] name;
                delete[] unicodeName;
            }
        }
        else if (_strnicmp(targetValue, &val->name, val->name_len) == 0) {
            // print types 1 and 7 as unicode strings  
            if (val->value_type == 1 || val->value_type == 7) {
                char* ansiResult = new char[length + 1] {0};

                for (int i = 0; i < length; i++) {
                    char concat[1];
                    sprintf(concat, "%c", data[i]);
                    strcat(ansiResult, concat);
                }

                
                size_t size = strlen(ansiResult) + 1;
                unicodeResult = new wchar_t[size] {0};

                size_t outSize;
                mbstowcs_s(&outSize, unicodeResult, size, ansiResult, size - 1);

                delete[] ansiResult;
                
                return unicodeResult;
            }
            else {
                char* ansiResult = new char[(length * 2) + 1] {0};

                unsigned int bits[4];
                unsigned int longBits[8];

                int i;
                for (i = 0; i < length; i++) {
                    if (length == 4) {
                        bits[i] = data[i];
                        continue;
                    }
                    if (length == 8) {
                        longBits[i] = data[i];
                        continue;
                    }
                    delete[] ansiResult;
                    return NULL;
                }

                if (length == 4) {
                    unsigned int result = (bits[0] << 24) | (bits[1] << 16) | (bits[2] << 8) | bits[3];

                    unsigned int resultat = 0;
                    char* source, * destination;
                    int i;

                    source = (char*)&result;
                    destination = ((char*)&resultat) + sizeof(unsigned int);
                    for (i = 0; i < sizeof(unsigned int); i++)
                        *(--destination) = *(source++);

                    sprintf(ansiResult, "%X", resultat);
                }
                else if (length == 8) {
                    unsigned int shortPart = (longBits[0] << 24) | (longBits[1] << 16) | (longBits[2] << 8) | longBits[3];
                    unsigned int longPart = (longBits[4] << 24) | (longBits[5] << 16) | (longBits[6] << 8) | longBits[7];
                    unsigned long long result = (long long)shortPart << 32 | longPart;

                    unsigned long long resultat = 0;
                    char* source, * destination;
                    int i;

                    source = (char*)&result;
                    destination = ((char*)&resultat) + sizeof(unsigned long long);
                    for (i = 0; i < sizeof(unsigned long long); i++)
                        *(--destination) = *(source++);

                    sprintf(ansiResult, "%I64X", resultat);
                }
                size_t size = strlen(ansiResult) + 1;
                unicodeResult = new wchar_t[size] {0};
                
                size_t outSize;
                mbstowcs_s(&outSize, unicodeResult, size, ansiResult, size - 1);
                
                delete[] ansiResult;
                
                return unicodeResult;
            }
        }
    }
    return unicodeResult;
}



#pragma comment(lib, "rpcrt4.lib")

#define SAFE_RELEASE(x)     if (x) { x->Release(); x = NULL; }
#define SAFE_FREE(x)        if (x) { CoTaskMemFree(x); }

BSTR GetVdsDiskInterface(
    DWORD driveIndex,
    const IID InterfaceIID,
    void** pInterfaceInstance
)
{
    wchar_t result[256] = L"Unknown error.";

    HRESULT hr;

    IVdsServiceLoader* pLoader;
    IVdsService* pService;
    IUnknown* pUnk;
    IVdsAsync* pAsync;
    IEnumVdsObject* pEnum;
    ULONG ulFetched;

    wchar_t physicalName[24];
    swprintf(physicalName, ARRAYSIZE(physicalName), L"\\\\?\\PhysicalDrive%lu", driveIndex);

    // Create a loader instance
    hr = CoCreateInstance(CLSID_VdsLoader,
        NULL,
        CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER,
        IID_IVdsServiceLoader,
        (void**)&pLoader
    );

    wcsncpy(result, L"CoCreateInstance failed.", 256);
    if (SUCCEEDED(hr))
    {
        // Load the service on the machine.
        hr = pLoader->LoadService(NULL, &pService);
        SAFE_RELEASE(pLoader);
        pLoader = NULL;

        wcsncpy(result, L"LoadService failed.", 256);
        if (SUCCEEDED(hr))
        {
            pService->WaitForServiceReady();

            hr = pService->QueryProviders(VDS_QUERY_SOFTWARE_PROVIDERS, &pEnum);
            pService->Release();
            if (SUCCEEDED(hr)) {
                while (pEnum->Next(1, &pUnk, &ulFetched) == S_OK) {
                    IVdsProvider* pProvider;
                    IVdsSwProvider* pSwProvider;
                    IEnumVdsObject* pEnumPack;
                    IUnknown* pPackUnk;

                    hr = pUnk->QueryInterface(IID_IVdsProvider, (void**)&pProvider);
                    pUnk->Release();
                    if (SUCCEEDED(hr)) {
                        hr = pProvider->QueryInterface(IID_IVdsSwProvider, (void**)&pSwProvider);
                        pProvider->Release();
                        if (SUCCEEDED(hr)) {
                            hr = pSwProvider->QueryPacks(&pEnumPack);
                            pSwProvider->Release();
                            if (SUCCEEDED(hr)) {
                                while (pEnumPack->Next(1, &pPackUnk, &ulFetched) == S_OK) {
                                    IVdsPack* pPack;
                                    IEnumVdsObject* pEnumDisk;
                                    IUnknown* pDiskUnk;

                                    hr = pPackUnk->QueryInterface(IID_IVdsPack, (void**)&pPack);
                                    pPackUnk->Release();
                                    if (SUCCEEDED(hr)) {
                                        hr = pPack->QueryDisks(&pEnumDisk);
                                        pPack->Release();
                                        if (SUCCEEDED(hr)) {
                                            while (pEnumDisk->Next(1, &pDiskUnk, &ulFetched) == S_OK) {
                                                VDS_DISK_PROP prop;
                                                IVdsDisk* pDisk;

                                                hr = pDiskUnk->QueryInterface(IID_IVdsDisk, (void**)&pDisk);
                                                pDiskUnk->Release();
                                                if (SUCCEEDED(hr)) {
                                                    hr = pDisk->GetProperties(&prop);
                                                    if ((hr != S_OK) && (hr != VDS_S_PROPERTIES_INCOMPLETE)) {
                                                        pDisk->Release();
                                                        continue;
                                                    }

                                                    hr = (HRESULT)_wcsicmp(physicalName, prop.pwszName);
                                                    CoTaskMemFree(prop.pwszName);

                                                    if (hr == S_OK) {
                                                        hr = pDisk->QueryInterface(InterfaceIID, pInterfaceInstance);
                                                        pDisk->Release();

                                                        if (SUCCEEDED(hr)) {
                                                            pEnumDisk->Release();
                                                            pEnumPack->Release();
                                                            pEnum->Release();
                                                            return SysAllocString(L"Success");
                                                        }
                                                    }
                                                    pDisk->Release();
                                                }
                                            }
                                            pEnumDisk->Release();
                                        }
                                    }
                                }
                                pEnumPack->Release();
                            }
                        }
                    }
                }
                pEnum->Release();
            }
        }
    }

    return result;
}

BSTR RefreshVds(
) {
    wchar_t result[256] = L"Unknown error.";

    HRESULT hr = S_FALSE;
    IVdsServiceLoader* pLoader;
    IVdsService* pService;

    hr = CoInitialize(NULL); // Will fail when called from C# since thread was already initialized from there

    if (true)
    {
        // Create a loader instance
        hr = CoCreateInstance(CLSID_VdsLoader,
            NULL,
            CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER,
            IID_IVdsServiceLoader,
            (void**)&pLoader
        );

        wcsncpy(result, L"CoCreateInstance failed.", 256);
        if (SUCCEEDED(hr))
        {
            // Load the service on the machine.
            hr = pLoader->LoadService(NULL, &pService);
            SAFE_RELEASE(pLoader);

            wcsncpy(result, L"LoadService failed.", 256);
            if (SUCCEEDED(hr))
            {
                pService->WaitForServiceReady();

                HRESULT hr1 = pService->Refresh();
                HRESULT hr2 = pService->Reenumerate();

                Sleep(1500);

                pService->Release();

                if (SUCCEEDED(hr1) && SUCCEEDED(hr2))
                    return SysAllocString(L"Success");
                if (!SUCCEEDED(hr1) && !SUCCEEDED(hr2))
                    return SysAllocString(L"Failed to refresh and renumerate disks.");
                if (!SUCCEEDED(hr1))
                    return SysAllocString(L"Failed to refresh disks.");
                if (!SUCCEEDED(hr2))
                    return SysAllocString(L"Failed to reenumerate disks.");
            }
        }
    }

    return SysAllocString(result);
}

BSTR CombineBSTRs(
    BSTR bstr1,
    BSTR bstr2,
    BOOL freeInput
)
{
    _bstr_t wrap1 = bstr1;
    _bstr_t wrap2 = bstr2;

    _bstr_t result = wrap1 + wrap2;

    if (freeInput) {
        SysFreeString(bstr1);
        SysFreeString(bstr2);
    }

    return result;
}

extern "C" {
    __declspec(dllexport) BSTR DeletePartitions(
        DWORD driveIndex
    ) 
    {
        //wchar_t result[256] = L"Unknown error.";

        HRESULT hr = S_FALSE;
        VDS_PARTITION_PROP* prop_array = NULL;
        LONG i, prop_array_size;
        IVdsAdvancedDisk* pAdvancedDisk = NULL;

        BSTR getResult = GetVdsDiskInterface(driveIndex, IID_IVdsAdvancedDisk, (void**)&pAdvancedDisk);
        if (wcscmp(getResult, L"Success") != 0)
            return CombineBSTRs(SysAllocString(L"Could not get VDS disk interface: "), getResult, true);
        if (pAdvancedDisk == NULL) {
            BSTR refreshResult = RefreshVds();
            SysFreeString(refreshResult);
            SysFreeString(getResult);
            getResult = GetVdsDiskInterface(driveIndex, IID_IVdsAdvancedDisk, (void**)&pAdvancedDisk);
            if (wcscmp(getResult, L"Success") != 0 || pAdvancedDisk == NULL) {
                return CombineBSTRs(SysAllocString(L"Could not get VDS disk interface after refresh: "), getResult, true);
            }
        }

        char erroredPartitions[128];
        BOOLEAN error = false;
        BSTR errorString = NULL;
        hr = pAdvancedDisk->QueryPartitions(&prop_array, &prop_array_size);
        if (SUCCEEDED(hr))
        {
            for (i = 0; i < prop_array_size; i++) {
                if (!SUCCEEDED(pAdvancedDisk->DeletePartition(prop_array[i].ullOffset, TRUE, TRUE))) {
                    if (!error)
                        errorString = SysAllocString(L"Could not remove partitions: ");

                    wchar_t partitionSize[256];
                    _swprintf(partitionSize, L"\n%d - %llu MB", i, (prop_array[i].ullSize / 1024) / 1024);

                    errorString = CombineBSTRs(errorString, SysAllocString(partitionSize), true);
                    error = true;
                }
            }
        }

        CoTaskMemFree(prop_array);
        pAdvancedDisk->Release();

        return error ? errorString : SysAllocString(L"Success");

    }

    __declspec(dllexport) BSTR FormatVolume(
        LPCWSTR letter,
        LPWSTR pwszFileSystemTypeName,
        UINT32 ulDesiredUnitAllocationSize,
        LPWSTR pwszLabel)
    {
        wchar_t result[256] = L"Unknown error.";

        HRESULT hr;
        HRESULT hrAsync;

        IVdsServiceLoader* pLoader;
        IVdsService* pService;
        IUnknown* pUnk;
        IVdsVolume* pVolume;
        IVdsVolumeMF3* pVolumeMF3;
        IVdsAsync* pAsync;

        VDS_ASYNC_OUTPUT AsyncOut;

        if (letter == NULL || pwszFileSystemTypeName == NULL)
        {
            return ::SysAllocString(L"Invalid parameters.");
        }

        // Convert drive letter from widechar
        char driveLetter;
        int bytesConverted;
        int res = wctomb_s(&bytesConverted, &driveLetter, sizeof(driveLetter), letter[0]);
        if (res != 0)
            return ::SysAllocString(L"Error converting letter.");

        hr = CoInitialize(NULL); // Will fail when called from C# since thread was already initialized from there

        if (true)
        {
            // Create a loader instance
            hr = CoCreateInstance(CLSID_VdsLoader,
                NULL,
                CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER,
                IID_IVdsServiceLoader,
                (void**)&pLoader
            );

            wcsncpy(result, L"CoCreateInstance failed.", 256);
            if (SUCCEEDED(hr))
            {
                // Load the service on the machine.
                hr = pLoader->LoadService(NULL, &pService);
                SAFE_RELEASE(pLoader);
                pLoader = NULL;

                wcsncpy(result, L"LoadService failed.", 256);
                if (SUCCEEDED(hr))
                {
                    pService->WaitForServiceReady();

                    // Access to volume interface via drive letter
                    VDS_DRIVE_LETTER_PROP mDriveLetterPropArray[1];
                    hr = pService->QueryDriveLetters(driveLetter, 1, mDriveLetterPropArray);
                    wcsncpy(result, L"QueryDriveLetters access failed.", 256);

                    if (SUCCEEDED(hr))
                    {
                        hr = pService->GetObject(mDriveLetterPropArray->volumeId, VDS_OT_VOLUME, &pUnk);

                        /*
                        WCHAR str[256];
                        StringFromGUID2(mDriveLetterPropArray->volumeId, str, _countof(str));
                        wprintf(str);
                        printf("\r\n%lu\r\n", hr);
                        printf("%lu\r\n", GetLastError());
                        */

                        wcsncpy(result, L"UuidFromString failed.", 256);
                        if (SUCCEEDED(hr))
                        {
                            hr = pUnk->QueryInterface(IID_IVdsVolume, (void**)&pVolume);
                            wcsncpy(result, L"QueryInterface failed.", 256);
                            if (SUCCEEDED(hr))
                            {
                                // Access volume format interface
                                hr = pVolume->QueryInterface(IID_IVdsVolumeMF3, (void**)&pVolumeMF3);
                                wcsncpy(result, L"QueryInterface MF3 failed.", 256);
                                if (SUCCEEDED(hr))
                                {
                                    // Execute format operation
                                    hr = pVolumeMF3->FormatEx2(
                                        pwszFileSystemTypeName,
                                        1,
                                        ulDesiredUnitAllocationSize,
                                        pwszLabel,
                                        VDS_FSOF_QUICK | VDS_FSOF_FORCE,
                                        &pAsync);
                                    hr = pAsync->Wait(&hrAsync, &AsyncOut);
#pragma region Error handling
                                    if (FAILED(hr))
                                    {
                                        wcsncpy(result, L"Failed to wait for asynchronous volume format completion.", 256);
                                    }
                                    else if (FAILED(hrAsync))
                                    {
                                        switch (hrAsync)
                                        {
                                        case VDS_E_NOT_SUPPORTED:
                                            wcsncpy(result, L"The operation is not supported by the object.", 256);
                                            break;
                                        case VDS_E_ACCESS_DENIED:
                                            wcsncpy(result, L"Access denied.", 256);
                                            break;
                                        case VDS_E_ACTIVE_PARTITION:
                                            break;
                                        default:
                                            wcsncpy(result, L"Error occurred in FormatEx2.", 256);
                                            break;
                                        }
                                    } else if (SUCCEEDED(hr))
                                    {
                                        wcsncpy(result, L"Success", 256);
                                    }
#pragma endregion
                                    SAFE_RELEASE(pVolumeMF3);
                                }

                                SAFE_RELEASE(pVolume);
                            }

                            SAFE_RELEASE(pUnk);
                        }
                    }

                    SAFE_RELEASE(pService);
                }
            }
            CoUninitialize();
        }

        return SysAllocString(result);
    }

    __declspec(dllexport) BSTR GetValue(
        char* data,
        LPWSTR key,
        LPWSTR valueName)
    {
        char keyBuffer[256];
        wcstombs(keyBuffer, key, 256);

        char valueBuffer[128];
        wcstombs(valueBuffer, valueName, 128);

        /*
        char memBuffer[30000];
        memcpy(memBuffer, data, sizeof(char) * 10000);

        memBuffer[sizeof(char) * 10000 - 1] = '\0';

        printf("\n");

        fwrite(memBuffer, sizeof(char), 10000, stdout);
        printf("\n");
        */

        char path[0x1000] = { 0 };

        // we just skip 1k header and start walking root key tree
        LPWSTR result = walk(path, (key_block*)(data + 0x1020), keyBuffer, strlen(keyBuffer), valueBuffer, true);

        if (result == NULL) {
            wcsncpy(result, L"NOT FOUND", 256);
        }
        BSTR returnValue = ::SysAllocString(result);
        delete[] result;

        return returnValue;
    }
    __declspec(dllexport) BSTR GetValues(
        char* data,
        LPWSTR key)
    {
        char keyBuffer[256];
        wcstombs(keyBuffer, key, 256);

        /*
        char memBuffer[30000];
        memcpy(memBuffer, data, sizeof(char) * 10000);

        memBuffer[sizeof(char) * 10000 - 1] = '\0';

        printf("\n");
        
        fwrite(memBuffer, sizeof(char), 10000, stdout);
        printf("\n");
        */

        char path[0x1000] = { 0 };

        // we just skip 1k header and start walking root key tree
        LPWSTR result = walk(path, (key_block*)(data + 0x1020), keyBuffer, strlen(keyBuffer), NULL, true);

        if (result == NULL) {
            wcsncpy(result, L"NOT FOUND", 256);
        }

        BSTR returnValue = ::SysAllocString(result);
        delete[] result;

        return returnValue;
    }
}


================================================
FILE: Core/Helper/pch.h
================================================
// pch.h: This is a precompiled header file.
// Files listed below are compiled only once, improving build performance for future builds.
// This also affects IntelliSense performance, including code completion and many code browsing features.
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
// Do not add files here that you will be updating frequently as this negates the performance advantage.

#ifndef PCH_H
#define PCH_H

// add headers that you want to pre-compile here
#include "framework.h"
#include <InitGuid.h>
#include <stdlib.h>
#include <vds.h>
#include <comdef.h>
#include <InitGuid.h>
#include <string.h>
#include <intrin.h>

#endif //PCH_H


================================================
FILE: Core/Miscellaneous/Serializables.cs
================================================
using System;
using System.Runtime.Serialization;
using JetBrains.Annotations;

namespace Core.Miscellaneous
{
    public static class Serializables
    {

                [Serializable]
                public class SerializableType : ISerializable
                {
                    [NonSerialized] public readonly Type Type;
                    public string TypeName { get; set; }
        
                    public SerializableType(Type type)
                    {
                        Type = type;
                        TypeName = type.AssemblyQualifiedName;
                    }
        
                    protected SerializableType(SerializationInfo info, StreamingContext context)
                    {
                        TypeName = info.GetString("TypeName");
                        Type = Type.GetType(TypeName);
                    }
        
                    public void GetObjectData(SerializationInfo info, StreamingContext context) => info.AddValue("TypeName", TypeName);
                }
                
                [Serializable]
                public class SerializableValue : ISerializable
                {
                    public SerializableType Type { get; set; }
                    [CanBeNull] public object Value { get; set; }
        
                    public SerializableValue(Type type, [CanBeNull] object value)
                    {
                        Type = new SerializableType(type);
                        Value = value;
                    }
                    public SerializableValue([NotNull] object value)
                    {
                        Type = new SerializableType(value.GetType());
                        Value = value;
                    }
        
                    protected SerializableValue(SerializationInfo info, StreamingContext context)
                    {
                        Type = (SerializableType)info.GetValue("Type", typeof(SerializableType));
                        Value = info.GetValue("Value", Type.Type);
                    }
        
                    public void GetObjectData(SerializationInfo info, StreamingContext context)
                    {
                        info.AddValue("Type", Type);
                        info.AddValue("Value", Value);
                    }
                }
            }
}


================================================
FILE: Core/Miscellaneous/StreamReaderWithPosition.cs
================================================
using System;
using System.Diagnostics.Contracts;
using System.IO;
using System.Reflection;
using System.Text;

namespace Core.Miscellaneous
{
    internal static class StreamReaderPosition
    {
        readonly static FieldInfo charPosField = typeof(StreamReader).GetField("charPos", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
        readonly static FieldInfo byteLenField = typeof(StreamReader).GetField("byteLen", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
        readonly static FieldInfo charBufferField = typeof(StreamReader).GetField("charBuffer", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
        internal static long GetPosition(this StreamReader reader)
        {
            // shift position back from BaseStream.Position by the number of bytes read
            // into internal buffer.
            int byteLen = (int)byteLenField.GetValue(reader);
            var position = reader.BaseStream.Position - byteLen;

            // if we have consumed chars from the buffer we need to calculate how many
            // bytes they represent in the current encoding and add that to the position.
            int charPos = (int)charPosField.GetValue(reader);
            if (charPos > 0)
            {
                var charBuffer = (char[])charBufferField.GetValue(reader);
                var encoding = reader.CurrentEncoding;
                var bytesConsumed = encoding.GetBytes(charBuffer, 0, charPos).Length;
                position += bytesConsumed;
            }

            return position;
        }

        internal static void SetPosition(this StreamReader reader, long position)
        {
            reader.DiscardBufferedData();
            reader.BaseStream.Seek(position, SeekOrigin.Begin);
        }
    }
    /// <summary>
    /// https://github.com/microsoft/referencesource/blob/master/mscorlib/system/io/streamreader.cs
    /// </summary>
    public class StreamReaderWithPosition : StreamReader
    {
        private readonly Stream stream;
        private readonly Encoding encoding;
        private Decoder decoder;
        private int charLen;
        private int charPos;
        private char[] charBuffer;
        private byte[] byteBuffer;
        // Record the number of valid bytes in the byteBuffer, for a few checks.
        private int byteLen;
        // This is used only for preamble detection
        private int bytePos;
        // Encoding's preamble, which identifies this encoding.
        private byte[] _preamble;
        // Whether we must still check for the encoding's given preamble at the
        // beginning of this file.
        private bool _checkPreamble;

        // Whether the stream is most likely not going to give us back as much 
        // data as we want the next time we call it.  We must do the computation
        // before we do any byte order mark handling and save the result.  Note
        // that we need this to allow users to handle streams used for an 
        // interactive protocol, where they block waiting for the remote end 
        // to send a response, like logging in on a Unix machine.
        public StreamReaderWithPosition(Stream stream, Encoding encoding) : base(stream, encoding)
        {
            this.stream = stream;
            this.encoding = encoding;
            decoder = encoding.GetDecoder();
            _preamble = encoding.GetPreamble();
            _checkPreamble = (_preamble.Length > 0);
            byteBuffer = new byte[1024];
            charBuffer = new char[encoding.GetMaxCharCount(1024)];
        }

        public long Position
        {
            get
            {
                var position = stream.Position - byteLen;
                if (charPos > 0)
                {
                    var bytesConsumed = encoding.GetBytes(charBuffer, 0, charPos).Length;
                    position += bytesConsumed;
                }
                return position;
            }
        }

        public void DiscardBuffered()
        {
            byteLen = 0;
            charLen = 0;
            charPos = 0;
            // in general we'd like to have an invariant that encoding isn't null. However,
            // for startup improvements for NullStreamReader, we want to delay load encoding. 
            if (encoding != null)
            {
                decoder = encoding.GetDecoder();
            }
        }

        private void CompressBuffer(int n)
        {
            Contract.Assert(byteLen >= n, "CompressBuffer was called with a number of bytes greater than the current buffer length.  Are two threads using this StreamReader at the same time?");
            Buffer.BlockCopy(byteBuffer, n, byteBuffer, 0, byteLen - n);
            byteLen -= n;
        }

        public void Seek(long offset)
        {
            DiscardBuffered();
            this.stream.Seek(offset, SeekOrigin.Begin);
        }

        // Trims the preamble bytes from the byteBuffer. This routine can be called multiple times
        // and we will buffer the bytes read until the preamble is matched or we determine that
        // there is no match. If there is no match, every byte read previously will be available 
        // for further consumption. If there is a match, we will compress the buffer for the 
        // leading preamble bytes
        private bool IsPreamble()
        {
            if (!_checkPreamble)
                return _checkPreamble;

            Contract.Assert(bytePos <= _preamble.Length, "_compressPreamble was called with the current bytePos greater than the preamble buffer length.  Are two threads using this StreamReader at the same time?");
            int len = (byteLen >= (_preamble.Length)) ? (_preamble.Length - bytePos) : (byteLen - bytePos);

            for (int i = 0; i < len; i++, bytePos++)
            {
                if (byteBuffer[bytePos] != _preamble[bytePos])
                {
                    bytePos = 0;
                    _checkPreamble = false;
                    break;
                }
            }

            Contract.Assert(bytePos <= _preamble.Length, "possible bug in _compressPreamble.  Are two threads using this StreamReader at the same time?");

            if (_checkPreamble)
            {
                if (bytePos == _preamble.Length)
                {
                    // We have a match
                    CompressBuffer(_preamble.Length);
                    bytePos = 0;
                    _checkPreamble = false;
                }
            }

            return _checkPreamble;
        }

        internal virtual int ReadBuffer()
        {
            charLen = 0;
            charPos = 0;

            if (!_checkPreamble)
                byteLen = 0;
            do
            {
                if (_checkPreamble)
                {
                    Contract.Assert(bytePos <= _preamble.Length, "possible bug in _compressPreamble.  Are two threads using this StreamReader at the same time?");
                    int len = stream.Read(byteBuffer, bytePos, byteBuffer.Length - bytePos);
                    Contract.Assert(len >= 0, "Stream.Read returned a negative number!  This is a bug in your stream class.");

                    if (len == 0)
                    {
                        // EOF but we might have buffered bytes from previous 
                        // attempt to detect preamble that needs to be decoded now
                        if (byteLen > 0)
                        {
                            charLen += decoder.GetChars(byteBuffer, 0, byteLen, charBuffer, charLen);
                            // Need to zero out the byteLen after we consume these bytes so that we don't keep infinitely hitting this code path
                            bytePos = byteLen = 0;
                        }

                        return charLen;
                    }

                    byteLen += len;
                }
                else
                {
                    Contract.Assert(bytePos == 0, "bytePos can be non zero only when we are trying to _checkPreamble.  Are two threads using this StreamReader at the same time?");
                    byteLen = stream.Read(byteBuffer, 0, byteBuffer.Length);
                    Contract.Assert(byteLen >= 0, "Stream.Read returned a negative number!  This is a bug in your stream class.");

                    if (byteLen == 0)  // We're at EOF
                        return charLen;
                }

                // Check for preamble before detect encoding. This is not to override the
                // user suppplied Encoding for the one we implicitly detect. The user could
                // customize the encoding which we will loose, such as ThrowOnError on UTF8
                if (IsPreamble())
                    continue;

                charLen += decoder.GetChars(byteBuffer, 0, byteLen, charBuffer, charLen);
            } while (charLen == 0);
            //Console.WriteLine("ReadBuffer called.  chars: "+charLen);
            return charLen;
        }
        public new bool EndOfStream
        {
            get
            {
                if (charPos < charLen)
                    return false;

                // This may block on pipes!
                int numRead = ReadBuffer();
                return numRead == 0;
            }
        }
        public override int Peek()
        {
            if (charPos == charLen)
            {
                if (ReadBuffer() == 0) return -1;
            }
            return charBuffer[charPos];
        }


        public override string ReadLine()
        {
            if (charPos == charLen)
            {
                if (ReadBuffer() == 0) return null;
            }

            StringBuilder sb = null;
            do
            {
                int i = charPos;
                do
                {
                    char ch = charBuffer[i];
                    // Note the following common line feed chars:
                    // \n - UNIX   \r\n - DOS   \r - Mac
                    if (ch == '\r' || ch == '\n')
                    {
                        String s;
                        if (sb != null)
                        {
                            sb.Append(charBuffer, charPos, i - charPos);
                            s = sb.ToString();
                        }
                        else
                        {
                            s = new String(charBuffer, charPos, i - charPos);
                        }
                        charPos = i + 1;
                        if (ch == '\r' && (charPos < charLen || ReadBuffer() > 0))
                        {
                            if (charBuffer[charPos] == '\n') charPos++;
                        }
                        return s;
                    }
                    i++;
                } while (i < charLen);
                i = charLen - charPos;
                if (sb == null) sb = new StringBuilder(i + 80);
                sb.Append(charBuffer, charPos, i);
            } while (ReadBuffer() > 0);
            return sb.ToString();
        }
    }
}

================================================
FILE: Core/Miscellaneous/XmlDeserializer.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace Core.Miscellaneous
{
    public abstract class XmlDeserializable : IXmlSerializable
    {
        public class XmlAllowInlineArrayItemAttribute : Attribute { }

        public class XmlRequiredAttribute : Attribute
        {
            public bool AllowEmptyString { get; set; }
            public XmlRequiredAttribute() => AllowEmptyString = true;
            public XmlRequiredAttribute(bool allowEmptyString) => AllowEmptyString = allowEmptyString;
        }
        
        [Obsolete("XmlDeserializable does not support XmlInclude.")]
        public class XmlIncludeAttribute : Attribute { }

        /// <summary>
        /// This method gets called upon after deserialization, but before Deserialize returns. This is a good place to throw exceptions to the Deserialize call.
        /// </summary>
        public virtual void Validate() { }

        public XmlSchema GetSchema() => null;

        public void ReadXml(XmlReader reader)
        {
            var properties = this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);

            var classType = reader.Name;
            List<string> assignedProperties = new List<string>();
            if (reader.HasAttributes)
            {
                while (reader.MoveToNextAttribute())
                {
                    var property = properties.FirstOrDefault(x => x.GetCustomAttribute<XmlIgnoreAttribute>() == null && (x.GetCustomAttributes<XmlAttributeAttribute>().FirstOrDefault(attr => !string.IsNullOrEmpty(attr.AttributeName) && attr.AttributeName == reader.Name) != null || (x.Name  == reader.Name && x.GetCustomAttribute<XmlAttributeAttribute>() != null))) ??
                        throw new XmlException($"Unrecognized attribute '{reader.Name}'");

                    if (assignedProperties.Contains(property.Name))
                        throw new XmlException($"Duplicate assignment for property '{property.Name}'");
                    assignedProperties.Add(property.Name);

                    property.SetValue(this, ReadContentValue(reader, property.PropertyType));
                }
            }

            while (true)
            {
                if (!MoveToNextElement(reader, classType))
                {
                    var requiredProperty = properties.FirstOrDefault(x =>
                        x.GetCustomAttribute<XmlIgnoreAttribute>() == null && x.GetCustomAttribute<XmlRequiredAttribute>() != null && (!assignedProperties.Contains(x.Name) || (x.PropertyType == typeof(string) && !x.GetCustomAttribute<XmlRequiredAttribute>().AllowEmptyString && string.IsNullOrWhiteSpace((string)x.GetValue(this)))));
                    if (requiredProperty != null && !assignedProperties.Contains(requiredProperty.Name)) 
                        throw new XmlException($"Required property '{requiredProperty.Name}' must be set.");
                    else if (requiredProperty != null)
                        throw new XmlException($"Property '{requiredProperty.Name}' must not be empty.");
                    
                    Validate();
                    return;
                }

                var property = properties.FirstOrDefault(x => x.GetCustomAttribute<XmlIgnoreAttribute>() == null && (x.GetCustomAttributes<XmlElementAttribute>().FirstOrDefault(attr => !string.IsNullOrEmpty(attr.ElementName) && attr.ElementName == reader.Name) != null || x.Name  == reader.Name)) ?? throw new XmlException($"Unrecognized element '{reader.Name}'");
                var elementName = string.IsNullOrEmpty(property.GetCustomAttribute<XmlElementAttribute>()?.ElementName) ? property.Name : property.GetCustomAttribute<XmlElementAttribute>()?.ElementName;
                
                if (!property.PropertyType.IsClass && reader.HasAttributes)
                    throw new XmlException($"Unexpected attributes found on XML element '{elementName}'");
                if (property.GetCustomAttribute<XmlAttributeAttribute>() != null && property.GetCustomAttribute<XmlElementAttribute>() == null)
                    throw new XmlException($"Property '{property.Name}' must be assigned as an XML attribute.");

                if (assignedProperties.Contains(property.Name))
                    throw new XmlException($"Duplicate assignment for property '{property.Name}'");
                assignedProperties.Add(property.Name);

                if (property.PropertyType.IsArray)
                {
                    IList arrayList = null;
                    var arrayItemType = property.PropertyType.GetElementType()!;
                    var arrayItemTypes = property.GetCustomAttributes(typeof(XmlArrayItemAttribute)).OfType<XmlArrayItemAttribute>().Select(x => x.Type).ToList();
                    arrayItemTypes.Add(arrayItemType);

                    reader.Read();
                    if (reader.NodeType == XmlNodeType.Text)
                    {
                        if (property.GetCustomAttribute<XmlAllowInlineArrayItemAttribute>() == null)
                            throw new XmlException($"Element '{elementName}' must be an array, not a single value.");

                        arrayList = Array.CreateInstance(arrayItemType, 1);
                        arrayList[0] = ReadContentValue(reader, arrayItemType);
                        property.SetValue(this, arrayList);
                    }

                    while (true)
                    {
                        if (!MoveToNextElement(reader, elementName))
                            break;

                        if (arrayList == null)
                            arrayList = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(new[] { property.PropertyType.GetElementType() }));

                        arrayList.Add(ReadElementValue(reader, arrayItemTypes));
                    }
                    if (arrayList != null)
                    {
                        Array array = Array.CreateInstance(arrayItemType, arrayList.Count);
                        arrayList.CopyTo(array, 0);
                        property.SetValue(this, array);
                    }
                }
                else
                    property.SetValue(this, ReadElementValue(reader, property.PropertyType));
            }
        }
        public void WriteXml(XmlWriter writer) => new XmlSerializer(this.GetType()).Serialize(writer, this);
        private static object ReadElementValue(XmlReader reader, Type type)
        {
            type = Nullable.GetUnderlyingType(type) ?? type;
            if (type.IsEnum)
                return Enum.Parse(type, reader.ReadElementContentAsString());
            if (type == typeof(Guid))
                return Guid.Parse(reader.ReadElementContentAsString());
            if (type.IsClass && type != typeof(string))
            {
                var serializer = new XmlSerializer(type, new XmlRootAttribute(reader.Name));
                try
                {
                    return serializer.Deserialize(reader);
                }
                catch (InvalidOperationException e)
                {
                    if (e.InnerException == null)
                        throw;
                    throw e.InnerException;
                }
            }

            return reader.ReadElementContentAs(type, null);
        }
        private static object ReadContentValue(XmlReader reader, Type type)
        {
            type = Nullable.GetUnderlyingType(type) ?? type;
            if (type.IsEnum)
                return Enum.Parse(type, reader.ReadContentAsString());
            if (type == typeof(Guid))
                return Guid.Parse(reader.ReadContentAsString());

            return reader.ReadContentAs(type, null);
        }
        private static object ReadElementValue(XmlReader reader, List<Type> types)
        {
            Type matchedType = types.FirstOrDefault(x => x.IsPrimitive || x == typeof(string) ? String.Equals(x.Name, reader.Name, StringComparison.OrdinalIgnoreCase) : x.Name == reader.Name);
            if (matchedType == null)
                throw new XmlException(types.Count > 1 ? $"Element '{reader.Name}' does not match any of the following:\r\n" + string.Join("\r\n", types.Select(x => x.Name)) :
                    $"Element '{reader.Name}' does not match expected type '{types.FirstOrDefault()?.Name}'");
            return ReadElementValue(reader, matchedType);
        }
        private bool MoveToNextElement(XmlReader reader, string enclosingElement)
        {
            if (reader.NodeType == XmlNodeType.EndElement && reader.Name == enclosingElement)
            {
                reader.ReadEndElement();
                return false;
            }
            reader.Read();
            while (reader.NodeType != XmlNodeType.Element)
            {
                if (reader.NodeType == XmlNodeType.EndElement && reader.Name == enclosingElement)
                {
                    reader.ReadEndElement();
                    return false;
                }
                if (!reader.Read())
                    throw new XmlException("Unexpected end of XML document.");

                if (reader.NodeType == XmlNodeType.Text)
                    throw new XmlException("Unexpected text.");
            }
            return true;
        }
    }
}


================================================
FILE: Core/Services/Config.cs
================================================
using System;
using System.Collections.Concurrent;
using System.Globalization;
using System.Runtime.Serialization;
using System.Threading;
using System.Xml;
using System.Xml.Serialization;

namespace Core
{
    /* TODO: Interprocess Config
    [Serializable]
    public class InterConfigObject<TType> : ISerializable
    {
        private TType _localValue;
        private string _name;
        public InterConfigObject(TType value, string name) => (_localValue, _name) = (value, name);

        public void Set(TType value)
        {
            _localValue = value;
        }
        public TType Get()
        {
            return _localValue;
        }

        protected InterConfigObject(SerializationInfo info, StreamingContext context)
        {
            _localValue = (TType)info.GetValue(_name, typeof(TType));
        }

        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue(_name, _localValue);
        }
    }

    public class WizardConfig
    {
        public InterConfigObject<string> VersionString = new InterConfigObject<string>("0.7.5", nameof(VersionString));
    }
    public static class Config
    {
        private static Thread _configThread = null;
        private static CancellationTokenSource _configThreadCancel = null;
        private static readonly BlockingCollection<InterConfigObject> Queue = new BlockingCollection<InterConfigObject>();

        private static object _lockObject = new object();
        public static Level Host;
        public static bool IsHost;
        public static bool IsWriter;

        private static void StartConfigThread(Level host, bool writer)
        {
            lock (_lockObject)
            {
                if (_configThread != null)
                    throw new Exception("Only one logging instance allowed.");

                Host = host;
                IsHost = host == InterLink.ApplicationLevel.ToLevel();
                IsWriter = writer;

                _configThreadCancel = new CancellationTokenSource();
                _configThread = new Thread(ThreadLoop) { IsBackground = true, CurrentUICulture = CultureInfo.InvariantCulture };
                _configThread.Start();
            }
        }

        private static void EndConfigThread()
        {
            lock (_lockObject)
            {
                _configThreadCancel.Cancel();
                if (!_configThread.Join(2000))
                    throw new TimeoutException("Log thread took too long to exit.");

                _configThread = null;
            }
        }

        private static void ThreadLoop()
        {
            foreach (var message in Queue.GetConsumingEnumerable(_configThreadCancel.Token))
            {
                if (IsWriter)
                {
                    try
                    {
                        XmlSerializer serializer = new XmlSerializer(typeof(Config));
                        using (XmlWriter writer = XmlWriter.Create(ConfigPath, new XmlWriterSettings() {Indent = true}))
                        {
                            serializer.Serialize(writer, Current);
                        }
                    }
                    catch (Exception e) { Log.EnqueueExceptionSafe(e); }
                }
                if (!IsHost)
                {
                    InterLink.ExecuteSafe()
                }
                Wrap.ExecuteSafe(() => Write(message));
            }
        }

          */
}


================================================
FILE: Core/Services/Log.cs
================================================
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Management;
using System.Reflection;
using System.Runtime.ExceptionServices;
using System.Runtime.Serialization;
using System.Security.AccessControl;
using System.Security.Cryptography;
using System.Security.Principal;
using System.Text;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
using System.Threading;
using Core.Miscellaneous;
using JetBrains.Annotations;
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
using YamlDotNet.Serialization;
using ThreadState = System.Threading.ThreadState;

namespace Core
{
    public enum LogType
    {
        Info,
        Warning,
        Error,
        Critical,
        Debug,
    }

    #region Serializables

    [Serializable]
    public class SerializableTrace : ICloneable
    {
        public TraceFrame[] Frames { get; set; }
        public string Source { get; set; }
        public SerializableThread Thread { get; set; }

        public object Clone()
        {
            TraceFrame[] cloneFrames = new TraceFrame[Frames.Length];
            Array.Copy(Frames, cloneFrames, Frames.Length);

            return new SerializableTrace()
            {
                Frames = cloneFrames,
                Source = Source,
                Thread = Thread
            };
        }

        [JsonConstructor]
        public SerializableTrace(SerializableThread thread) => Thread = thread;

        public SerializableTrace(string source = null, int skipFrames = 0, int takeFrames = Int32.MaxValue) : this(null, source, skipFrames + 1, takeFrames) { }

        public SerializableTrace(Exception exception, string source = null, int skipFrames = 0, int takeFrames = Int32.MaxValue)
        {
            Source = source ?? Log.CurrentSource;
            Thread = new SerializableThread(System.Threading.Thread.CurrentThread);

            var stackTrace = exception == null ? new StackTrace(1 + skipFrames, true) : new StackTrace(exception, skipFrames, true);
            if (exception != null && stackTrace.FrameCount == 0)
            {
                stackTrace = new StackTrace(1 + skipFrames, true);
                takeFrames = Math.Min(takeFrames, 5);
            }

            var trace = new EnhancedStackTrace(stackTrace);
            var frames = (EnhancedStackFrame[])trace.GetFrames();

            var frameList = new List<TraceFrame>();

            int taken = 0;
            foreach (var frame in frames)
            {
                if (taken >= takeFrames)
                    break;

                var methodName = frame.MethodInfo.Append(new StringBuilder(), false).ToString();
                frameList.Add(new TraceFrame()
                {
                    MethodName = methodName,
                    FileName = Path.GetFileName(frame.GetFileName()),
                    FileLineNumber = frame.GetFileLineNumber(),
                    FileColumnNumber = frame.GetFileColumnNumber(),
                });

                taken++;

                if (methodName.Contains("App.OnStartup(StartupEventArgs e)"))
                    break;
            }

            Frames = frameList.ToArray();
        }

        internal void Append(SerializableTrace append)
        {
            var frames = new TraceFrame[Frames.Length + append.Frames.Length + 1];

            int i;
            for (i = 0; i < append.Frames.Length; i++)
            {
                frames[i].MethodName = append.Frames[i].MethodName;
                frames[i].FileName = Path.GetFileName(append.Frames[i].FileName);
                frames[i].FileLineNumber = append.Frames[i].FileLineNumber;
                frames[i].FileColumnNumber = append.Frames[i].FileColumnNumber;
            }
            frames[i].MethodName = $"[{append.Source}]";
            i++;
            for (int j = 0; j < Frames.Length; j++, i++)
            {
                frames[i].MethodName = Frames[j].MethodName;
                frames[i].FileName = Path.GetFileName(Frames[j].FileName);
                frames[i].FileLineNumber = Frames[j].FileLineNumber;
                frames[i].FileColumnNumber = Frames[j].FileColumnNumber;
            }

            Frames = frames;
        }

        internal void Prepend(SerializableTrace prepend)
        {
            var frames = new TraceFrame[Frames.Length + prepend.Frames.Length + 1];

            int i;
            for (i = 0; i < Frames.Length; i++)
            {
                frames[i].MethodName = Frames[i].MethodName;
                frames[i].FileName = Path.GetFileName(Frames[i].FileName);
                frames[i].FileLineNumber = Frames[i].FileLineNumber;
                frames[i].FileColumnNumber = Frames[i].FileColumnNumber;
            }
            frames[i].MethodName = $"[{Source}]";
            i++;
            for (int j = 0; j < prepend.Frames.Length; j++, i++)
            {
                frames[i].MethodName = prepend.Frames[j].MethodName;
                frames[i].FileName = Path.GetFileName(prepend.Frames[j].FileName);
                frames[i].FileLineNumber = prepend.Frames[j].FileLineNumber;
                frames[i].FileColumnNumber = prepend.Frames[j].FileColumnNumber;
            }

            Frames = frames;
            Source = prepend.Source;
        }

        private string _stringValue { get; set; } = null;

        public override string ToString() => ToString(null);
        public string ToString([CanBeNull] string source)
        {
            if (_stringValue != null)
                return _stringValue;

            var threadString = Wrap.ExecuteSafe(() =>
            {
                return ((Thread.ApartmentState == ApartmentState.STA || Thread.ManagedThreadId == 1) &&
                        !Thread.IsBackground && !Thread.IsThreadPoolThread) ? "" :
                    Thread.ThreadState != System.Threading.ThreadState.Running && Thread.IsAlive ? $" ({Thread.ThreadState.ToString()} TID {Thread.ManagedThreadId})" : $" (TID {Thread.ManagedThreadId})";
            }).Value;

            var traceBuilder = new StringBuilder($"[{source ?? Source ?? (Log.CurrentSource + threadString)}]");
            var traceString = Wrap.ExecuteSafe(() =>
            {
                foreach (var frame in Frames.Reverse())
                {
                    var name = Log.RemoveParameterTypes(frame.MethodName);
                    if (String.IsNullOrWhiteSpace(name))
                        continue;

                    string fileName = Path.GetFileName(frame.FileName);
                    int lineNumber = frame.FileLineNumber;
                    traceBuilder.Append((traceBuilder.Length == 0 ? "" : " >" + Environment.NewLine) + name + (String.IsNullOrWhiteSpace(fileName) ? "" : " in " + fileName) + (lineNumber == 0 ? "" : ":" + lineNumber));
                }

                var traceString = traceBuilder.ToString();
                if (Regex.IsMatch(traceString, @"Wrap\.Execute[a-zA-Z]*Safe"))
                {
                    // Remove useless Polly execute lines
                    return Regex.Replace(traceString, @".*Polly\.ResiliencePipeline\.Execute.*\n", "");
                }

                return traceString;
            }).Value;

            _stringValue = traceString ?? traceBuilder.ToString();
            return _stringValue;
        }

        [Serializable]
        public struct TraceFrame
        {
            public string MethodName { get; set; }
            [CanBeNull] public string FileName { get; set; }
            public int FileLineNumber { get; set; }
            public int FileColumnNumber { get; set; }
        }

        [Serializable]
        public struct SerializableThread
        {
            public ApartmentState ApartmentState { get; set; }
            public int ManagedThreadId { get; set; }
            public bool IsBackground { get; set; }
            public bool IsThreadPoolThread { get; set; }
            public ThreadState ThreadState { get; set; }
            public bool IsAlive { get; set; }

            public SerializableThread(Thread thread)
            {
                ApartmentState = thread.GetApartmentState();
                ManagedThreadId = thread.ManagedThreadId;
                IsBackground = thread.IsBackground;
                IsThreadPoolThread = thread.IsThreadPoolThread;
                ThreadState = thread.ThreadState;
                IsAlive = thread.IsAlive;
            }
        }
    }

    [Serializable]
    public class SerializableException : Exception, IJsonOnDeserialized
    {
        public SerializableTrace Trace { get; set; }
        public string OriginalTraceString { get; set; }
        public Serializables.SerializableType OriginalType { get; set; }
        public new string Message { get; set; }

        [CanBeNull] public new SerializableException InnerException { get; set; } = null;
        [CanBeNull] public SerializableException[] AggregateInnerExceptions { get; set; } = null;

        [JsonIgnore] public bool WasDeserialized { get; set; } = false;

        [JsonConstructor]
        public SerializableException(Serializables.SerializableType originalType) => OriginalType = originalType;

        public void OnDeserialized()
        {
            SetMessage(this, Message);
            SetStackTrace(this, OriginalTraceString);
            typeof(Exception).GetField("_className", BindingFlags.NonPublic | BindingFlags.Instance)?.SetValue(this, OriginalType?.Type?.ToString() ?? "SerializableException");
            WasDeserialized = true;
        }

        public SerializableException([NotNull] Exception exception, string message = null) : this(exception, message, 0) { }

        private SerializableException([NotNull] Exception exception, string message = null, int skipFrames = 0) : base(message == null ? exception.Message : message.TrimEnd('.') + ": " + exception.Message)
        {
            Message = message == null ? exception.Message : message.TrimEnd('.') + ": " + exception.Message;
            
            if (exception is SerializableException serializableException)
            {
                this.Trace = (SerializableTrace)serializableException.Trace.Clone();
                this.OriginalTraceString = serializableException.OriginalTraceString;
                this.OriginalType = serializableException.OriginalType;
                this.Message = message == null ? serializableException.Message : message.TrimEnd('.') + ": " + serializableException.Message;
                this.InnerException = serializableException.InnerException;
                this.AggregateInnerExceptions = serializableException.AggregateInnerExceptions;
                this.Trace.Append(new SerializableTrace("Duplicated at", 1, 1));

                OnDeserialized();
                WasDeserialized = false;

                return;
            }

            if (exception is Win32Exception win32Exception)
            {
                var rawMessage = new Win32Exception(win32Exception.NativeErrorCode).Message;
                if (rawMessage != win32Exception.Message)
                {
                    // Message has been set manually by the Win32Exception constructor, so append the valuable win32 error message
                    Message = Message.TrimEnd('.') + ": " + rawMessage;
                }
            }

            if (exception.InnerException != null)
                InnerException = new SerializableException(exception.InnerException, null, skipFrames + 1);
            if (exception is AggregateException aggregateException)
                AggregateInnerExceptions = aggregateException.InnerExceptions.Select(x => new SerializableException(x, null, skipFrames + 1)).ToArray();

            Trace = new SerializableTrace(exception, null, skipFrames);
            OriginalType = new Serializables.SerializableType(exception.GetType());
            OriginalTraceString = exception.StackTrace;

            OnDeserialized();
            WasDeserialized = false;
        }

        private void SetStackTrace(Exception exception, string stackTrace)
        {
            var stackTraceField = typeof(Exception).GetField("_stackTraceString", BindingFlags.NonPublic | BindingFlags.Instance);
            if (stackTraceField != null && stackTrace != null)
                stackTraceField.SetValue(exception, null);
            var remoteStackTraceField = typeof(Exception).GetField("_remoteStackTraceString", BindingFlags.NonPublic | BindingFlags.Instance);
            if (remoteStackTraceField != null && stackTrace != null)
                remoteStackTraceField.SetValue(exception, stackTrace + Environment.NewLine);

            var stackTraceObjectField = typeof(Exception).GetField("_stackTrace", BindingFlags.NonPublic | BindingFlags.Instance);
            if (stackTraceObjectField != null && stackTrace != null)
                stackTraceObjectField.SetValue(exception, null);
        }

        private void SetMessage(Exception exception, string message)
        {
            var messageField = typeof(Exception).GetField("_message", BindingFlags.NonPublic | BindingFlags.Instance);
            if (messageField != null && message != null)
            {
                messageField.SetValue(exception, message);
            }
        }
    }

    #endregion

    public static class Log
    {
        public const string GlobalLog = @"%PROGRAMDATA%\AME\Logs\Log.yml";
        public static string CurrentSource { get; set; } = "Unknown";
        public static ILogMetadata MetadataSource = new LogMetadata();
        public static string LogFileOverride { get; set; } = null;

        private static Thread _logThread = null;
        private static CancellationTokenSource _logThreadCancel = null;
        private static readonly BlockingCollection<LogMessage> Queue = new BlockingCollection<LogMessage>();

        #region Public write methods

        public class LogOptions
        {
            public static LogOptions Default { get; } = new LogOptions()
            {
                LogFile = GlobalLog,
            };

            public LogOptions() { }
            public LogOptions(string logFile) => LogFile = logFile;
            public LogOptions(Output.OutputWriter writer) => OutputWriter = writer;
            public LogOptions(string logFile, Output.OutputWriter writer) => (OutputWriter, LogFile) = (writer, logFile);

            public string LogFile { get; set; }
            public Output.OutputWriter OutputWriter { get; set; }
            public string SourceOverride { get; set; } = null;
        }
        
        public static void EnqueueSafe(LogType type, [NotNull] string message, [CanBeNull] SerializableTrace trace, params (string Name, object Value)[] data) => EnqueueSafe(type, message, trace,null, data);
        public static void EnqueueSafe(LogType type, [NotNull] string message, [CanBeNull] SerializableTrace trace, [CanBeNull] LogOptions options = null, params (string Name, object Value)[] data)
        {
#if !DEBUG
            if (type == LogType.Debug)
                return;
#endif
            if (options?.OutputWriter != null)
            {
                WriteSafe(type, message, trace, options, data);
                return;
            }
            
            CheckLogThread();

            Queue.Add(new LogMessage { FilePath = options?.LogFile ?? LogOptions.Default.LogFile, Type = type, Message = message, Trace = trace, Time = DateTime.UtcNow, SourceOverride = options?.SourceOverride, Data = (data?.Length ?? 0) == 0 ? null : data.ToDictionary(tuple => tuple.Name, tuple => tuple.Value?.ToString() ?? "null") });
        }

        public static void EnqueueExceptionSafe(Exception exception, params (string Name, object Value)[] data) => EnqueueExceptionSafe(exception, null, null,null, data);
        public static void EnqueueExceptionSafe(Exception exception, [CanBeNull] string message, params (string Name, object Value)[] data) => EnqueueExceptionSafe(exception, message, null,null, data);
        public static void EnqueueExceptionSafe(Exception exception, [CanBeNull] LogOptions options = null, string source = null, params (string Name, object Value)[] data) => EnqueueExceptionSafe(exception, null, options, source, data);
        public static void EnqueueExceptionSafe(Exception exception, [CanBeNull] string message, [CanBeNull] LogOptions options = null, string source = null, params (string Name, object Value)[] data) => EnqueueExceptionSafe(LogType.Error, exception, message, options, source, data);
        public static void EnqueueExceptionSafe(LogType type, Exception exception, params (string Name, object Value)[] data) => EnqueueExceptionSafe(type, exception, null, null,null, data);
        public static void EnqueueExceptionSafe(LogType type, Exception exception, [CanBeNull] string message, params (string Name, object Value)[] data) => EnqueueExceptionSafe(type, exception, message, null,null, data);
        public static void EnqueueExceptionSafe(LogType type, Exception exception, [CanBeNull] LogOptions options = null, string source = null, params (string Name, object Value)[] data) => EnqueueExceptionSafe(type, exception, null, options, source, data);
        public static void EnqueueExceptionSafe(LogType type, Exception exception, [CanBeNull] string message, [CanBeNull] LogOptions options = null, string source = null, params (string Name, object Value)[] data)
        {
            if (exception == null && message == null)
                return;

            if (exception == null)
            {
                EnqueueSafe(LogType.Error, $"[Unknown] " + message, new SerializableTrace(source, 1), options, data);
                return;
            }

            if (options?.OutputWriter != null)
            {
                WriteExceptionSafe(type, exception, message, options, source, data);
                return;
            }
            
            string exceptionMessage = exception.GetRealMessage();
            if (message != null)
                exceptionMessage = message.TrimEnd('.') + ": " + exceptionMessage;
            
            var logMessage = new LogMessage() { Type = type, Message = $"[{exception.GetType().ToString().Split(new[] { '.', '+' }).Last()}] " + exceptionMessage, Trace = new SerializableTrace(exception, source ?? options?.SourceOverride, 1), Data = (data?.Length ?? 0) == 0 ? null : data.ToDictionary(tuple => tuple.Name, tuple => tuple.Value?.ToString() ?? "null"), FilePath = options?.LogFile ?? LogOptions.Default.LogFile, Time = DateTime.UtcNow, SourceOverride = source ?? options?.SourceOverride };

            if (exception is SerializableException serializableException)
            {
                logMessage = new LogMessage() { Type = type, Message = $"[{serializableException.OriginalType.Type.ToString().Split(new[] { '.', '+' }).Last()}] " + (exceptionMessage), Trace = serializableException.Trace, Data = (data?.Length ?? 0) == 0 ? null : data.ToDictionary(tuple => tuple.Name, tuple => tuple.Value?.ToString() ?? "null"), FilePath = options?.LogFile ?? LogOptions.Default.LogFile, Time = DateTime.UtcNow, SourceOverride = source ?? options?.SourceOverride };

                if (serializableException.AggregateInnerExceptions != null)
                    logMessage.Nested = serializableException.AggregateInnerExceptions.Select(x => new LogMessage() { Type = null, Time = null, Trace = x.Trace, Message = $"[(Aggregate) {x.OriginalType.Type.ToString().Split(new[] { '.', '+' }).Last()}] " + x.GetRealMessage() }).ToArray();
                if (serializableException.InnerException != null)
                {
                    var innerMessage = new LogMessage() { Type = null, Time = null, Trace = serializableException.InnerException.Trace, Message = $"[(Inner) {serializableException.InnerException.OriginalType.Type.ToString().Split(new[] { '.', '+' }).Last()}] " + serializableException.InnerException.GetRealMessage() };
                    logMessage.Nested = logMessage.Nested == null ? new[] { innerMessage } : logMessage.Nested.Concat(new[] { innerMessage }).ToArray();
                }
            }
            else if (exception is AggregateException aggregate)
            {
                logMessage.Nested = aggregate.InnerExceptions.Select(x => new LogMessage() { Type = null, Time = null, Trace = new SerializableTrace(x, null, 1), Message = $"[(Aggregate) {x.GetType().ToString().Split(new[] { '.', '+' }).Last()}] " + x.GetRealMessage()}).ToArray();

                if (aggregate.InnerException != null && !aggregate.InnerExceptions.Any(x => x == aggregate.InnerException))
                {
                    var innerMessage = new LogMessage() { Type = null, Time = null, Trace = new SerializableTrace(aggregate.InnerException, null, 1), Message = $"[(Inner) {aggregate.InnerException.GetType().ToString().Split(new[] { '.', '+' }).Last()}] " + aggregate.InnerException.GetRealMessage() };
                    logMessage.Nested = logMessage.Nested.Concat(new[] { innerMessage }).ToArray();
                }
            }
            else
            {
                if (exception.InnerException != null)
                {
                    var innerMessage = new LogMessage() { Type = null, Time = null, Trace = new SerializableTrace(exception.InnerException, null, 1), Message = $"[(Inner) {exception.InnerException.GetType().ToString().Split(new[] { '.', '+' }).Last()}] " + exception.InnerException.GetRealMessage() };
                    logMessage.Nested = new[] { innerMessage };
                }
            }

            CheckLogThread();
            Queue.Add(logMessage);
        }

        
        public static void WriteIf(bool condition, LogType type, [NotNull] string message, [CanBeNull] SerializableTrace trace = null, params (string Name, object Value)[] data)
        {
            if (condition)
                WriteSafe(type, message, trace, null, data);
        }

        public static void WriteSafe(LogType type, [NotNull] string message, [CanBeNull] SerializableTrace trace, params (string Name, object Value)[] data) => WriteSafe(type, message, trace,null, data);
        public static void WriteSafe(LogType type, [NotNull] string message, [CanBeNull] SerializableTrace trace, [CanBeNull] LogOptions options = null, params (string Name, object Value)[] data)
        {
#if !DEBUG
            if (type == LogType.Debug)
                return;
#endif

            var exception = Wrap.ExecuteSafe(() =>
            {
                var logMessage = new LogMessage { FilePath = options?.LogFile ?? LogOptions.Default.LogFile, Type = type, Message = message, Trace = trace, Time = DateTime.UtcNow, SourceOverride = options?.SourceOverride, Data = (data?.Length ?? 0) == 0 ? null : data.ToDictionary(tuple => tuple.Name, tuple => tuple.Value?.ToString() ?? "null") };

                Write(logMessage, options?.OutputWriter);
            });
            if (exception != null)
                Log.EnqueueExceptionSafe(exception, source: "Logger");
        }
        public static void WriteExceptionIf(bool condition, Exception exception, params (string Name, object Value)[] data) => WriteExceptionIf(condition, exception, null, data);
        public static void WriteExceptionIf(bool condition, Exception exception, [CanBeNull] string message, params (string Name, object Value)[] data)
        {
            if (condition)
                WriteExceptionSafe(exception, message, null, null, data);
        }
        
        public static void WriteExceptionSafe(Exception exception, params (string Name, object Value)[] data) => WriteExceptionSafe(exception, null, null,null, data);
        public static void WriteExceptionSafe(Exception exception, [CanBeNull] string message, params (string Name, object Value)[] data) => WriteExceptionSafe(exception, message, null,null, data);
        public static void WriteExceptionSafe(Exception exception, [CanBeNull] LogOptions options = null, string source = null, params (string Name, object Value)[] data) => WriteExceptionSafe(exception, null, options, source, data);
        public static void WriteExceptionSafe(Exception exception, [CanBeNull] string message, [CanBeNull] LogOptions options = null, string source = null, params (string Name, object Value)[] data) => WriteExceptionSafe(LogType.Error, exception, message, options, source, data);
        public static void WriteExceptionSafe(LogType type, Exception exception, params (string Name, object Value)[] data) => WriteExceptionSafe(type, exception, null, null,null, data);
        public static void WriteExceptionSafe(LogType type, Exception exception, [CanBeNull] string message, params (string Name, object Value)[] data) => WriteExceptionSafe(type, exception, message, null,null, data);
        public static void WriteExceptionSafe(LogType type, Exception exception, [CanBeNull] LogOptions options = null, string source = null, params (string Name, object Value)[] data) => WriteExceptionSafe(type, exception, null, options, source, data);
        public static void WriteExceptionSafe(LogType type, Exception exception, [CanBeNull] string message, [CanBeNull] LogOptions options = null, string source = null, params (string Name, object Value)[] data)
        {
            if (exception == null && message == null)
                return;

            if (exception == null)
            {
                WriteSafe(LogType.Error, $"[Unknown] " + message, new SerializableTrace(source, 1), options, data);
                return;
            }

            string exceptionMessage = exception.GetRealMessage();
            if (message != null)
                exceptionMessage = message.ToString().TrimEnd('.') + ": " + exceptionMessage;
            
            var logMessage = new LogMessage() { Type = type, Message = $"[{exception.GetType().ToString().Split(new[] { '.', '+' }).Last()}] " + exceptionMessage, Trace = new SerializableTrace(exception, source ?? options?.SourceOverride, 1), Data = (data?.Length ?? 0) == 0 ? null : data.ToDictionary(tuple => tuple.Name, tuple => tuple.Value?.ToString() ?? "null"), FilePath = options?.LogFile ?? LogOptions.Default.LogFile, Time = DateTime.UtcNow, SourceOverride = source ?? options?.SourceOverride };

            if (exception is SerializableException serializableException)
            {
                logMessage = new LogMessage() { Type = type, Message = $"[{serializableException.OriginalType.Type.ToString().Split(new[] { '.', '+' }).Last()}] " + exceptionMessage, Trace = serializableException.Trace, Data = (data?.Length ?? 0) == 0 ? null : data.ToDictionary(tuple => tuple.Name, tuple => tuple.Value?.ToString() ?? "null"), FilePath = options?.LogFile ?? LogOptions.Default.LogFile, Time = DateTime.UtcNow, SourceOverride = source ?? options?.SourceOverride };

                if (serializableException.AggregateInnerExceptions != null)
                    logMessage.Nested = serializableException.AggregateInnerExceptions.Select(x => new LogMessage() { Type = null, Time = null, Trace = x.Trace, Message = $"[(Aggregate) {x.OriginalType.Type.ToString().Split(new[] { '.', '+' }).Last()}] " + x.GetRealMessage() }).ToArray();
                if (serializableException.InnerException != null)
                {
                    var innerMessage = new LogMessage() { Type = null, Time = null, Trace = serializableException.InnerException.Trace, Message = $"[(Inner) {serializableException.InnerException.OriginalType.Type.ToString().Split(new[] { '.', '+' }).Last()}] " + serializableException.InnerException.GetRealMessage() };
                    logMessage.Nested = logMessage.Nested == null ? new[] { innerMessage } : logMessage.Nested.Concat(new[] { innerMessage }).ToArray();
                }
            }
            else if (exception is AggregateException aggregate)
            {
                logMessage.Nested = aggregate.InnerExceptions.Select(x => new LogMessage() { Type = null, Time = null, Trace = new SerializableTrace(x, null, 1), Message = $"[(Aggregate) {x.GetType().ToString().Split(new[] { '.', '+' }).Last()}] " + x.GetRealMessage()}).ToArray();

                if (aggregate.InnerException != null && !aggregate.InnerExceptions.Any(x => x == aggregate.InnerException))
                {
                    var innerMessage = new LogMessage() { Type = null, Time = null, Trace = new SerializableTrace(aggregate.InnerException, null, 1), Message = $"[(Inner) {aggregate.InnerException.GetType().ToString().Split(new[] { '.', '+' }).Last()}] " + aggregate.InnerException.GetRealMessage() };
                    logMessage.Nested = logMessage.Nested.Concat(new[] { innerMessage }).ToArray();
                }
            }
            else
            {
                if (exception.InnerException != null)
                {
                    var innerMessage = new LogMessage() { Type = null, Time = null, Trace = new SerializableTrace(exception.InnerException, null, 1), Message = $"[(Inner) {exception.InnerException.GetType().ToString().Split(new[] { '.', '+' }).Last()}] " + exception.InnerException.GetRealMessage() };
                    logMessage.Nested = new[] { innerMessage };
                }
            }

            var writeException = Wrap.ExecuteSafe(() => Write(logMessage, options?.OutputWriter));
            if (writeException != null)
                Log.EnqueueExceptionSafe(exception, source: "Logger");
        }

        private static string GetRealMessage(this Exception exception)
        {
            string exceptionMessage = exception.Message;

            if (exception is Win32Exception win32Exception)
            {
                var rawMessage = new Win32Exception(win32Exception.NativeErrorCode).Message;
                if (rawMessage != win32Exception.Message)
                {
                    // Message has been set manually by the Win32Exception constructor, so append the valuable win32 error message
                    exceptionMessage = exceptionMessage.TrimEnd('.') + ": " + rawMessage;
                }
            }
            return exceptionMessage;
        }

        /// <summary>
        /// Write header metadata to log file. This deletes any previous <b>filePath</b> file if present.
        /// <br/><br/>Note that any normal write/enqueue method will automatically write the metadata if this was
        /// not called previously.
        /// </summary>
        public static void WriteMetadata(string filePath)
        {
            var exception = Wrap.ExecuteSafe(() =>
            {
                var logMessage = new LogMessage { FilePath = filePath, Type = LogType.Info, Message = null, Trace = null, Time = default, Data = null };

                Write(logMessage, null, true);
            });
            if (exception != null)
                Log.EnqueueExceptionSafe(exception, source: "Logger");
        }

        #endregion

        #region Public helper methods

        public static SerializableTrace GetCurrentTrace() => new SerializableTrace();

        #endregion

        #region Private methods

        private static object _lockObject = new object();

        private static void CheckLogThread()
        {
            lock (_lockObject)
            {
                if (_logThread != null && !_logThread.IsAlive)
                    _logThread = null;
                if (_logThread == null)
                    StartLoggerThread();
            }
        }

        private static void StartLoggerThread()
        {
            lock (_lockObject)
            {
                if (_logThread != null)
                    throw new Exception("Only one logging instance allowed.");

                _logThreadCancel = new CancellationTokenSource();
                _logThread = new Thread(ThreadLoop) { IsBackground = true, CurrentUICulture = CultureInfo.InvariantCulture };
                _logThread.Start();
            }
        }

        private static void EndLoggerThread()
        {
            lock (_lockObject)
            {
                _logThreadCancel.Cancel();
                if (!_logThread.Join(2000))
                    throw new TimeoutException("Log thread took too long to exit.");

                _logThread = null;
            }
        }

        private static void ThreadLoop()
        {
            foreach (var message in Queue.GetConsumingEnumerable(_logThreadCancel.Token))
            {
                Wrap.ExecuteSafe(() => Write(message));
            }
        }

        private static readonly ISerializer _serializer = new SerializerBuilder().WithTypeConverter(new Converters.DateTimeConverter()).WithTypeConverter(new Converters.TraceConverter()).WithTypeConverter(new Converters.StringConverter()).ConfigureDefaultValuesHandling(DefaultValuesHandling.OmitNull).Build();

        private static void Write(LogMessage message, Output.OutputWriter outputWriter = null, bool metadataOnly = false)
        {
            Converters.TraceConverter.SourceOverride = message.SourceOverride;
            
            using var md5 = MD5.Create();

            var path = Wrap.ExecuteSafe(() =>
            {
                var fullPath = Path.GetFullPath(Environment.ExpandEnvironmentVariables(LogFileOverride ?? message.FilePath));

                if (!Directory.Exists(Path.GetDirectoryName(fullPath)))
                    Directory.CreateDirectory(Path.GetDirectoryName(fullPath)!);

                return fullPath;
            });
            if (path.Failed)
            {
                EnqueueExceptionSafe(path.Exception, source: "Logger");
                return;
            }

            byte[] hashBytes = md5.ComputeHash(Encoding.UTF8.GetBytes(path.Value));
            var hash = BitConverter.ToString(hashBytes).Replace("-", "").ToUpperInvariant();

            using (var mutex = new Mutex(false, "AME-File-" + hash))
            {
                try
                {
                    mutex.WaitOne();
                    
                    if (outputWriter != null)
                    {
                        long lineNumber = File.Exists(path.Value) ? Wrap.ExecuteSafe(() => File.ReadLines(path.Value).LongCount() + 2, -1).Value : 2;
                        outputWriter.WriteLineSafe(message.Type + $" | {Path.GetFileName(path.Value)}:{lineNumber}", message.Message);
                    }

                    int i;
                    for (i = 0; i != 10; i++)
                    {
                        StreamWriter writer = null;
                        try
                        {
                            string metadata = null;
                            if (!File.Exists(path.Value))
                            {
                                using (_ = File.Create(path.Value)) { }

                                FileInfo fileInfo = new FileInfo(path.Value);
                                FileSecurity fileSecurity = fileInfo.GetAccessControl();
                                fileSecurity.AddAccessRule(new FileSystemAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null),
                                    FileSystemRights.FullControl, AccessControlType.Allow));

                                fileInfo.SetAccessControl(fileSecurity);
                                
                                MetadataSource.Construct();
                                metadata = MetadataSource.Serialize(_serializer);
                            } else if (metadataOnly)
                            {
                                MetadataSource.Construct();
                                metadata = MetadataSource.Serialize(_serializer);
                            }
                            else
                            {
                                Wrap.ExecuteSafe(() => TrimLogFile(path.Value));
                            }
                            
                            writer = new StreamWriter(path.Value, !metadataOnly);

                            if (metadata != null)
                                writer.Write(metadata);

                            if (!metadataOnly)
                            {
                                var serialized = _serializer.Serialize(message);
                                if (serialized.Length > 10000)
                                {
                                    serialized = _serializer.Serialize(new LogMessage()
                                    {
                                        Message = "Log serialization exceeded 10000 characters.\r\nMessage: " + (message.Message.Length > 5000 ? message.Message.Take(5000) + "..." : message.Message) + (message.Trace == null ? string.Empty : "\r\nSource: " + message.Trace.Source),
                                        Type = LogType.Warning,
                                        Time = message.Time,
                                    });
                                }

                                writer.WriteLine("---"); // document separator
                                writer.Write(serialized);
                            }

                            writer.Flush();

                            break;
                        }
                        catch (Exception e)
                        {
                            if (_logThreadCancel.IsCancellationRequested)
                                return;

                            writer?.Dispose();
                            if (i == 8 && e is UnauthorizedAccessException ex)
                            {
                                EnqueueExceptionSafe(ex, null, "Logger", ("Path", path.Value));
                                path.Value += "x";
                            }
                            if (i == 9)
                                EnqueueExceptionSafe(e, null, "Logger", ("Path", path.Value));

                            Thread.Sleep(100);
                        }
                        finally
                        {
                            writer?.Dispose();
                        }
                    }
                }
                finally
                {
                    mutex.ReleaseMutex();
                }
            }
        }

        private static void TrimLogFile(string path)
        {
            const long maxBytes = 1 * 1024 * 1024; // 1MB
            var fileInfo = new FileInfo(path);

            if (fileInfo.Length > maxBytes)
            {
                Log.EnqueueSafe(LogType.Warning, "Log filesize exceeded 1MB.", new SerializableTrace("Logger"));

                const long bytesToRemoveMinimum = 100 * 1024; // 100KB
                const long startRemovingAtMinimum = 100 * 1024; // Start removing at ~100KB
                var remainingLog = new StringBuilder();
                bool shouldClearFile = false;

                using (var reader = new StreamReader(path))
                {
                    string line;
                    long totalBytesRead = 0;

                    // Collect bytes until we reach the start of block to be removed.
                    while ((line = reader.ReadLine()) != null)
                    {
                        totalBytesRead += Encoding.UTF8.GetByteCount(line + Environment.NewLine);

                        if (totalBytesRead >= startRemovingAtMinimum && line.StartsWith("---"))
                        {
                            break;
                        }

                        if (totalBytesRead < (maxBytes - bytesToRemoveMinimum))
                        {
                            remainingLog.AppendLine(line);
                        }
                        else
                        {
                            shouldClearFile = true;
                            break;
                        }
                    }

                    // Skip the block to be removed. Starts and ends with a line ---.
                    long bytesReadDuringRemoval = 0;
                    while (!shouldClearFile && (line = reader.ReadLine()) != null && (bytesReadDuringRemoval < bytesToRemoveMinimum || !line.StartsWith("---")))
                    {
                        bytesReadDuringRemoval += Encoding.UTF8.GetByteCount(line + Environment.NewLine);
                    }

                    // Read the rest of the file
                    if (!shouldClearFile && line != null) // Add the line beginning with --- to the remaining log
                    {
                        remainingLog.AppendLine(line);
                        remainingLog.AppendLine(reader.ReadToEnd());
                    }
                    else
                    {
                        shouldClearFile = true;
                    }
                }

                if (shouldClearFile)
                {
                    File.WriteAllText(path, string.Empty);
                }
                else
                {
                    using (var writer = new StreamWriter(path))
                    {
                        writer.Write(remainingLog.ToString());
                    }
                }
            }
        }

        internal static string RemoveParameterTypes(string name)
        {
            int firstPar = name.IndexOf('(');
            int lastPar = name.LastIndexOf(')');
    
            if (firstPar == -1 || lastPar == -1) return name;
    
            var paramsString = name.Substring(firstPar + 1, lastPar - firstPar - 1);
            var paramsArray = new
Download .txt
gitextract_dcyh09z4/

├── .gitea/
│   └── workflows/
│       └── github_mirror.yaml
├── .gitignore
├── Core/
│   ├── Actions/
│   │   ├── CmdAction.cs
│   │   ├── CoreActions.cs
│   │   ├── RegistryKeyAction.cs
│   │   ├── RegistryValueAction.cs
│   │   ├── RunAction.cs
│   │   ├── ServiceAction.cs
│   │   ├── TaskKillAction.cs
│   │   └── UninstallTaskStatus.cs
│   ├── Core.projitems
│   ├── Core.shproj
│   ├── Core.shproj.DotSettings
│   ├── Exceptions/
│   │   └── UnexpectedException.cs
│   ├── Helper/
│   │   ├── Interop/
│   │   │   └── Helper.cs
│   │   ├── client-helper.sln
│   │   ├── client-helper.vcxproj
│   │   ├── client-helper.vcxproj.filters
│   │   ├── dllmain.cpp
│   │   ├── framework.h
│   │   ├── pch.cpp
│   │   └── pch.h
│   ├── Miscellaneous/
│   │   ├── Serializables.cs
│   │   ├── StreamReaderWithPosition.cs
│   │   └── XmlDeserializer.cs
│   ├── Services/
│   │   ├── Config.cs
│   │   ├── Log.cs
│   │   └── Output.cs
│   └── Utilities/
│       ├── IdManagers.cs
│       ├── StringUtils.cs
│       └── Wrap.cs
├── Interprocess/
│   ├── InterLink.cs
│   ├── Interprocess.projitems
│   ├── Interprocess.shproj
│   ├── JsonSerializables.cs
│   ├── LevelController.cs
│   ├── Levels.cs
│   ├── Serialization.cs
│   ├── SynchronousIOCanceler.cs
│   └── Threads.cs
├── LICENSE.md
├── ManagedWimLib/
│   ├── Compressors/
│   │   ├── Compressor.cs
│   │   └── Decompressor.cs
│   ├── Helper.cs
│   ├── IterateCallback.cs
│   ├── ManagedWimLib.csproj
│   ├── ManagedWimLib.netfx.targets
│   ├── NUGET_README.md
│   ├── NativeStructs.cs
│   ├── NugetPack.cmd
│   ├── ProgressCallback.cs
│   ├── WimLibException.cs
│   ├── WimLibLoadManager.cs
│   ├── WimLibLoader.cs
│   └── WimStruct.cs
├── README.md
├── TrustedUninstaller.CLI/
│   ├── CLI.cs
│   ├── CommandLine.cs
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── TrustedUninstaller.CLI.csproj
│   └── app.manifest
├── TrustedUninstaller.Shared/
│   ├── Actions/
│   │   ├── AppxAction.cs
│   │   ├── CmdAction.cs
│   │   ├── DownloadAction.cs
│   │   ├── FileAction.cs
│   │   ├── LanguageAction.cs
│   │   ├── LineInFileAction.cs
│   │   ├── PowershellAction.cs
│   │   ├── RegistryKeyAction.cs
│   │   ├── RegistryValueAction.cs
│   │   ├── RunAction.cs
│   │   ├── ScheduledTaskAction.cs
│   │   ├── ServiceAction.cs
│   │   ├── ShortcutAction.cs
│   │   ├── SoftwareAction.cs
│   │   ├── SystemPackageAction.cs
│   │   ├── TaskAction.cs
│   │   ├── TaskKillAction.cs
│   │   ├── UpdateAction.cs
│   │   ├── UserAction.cs
│   │   └── WriteStatusAction.cs
│   ├── AmeliorationUtil.cs
│   ├── AugmentedProcess.cs
│   ├── ControlWriter.cs
│   ├── Defender.cs
│   ├── Exceptions/
│   │   ├── ErrorHandlingException.cs
│   │   ├── InvalidRegistryEntryException.cs
│   │   └── TaskInProgressException.cs
│   ├── Globals.cs
│   ├── ISO.cs
│   ├── NativeProcess.cs
│   ├── NtStatus.cs
│   ├── OOBE.cs
│   ├── Parser/
│   │   ├── PlaybookParser.cs
│   │   └── TaskActionResolver.cs
│   ├── Playbook.cs
│   ├── Predicates/
│   │   └── IPredicate.cs
│   ├── ProcessPrivilege.cs
│   ├── Properties/
│   │   ├── AssemblyInfo.cs
│   │   ├── uefi-ntfs-ame-old.img
│   │   └── uefi-ntfs-ame.img
│   ├── ProviderStatus.cs
│   ├── Requirements.cs
│   ├── Tasks/
│   │   ├── ITaskAction.cs
│   │   ├── OutputProcessor.cs
│   │   ├── TaskAction.cs
│   │   ├── TaskList.cs
│   │   ├── UninstallTask.cs
│   │   ├── UninstallTaskPrivilege.cs
│   │   └── UninstallTaskStatus.cs
│   ├── TrustedUninstaller.Shared.csproj
│   ├── USB/
│   │   ├── BZip2.cs
│   │   ├── Drive.cs
│   │   ├── Drivers.cs
│   │   ├── Format.cs
│   │   ├── ISO.cs
│   │   ├── ISOWIM.cs
│   │   ├── InterMethods.cs
│   │   ├── Interop.cs
│   │   ├── OSDownload.cs
│   │   └── USB.cs
│   ├── WimLib/
│   │   ├── Compressors/
│   │   │   ├── Compressor.cs
│   │   │   └── Decompressor.cs
│   │   ├── DynLoader/
│   │   │   ├── DynLoaderBase.cs
│   │   │   ├── LoadManagerBase.cs
│   │   │   ├── NativeMethods.cs
│   │   │   ├── PlatformConvention.cs
│   │   │   └── SafeLibHandle.cs
│   │   ├── Helper.cs
│   │   ├── IterateCallback.cs
│   │   ├── NativeStructs.cs
│   │   ├── ProgressCallback.cs
│   │   ├── WimLibException.cs
│   │   ├── WimLibLoadManager.cs
│   │   ├── WimLibLoader.cs
│   │   └── WimStruct.cs
│   ├── WimWrapper.cs
│   └── WinUtil.cs
└── TrustedUninstaller.sln
Download .txt
Showing preview only (208K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2239 symbols across 112 files)

FILE: Core/Actions/CmdAction.cs
  class CmdAction (line 13) | public class CmdAction : ICoreAction
    method GetProgressWeight (line 27) | public int GetProgressWeight() => ProgressWeight;
    method ResetProgress (line 30) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 38) | public string ErrorString() => $"CmdAction failed to run command '{Com...
    method GetStatus (line 40) | public UninstallTaskStatus GetStatus()
    method RunTask (line 50) | public void RunTask(bool logExceptions = true)
    method RunAsProcess (line 57) | private void RunAsProcess()
    method CmdRunning (line 146) | private static bool CmdRunning(int id)
    method ProcOutputHandler (line 158) | private void ProcOutputHandler(object sendingProcess, DataReceivedEven...

FILE: Core/Actions/CoreActions.cs
  type ICoreAction (line 5) | public interface ICoreAction
    method RunTask (line 7) | public void RunTask(bool logExceptions);
  class CoreActions (line 9) | public static class CoreActions
    method SafeRun (line 11) | public static void SafeRun(ICoreAction action, bool logExceptions = fa...

FILE: Core/Actions/RegistryKeyAction.cs
  type RegistryKeyOperation (line 18) | public enum RegistryKeyOperation
  class RegistryKeyAction (line 23) | public class RegistryKeyAction : ICoreAction
    method RunTaskOnMainThread (line 25) | public void RunTaskOnMainThread() { throw new NotImplementedException(...
    method GetProgressWeight (line 34) | public int GetProgressWeight() => ProgressWeight;
    method RegOpenKeyEx (line 45) | [DllImport("advapi32.dll", SetLastError = true)]
    method RegDeleteKeyEx (line 48) | [DllImport("advapi32.dll", EntryPoint = "RegDeleteKeyEx", SetLastError...
    method DeleteKeyTreeWin32 (line 54) | private static void DeleteKeyTreeWin32(string key, RegistryHive hive)
    method ResetProgress (line 67) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 69) | public string ErrorString() => $"RegistryKeyAction failed to {Operatio...
    method GetRoots (line 71) | private List<RegistryKey> GetRoots()
    method GetSubKey (line 91) | public string GetSubKey() => KeyName.Substring(KeyName.IndexOf('\\') +...
    method OpenSubKey (line 93) | private RegistryKey? OpenSubKey(RegistryKey root)
    method GetStatus (line 102) | public UninstallTaskStatus GetStatus()
    method RunTask (line 133) | public void RunTask(bool logExceptions = true)

FILE: Core/Actions/RegistryValueAction.cs
  type RegistryValueOperation (line 18) | public enum RegistryValueOperation
  type RegistryValueType (line 26) | public enum RegistryValueType
  class RegistryValueAction (line 38) | public class RegistryValueAction : ICoreAction
    method GetProgressWeight (line 57) | public int GetProgressWeight()
    method ResetProgress (line 76) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 78) | public string ErrorString() => $"RegistryValueAction failed to {Operat...
    method GetRoots (line 80) | private List<RegistryKey> GetRoots()
    method GetSubKey (line 100) | public string GetSubKey() => KeyName.Substring(KeyName.IndexOf('\\') +...
    method OpenSubKey (line 102) | private RegistryKey? OpenSubKey(RegistryKey root)
    method GetCurrentValue (line 111) | public object? GetCurrentValue(RegistryKey root)
    method StringToByteArray (line 117) | public static byte[] StringToByteArray(string hex) {
    method GetStatus (line 124) | public UninstallTaskStatus GetStatus()
    method RunTask (line 198) | public void RunTask(bool logExceptions = true)

FILE: Core/Actions/RunAction.cs
  class RunAction (line 11) | public class RunAction : ICoreAction
    method GetProgressWeight (line 45) | public int GetProgressWeight() => ProgressWeight;
    method ResetProgress (line 48) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 54) | public string ErrorString() => String.IsNullOrEmpty(Arguments) ? $"Run...
    method ExistsInPath (line 56) | public static bool ExistsInPath(string fileName)
    method GetStatus (line 73) | public UninstallTaskStatus GetStatus()
    method RunTask (line 83) | public void RunTask(bool logExceptions = true)
    method RunAsProcess (line 107) | private void RunAsProcess(string file)
    method ExeRunning (line 187) | private static bool ExeRunning(string name, int id)
    method ProcOutputHandler (line 199) | private void ProcOutputHandler(object sendingProcess, DataReceivedEven...

FILE: Core/Actions/ServiceAction.cs
  type ServiceOperation (line 21) | public enum ServiceOperation
  class ServiceAction (line 30) | public class ServiceAction : ICoreAction
    method RunTaskOnMainThread (line 32) | public void RunTaskOnMainThread() { throw new NotImplementedException(...
    method GetProgressWeight (line 53) | public int GetProgressWeight() => ProgressWeight;
    method ResetProgress (line 56) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 58) | public string ErrorString() => $"ServiceAction failed to {Operation.To...
    method GetService (line 60) | private ServiceController? GetService()
    method GetDevice (line 72) | private ServiceController? GetDevice()
    method GetStatus (line 85) | public UninstallTaskStatus GetStatus()
    method RunTask (line 145) | public void RunTask(bool logExceptions = true)

FILE: Core/Actions/TaskKillAction.cs
  class TaskKillAction (line 16) | class TaskKillAction : ICoreAction
    method TerminateProcess (line 18) | [DllImport("kernel32.dll", SetLastError=true)]
    method OpenProcess (line 21) | [DllImport("kernel32.dll", SetLastError = true)]
    type ProcessAccessFlags (line 25) | public enum ProcessAccessFlags : uint
    method CloseHandle (line 30) | [DllImport("kernel32.dll", SetLastError = true)]
    method GetProgressWeight (line 42) | public int GetProgressWeight() => ProgressWeight;
    method ResetProgress (line 45) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 49) | public string ErrorString()
    method GetStatus (line 70) | public UninstallTaskStatus GetStatus()
    method GetProcess (line 90) | private List<Process> GetProcess()
    method IsProcessCritical (line 123) | [DllImport("kernel32.dll", SetLastError=true)]
    method RunTask (line 130) | public void RunTask(bool logExceptions = true)

FILE: Core/Actions/UninstallTaskStatus.cs
  type UninstallTaskStatus (line 3) | public enum UninstallTaskStatus

FILE: Core/Exceptions/UnexpectedException.cs
  class UnexpectedException (line 5) | public class UnexpectedException : Exception
    method UnexpectedException (line 7) | public UnexpectedException() : base() {}
    method UnexpectedException (line 8) | public UnexpectedException(string message) : base(message) {}
    method UnexpectedException (line 9) | public UnexpectedException(string message, Exception innerException) :...

FILE: Core/Helper/Interop/Helper.cs
  class Helper (line 7) | public static class Helper
    method FormatVolume (line 9) | [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConv...
    method DeletePartitions (line 13) | [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConv...
    method GetValue (line 20) | [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConv...
    method GetValues (line 29) | [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConv...
    method GetDWordValue (line 33) | public static ulong GetDWordValue(IntPtr data, string key, string valu...
    method GetQWordValue (line 36) | public static ulong GetQWordValue(IntPtr data, string key, string valu...

FILE: Core/Helper/dllmain.cpp
  function BOOL (line 4) | BOOL APIENTRY DllMain( HMODULE hModule,

FILE: Core/Helper/pch.cpp
  type offsets (line 6) | struct offsets {
  type key_block (line 14) | struct key_block {
  type value_block (line 30) | struct value_block {
  function LPWSTR (line 42) | LPWSTR walk(char* path, key_block* key, char* targetKey, int targetKeyLe...
  function BSTR (line 350) | BSTR GetVdsDiskInterface(
  function BSTR (line 467) | BSTR RefreshVds(
  function BSTR (line 521) | BSTR CombineBSTRs(
  function BSTR (line 541) | __declspec(dllexport) BSTR DeletePartitions(
  function BSTR (line 592) | __declspec(dllexport) BSTR FormatVolume(
  function BSTR (line 732) | __declspec(dllexport) BSTR GetValue(
  function BSTR (line 768) | __declspec(dllexport) BSTR GetValues(

FILE: Core/Miscellaneous/Serializables.cs
  class Serializables (line 7) | public static class Serializables
    class SerializableType (line 10) | [Serializable]
      method SerializableType (line 16) | public SerializableType(Type type)
      method SerializableType (line 22) | protected SerializableType(SerializationInfo info, StreamingContext ...
      method GetObjectData (line 28) | public void GetObjectData(SerializationInfo info, StreamingContext c...
    class SerializableValue (line 31) | [Serializable]
      method SerializableValue (line 37) | public SerializableValue(Type type, [CanBeNull] object value)
      method SerializableValue (line 42) | public SerializableValue([NotNull] object value)
      method SerializableValue (line 48) | protected SerializableValue(SerializationInfo info, StreamingContext...
      method GetObjectData (line 54) | public void GetObjectData(SerializationInfo info, StreamingContext c...

FILE: Core/Miscellaneous/StreamReaderWithPosition.cs
  class StreamReaderPosition (line 9) | internal static class StreamReaderPosition
    method GetPosition (line 14) | internal static long GetPosition(this StreamReader reader)
    method SetPosition (line 35) | internal static void SetPosition(this StreamReader reader, long position)
  class StreamReaderWithPosition (line 44) | public class StreamReaderWithPosition : StreamReader
    method StreamReaderWithPosition (line 69) | public StreamReaderWithPosition(Stream stream, Encoding encoding) : ba...
    method DiscardBuffered (line 94) | public void DiscardBuffered()
    method CompressBuffer (line 107) | private void CompressBuffer(int n)
    method Seek (line 114) | public void Seek(long offset)
    method IsPreamble (line 125) | private bool IsPreamble()
    method ReadBuffer (line 159) | internal virtual int ReadBuffer()
    method Peek (line 223) | public override int Peek()
    method ReadLine (line 233) | public override string ReadLine()

FILE: Core/Miscellaneous/XmlDeserializer.cs
  class XmlDeserializable (line 12) | public abstract class XmlDeserializable : IXmlSerializable
    class XmlAllowInlineArrayItemAttribute (line 14) | public class XmlAllowInlineArrayItemAttribute : Attribute { }
    class XmlRequiredAttribute (line 16) | public class XmlRequiredAttribute : Attribute
      method XmlRequiredAttribute (line 19) | public XmlRequiredAttribute() => AllowEmptyString = true;
      method XmlRequiredAttribute (line 20) | public XmlRequiredAttribute(bool allowEmptyString) => AllowEmptyStri...
    class XmlIncludeAttribute (line 23) | [Obsolete("XmlDeserializable does not support XmlInclude.")]
    method Validate (line 29) | public virtual void Validate() { }
    method GetSchema (line 31) | public XmlSchema GetSchema() => null;
    method ReadXml (line 33) | public void ReadXml(XmlReader reader)
    method WriteXml (line 120) | public void WriteXml(XmlWriter writer) => new XmlSerializer(this.GetTy...
    method ReadElementValue (line 121) | private static object ReadElementValue(XmlReader reader, Type type)
    method ReadContentValue (line 145) | private static object ReadContentValue(XmlReader reader, Type type)
    method ReadElementValue (line 155) | private static object ReadElementValue(XmlReader reader, List<Type> ty...
    method MoveToNextElement (line 163) | private bool MoveToNextElement(XmlReader reader, string enclosingElement)

FILE: Core/Services/Log.cs
  type LogType (line 30) | public enum LogType
  class SerializableTrace (line 41) | [Serializable]
    method Clone (line 48) | public object Clone()
    method SerializableTrace (line 61) | [JsonConstructor]
    method SerializableTrace (line 64) | public SerializableTrace(string source = null, int skipFrames = 0, int...
    method SerializableTrace (line 66) | public SerializableTrace(Exception exception, string source = null, in...
    method Append (line 107) | internal void Append(SerializableTrace append)
    method Prepend (line 132) | internal void Prepend(SerializableTrace prepend)
    method ToString (line 160) | public override string ToString() => ToString(null);
    method ToString (line 161) | public string ToString([CanBeNull] string source)
    type TraceFrame (line 201) | [Serializable]
    type SerializableThread (line 210) | [Serializable]
      method SerializableThread (line 220) | public SerializableThread(Thread thread)
  class SerializableException (line 232) | [Serializable]
    method SerializableException (line 245) | [JsonConstructor]
    method OnDeserialized (line 248) | public void OnDeserialized()
    method SerializableException (line 256) | public SerializableException([NotNull] Exception exception, string mes...
    method SerializableException (line 258) | private SerializableException([NotNull] Exception exception, string me...
    method SetStackTrace (line 301) | private void SetStackTrace(Exception exception, string stackTrace)
    method SetMessage (line 315) | private void SetMessage(Exception exception, string message)
  class Log (line 327) | public static class Log
    class LogOptions (line 340) | public class LogOptions
      method LogOptions (line 347) | public LogOptions() { }
      method LogOptions (line 348) | public LogOptions(string logFile) => LogFile = logFile;
      method LogOptions (line 349) | public LogOptions(Output.OutputWriter writer) => OutputWriter = writer;
      method LogOptions (line 350) | public LogOptions(string logFile, Output.OutputWriter writer) => (Ou...
    method EnqueueSafe (line 357) | public static void EnqueueSafe(LogType type, [NotNull] string message,...
    method EnqueueSafe (line 358) | public static void EnqueueSafe(LogType type, [NotNull] string message,...
    method EnqueueExceptionSafe (line 375) | public static void EnqueueExceptionSafe(Exception exception, params (s...
    method EnqueueExceptionSafe (line 376) | public static void EnqueueExceptionSafe(Exception exception, [CanBeNul...
    method EnqueueExceptionSafe (line 377) | public static void EnqueueExceptionSafe(Exception exception, [CanBeNul...
    method EnqueueExceptionSafe (line 378) | public static void EnqueueExceptionSafe(Exception exception, [CanBeNul...
    method EnqueueExceptionSafe (line 379) | public static void EnqueueExceptionSafe(LogType type, Exception except...
    method EnqueueExceptionSafe (line 380) | public static void EnqueueExceptionSafe(LogType type, Exception except...
    method EnqueueExceptionSafe (line 381) | public static void EnqueueExceptionSafe(LogType type, Exception except...
    method EnqueueExceptionSafe (line 382) | public static void EnqueueExceptionSafe(LogType type, Exception except...
    method WriteIf (line 441) | public static void WriteIf(bool condition, LogType type, [NotNull] str...
    method WriteSafe (line 447) | public static void WriteSafe(LogType type, [NotNull] string message, [...
    method WriteSafe (line 448) | public static void WriteSafe(LogType type, [NotNull] string message, [...
    method WriteExceptionIf (line 464) | public static void WriteExceptionIf(bool condition, Exception exceptio...
    method WriteExceptionIf (line 465) | public static void WriteExceptionIf(bool condition, Exception exceptio...
    method WriteExceptionSafe (line 471) | public static void WriteExceptionSafe(Exception exception, params (str...
    method WriteExceptionSafe (line 472) | public static void WriteExceptionSafe(Exception exception, [CanBeNull]...
    method WriteExceptionSafe (line 473) | public static void WriteExceptionSafe(Exception exception, [CanBeNull]...
    method WriteExceptionSafe (line 474) | public static void WriteExceptionSafe(Exception exception, [CanBeNull]...
    method WriteExceptionSafe (line 475) | public static void WriteExceptionSafe(LogType type, Exception exceptio...
    method WriteExceptionSafe (line 476) | public static void WriteExceptionSafe(LogType type, Exception exceptio...
    method WriteExceptionSafe (line 477) | public static void WriteExceptionSafe(LogType type, Exception exceptio...
    method WriteExceptionSafe (line 478) | public static void WriteExceptionSafe(LogType type, Exception exceptio...
    method GetRealMessage (line 531) | private static string GetRealMessage(this Exception exception)
    method WriteMetadata (line 552) | public static void WriteMetadata(string filePath)
    method GetCurrentTrace (line 568) | public static SerializableTrace GetCurrentTrace() => new SerializableT...
    method CheckLogThread (line 576) | private static void CheckLogThread()
    method StartLoggerThread (line 587) | private static void StartLoggerThread()
    method EndLoggerThread (line 600) | private static void EndLoggerThread()
    method ThreadLoop (line 612) | private static void ThreadLoop()
    method Write (line 622) | private static void Write(LogMessage message, Output.OutputWriter outp...
    method TrimLogFile (line 743) | private static void TrimLogFile(string path)
    method RemoveParameterTypes (line 816) | internal static string RemoveParameterTypes(string name)
    type ILogMetadata (line 849) | public interface ILogMetadata
      method Serialize (line 851) | public string Serialize(ISerializer serializer);
      method Construct (line 852) | public void Construct();
    class LogMetadata (line 855) | [Serializable]
      method Construct (line 862) | public void Construct()
      method Serialize (line 869) | public string Serialize(ISerializer serializer) => serializer.Serial...
    class LogMessage (line 872) | [Serializable]
    class Converters (line 889) | private static class Converters
      class DateTimeConverter (line 891) | internal class DateTimeConverter : IYamlTypeConverter
        method Accepts (line 893) | public bool Accepts(Type type) => type == typeof(DateTime);
        method ReadYaml (line 895) | public object ReadYaml(IParser parser, Type type)
        method WriteYaml (line 900) | public void WriteYaml(IEmitter emitter, object value, Type type)
      class TraceConverter (line 910) | internal class TraceConverter : IYamlTypeConverter
        method Accepts (line 914) | public bool Accepts(Type type) => type == typeof(SerializableTrace);
        method ReadYaml (line 915) | public object ReadYaml(IParser parser, Type type) => null;
        method WriteYaml (line 917) | public void WriteYaml(IEmitter emitter, object value, Type type)
      class StringConverter (line 925) | internal class StringConverter : IYamlTypeConverter
        method Accepts (line 927) | public bool Accepts(Type type) => type == typeof(string);
        method ReadYaml (line 928) | public object ReadYaml(IParser parser, Type type) => null;
        method WriteYaml (line 930) | public void WriteYaml(IEmitter emitter, object value, Type type)

FILE: Core/Services/Output.cs
  class Output (line 18) | public static class Output
    method WriteAll (line 24) | public static void WriteAll([NotNull] string type, [CanBeNull] string ...
    method FlushAll (line 32) | public static void FlushAll()
    method SplitByLine (line 43) | public static string[] SplitByLine(this string text, StringSplitOption...
    method SplitByLength (line 48) | public static IEnumerable<string> SplitByLength(this string str, int m...
    type WriterLockPair (line 63) | private struct WriterLockPair
    class OutputWriter (line 71) | public class OutputWriter : IDisposable
      method OutputWriter (line 84) | private OutputWriter() {}
      method OutputWriter (line 85) | public OutputWriter([NotNull] string name, [NotNull] string outputFi...
      method WriteLineSafe (line 112) | public void WriteLineSafe([NotNull] string type, [CanBeNull] string ...
      method WriteLineRawSafe (line 119) | public void WriteLineRawSafe([CanBeNull] string text)
      method FlushSafe (line 126) | public void FlushSafe()
      method WriteBufferSafe (line 317) | private void WriteBufferSafe(string type, [CanBeNull] string text, b...
      method InsertBufferSafe (line 347) | private void InsertBufferSafe(string type, [CanBeNull] string text, ...
      method ShiftBytes (line 430) | private static void ShiftBytes(FileStream fs, long endPos, long shift)
      method GetID (line 466) | [CanBeNull]
      method Dispose (line 493) | public void Dispose()
      class LineStream (line 520) | public class LineStream : IDisposable
        method LineStream (line 526) | public LineStream([NotNull] OutputWriter writer, string type)
        method WriteSafe (line 538) | public void WriteSafe([CanBeNull] string text)
        method Erase (line 550) | public void Erase()
        method Dispose (line 564) | public void Dispose()

FILE: Core/Utilities/IdManagers.cs
  class IdManager (line 7) | public class IdManager
    method GenerateId (line 12) | public short GenerateId()
    method ReleaseId (line 30) | public void ReleaseId(short id)

FILE: Core/Utilities/StringUtils.cs
  class StringUtils (line 5) | public class StringUtils
    method HumanReadableBytes (line 7) | public static string HumanReadableBytes(ulong input)
    method HumanReadableDiskSize (line 21) | public static string HumanReadableDiskSize(long input)

FILE: Core/Utilities/Wrap.cs
  class Wrap (line 21) | public static class Wrap
    method Retry (line 41) | public static ResiliencePipeline Retry([Range(1, 1000)] int attempts =...
    method RetryWithTimeout (line 60) | public static ResiliencePipeline RetryWithTimeout(TimeSpan timeout, [R...
    method HelperRetry (line 79) | public static ResiliencePipeline<string> HelperRetry([Range(2, 1000)] ...
    method HelperRetryWithTimeout (line 112) | public static ResiliencePipeline<string> HelperRetryWithTimeout(TimeSp...
    method Win32IntegerRetry (line 144) | public static ResiliencePipeline<int> Win32IntegerRetry([Range(2, 1000...
    method Win32IntegerRetryWithTimeout (line 160) | public static ResiliencePipeline<int> Win32IntegerRetryWithTimeout(Tim...
    method Win32BoolRetry (line 175) | public static ResiliencePipeline<bool> Win32BoolRetry([Range(2, 1000)]...
    method Win32BoolRetryWithTimeout (line 191) | public static ResiliencePipeline<bool> Win32BoolRetryWithTimeout(TimeS...
    method Win32HandleRetry (line 206) | public static ResiliencePipeline<SafeHandle> Win32HandleRetry(int atte...
    method Win32HandleRetryWithTimeout (line 222) | public static ResiliencePipeline<SafeHandle> Win32HandleRetryWithTimeo...
    type SafeResult (line 236) | public struct SafeResult<TResult>
      method SafeResult (line 242) | public SafeResult(TResult result, Exception exception)
      method SafeResult (line 248) | internal SafeResult(SafeResult<TResult, object> result)
      method Failed (line 260) | public bool Failed() => Exception != null;
      method SafeResult (line 262) | public SafeResult(TResult result, Exception exception)
    type SafeResult (line 256) | public struct SafeResult<TResult, T>
      method SafeResult (line 242) | public SafeResult(TResult result, Exception exception)
      method SafeResult (line 248) | internal SafeResult(SafeResult<TResult, object> result)
      method Failed (line 260) | public bool Failed() => Exception != null;
      method SafeResult (line 262) | public SafeResult(TResult result, Exception exception)
    type SafeFallbackResult (line 270) | public struct SafeFallbackResult<TResult>
      method SafeFallbackResult (line 278) | public SafeFallbackResult(TResult result, Exception exception, Excep...
      method SafeFallbackResult (line 285) | internal SafeFallbackResult(SafeFallbackResult<TResult, object> result)
      method SafeFallbackResult (line 302) | public SafeFallbackResult(TResult result, Exception exception, Excep...
    type SafeFallbackResult (line 294) | public struct SafeFallbackResult<TResult, T>
      method SafeFallbackResult (line 278) | public SafeFallbackResult(TResult result, Exception exception, Excep...
      method SafeFallbackResult (line 285) | internal SafeFallbackResult(SafeFallbackResult<TResult, object> result)
      method SafeFallbackResult (line 302) | public SafeFallbackResult(TResult result, Exception exception, Excep...
    class DoubleException (line 310) | public class DoubleException : Exception
      method DoubleException (line 317) | public DoubleException(Exception primaryException, Exception fallbac...
      method DoubleException (line 331) | public DoubleException(Exception primaryException, Exception fallbac...
    class DoubleException (line 324) | public class DoubleException<T> : Exception
      method DoubleException (line 317) | public DoubleException(Exception primaryException, Exception fallbac...
      method DoubleException (line 331) | public DoubleException(Exception primaryException, Exception fallbac...
    method ExecuteSafe (line 349) | [NotNull]
    method ExecuteSafe (line 358) | [NotNull]
    method ExecuteSafe (line 379) | [NotNull]
    method ExecuteSafe (line 388) | [NotNull]
    method ExecuteSafe (line 409) | [CanBeNull]
    method ExecuteSafe (line 432) | [NotNull]
    method ExecuteSafe (line 441) | [NotNull]
    method ExecuteSafe (line 462) | [CanBeNull]
    method ExecuteWithFallbackSafe (line 491) | [NotNull]
    method ExecuteWithFallbackSafe (line 502) | [NotNull]
    method ExecuteWithFallbackSafe (line 539) | [NotNull]
    method ExecuteWithFallbackSafe (line 550) | [NotNull]
    method ExecuteWithFallbackSafe (line 587) | [CanBeNull]
    method ExecuteWithFallbackSafe (line 626) | [NotNull]
    method ExecuteWithFallbackSafe (line 636) | [NotNull]
    method ExecuteWithFallbackSafe (line 668) | [CanBeNull]
    method ExecuteWithFallback (line 707) | public static TResult ExecuteWithFallback<TResult>(this ResiliencePipe...
    method ExecuteWithFallback (line 741) | public static TResult ExecuteWithFallback<TResult>(this ResiliencePipe...
    method ExecuteWithFallback (line 775) | public static void ExecuteWithFallback(this ResiliencePipeline pipelin...
    method ExecuteWithFallback (line 809) | [NotNull]
    method ExecuteWithFallback (line 841) | public static void ExecuteWithFallback([NotNull] Action operation, [No...
    method ExecuteSafe (line 878) | [NotNull]
    method ExecuteSafe (line 887) | [NotNull]
    method ExecuteSafe (line 909) | [NotNull]
    method ExecuteSafe (line 918) | [NotNull]
    method ExecuteSafe (line 940) | [CanBeNull]
    method ExecuteSafe (line 964) | [NotNull]
    method ExecuteSafe (line 973) | [NotNull]
    method ExecuteSafe (line 995) | [CanBeNull]
    method ExecuteWithFallbackSafe (line 1025) | [NotNull]
    method ExecuteWithFallbackSafe (line 1036) | [NotNull]
    method ExecuteWithFallbackSafe (line 1076) | [NotNull]
    method ExecuteWithFallbackSafe (line 1087) | [NotNull]
    method ExecuteWithFallbackSafe (line 1127) | [CanBeNull]
    method ExecuteWithFallbackSafe (line 1170) | [NotNull]
    method ExecuteWithFallbackSafe (line 1180) | [NotNull]
    method ExecuteWithFallbackSafe (line 1215) | [CanBeNull]
    method ExecuteWithFallback (line 1257) | public static TResult ExecuteWithFallback<TResult>(this ResiliencePipe...
    method ExecuteWithFallback (line 1295) | public static TResult ExecuteWithFallback<TResult>(this ResiliencePipe...
    method ExecuteWithFallback (line 1333) | public static void ExecuteWithFallback(this ResiliencePipeline pipelin...
    method ExecuteWithFallback (line 1371) | [NotNull]
    method ExecuteWithFallback (line 1407) | public static void ExecuteWithFallback([NotNull] Action<CancellationTo...
    method ExecuteSafeAsync (line 1450) | [ItemNotNull]
    method ExecuteSafeAsync (line 1460) | [ItemNotNull]
    method ExecuteSafeAsync (line 1483) | [ItemNotNull]
    method ExecuteSafeAsync (line 1493) | [ItemNotNull]
    method ExecuteSafeAsync (line 1516) | [ItemCanBeNull]
    method ExecuteSafeAsync (line 1541) | [ItemNotNull]
    method ExecuteSafeAsync (line 1551) | [ItemNotNull]
    method ExecuteSafeAsync (line 1574) | [ItemCanBeNull]
    method ExecuteWithFallbackSafeAsync (line 1604) | [ItemNotNull]
    method ExecuteWithFallbackSafeAsync (line 1615) | [ItemNotNull]
    method ExecuteWithFallbackSafeAsync (line 1653) | [ItemNotNull]
    method ExecuteWithFallbackSafeAsync (line 1664) | [ItemNotNull]
    method ExecuteWithFallbackSafeAsync (line 1702) | [ItemCanBeNull]
    method ExecuteWithFallbackSafeAsync (line 1744) | [ItemNotNull]
    method ExecuteWithFallbackSafeAsync (line 1754) | [ItemNotNull]
    method ExecuteWithFallbackSafeAsync (line 1789) | [ItemCanBeNull]
    method ExecuteWithFallbackAsync (line 1832) | public static async Task<TResult> ExecuteWithFallbackAsync<TResult>(th...
    method ExecuteWithFallbackAsync (line 1870) | public static async Task ExecuteWithFallbackAsync(this ResiliencePipel...
    method ExecuteWithFallbackAsync (line 1908) | public static async Task<TResult> ExecuteWithFallbackAsync<TResult>([N...
    method ExecuteWithFallbackAsync (line 1943) | public static async Task ExecuteWithFallbackAsync([NotNull] Func<Cance...
    method ThrowIfNull (line 1978) | private static void ThrowIfNull<TArgument>(TArgument argument, string ...
  class SafeTask (line 1986) | public class SafeTask<TResult>
    method SafeTask (line 1989) | public SafeTask(Func<TResult> function, bool logExceptions, Log.LogOpt...
    method Start (line 1990) | public void Start() => Task.Start();
    method SafeTask (line 1995) | public SafeTask(Action action, bool logExceptions, Log.LogOptions logO...
    method Start (line 1996) | public void Start() => Task.Start();
    method Run (line 1998) | public static Task<Exception> Run(Action action, bool logExceptions = ...
    method Run (line 1999) | public static Task<Exception> Run(Action action, CancellationToken can...
    method Run (line 2000) | public static Task<Wrap.SafeResult<TResult>> Run<TResult>(Func<TResult...
    method Run (line 2001) | public static Task<Wrap.SafeResult<TResult>> Run<TResult>(Func<TResult...
    method Run (line 2003) | public static Task<Exception> Run(Func<Task> function, bool logExcepti...
    method Run (line 2004) | public static Task<Exception> Run(Func<Task> function, CancellationTok...
    method Run (line 2005) | public static Task<Wrap.SafeResult<TResult>> Run<TResult>(Func<Task<TR...
    method Run (line 2006) | public static Task<Wrap.SafeResult<TResult>> Run<TResult>(Func<Task<TR...
  class SafeTask (line 1992) | public class SafeTask
    method SafeTask (line 1989) | public SafeTask(Func<TResult> function, bool logExceptions, Log.LogOpt...
    method Start (line 1990) | public void Start() => Task.Start();
    method SafeTask (line 1995) | public SafeTask(Action action, bool logExceptions, Log.LogOptions logO...
    method Start (line 1996) | public void Start() => Task.Start();
    method Run (line 1998) | public static Task<Exception> Run(Action action, bool logExceptions = ...
    method Run (line 1999) | public static Task<Exception> Run(Action action, CancellationToken can...
    method Run (line 2000) | public static Task<Wrap.SafeResult<TResult>> Run<TResult>(Func<TResult...
    method Run (line 2001) | public static Task<Wrap.SafeResult<TResult>> Run<TResult>(Func<TResult...
    method Run (line 2003) | public static Task<Exception> Run(Func<Task> function, bool logExcepti...
    method Run (line 2004) | public static Task<Exception> Run(Func<Task> function, CancellationTok...
    method Run (line 2005) | public static Task<Wrap.SafeResult<TResult>> Run<TResult>(Func<Task<TR...
    method Run (line 2006) | public static Task<Wrap.SafeResult<TResult>> Run<TResult>(Func<Task<TR...

FILE: Interprocess/InterLink.cs
  type Mode (line 34) | public enum Mode
  type ConnectionAction (line 41) | public enum ConnectionAction
  class InterLink (line 61) | public static partial class InterLink
    method LaunchNode (line 86) | public static int LaunchNode(TargetLevel parentLevel, Expression<Func<...
    method LaunchNode (line 142) | [InterprocessMethod(Level.Any)]
    method LaunchNode (line 171) | public static int LaunchNode(Func<string, int> launchCode, Level level...
    method ShutdownNode (line 205) | public static void ShutdownNode(Level nodeLevel)
    method ChangeMode (line 214) | public static void ChangeMode(Mode mode) => _mode = mode;
    method RegisterDangerous (line 216) | public static void RegisterDangerous(Level level, int processId)
    method SendText (line 239) | public static void SendText(TargetLevel level, string text, int millis...
    method CancelPendingOperations (line 257) | public static void CancelPendingOperations(TargetLevel level, [NotNull...
    method SendTextSafe (line 263) | [ItemCanBeNull]
    method SendTextAsync (line 266) | public static async Task SendTextAsync(TargetLevel level, string text,...
    method SendTextAsyncSafe (line 284) | [ItemCanBeNull]
    method InitializeConnection (line 299) | public static async Task InitializeConnection(Level level, Mode mode, ...
    method InitializeConnection (line 310) | public static async Task InitializeConnection(Level currentLevel, Mode...
    method CloseConnection (line 371) | public static void CloseConnection(bool waitForExit)
    method RegisterToTarget (line 382) | public static async Task RegisterToTarget(TargetLevel level)
    method EnqueueSafe (line 413) | public static void EnqueueSafe(Expression<Func<Task>> operation, int e...
    method EnqueueSafe (line 414) | public static void EnqueueSafe<TResult>(Expression<Func<Task<TResult>>...
    method EnqueueSafe (line 415) | public static void EnqueueSafe<TResult>(Expression<Func<TResult>> oper...
    method EnqueueSafe (line 416) | public static void EnqueueSafe(Expression<Action> operation, int enque...
    method EnqueueSafe (line 417) | public static void EnqueueSafe(Expression<Func<Task>> operation, Targe...
    method EnqueueSafe (line 418) | public static void EnqueueSafe<TResult>(Expression<Func<Task<TResult>>...
    method EnqueueSafe (line 419) | public static void EnqueueSafe<TResult>(Expression<Func<TResult>> oper...
    method EnqueueSafe (line 420) | public static void EnqueueSafe(Expression<Action> operation, TargetLev...
    method EnqueueSafeCore (line 421) | private static void EnqueueSafeCore(Expression operation, TargetLevel ...
    method ExecuteSafe (line 433) | public static Wrap.SafeResult<TResult> ExecuteSafe<TResult>(Expression...
    method ExecuteSafe (line 434) | public static Wrap.SafeResult<TResult> ExecuteSafe<TResult>(Expression...
    method Execute (line 435) | public static TResult Execute<TResult>(Expression<Func<TResult>> opera...
    method Execute (line 436) | public static TResult Execute<TResult>(Expression<Func<TResult>> opera...
    method ExecuteSafe (line 466) | public static Wrap.SafeResult<TResult> ExecuteSafe<TResult>(Expression...
    method ExecuteSafe (line 467) | public static Wrap.SafeResult<TResult> ExecuteSafe<TResult>(Expression...
    method Execute (line 468) | public static TResult Execute<TResult>(Expression<Func<Task<TResult>>>...
    method Execute (line 469) | public static TResult Execute<TResult>(Expression<Func<Task<TResult>>>...
    method ExecuteSafeAsync (line 499) | public static Task<Wrap.SafeResult<TResult>> ExecuteSafeAsync<TResult>...
    method ExecuteSafeAsync (line 500) | public static Task<Wrap.SafeResult<TResult>> ExecuteSafeAsync<TResult>...
    method ExecuteAsync (line 501) | public static Task<TResult> ExecuteAsync<TResult>(Expression<Func<TRes...
    method ExecuteAsync (line 502) | public static async Task<TResult> ExecuteAsync<TResult>(Expression<Fun...
    method ExecuteSafeAsync (line 533) | public static Task<Wrap.SafeResult<TResult>> ExecuteSafeAsync<TResult>...
    method ExecuteSafeAsync (line 534) | public static Task<Wrap.SafeResult<TResult>> ExecuteSafeAsync<TResult>...
    method ExecuteAsync (line 535) | public static Task<TResult> ExecuteAsync<TResult>(Expression<Func<Task...
    method ExecuteAsync (line 536) | public static async Task<TResult> ExecuteAsync<TResult>(Expression<Fun...
    method ExecuteSafe (line 567) | public static Exception ExecuteSafe(Expression<Action> operation, bool...
    method ExecuteSafe (line 568) | public static Exception ExecuteSafe(Expression<Action> operation, Targ...
    method Execute (line 569) | public static void Execute(Expression<Action> operation, bool logExcep...
    method Execute (line 570) | public static void Execute(Expression<Action> operation, TargetLevel l...
    method ExecuteSafeAsync (line 598) | public static Task<Exception> ExecuteSafeAsync(Expression<Action> oper...
    method ExecuteSafeAsync (line 599) | public static Task<Exception> ExecuteSafeAsync(Expression<Action> oper...
    method ExecuteAsync (line 600) | public static Task ExecuteAsync(Expression<Action> operation, bool log...
    method ExecuteAsync (line 601) | public static async Task ExecuteAsync(Expression<Action> operation, Ta...
    method ExecuteDisposableSafe (line 631) | public static Wrap.SafeResult<TResult> ExecuteDisposableSafe<TResult>(...
    method ExecuteDisposableSafe (line 633) | public static Wrap.SafeResult<TResult> ExecuteDisposableSafe<TResult>(...
    method ExecuteDisposableSafe (line 635) | public static Exception ExecuteDisposableSafe(TargetLevel parentLevel,...
    method ExecuteDisposableSafeAsync (line 637) | public static Task<Wrap.SafeResult<TResult>> ExecuteDisposableSafeAsyn...
    method ExecuteDisposableSafeAsync (line 639) | public static Task<Wrap.SafeResult<TResult>> ExecuteDisposableSafeAsyn...
    method ExecuteDisposableSafeAsync (line 641) | public static Task<Exception> ExecuteDisposableSafeAsync(TargetLevel p...
    method ExecuteDisposable (line 644) | public static TResult ExecuteDisposable<TResult>(TargetLevel parentLev...
    method ExecuteDisposable (line 646) | public static TResult ExecuteDisposable<TResult>(TargetLevel parentLev...
    method ExecuteDisposable (line 648) | public static void ExecuteDisposable(TargetLevel parentLevel, Expressi...
    method ExecuteDisposableAsync (line 650) | public static Task<TResult> ExecuteDisposableAsync<TResult>(TargetLeve...
    method ExecuteDisposableAsync (line 652) | public static Task<TResult> ExecuteDisposableAsync<TResult>(TargetLeve...
    method ExecuteDisposableAsync (line 654) | public static async Task ExecuteDisposableAsync(TargetLevel parentLeve...
    method ExecuteDisposableSafe (line 657) | public static Wrap.SafeResult<TResult> ExecuteDisposableSafe<TResult>(...
    method ExecuteDisposableSafe (line 659) | public static Wrap.SafeResult<TResult> ExecuteDisposableSafe<TResult>(...
    method ExecuteDisposableSafe (line 661) | public static Exception ExecuteDisposableSafe(TargetLevel parentLevel,...
    method ExecuteDisposableSafeAsync (line 663) | public static Task<Wrap.SafeResult<TResult>> ExecuteDisposableSafeAsyn...
    method ExecuteDisposableSafeAsync (line 665) | public static Task<Wrap.SafeResult<TResult>> ExecuteDisposableSafeAsyn...
    method ExecuteDisposableSafeAsync (line 667) | public static Task<Exception> ExecuteDisposableSafeAsync(TargetLevel p...
    method ExecuteDisposable (line 670) | public static TResult ExecuteDisposable<TResult>(TargetLevel parentLev...
    method ExecuteDisposable (line 672) | public static TResult ExecuteDisposable<TResult>(TargetLevel parentLev...
    method ExecuteDisposable (line 674) | public static void ExecuteDisposable(TargetLevel parentLevel, Expressi...
    method ExecuteDisposableAsync (line 676) | public static Task<TResult> ExecuteDisposableAsync<TResult>(TargetLeve...
    method ExecuteDisposableAsync (line 678) | public static Task<TResult> ExecuteDisposableAsync<TResult>(TargetLeve...
    method ExecuteDisposableAsync (line 680) | public static async Task ExecuteDisposableAsync(TargetLevel parentLeve...
    type Void (line 687) | internal struct Void { }
    method ExecuteDisposableCore (line 691) | private static TResult ExecuteDisposableCore<TResult>(TargetLevel pare...
    method ExecuteDisposableCoreAsync (line 729) | private static async Task<TResult> ExecuteDisposableCoreAsync<TResult>...
    method ExecuteCore (line 767) | private static void ExecuteCore(MethodMessage message)
    method GetLambdaMessage (line 837) | private static MethodMessage GetLambdaMessage<TResult>(Expression<Func...
    method GetLambdaMessage (line 838) | private static MethodMessage GetLambdaMessage<TResult>(Expression<Func...
    method GetLambdaMessage (line 839) | private static MethodMessage GetLambdaMessage(Expression<Action> expre...
    method GetLambdaMessage (line 840) | private static MethodMessage GetLambdaMessage<TArg>(Expression<Action<...
    method GetLambdaMessage (line 841) | private static MethodMessage GetLambdaMessage<TResult, TArg>(Expressio...
    method GetLambdaMessageCore (line 843) | private static MethodMessage GetLambdaMessageCore(Expression expressio...
    class ReplaceVisitor (line 886) | private class ReplaceVisitor : ExpressionVisitor
      method ReplaceVisitor (line 891) | public ReplaceVisitor(string oldParamName, Expression newParam) => (...
      method VisitParameter (line 892) | protected override Expression VisitParameter(ParameterExpression nod...
    method IsSerializable (line 896) | public static bool IsSerializable(Type type)
    method GetGenericArguments (line 901) | public static Serializables.SerializableType[] GetGenericArguments(Met...
    method GetParameters (line 909) | public static Serializables.SerializableValue[] GetParameters(ReadOnly...
    method LaunchDisposableNode (line 954) | private static Process LaunchDisposableNode(MethodMessage launchMethod...
    method LaunchDisposableNode (line 965) | private static Process LaunchDisposableNode()
    class NodeMethods (line 971) | private static class NodeMethods
      method ExecuteDisposable (line 973) | [InterprocessMethod(Level.Any)]
    method ExitIfHostExited (line 1073) | private static void ExitIfHostExited()
    class ReadJsonResult (line 1084) | private class ReadJsonResult
    method ReadJson (line 1092) | private static ReadJsonResult ReadJson(NamedPipeServerStream pipe, int...
    method WriteJson (line 1181) | private static void WriteJson(NamedPipeClientStream pipe, byte[] utf8J...
    method CombineByteArrays (line 1193) | private static byte[] CombineByteArrays(params byte[][] arrays)
    method OnNodeExit (line 1205) | private static void OnNodeExit(InternalLevel level, int pid, uint exit...
    method SetMessageResult (line 1228) | private static void SetMessageResult(InterMessage message, [CanBeNull]...
    method IsSet (line 1271) | public static bool IsSet(this SemaphoreSlim semaphore)
    type FileProcessIdsUsingFileInformation (line 1280) | [StructLayout(LayoutKind.Sequential)]
    method NtQueryInformationFile (line 1287) | [DllImport("ntdll.dll")]
    method GetClientPID (line 1298) | private static int GetClientPID(NamedPipeServerStream namedPipeServer)
    method GetNamedPipeServerProcessId (line 1328) | [DllImport("kernel32.dll", SetLastError = true)]
    method ThrowIfMismatchedServerExePath (line 1330) | public static void ThrowIfMismatchedServerExePath(NamedPipeClientStrea...
    method GetNamedPipeClientProcessId (line 1339) | [DllImport("kernel32.dll", SetLastError = true)]
    method ThrowIfMismatchedClientExePath (line 1341) | public static void ThrowIfMismatchedClientExePath(NamedPipeServerStrea...
    method ThrowIfUnauthorizedMessageSender (line 1351) | private static Task ThrowIfUnauthorizedMessageSender(InterMessage mess...
    method ThrowIfUnauthorizedResultSender (line 1360) | private static Task ThrowIfUnauthorizedResultSender(MessageResult resu...
    method ThrowIfUnauthorizedSender (line 1370) | private static async Task ThrowIfUnauthorizedSender(VerificationReques...
    method ThrowIfUnauthorizedMethodAccess (line 1434) | private static InternalLevel ThrowIfUnauthorizedMethodAccess(MethodInf...
    method CancelReceiver (line 1452) | private static void CancelReceiver()
    method CancelReceiver (line 1460) | private static void CancelReceiver(Exception exception, bool logExcept...
    method CancelSender (line 1471) | private static void CancelSender()
    method CancelSender (line 1479) | private static void CancelSender(Exception exception, bool logException)
    type IInterObject (line 1493) | internal interface IInterObject
      method BeforeSend (line 1495) | public void BeforeSend(InternalLevel targetLevel);
      method OnCompleted (line 1496) | public void OnCompleted(InternalLevel targetLevel);
  class InterprocessMethodAttribute (line 1506) | public class InterprocessMethodAttribute : Attribute
    method InterprocessMethodAttribute (line 1511) | public InterprocessMethodAttribute([NotNull] Level[] authorizedExecuto...
    method InterprocessMethodAttribute (line 1512) | public InterprocessMethodAttribute(Level authorizedExecutor) : this(ne...
    method InterprocessMethodAttribute (line 1513) | public InterprocessMethodAttribute(Level authorizedExecutor, Level aut...
    method InterprocessMethodAttribute (line 1514) | public InterprocessMethodAttribute([NotNull] Level[] authorizedExecuto...
    method InterprocessMethodAttribute (line 1515) | public InterprocessMethodAttribute(Level authorizedExecutor, [NotNull]...
    method InterprocessMethodAttribute (line 1517) | public InterprocessMethodAttribute([NotNull] Level[] authorizedExecuto...

FILE: Interprocess/JsonSerializables.cs
  class InterLink (line 14) | public partial class InterLink
    class SourceGenerationContext (line 16) | [JsonSerializable(typeof(Playbook))]
      method GetTypeInfo (line 161) | [CanBeNull]

FILE: Interprocess/LevelController.cs
  class InterLink (line 16) | public partial class InterLink
    class LevelController (line 18) | private static class LevelController
      method Register (line 24) | public static void Register(InternalLevel level, int processID, [Can...
      method Unregister (line 29) | public static void Unregister(InternalLevel level)
      method GetRegisteredNodes (line 35) | public static (InternalLevel Level, int ProcessID)[] GetRegisteredNo...
      method Open (line 44) | [NotNull]
      method GetCloseToken (line 60) | [NotNull]
      method Close (line 74) | public static void Close(InternalLevel level)
      method IsClosed (line 82) | [NotNull]
      method ThrowIfClosedOrExited (line 97) | public static void ThrowIfClosedOrExited(InternalLevel level, bool r...

FILE: Interprocess/Levels.cs
  type Level (line 5) | public enum Level
  type TargetLevel (line 16) | public enum TargetLevel
  class InterLink (line 27) | public partial class InterLink
    type InternalLevel (line 29) | public enum InternalLevel
    method ToInternalLevel (line 41) | public static InternalLevel ToInternalLevel(this Level level)
    method ToInternalLevel (line 56) | public static InternalLevel ToInternalLevel(this TargetLevel level)
    method ToLevel (line 71) | public static Level ToLevel(this TargetLevel level)
    method ToLevel (line 86) | public static Level ToLevel(this InternalLevel level)
    method ToTargetLevel (line 101) | public static TargetLevel ToTargetLevel(this InternalLevel level)
    method ToTargetLevel (line 115) | public static TargetLevel ToTargetLevel(this Level level)

FILE: Interprocess/Serialization.cs
  class InterLink (line 24) | public static partial class InterLink
    class SerializableExceptionConverter (line 40) | public class SerializableExceptionConverter : JsonConverter<Serializab...
      method Read (line 42) | public override SerializableException Read(ref Utf8JsonReader reader...
      method Write (line 90) | public override void Write(Utf8JsonWriter writer, SerializableExcept...
    class SerializableTypeConverter (line 116) | private class SerializableTypeConverter : JsonConverter<Serializables....
      method Read (line 118) | public override Serializables.SerializableType Read(ref Utf8JsonRead...
      method Write (line 149) | public override void Write(Utf8JsonWriter writer, Serializables.Seri...
    class SerializableValueConverter (line 157) | private class SerializableValueConverter : JsonConverter<Serializables...
      method Read (line 159) | public override Serializables.SerializableValue Read(ref Utf8JsonRea...
      method Write (line 197) | public override void Write(Utf8JsonWriter writer, Serializables.Seri...
    class InterCancellationTokenSource (line 222) | [Serializable]
      method InterCancellationTokenSource (line 229) | public InterCancellationTokenSource() : this(new CancellationTokenSo...
      method InterCancellationTokenSource (line 231) | public InterCancellationTokenSource(CancellationTokenSource underlyi...
      method Cancel (line 247) | public void Cancel() => Cancel(ApplicationLevel);
      method Cancel (line 249) | internal void Cancel(InternalLevel cancelSource)
      method BeforeSend (line 286) | public void BeforeSend(InternalLevel targetLevel)
      method OnCompleted (line 293) | public void OnCompleted(InternalLevel targetLevel) => _targets.Remov...
      method OnDeserialized (line 296) | public void OnDeserialized()
      method Dispose (line 304) | public void Dispose()
    class InterProgress (line 315) | [Serializable]
      method InterProgress (line 322) | [JsonConstructor]
      method InterProgress (line 328) | public InterProgress(Action<decimal> handler) : base(handler)
      method Report (line 337) | public void Report(decimal value)
      method OnProgressReceived (line 348) | public void OnProgressReceived(decimal progress)
      method SendProgress (line 359) | private void SendProgress(decimal value)
      method OnReport (line 369) | public new void OnReport(decimal progress) => throw new NotImplement...
      method Dispose (line 371) | public void Dispose()
    class InterMessageReporter (line 382) | [Serializable]
      method InterMessageReporter (line 388) | [JsonConstructor]
      method InterMessageReporter (line 394) | public InterMessageReporter(Action<string> handler) : base(handler)
      method Report (line 403) | public void Report(string value)
      method OnMessageReceived (line 411) | public void OnMessageReceived(string progress)
      method SendProgress (line 419) | private void SendProgress(string value)
      method OnReport (line 429) | public new void OnReport(string progress) => throw new NotImplemente...
      method Dispose (line 431) | public void Dispose()
    class InterMessage (line 446) | [JsonDerivedType(typeof(MethodMessage), 0)]
      method InterMessage (line 455) | [JsonConstructor]
      method InterMessage (line 458) | protected InterMessage() { }
      method InterMessage (line 459) | protected InterMessage(InternalLevel targetLevel, InternalLevel call...
    class MethodMessage (line 482) | private class MethodMessage : InterMessage
      method MethodMessage (line 484) | [JsonConstructor]
      method MethodMessage (line 486) | public MethodMessage(InternalLevel targetLevel, InternalLevel caller...
    class TextMessage (line 490) | private class TextMessage : InterMessage
      method TextMessage (line 492) | [JsonConstructor]
      method TextMessage (line 494) | public TextMessage(InternalLevel targetLevel, InternalLevel callerLe...
    class ProgressMessage (line 498) | private class ProgressMessage : InterMessage
      method ProgressMessage (line 500) | [JsonConstructor]
      method ProgressMessage (line 502) | public ProgressMessage(InternalLevel targetLevel, InternalLevel call...
    class MessageReportMessage (line 507) | private class MessageReportMessage : InterMessage
      method MessageReportMessage (line 509) | [JsonConstructor]
      method MessageReportMessage (line 511) | public MessageReportMessage(InternalLevel targetLevel, InternalLevel...
    class TokenCancellationMessage (line 517) | private class TokenCancellationMessage : InterMessage
      method TokenCancellationMessage (line 519) | [JsonConstructor]
      method TokenCancellationMessage (line 521) | public TokenCancellationMessage(InternalLevel targetLevel, InternalL...
    class NodeRegistrationMessage (line 526) | private class NodeRegistrationMessage : InterMessage
      method NodeRegistrationMessage (line 528) | [JsonConstructor]
      method NodeRegistrationMessage (line 530) | public NodeRegistrationMessage(InternalLevel targetLevel, InternalLe...
    class ShutdownMessage (line 535) | private class ShutdownMessage : InterMessage
      method ShutdownMessage (line 537) | [JsonConstructor]
      method ShutdownMessage (line 539) | public ShutdownMessage(InternalLevel targetLevel, InternalLevel call...
    class SerializableMethod (line 542) | [Serializable]
    class MessageResult (line 553) | [Serializable]
      method MessageResult (line 562) | private MessageResult() { }
      method MessageResult (line 563) | [JsonConstructor]
      method MessageResult (line 565) | public MessageResult(Guid messageId, InternalLevel messageTargetLeve...
      method MessageResult (line 574) | public MessageResult(Guid messageId, InternalLevel messageTargetLeve...
    type VerificationType (line 590) | public enum VerificationType
    class VerificationRequest (line 595) | public class VerificationRequest

FILE: Interprocess/SynchronousIOCanceler.cs
  class SynchronousIoCanceler (line 7) | public class SynchronousIoCanceler : IDisposable
    method OpenThread (line 9) | [DllImport("kernel32.dll", SetLastError = true)]
    method GetCurrentThreadId (line 12) | [DllImport("kernel32.dll")]
    method CancelSynchronousIo (line 15) | [DllImport("kernel32.dll", SetLastError = true)]
    method CloseHandle (line 19) | [DllImport("kernel32.dll", SetLastError = true)]
    type ThreadAccess (line 23) | [Flags]
    method SynchronousIoCanceler (line 43) | public SynchronousIoCanceler(CancellationToken token, int cancelInterv...
    method SynchronousIoCanceler (line 49) | public SynchronousIoCanceler(int timeout, int cancelInterval = 1000)
    method SynchronousIoCanceler (line 55) | public SynchronousIoCanceler(int timeout, CancellationToken token, int...
    method Dispose (line 70) | public void Dispose()

FILE: Interprocess/Threads.cs
  class InterLink (line 26) | public partial class InterLink
    method ThrowIfReceiverViolation (line 45) | private static void ThrowIfReceiverViolation(InternalLevel level, bool...
    method ReceiverThread (line 53) | private static void ReceiverThread(PipeSecurity security)
    method ExecuteMethod (line 206) | private static void ExecuteMethod(MethodMessage message)
    method SendResultThread (line 288) | private static void SendResultThread()
    method ThrowIfSenderViolation (line 373) | private static void ThrowIfSenderViolation(InternalLevel level, bool r...
    method SenderThread (line 382) | private static void SenderThread()
    method ReceiveResultThread (line 506) | private static void ReceiveResultThread(PipeSecurity security)
    method VerificationThread (line 595) | private static void VerificationThread(PipeSecurity security)
    method CreateCompositeCancellationTokenSource (line 692) | public static CancellationTokenSource CreateCompositeCancellationToken...
    method VerifyMessage (line 711) | private static bool VerifyMessage(VerificationRequest request)
    method VerifyResult (line 733) | private static bool VerifyResult(VerificationRequest request)

FILE: ManagedWimLib/Compressors/Compressor.cs
  class Compressor (line 30) | public class Compressor : IDisposable
    method Compressor (line 42) | private Compressor(IntPtr ptr)
    method Dispose (line 54) | public void Dispose()
    method Dispose (line 60) | protected virtual void Dispose(bool disposing)
    method Create (line 106) | public static Compressor Create(CompressionType ctype, int maxBlockSiz...
    method Compress (line 139) | public unsafe int Compress(ReadOnlySpan<byte> uncompressedSpan, Span<b...
    method Compress (line 181) | public unsafe int Compress(byte[] uncompressedData, int uncompressedOf...
    method Compress (line 222) | public unsafe ulong Compress(byte* uncompressedBuf, ulong uncompressed...
    method CheckReadWriteArgs (line 234) | [MethodImpl(MethodImplOptions.AggressiveInlining)]

FILE: ManagedWimLib/Compressors/Decompressor.cs
  class Decompressor (line 29) | public class Decompressor : IDisposable
    method Decompressor (line 41) | private Decompressor(IntPtr ptr)
    method Dispose (line 53) | public void Dispose()
    method Dispose (line 59) | protected virtual void Dispose(bool disposing)
    method Create (line 90) | public static Decompressor Create(CompressionType ctype, int maxBlockS...
    method Decompress (line 125) | public unsafe bool Decompress(ReadOnlySpan<byte> compressedSpan, Span<...
    method Decompress (line 165) | public unsafe bool Decompress(byte[] compressedData, int compressedOff...
    method Decompress (line 201) | public unsafe bool Decompress(byte* compressedBuf, ulong compressedSiz...
    method CheckReadWriteArgs (line 213) | [MethodImpl(MethodImplOptions.AggressiveInlining)]

FILE: ManagedWimLib/Helper.cs
  class StringHelper (line 27) | internal class StringHelper
    method ReplaceEx (line 29) | public static string ReplaceEx(string str, string oldValue, string new...

FILE: ManagedWimLib/IterateCallback.cs
  class ManagedIterateDirTreeCallback (line 40) | internal class ManagedIterateDirTreeCallback
    method ManagedIterateDirTreeCallback (line 47) | public ManagedIterateDirTreeCallback(IterateDirTreeCallback callback, ...
    method NativeCallback (line 56) | private int NativeCallback(IntPtr entryPtr, IntPtr userCtx)
  class ManagedIterateLookupTableCallback (line 107) | internal class ManagedIterateLookupTableCallback
    method ManagedIterateLookupTableCallback (line 114) | public ManagedIterateLookupTableCallback(IterateLookupTableCallback ca...
    method NativeCallback (line 123) | private int NativeCallback(ResourceEntry resource, IntPtr userCtx)

FILE: ManagedWimLib/NativeStructs.cs
  type CompressionType (line 60) | public enum CompressionType : int
  type ProgressMsg (line 108) | public enum ProgressMsg
  type CallbackStatus (line 315) | public enum CallbackStatus : int
  type ErrorCode (line 335) | public enum ErrorCode : int
  type IterateDirTreeFlags (line 496) | [Flags]
  type IterateLookupTableFlags (line 523) | [Flags]
  type AddFlags (line 531) | [Flags]
  type ChangeFlags (line 674) | [Flags]
  type DeleteFlags (line 707) | [Flags]
  type ExportFlags (line 723) | [Flags]
  type ExtractFlags (line 770) | [Flags]
  type MountFlags (line 921) | [Flags]
  type OpenFlags (line 961) | [Flags]
  type UnmountFlags (line 991) | [Flags]
  type UpdateFlags (line 1033) | [Flags]
  type WriteFlags (line 1045) | [Flags]
  type InitFlags (line 1210) | [Flags]
  type RefFlags (line 1251) | [Flags]
  type CompressorFlags (line 1272) | [Flags]
  class WimInfo (line 1283) | [StructLayout(LayoutKind.Sequential)]
  class CaptureSource (line 1429) | public class CaptureSource
    method CaptureSource (line 1441) | public CaptureSource(string fsSourcePath, string wimTargetPath)
  class UpdateCommand (line 1449) | public class UpdateCommand
    method SetAdd (line 1555) | public static UpdateCommand SetAdd(string fsSourcePath, string wimTarg...
    method SetAdd (line 1567) | public static UpdateCommand SetAdd(AddCommand add)
    method SetDelete (line 1579) | public static UpdateCommand SetDelete(string wimPath, DeleteFlags dele...
    method SetDelete (line 1589) | public static UpdateCommand SetDelete(DeleteCommand del)
    method SetRename (line 1599) | public static UpdateCommand SetRename(string wimSourcePath, string wim...
    method SetRename (line 1610) | public static UpdateCommand SetRename(RenameCommand ren)
    method ToNativeStruct32 (line 1623) | internal UpdateCommand32 ToNativeStruct32()
    method ToNativeStruct64 (line 1651) | internal UpdateCommand64 ToNativeStruct64()
  type UpdateOp (line 1683) | [Flags]
  class AddCommand (line 1702) | public class AddCommand
    method AddCommand (line 1722) | public AddCommand(string fsSourcePath, string wimTargetPath, string co...
  class DeleteCommand (line 1731) | public class DeleteCommand
    method DeleteCommand (line 1742) | public DeleteCommand(string wimPath, DeleteFlags deleteFlags)
  class RenameCommand (line 1749) | public class RenameCommand
    method RenameCommand (line 1760) | public RenameCommand(string wimSourcePath, string wimTargetPath)
  type UpdateCommand32 (line 1778) | [StructLayout(LayoutKind.Explicit)]
    method Free (line 1869) | public void Free()
    method FreePtr (line 1888) | internal static void FreePtr(ref IntPtr ptr)
    method UpdatePtr (line 1895) | internal static void UpdatePtr(ref IntPtr ptr, string str)
    method ToManagedClass (line 1903) | public UpdateCommand ToManagedClass()
  type UpdateCommand64 (line 1927) | [StructLayout(LayoutKind.Explicit)]
    method Free (line 2018) | public void Free()
    method FreePtr (line 2037) | internal static void FreePtr(ref IntPtr ptr)
    method UpdatePtr (line 2044) | internal static void UpdatePtr(ref IntPtr ptr, string str)
    method ToManagedClass (line 2052) | public UpdateCommand ToManagedClass()
  class DirEntryBase (line 2073) | [StructLayout(LayoutKind.Sequential)]
  class DirEntry (line 2216) | public class DirEntry
  type ReparseTag (line 2336) | public enum ReparseTag : uint
  type WimTimeSpec (line 2354) | [StructLayout(LayoutKind.Sequential)]
    method ToDateTime (line 2371) | internal DateTime ToDateTime(int high)
  class WimObjectId (line 2395) | [StructLayout(LayoutKind.Sequential)]
  class ResourceEntry (line 2444) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
  class StreamEntry (line 2528) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

FILE: ManagedWimLib/ProgressCallback.cs
  class ManagedProgressCallback (line 42) | internal class ManagedProgressCallback
    method ManagedProgressCallback (line 49) | public ManagedProgressCallback(ProgressCallback callback, object userD...
    method NativeCallback (line 58) | private CallbackStatus NativeCallback(ProgressMsg msgType, IntPtr info...
  class WriteStreamsProgress (line 139) | [StructLayout(LayoutKind.Sequential)]
  type ScanDentryStatus (line 195) | public enum ScanDentryStatus : uint
  class ScanProgress (line 225) | [StructLayout(LayoutKind.Sequential)]
  class ExtractProgress (line 288) | [StructLayout(LayoutKind.Sequential)]
  class RenameProgress (line 380) | [StructLayout(LayoutKind.Sequential)]
  class UpdateProgress (line 404) | public class UpdateProgress
  class UpdateProgressBase (line 425) | [StructLayout(LayoutKind.Sequential)]
    method ToManaged (line 456) | public UpdateProgress ToManaged()
  class IntegrityProgress (line 472) | [StructLayout(LayoutKind.Sequential)]
  class SplitProgress (line 509) | [StructLayout(LayoutKind.Sequential)]
  class ReplaceProgress (line 543) | [StructLayout(LayoutKind.Sequential)]
  class WimBootExcludeProgress (line 558) | [StructLayout(LayoutKind.Sequential)]
  class UnmountProgress (line 578) | [StructLayout(LayoutKind.Sequential)]
  class DoneWithFileProgress (line 610) | [StructLayout(LayoutKind.Sequential)]
  class VerifyImageProgress (line 636) | [StructLayout(LayoutKind.Sequential)]
  class VerifyStreamsProgress (line 650) | [StructLayout(LayoutKind.Sequential)]
  class TestFileExclusionProgress (line 666) | [StructLayout(LayoutKind.Sequential)]
  class HandleErrorProgress (line 692) | [StructLayout(LayoutKind.Sequential)]

FILE: ManagedWimLib/WimLibException.cs
  class WimLibException (line 31) | [Serializable]
    method WimLibException (line 37) | public WimLibException(ErrorCode errorCode)
    method WimLibException (line 43) | public WimLibException()
    method WimLibException (line 48) | public WimLibException(string message)
    method WimLibException (line 54) | public WimLibException(string message, Exception innerException)
    method ForgeErrorMessages (line 61) | internal static string ForgeErrorMessages(ErrorCode errorCode, bool full)
    method CheckErrorCode (line 73) | internal static void CheckErrorCode(ErrorCode ret)
    method WimLibException (line 80) | protected WimLibException(SerializationInfo info, StreamingContext ctx)
    method GetObjectData (line 85) | public override void GetObjectData(SerializationInfo info, StreamingCo...

FILE: ManagedWimLib/WimLibLoadManager.cs
  class WimLibLoadManager (line 25) | internal sealed class WimLibLoadManager : LoadManagerBase<WimLibLoader>
    method CreateLoader (line 30) | protected override WimLibLoader CreateLoader() => new WimLibLoader();

FILE: ManagedWimLib/WimLibLoader.cs
  class WimLibLoader (line 34) | internal sealed class WimLibLoader : DynLoaderBase
    method WimLibLoader (line 42) | public WimLibLoader() : base() { }
    method GetErrorFilePath (line 55) | internal string GetErrorFilePath()
    method GetErrorPrintState (line 62) | internal ErrorPrintState GetErrorPrintState()
    method LoadFunctions (line 88) | protected override void LoadFunctions()
    method ResetFunctions (line 358) | protected override void ResetFunctions()
    class Utf16d (line 546) | internal class Utf16d
      type CaptureSourceBaseL32 (line 850) | [StructLayout(LayoutKind.Sequential, CharSet = StructCharSet)]
        method CaptureSourceBaseL32 (line 867) | public CaptureSourceBaseL32(string fsSourcePath, string wimTargetP...
      type CaptureSourceBaseL64 (line 882) | [StructLayout(LayoutKind.Sequential, CharSet = StructCharSet)]
        method CaptureSourceBaseL64 (line 899) | public CaptureSourceBaseL64(string fsSourcePath, string wimTargetP...
    class Utf8d (line 911) | internal class Utf8d
      type CaptureSourceBaseL32 (line 1216) | [StructLayout(LayoutKind.Sequential, CharSet = StructCharSet)]
        method CaptureSourceBaseL32 (line 1233) | public CaptureSourceBaseL32(string fsSourcePath, string wimTargetP...
      type CaptureSourceBaseL64 (line 1248) | [StructLayout(LayoutKind.Sequential, CharSet = StructCharSet)]
        method CaptureSourceBaseL64 (line 1265) | public CaptureSourceBaseL64(string fsSourcePath, string wimTargetP...
    method SetErrorFile (line 1316) | internal void SetErrorFile()
    method SetErrorFile (line 1322) | internal void SetErrorFile(string path)
    method SetPrintErrors (line 1369) | internal void SetPrintErrors(bool showMessages)
    method GetErrors (line 1390) | internal string[] GetErrors()
    method GetLastError (line 1407) | internal string GetLastError()
    method ResetErrorFile (line 1425) | internal void ResetErrorFile()
    method AddEmptyImage (line 1445) | internal ErrorCode AddEmptyImage(IntPtr wim, string name, out int newI...
    method AddImage (line 1454) | internal ErrorCode AddImage(IntPtr wim, string source, string name, st...
    method AddImageMultiSource (line 1463) | internal ErrorCode AddImageMultiSource(IntPtr wim, CaptureSource[] sou...
    method AddTree (line 1529) | internal ErrorCode AddTree(IntPtr wim, int image, string fsSourcePath,...
    method DeletePath (line 1554) | internal ErrorCode DeletePath(IntPtr wim, int image, string path, Dele...
    method ExportImage (line 1565) | internal ErrorCode ExportImage(IntPtr srcWim, int srcImage, IntPtr des...
    method ExtractImage (line 1576) | internal ErrorCode ExtractImage(IntPtr wim, int image, string target, ...
    method ExtractPathList (line 1585) | internal ErrorCode ExtractPathList(IntPtr wim, int image, string targe...
    method ExtractPaths (line 1594) | internal ErrorCode ExtractPaths(IntPtr wim, int image, string target, ...
    method GetImageProperty (line 1623) | internal IntPtr GetImageProperty(IntPtr wim, int image, string propert...
    method IsImageNameInUse (line 1647) | internal bool IsImageNameInUse(IntPtr wim, string name)
    method ResolveImage (line 1656) | internal int ResolveImage(IntPtr wim, string imageNameOrNum)
    method IterateDirTree (line 1692) | internal int IterateDirTree(IntPtr wim, int image, string path, Iterat...
    method Join (line 1716) | internal ErrorCode Join(string[] swms, uint numSwms, string outputPath...
    method JoinWithProgress (line 1725) | internal ErrorCode JoinWithProgress(string[] swms, uint numSwms, strin...
    method OpenWim (line 1736) | internal ErrorCode OpenWim(string wimFile, OpenFlags openFlags, out In...
    method OpenWimWithProgress (line 1745) | internal ErrorCode OpenWimWithProgress(string wimFile, OpenFlags openF...
    method MountImage (line 1756) | internal ErrorCode MountImage(IntPtr wim, int image, string dir, Mount...
    method ReferenceResourceFiles (line 1767) | internal ErrorCode ReferenceResourceFiles(IntPtr wim, string[] resourc...
    method RenamePath (line 1795) | internal ErrorCode RenamePath(IntPtr wim, int image, string sourcePath...
    method SetImageDescription (line 1806) | internal ErrorCode SetImageDescription(IntPtr wim, int image, string d...
    method SetImageFlags (line 1815) | internal ErrorCode SetImageFlags(IntPtr wim, int image, string flags)
    method SetImageName (line 1824) | internal ErrorCode SetImageName(IntPtr wim, int image, string name)
    method SetImageProperty (line 1833) | internal ErrorCode SetImageProperty(IntPtr wim, int image, string prop...
    method Split (line 1877) | internal ErrorCode Split(IntPtr wim, string swmName, ulong partSize, W...
    method UnmountImage (line 1896) | internal ErrorCode UnmountImage(string dir, UnmountFlags unmountFlags)
    method UnmountImageWithProgress (line 1905) | internal ErrorCode UnmountImageWithProgress(string dir, UnmountFlags u...
    method Write (line 1936) | internal ErrorCode Write(IntPtr wim, string path, int image, WriteFlag...
    method SetBitField (line 2015) | internal static void SetBitField(ref uint bitField, int bitShift, bool...
    method GetBitField (line 2023) | internal static bool GetBitField(uint bitField, int bitShift)
  type ErrorPrintState (line 2034) | public enum ErrorPrintState

FILE: ManagedWimLib/WimStruct.cs
  class Wim (line 33) | public class Wim : IDisposable
    method GlobalInit (line 45) | public static void GlobalInit() => GlobalInit(InitFlags.None);
    method GlobalInit (line 50) | public static void GlobalInit(InitFlags flags)
    method GlobalInit (line 62) | public static void GlobalInit(string libPath) => GlobalInit(libPath, I...
    method GlobalInit (line 68) | public static void GlobalInit(string libPath, InitFlags flags)
    method GlobalCleanup (line 80) | public static void GlobalCleanup()
    method TryGlobalCleanup (line 98) | public static bool TryGlobalCleanup()
    method Wim (line 145) | private Wim(IntPtr ptr)
    method Dispose (line 159) | public void Dispose()
    method Dispose (line 165) | protected virtual void Dispose(bool disposing)
    method GetErrorString (line 187) | public static string GetErrorString(ErrorCode code)
    method GetErrors (line 204) | public static string[] GetErrors()
    method GetLastError (line 223) | public static string GetLastError()
    method ResetErrorFile (line 233) | public static void ResetErrorFile()
    method SetPrintErrors (line 252) | public static void SetPrintErrors(bool showMessages)
    method AddEmptyImage (line 278) | public int AddEmptyImage(string name)
    method AddImage (line 318) | public void AddImage(string source, string name, string configFile, Ad...
    method AddImageMultiSource (line 345) | public void AddImageMultiSource(IEnumerable<CaptureSource> sources, st...
    method AddTree (line 363) | public void AddTree(int image, string fsSourcePath, string wimTargetPa...
    method CreateNewWim (line 379) | public static Wim CreateNewWim(CompressionType type)
    method DeleteImage (line 399) | public void DeleteImage(int image)
    method DeletePath (line 415) | public void DeletePath(int image, string path, DeleteFlags deleteFlags)
    method ExportImage (line 453) | public void ExportImage(int srcImage, Wim destWim, string destName, st...
    method ExtractImage (line 483) | public void ExtractImage(int image, string target, ExtractFlags extrac...
    method ExtractPath (line 525) | public void ExtractPath(int image, string target, string path, Extract...
    method ExtractPaths (line 568) | public void ExtractPaths(int image, string target, IEnumerable<string>...
    method ExtractPathList (line 589) | public void ExtractPathList(int image, string target, string pathListF...
    method GetImageDescription (line 602) | public string GetImageDescription(int image)
    method GetImageName (line 617) | public string GetImageName(int image)
    method GetImageProperty (line 642) | public string GetImageProperty(int image, string propertyName)
    method GetWimInfo (line 653) | public WimInfo GetWimInfo()
    method GetXmlData (line 674) | public string GetXmlData()
    method IsImageNameInUse (line 697) | public bool IsImageNameInUse(string name)
    method ResolveImage (line 720) | public int ResolveImage(string imageNameOrNum)
    method IterateDirTree (line 796) | public int IterateDirTree(int image, string path, IterateDirTreeFlags ...
    method IterateDirTree (line 837) | public int IterateDirTree(int image, string path, IterateDirTreeFlags ...
    method IterateDirTree (line 888) | public int IterateDirTree(int image, string path, IterateDirTreeFlags ...
    method IterateDirTree (line 919) | public int IterateDirTree(int image, string path, IterateDirTreeFlags ...
    method IterateLookupTable (line 968) | public int IterateLookupTable(IterateLookupTableFlags flags, IterateLo...
    method IterateLookupTable (line 984) | public int IterateLookupTable(IterateLookupTableFlags flags, IterateLo...
    method Join (line 1010) | public static void Join(IEnumerable<string> swms, string outputPath, O...
    method Join (line 1034) | public static void Join(IEnumerable<string> swms, string outputPath, O...
    method Join (line 1058) | public static void Join(IEnumerable<string> swms, string outputPath, O...
    method OpenWim (line 1081) | public static Wim OpenWim(string wimFile, OpenFlags openFlags)
    method OpenWim (line 1110) | public static Wim OpenWim(string wimFile, OpenFlags openFlags, Progres...
    method MountImage (line 1168) | public void MountImage(int image, string dir, MountFlags mountFlags, s...
    method ReferenceResourceFile (line 1198) | public void ReferenceResourceFile(string resourceWimFileOrGlobs, RefFl...
    method ReferenceResourceFiles (line 1235) | public void ReferenceResourceFiles(IEnumerable<string> resourceWimFile...
    method ReferenceResources (line 1250) | public void ReferenceResources(IEnumerable<Wim> resourceWims)
    method ReferenceTemplateImage (line 1283) | public void ReferenceTemplateImage(int newImage, int templateImage)
    method ReferenceTemplateImage (line 1319) | public void ReferenceTemplateImage(int newImage, Wim template, int tem...
    method RegisterCallback (line 1335) | public void RegisterCallback(ProgressCallback callback)
    method RegisterCallback (line 1351) | public void RegisterCallback(ProgressCallback callback, object userData)
    method RenamePath (line 1374) | public void RenamePath(int image, string sourcePath, string destPath)
    method SetImageDescription (line 1392) | public void SetImageDescription(int image, string description)
    method SetImageFlags (line 1408) | public void SetImageFlags(int image, string flags)
    method SetImageName (line 1424) | public void SetImageName(int image, string name)
    method SetImageProperty (line 1452) | public void SetImageProperty(int image, string propertyName, string pr...
    method SetWimInfo (line 1471) | public void SetWimInfo(WimInfo info, ChangeFlags which)
    method SetOutputChunkSize (line 1495) | public void SetOutputChunkSize(uint chunkSize)
    method SetOutputPackChunkSize (line 1512) | public void SetOutputPackChunkSize(uint chunkSize)
    method SetOutputCompressionType (line 1529) | public void SetOutputCompressionType(CompressionType compType)
    method SetOutputPackCompressionType (line 1545) | public void SetOutputPackCompressionType(CompressionType compType)
    method Split (line 1574) | public void Split(string swmName, ulong partSize, WriteFlags writeFlags)
    method VerifyWim (line 1596) | public void VerifyWim()
    method UnmountImage (line 1617) | public static void UnmountImage(string dir, UnmountFlags unmountFlags)
    method UnmountImage (line 1643) | public static void UnmountImage(string dir, UnmountFlags unmountFlags,...
    method UpdateImage (line 1664) | public void UpdateImage(int image, UpdateCommand cmd, UpdateFlags upda...
    method UpdateImage (line 1710) | public void UpdateImage(int image, IEnumerable<UpdateCommand> cmds, Up...
    method Write (line 1774) | public void Write(string path, int image, WriteFlags writeFlags, uint ...
    method Overwrite (line 1808) | public void Overwrite(WriteFlags writeFlags, uint numThreads)
    method FileExists (line 1826) | public bool FileExists(int image, string wimFilePath)
    method DirExists (line 1858) | public bool DirExists(int image, string wimDirPath)
    method PathExists (line 1890) | public bool PathExists(int image, string wimPath)
    method SetDefaultCompressionLevel (line 1928) | public static void SetDefaultCompressionLevel(CompressionType ctype, u...
    method SetEveryDefaultCompressionLevel (line 1959) | public static void SetEveryDefaultCompressionLevel(uint compressionLev...
    method GetCompressorNeededMemory (line 1974) | public static ulong GetCompressorNeededMemory(CompressionType ctype, u...

FILE: TrustedUninstaller.CLI/CLI.cs
  class CLI (line 24) | public class CLI
    method ParseArguments (line 26) | private static async Task ParseArguments(string[] args)
    method Main (line 49) | private static async System.Threading.Tasks.Task<int> Main(string[] args)
    method ExtractArchive (line 286) | public static void ExtractArchive(string file, string targetDir)
    method RunCommand (line 291) | private static void RunCommand(string command)
    method ExtractResourceFolder (line 322) | public static void ExtractResourceFolder(string resource, string dir, ...
    method GetDefenderToggles (line 389) | public static async Task<List<bool>> GetDefenderToggles()
    method PrepareSystemCLI (line 506) | public static async Task PrepareSystemCLI(bool KernelDriverOnly, bool ...

FILE: TrustedUninstaller.CLI/CommandLine.cs
  class CommandLine (line 20) | public static class CommandLine
    class Interprocess (line 24) | public class Interprocess : IArgumentData
      class NodeData (line 31) | public class NodeData
    class Execute (line 39) | public class Execute : IArgumentData
      type CommandType (line 43) | public enum CommandType
      class Run (line 51) | public class Run : IArgumentData
    method SerializeArgument (line 61) | public static string SerializeArgument([NotNull] object value)
    method ParseArguments (line 84) | [CanBeNull]
    method ParseArguments (line 86) | [CanBeNull]
    method DeserializeArguments (line 103) | private static IArgumentData DeserializeArguments(List<string> args, I...
    method DeserializeArgument (line 191) | [NotNull]
    method EnumValueHasAttribute (line 268) | public static bool EnumValueHasAttribute(Type enumType, object enumVal...
    type IArgumentData (line 279) | public interface IArgumentData { }
    class RequiresArgumentDataAttribute (line 281) | [AttributeUsage(AttributeTargets.Field)]
      method RequiresArgumentDataAttribute (line 286) | public RequiresArgumentDataAttribute(string requiredProperty) =>
    class RequiredArgumentDataAttribute (line 290) | public class RequiredArgumentDataAttribute : Attribute { }
    class DefaultArgumentAttribute (line 292) | public class DefaultArgumentAttribute : Attribute { }
    class ArgumentDictionary (line 294) | public class ArgumentDictionary<TKey, TValue>
      method Add (line 299) | public void Add(TKey key, TValue value)
      method TryGetValueAfterIndex (line 305) | public bool TryGetValueAfterIndex(int index, TKey key, out TValue va...
      method GetIndex (line 320) | public int GetIndex(TKey key) => _index.IndexOf(key);

FILE: TrustedUninstaller.Shared/Actions/AppxAction.cs
  method RunTaskOnMainThread (line 22) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw new ...
  type AppxOperation (line 24) | public enum AppxOperation
  type Level (line 29) | public enum Level
  method GetProgressWeight (line 52) | public int GetProgressWeight() => ProgressWeight;
  method GetDefaultErrorAction (line 53) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
  method GetRetryAllowed (line 54) | public bool GetRetryAllowed() => false;
  method ResetProgress (line 57) | public void ResetProgress() => InProgress = false;
  method ErrorString (line 59) | public string ErrorString() => $"AppxAction failed to remove '{Name}'.";
  method IsISOCompatible (line 69) | public override string? IsISOCompatible() => "AppxAction does not suppor...
  method GetStatus (line 70) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/CmdAction.cs
  class CmdAction (line 18) | public class CmdAction : Tasks.TaskActionWithOutputProcessor, ITaskAction
    method IsISOCompatible (line 20) | public override string? IsISOCompatible() => "For safety reasons, CmdA...
    method RunTaskOnMainThread (line 21) | public void RunTaskOnMainThread(Output.OutputWriter output)
    method GetProgressWeight (line 62) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 63) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 64) | public bool GetRetryAllowed() => false;
    method ResetProgress (line 67) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 72) | public string ErrorString() => $"CmdAction failed to run command '{Com...
    method GetStatus (line 74) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 84) | public Task<bool> RunTask(Output.OutputWriter output)
    method RunAsProcess (line 89) | private void RunAsProcess(Output.OutputWriter output)
    method CmdRunning (line 166) | private static bool CmdRunning(int id)
    method RunAsPrivilegedProcess (line 178) | private void RunAsPrivilegedProcess(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/DownloadAction.cs
  class DownloadAction (line 22) | public class DownloadAction : TaskActionWithOutputProcessor, ITaskAction
    method RunTaskOnMainThread (line 24) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 28) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 29) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 30) | public bool GetRetryAllowed() => false;
    method ResetProgress (line 32) | public void ResetProgress() { }
    method ErrorString (line 51) | public string ErrorString() => $"DownloadAction failed to download '{P...
    method GetStatus (line 53) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 60) | public async Task<bool> RunTask(Output.OutputWriter output)
    method DownloadUrl (line 102) | private async Task DownloadUrl(Output.OutputWriter output, string url,...
    method DownloadGit (line 111) | private async Task DownloadGit(Output.OutputWriter output, string git,...
    class HttpProgressClient (line 165) | public class HttpProgressClient : IDisposable
      method HttpProgressClient (line 176) | public HttpProgressClient()
      method StartDownload (line 181) | public async Task<string> StartDownload(string downloadUrl, string d...
      method GetAsync (line 206) | public Task<HttpResponseMessage> GetAsync(string link)
      method DownloadFileFromHttpResponseMessage (line 211) | private async Task<string> DownloadFileFromHttpResponseMessage(HttpR...
      method ProcessContentStream (line 222) | private async Task<string> ProcessContentStream(long? totalDownloadS...
      method TriggerProgressChanged (line 260) | private void TriggerProgressChanged(long? totalDownloadSize, long to...
      method Dispose (line 275) | public void Dispose()

FILE: TrustedUninstaller.Shared/Actions/FileAction.cs
  class FileAction (line 23) | public class FileAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 25) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 38) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 39) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 40) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 42) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 45) | public string ErrorString() => $"FileAction failed to remove file or d...
    method GetRealPath (line 47) | private string GetRealPath()
    method GetRealPath (line 52) | private string GetRealPath(string path)
    method GetStatus (line 57) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method EzUnlockFileW (line 90) | [DllImport("Unlocker.dll", CallingConvention = CallingConvention.Cdecl...
    method DeleteFile (line 93) | private async Task DeleteFile(string file, Output.OutputWriter output,...
    method RemoveDirectory (line 148) | private async Task RemoveDirectory(string dir, Output.OutputWriter out...
    method DeleteItemsInDirectory (line 181) | private async Task DeleteItemsInDirectory(string dir, Output.OutputWri...
    method RunTask (line 394) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/LanguageAction.cs
  class LanguageAction (line 11) | class LanguageAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 13) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 15) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 16) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 17) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 20) | public void ResetProgress() => InProgress = false;
    method Primary (line 23) | public string Primary() => "for language " + Tag;
    method ErrorString (line 26) | public string ErrorString() => $"LanguageAction failed to install lang...
    method IntlUpdateSystemLocale (line 28) | [DllImport("intl.cpl", CharSet = CharSet.Unicode, SetLastError = true)]
    method GetStatus (line 31) | public UninstallTaskStatus GetStatus(Output.OutputWriter output) =>
    method RunTask (line 37) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/LineInFileAction.cs
  type LineInFileOperation (line 13) | internal enum LineInFileOperation
  class LineInFileAction (line 18) | internal class LineInFileAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 20) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 32) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 33) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 34) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 37) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 39) | public string ErrorString() => $"LineInFileAction failed to {Operation...
    method GetStatus (line 41) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method GetLines (line 61) | private IEnumerable<string> GetLines() =>
    method GetMissingLines (line 67) | private IEnumerable<string> GetMissingLines()
    method GetRealPath (line 76) | private string GetRealPath()
    method RunTask (line 81) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/PowershellAction.cs
  method IsISOCompatible (line 20) | public override string? IsISOCompatible() => "For safety reasons, PowerS...
  method RunTaskOnMainThread (line 21) | public void RunTaskOnMainThread(Output.OutputWriter output)
  method GetProgressWeight (line 65) | public int GetProgressWeight() => ProgressWeight;
  method GetDefaultErrorAction (line 66) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
  method GetRetryAllowed (line 67) | public bool GetRetryAllowed() => false;
  method ResetProgress (line 70) | public void ResetProgress() => InProgress = false;
  method ErrorString (line 72) | public string ErrorString() => $"PowerShellAction failed to run command ...
  method GetStatus (line 73) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
  method RunTask (line 83) | public Task<bool> RunTask(Output.OutputWriter output)
  method RunAsProcess (line 88) | private void RunAsProcess(Output.OutputWriter output)
  method OutputHandler (line 111) | new OutputHandler("Process", process, output))
  method if (line 143) | if (ExitCode != 0)

FILE: TrustedUninstaller.Shared/Actions/RegistryKeyAction.cs
  type RegistryKeyOperation (line 22) | public enum RegistryKeyOperation
  class RegistryKeyAction (line 27) | public class RegistryKeyAction : TaskActionWithOutputProcessor, ITaskAction
    method RunTaskOnMainThread (line 29) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 41) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 42) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 43) | public bool GetRetryAllowed() => true;
    method RegOpenKeyEx (line 54) | [DllImport("advapi32.dll", SetLastError = true)]
    method RegDeleteKeyEx (line 57) | [DllImport("advapi32.dll", EntryPoint = "RegDeleteKeyEx", SetLastError...
    method DeleteKeyTreeWin32 (line 63) | private static void DeleteKeyTreeWin32(string key, RegistryHive hive)
    method ResetProgress (line 76) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 78) | public string ErrorString() => $"RegistryKeyAction failed to {Operatio...
    method GetRoots (line 80) | private List<RegistryKey> GetRoots(ref string subKey)
    method GetSubKey (line 185) | public string GetSubKey(string key) => key.Replace("\\\\", "\\").Subst...
    method GetStatus (line 187) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 240) | public async Task<bool> RunTask(Output.OutputWriter output)
    method RegAddKey (line 343) | private void RegAddKey(Output.OutputWriter output, string exePath, str...

FILE: TrustedUninstaller.Shared/Actions/RegistryValueAction.cs
  type RegistryValueOperation (line 21) | public enum RegistryValueOperation
  type RegistryValueType (line 29) | public enum RegistryValueType
  class RegistryValueAction (line 41) | public class RegistryValueAction : TaskActionWithOutputProcessor, ITaskA...
    method RunTaskOnMainThread (line 43) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 64) | public int GetProgressWeight()
    method GetDefaultErrorAction (line 81) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 82) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 85) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 87) | public string ErrorString() => $"RegistryValueAction failed to {Operat...
    method GetRoots (line 89) | private List<RegistryKey> GetRoots(ref string subKey)
    method GetSubKey (line 193) | public string GetSubKey(string key) => key.Replace("\\\\", "\\").Subst...
    method StringToByteArray (line 201) | public static byte[] StringToByteArray(string hex) {
    method GetStatus (line 208) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 303) | public async Task<bool> RunTask(Output.OutputWriter output)
    method RegAddValue (line 428) | private void RegAddValue(Output.OutputWriter output, string exePath, s...

FILE: TrustedUninstaller.Shared/Actions/RunAction.cs
  class RunAction (line 17) | public class RunAction : Tasks.TaskActionWithOutputProcessor, ITaskAction
    method IsISOCompatible (line 19) | public override string? IsISOCompatible() => "For safety reasons, RunA...
    method RunTaskOnMainThread (line 20) | public void RunTaskOnMainThread(Output.OutputWriter output)
    method GetProgressWeight (line 96) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 97) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 98) | public bool GetRetryAllowed() => false;
    method ResetProgress (line 101) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 105) | public string ErrorString() => String.IsNullOrEmpty(Arguments) ? $"Run...
    method ExistsInPath (line 107) | public static bool ExistsInPath(string fileName)
    method GetStatus (line 124) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 134) | public Task<bool> RunTask(Output.OutputWriter output)
    method RunAsProcess (line 139) | private void RunAsProcess(string file, Output.OutputWriter output)
    method RunAsPrivilegedProcess (line 217) | private void RunAsPrivilegedProcess(string file, Output.OutputWriter o...

FILE: TrustedUninstaller.Shared/Actions/ScheduledTaskAction.cs
  type ScheduledTaskOperation (line 16) | internal enum ScheduledTaskOperation
  class ScheduledTaskAction (line 24) | internal class ScheduledTaskAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 26) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 36) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 37) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Log;
    method GetRetryAllowed (line 38) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 41) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 43) | public string ErrorString() => $"ScheduledTaskAction failed to change ...
    method GetStatus (line 45) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 94) | public async Task<bool> RunTask(Output.OutputWriter output)
    method DeleteUsingRegistry (line 224) | private static void DeleteUsingRegistry(string path, bool throwOnTaskN...
    method DeleteTaskIdRelations (line 262) | private static void DeleteTaskIdRelations(RegistryKey schedule, string...

FILE: TrustedUninstaller.Shared/Actions/ServiceAction.cs
  type ServiceOperation (line 21) | public enum ServiceOperation
  class ServiceAction (line 30) | public class ServiceAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 32) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 53) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 54) | public ErrorAction GetDefaultErrorAction() => (Operation == ServiceOpe...
    method GetRetryAllowed (line 55) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 58) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 60) | public string ErrorString() => $"ServiceAction failed to {Operation.To...
    method GetService (line 62) | private ServiceController? GetService()
    method GetDevice (line 74) | private ServiceController? GetDevice()
    method GetStatus (line 87) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method IsISOCompatible (line 153) | public override string? IsISOCompatible() => Operation != ServiceOpera...
    method RunTask (line 154) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/ShortcutAction.cs
  class ShortcutAction (line 12) | class ShortcutAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 14) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 29) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 30) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Log;
    method GetRetryAllowed (line 31) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 34) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 36) | public string ErrorString() => $"ShortcutAction failed to create short...
    method GetStatus (line 38) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 45) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/SoftwareAction.cs
  class SoftwareAction (line 22) | public class SoftwareAction : TaskActionWithOutputProcessor, ITaskAction
    method RunTaskOnMainThread (line 24) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    type SoftwareSource (line 26) | public enum SoftwareSource
    class SoftwareFallback (line 31) | public class SoftwareFallback
    method GetProgressWeight (line 41) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 42) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 43) | public bool GetRetryAllowed() => false;
    method ResetProgress (line 45) | public void ResetProgress() {}
    method ErrorString (line 71) | public string ErrorString() => $"SoftwareAction failed to install '{Na...
    method GetStatus (line 73) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method IsISOCompatible (line 80) | public override string? IsISOCompatible() => ISO == ISOSetting.Only ? ...
    method RunTask (line 81) | public async Task<bool> RunTask(Output.OutputWriter output)
    method InstallToCache (line 160) | private async Task InstallToCache(Output.OutputWriter output, string n...
    method InstallDependencies (line 418) | private async Task InstallDependencies(Output.OutputWriter output, str...
    method RunChoco (line 438) | private static async Task RunChoco(Output.OutputWriter output, string ...
    method InstallISO (line 472) | private static async Task InstallISO(Output.OutputWriter output)
    method Install (line 531) | private static async Task Install(Output.OutputWriter output)
    method ExtractArchive (line 616) | public static void ExtractArchive(string file, string targetDir)
    method RunCommand (line 620) | private static void RunCommand(string exe, string command, bool printO...
    class HttpProgressClient (line 659) | public class HttpProgressClient : IDisposable
      method HttpProgressClient (line 670) | public HttpProgressClient()
      method StartDownload (line 675) | public async Task<string> StartDownload(string downloadUrl, string d...
      method GetAsync (line 703) | public Task<HttpResponseMessage> GetAsync(string link)
      method DownloadFileFromHttpResponseMessage (line 708) | private async Task<string> DownloadFileFromHttpResponseMessage(HttpR...
      method ProcessContentStream (line 719) | private async Task<string> ProcessContentStream(long? totalDownloadS...
      method TriggerProgressChanged (line 757) | private void TriggerProgressChanged(long? totalDownloadSize, long to...
      method Dispose (line 772) | public void Dispose()

FILE: TrustedUninstaller.Shared/Actions/SystemPackageAction.cs
  method RunTaskOnMainThread (line 18) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw new ...
  type Architecture (line 19) | public enum Architecture
  method GetProgressWeight (line 44) | public int GetProgressWeight() => ProgressWeight;
  method GetDefaultErrorAction (line 45) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
  method GetRetryAllowed (line 46) | public bool GetRetryAllowed() => false;
  method ResetProgress (line 49) | public void ResetProgress() => InProgress = false;
  method ErrorString (line 51) | public string ErrorString() => $"SystemPackageAction failed to remove '{...
  method IsISOCompatible (line 53) | public override string? IsISOCompatible() => "SystemPackageAction does n...
  method GetStatus (line 54) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/TaskAction.cs
  class TaskAction (line 9) | public class TaskAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 20) | public void RunTaskOnMainThread(Output.OutputWriter output) => throw n...
    method ResetProgress (line 22) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 23) | public string ErrorString() => "";
    method GetProgressWeight (line 24) | public int GetProgressWeight() => 0;
    method GetDefaultErrorAction (line 25) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 26) | public bool GetRetryAllowed() => false;
    method GetStatus (line 27) | public UninstallTaskStatus GetStatus(Output.OutputWriter output) => th...
    method RunTask (line 28) | public Task<bool> RunTask(Output.OutputWriter output) => throw new Not...

FILE: TrustedUninstaller.Shared/Actions/TaskKillAction.cs
  class TaskKillAction (line 16) | class TaskKillAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 18) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method TerminateProcess (line 19) | [DllImport("kernel32.dll", SetLastError=true)]
    method OpenProcess (line 22) | [DllImport("kernel32.dll", SetLastError = true)]
    type ProcessAccessFlags (line 26) | public enum ProcessAccessFlags : uint
    method CloseHandle (line 31) | [DllImport("kernel32.dll", SetLastError = true)]
    method GetProgressWeight (line 43) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 44) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Log;
    method GetRetryAllowed (line 45) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 48) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 52) | public string ErrorString()
    method GetStatus (line 73) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method GetProcess (line 93) | private List<Process> GetProcess()
    method IsProcessCritical (line 126) | [DllImport("kernel32.dll", SetLastError=true)]
    method IsISOCompatible (line 134) | public override string? IsISOCompatible() => "TaskKillAction does not ...
    method RunTask (line 135) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/UpdateAction.cs
  class UpdateAction (line 12) | internal class UpdateAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 14) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 20) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 21) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 22) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 25) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 27) | public string ErrorString() => $"UpdateAction failed to remove update ...
    method GetStatus (line 29) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 39) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/UserAction.cs
  class UserAction (line 12) | public class UserAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 14) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method GetProgressWeight (line 22) | public int GetProgressWeight() => ProgressWeight;
    method GetDefaultErrorAction (line 23) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Notify;
    method GetRetryAllowed (line 24) | public bool GetRetryAllowed() => true;
    method ResetProgress (line 27) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 29) | public string ErrorString() => $"UserAction failed to change permissio...
    method GetStatus (line 31) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 52) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/Actions/WriteStatusAction.cs
  class WriteStatusAction (line 10) | public class WriteStatusAction : Tasks.TaskAction, ITaskAction
    method RunTaskOnMainThread (line 14) | public void RunTaskOnMainThread(Output.OutputWriter output) { throw ne...
    method ResetProgress (line 18) | public void ResetProgress() => InProgress = false;
    method ErrorString (line 19) | public string ErrorString() => "";
    method GetProgressWeight (line 20) | public int GetProgressWeight() => 0;
    method GetDefaultErrorAction (line 21) | public ErrorAction GetDefaultErrorAction() => Tasks.ErrorAction.Log;
    method GetRetryAllowed (line 22) | public bool GetRetryAllowed() => false;
    method GetStatus (line 23) | public UninstallTaskStatus GetStatus(Output.OutputWriter output)
    method RunTask (line 33) | public async Task<bool> RunTask(Output.OutputWriter output)

FILE: TrustedUninstaller.Shared/AmeliorationUtil.cs
  class AmeliorationUtil (line 47) | public static class AmeliorationUtil
    method GetProgressMaximum (line 58) | public static int GetProgressMaximum(List<ITaskAction> actions) => act...
    method IsApplicable (line 66) | private static bool IsApplicable([CanBeNull] Playbook upgradingFrom, b...
    method ParseActions (line 100) | [CanBeNull]
    method GetFaultyYamlText (line 219) | public static string GetFaultyYamlText(string yamlFilePath, YamlExcept...
    method FilterYAMLMessage (line 271) | private static string FilterYAMLMessage(YamlException exception)
    method DoActions (line 294) | public static async Task<bool> DoActions(List<ITaskAction> actions, st...
    method DeserializePlaybook (line 426) | public static Playbook DeserializePlaybook(string dir)
    class PlaybookMetadata (line 458) | [Serializable]
      method PlaybookMetadata (line 461) | public PlaybookMetadata(string[] options, string playbookName, strin...
      method Construct (line 476) | public virtual void Construct()
      method Serialize (line 489) | public string Serialize(ISerializer serializer) => serializer.Serial...
    method CreateWindowsSkeleton (line 493) | private static void CreateWindowsSkeleton(string folder)
    method RunPlaybook (line 520) | [InterprocessMethod(Level.TrustedInstaller)]
    method RunPlaybook (line 526) | [InterprocessMethod(Level.TrustedInstaller)]
    method InjectOOBE (line 1015) | private static async Task InjectOOBE()
    method ExtractCab (line 1080) | private static string ExtractCab(Architecture arch)
    method RunPSCommand (line 1104) | private static int RunPSCommand(string command, [CanBeNull] DataReceiv...
    method RunCommand (line 1106) | private static int RunCommand(string exe, string arguments, [CanBeNull...
    method ThrowIfNotEnoughFreeSpace (line 1138) | static void ThrowIfNotEnoughFreeSpace(string isoPath, string destination)
    method DeleteAppliedPlaybook (line 1152) | private static void DeleteAppliedPlaybook(string folderName)
    method WriteAppliedPlaybook (line 1159) | private static void WriteAppliedPlaybook(string playbookPath, [CanBeNu...
    method CopyDirectory (line 1208) | static void CopyDirectory(string sourceDir, string destDir)
    method DownloadLanguagesAsync (line 1226) | public static async Task DownloadLanguagesAsync(IEnumerable<string> la...
    method IsApplicableUpgrade (line 1397) | private static bool IsApplicableUpgrade(string oldVersion, string allo...
    method IsApplicableWindowsVersion (line 1443) | public static bool IsApplicableWindowsVersion(string version, bool ISO...
    method IsApplicableOption (line 1500) | private static bool IsApplicableOption(string option, List<string> opt...
    method IsApplicableArch (line 1528) | private static bool IsApplicableArch(string arch, [CanBeNull] string i...

FILE: TrustedUninstaller.Shared/AugmentedProcess.cs
  class AugmentedProcess (line 24) | [DefaultEvent("Exited"), DefaultProperty("StartInfo"), HostProtection(Sh...
    class Process (line 27) | public class Process : Component
      type CreateType (line 29) | public enum CreateType {
      type StreamReadMode (line 81) | private enum StreamReadMode
      method Process (line 98) | public Process()
      method Process (line 105) | [ResourceExposure(ResourceScope.Machine)]
      method ReleaseProcessHandle (line 500) | void ReleaseProcessHandle(SafeProcessHandle handle)
      method CompletionCallback (line 516) | private void CompletionCallback(object context, bool wasSignaled)
      method Dispose (line 527) | protected override void Dispose(bool disposing)
      method Close (line 545) | public void Close()
      method EnsureState (line 576) | [ResourceExposure(ResourceScope.None)]
      method EnsureWatchingForExit (line 607) | void EnsureWatchingForExit()
      method OnExited (line 630) | protected void OnExited()
      method GetProcessHandle (line 643) | [ResourceExposure(ResourceScope.None)]
      method GetProcessHandle (line 684) | SafeProcessHandle GetProcessHandle(int access)
      method OpenProcessHandle (line 693) | SafeProcessHandle OpenProcessHandle()
      method OpenProcessHandle (line 697) | SafeProcessHandle OpenProcessHandle(Int32 access)
      method RaiseOnExited (line 714) | void RaiseOnExited()
      method Refresh (line 736) | public void Refresh()
      method SetProcessHandle (line 756) | void SetProcessHandle(SafeProcessHandle processHandle)
      method SetProcessId (line 769) | [ResourceExposure(ResourceScope.Machine)]
      method Start (line 784) | [ResourceExposure(ResourceScope.None)]
      method CreatePipeWithSecurityAttributes (line 794) | [ResourceExposure(ResourceScope.Process)]
      method CreatePipe (line 812) | [ResourceExposure(ResourceScope.None)]
      method BuildCommandLine (line 848) | private static StringBuilder BuildCommandLine(string executableFileN...
      method StartWithCreateProcess (line 874) | [ResourceExposure(ResourceScope.Machine)]
      method StartWithShellExecuteEx (line 1160) | [ResourceExposure(ResourceScope.Machine)]
      method Start (line 1289) | [ResourceExposure(ResourceScope.Machine)]
      method Kill (line 1308) | [ResourceExposure(ResourceScope.Machine)]
      method StopWatchingForExit (line 1327) | void StopWatchingForExit()
      method WaitForExit (line 1349) | public bool WaitForExit(int milliseconds)
      method WaitForExit (line 1406) | public void WaitForExit()
      method WaitForInputIdle (line 1419) | public bool WaitForInputIdle(int milliseconds)
      method WaitForInputIdle (line 1453) | public bool WaitForInputIdle()
      method BeginOutputReadLine (line 1467) | [System.Runtime.InteropServices.ComVisible(false)]
      method BeginErrorReadLine (line 1500) | [System.Runtime.InteropServices.ComVisible(false)]
      method CancelOutputRead (line 1534) | [System.Runtime.InteropServices.ComVisible(false)]
      method CancelErrorRead (line 1553) | [System.Runtime.InteropServices.ComVisible(false)]
      method OutputReadNotifyUser (line 1566) | internal void OutputReadNotifyUser(String data)
      method ErrorReadNotifyUser (line 1586) | internal void ErrorReadNotifyUser(String data)
      type State (line 1611) | enum State
    class ProcessInfo (line 1631) | internal class ProcessInfo
    class ThreadInfo (line 1658) | internal class ThreadInfo
    class ModuleInfo (line 1676) | internal class ModuleInfo
    class EnvironmentBlock (line 1686) | internal static class EnvironmentBlock
      method ToByteArray (line 1688) | public static byte[] ToByteArray(StringDictionary sd, bool unicode)
    class OrdinalCaseInsensitiveComparer (line 1728) | internal class OrdinalCaseInsensitiveComparer : IComparer
      method Compare (line 1731) | public int Compare(Object a, Object b)
    class ShellExecuteHelper (line 1743) | internal class ShellExecuteHelper
      method ShellExecuteHelper (line 1748) | public ShellExecuteHelper(NativeMethods.ShellExecuteInfo executeInfo)
      method ShellExecuteFunction (line 1752) | [ResourceExposure(ResourceScope.None)]
      method ShellExecuteOnSTAThread (line 1761) | public bool ShellExecuteOnSTAThread()
    method GetNewBufferSize (line 1792) | private static int GetNewBufferSize(int existingBufferSize, int requir...
    method GetProcessInfo (line 1803) | internal static ProcessInfo GetProcessInfo(int processId, string machi...
    method GetProcessInfos (line 1809) | internal static ProcessInfo[] GetProcessInfos(Predicate<int> processId...
    method GetProcessInfos (line 1840) | private static ProcessInfo[] GetProcessInfos(IntPtr dataPtr, Predicate...
    method GetThreadWaitReason (line 1903) | internal static ThreadWaitReason GetThreadWaitReason(int value)
    method GetProcessShortName (line 1945) | internal static string GetProcessShortName(string name)
    class NativeMethods (line 1963) | [HostProtection(MayLeakOnAbort = true)]
      method NtQuerySystemInformation (line 1980) | [DllImport("ntdll.dll", CharSet = CharSet.Auto)]
      class SystemProcessInformation (line 1987) | [StructLayout(LayoutKind.Sequential)]
      class SystemThreadInformation (line 2027) | [StructLayout(LayoutKind.Sequential)]
      class STARTUPINFO (line 2044) | [StructLayout(LayoutKind.Sequential)]
        method STARTUPINFO (line 2065) | public STARTUPINFO()
        method Dispose (line 2069) | public void Dispose()
      class SECURITY_ATTRIBUTES (line 2090) | [StructLayout(LayoutKind.Sequential)]
      method GetExitCodeProcess (line 2098) | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = tr...
      method GetProcessTimes (line 2101) | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = tr...
      method GetStdHandle (line 2104) | [DllImport("kernel32.dll", CharSet = CharSet.Ansi, SetLastError = tr...
      method CreatePipe (line 2107) | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = tr...
      method CreateProcess (line 2110) | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = tr...
      method TerminateProcess (line 2123) | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = tr...
      method GetCurrentProcess (line 2126) | [DllImport("kernel32.dll", CharSet = CharSet.Ansi, SetLastError = tr...
      method CreateProcessAsUser (line 2129) | [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = tr...
      method CreateProcessWithToken (line 2135) | [DllImport("advapi32", SetLastError = true, CharSet = CharSet.Auto)]
      method CreateProcessWithLogonW (line 2148) | [DllImport("advapi32.dll", CharSet = CharSet.Unicode, ExactSpelling ...
      class PROCESS_INFORMATION (line 2156) | [StructLayout(LayoutKind.Sequential)]
      type LogonFlags (line 2165) | [Flags]
      method WaitForInputIdle (line 2185) | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
      method ShellExecuteEx (line 2188) | [DllImport("shell32.dll", CharSet = CharSet.Auto, SetLastError = true)]
      method DuplicateHandle (line 2191) | [DllImport("kernel32.dll", CharSet = CharSet.Ansi, SetLastError = tr...
      method DuplicateHandle (line 2195) | [DllImport("kernel32.dll", CharSet = System.Runtime.InteropServices....
      method GetWindowText (line 2199) | [DllImport("user32.dll", CharSet = CharSet.Auto, BestFitMapping = tr...
      method GetWindowTextLength (line 2202) | [DllImport("user32.dll", CharSet = CharSet.Auto)]
      method SendMessageTimeout (line 2205) | [DllImport("user32.dll", CharSet = CharSet.Auto)]
      method GetWindowLong (line 2208) | [DllImport("user32.dll", CharSet = CharSet.Auto)]
      method PostMessage (line 2211) | [DllImport("user32.dll", CharSet = CharSet.Auto)]
      class ShellExecuteInfo (line 2215) | [StructLayout(LayoutKind.Sequential)]
        method ShellExecuteInfo (line 2233) | [ResourceExposure(ResourceScope.Machine)]
      type LUID (line 2240) | [StructLayout(LayoutKind.Sequential)]
    class AsyncStreamReader (line 2330) | internal class AsyncStreamReader : IDisposable
      method AsyncStreamReader (line 2361) | internal AsyncStreamReader(Process process, Stream stream, UserCallB...
      method AsyncStreamReader (line 2367) | internal AsyncStreamReader(Process process, Stream stream, UserCallB...
      method Init (line 2372) | private void Init(Process process, Stream stream, UserCallBack callb...
      method Close (line 2388) | public virtual void Close()
      method Dispose (line 2392) | void IDisposable.Dispose()
      method Dispose (line 2397) | protected virtual void Dispose(bool disposing)
      method BeginReadLine (line 2433) | internal void BeginReadLine()
      method CancelOperation (line 2449) | internal void CancelOperation()
      method ReadBuffer (line 2455) | private void ReadBuffer(IAsyncResult ar)
      method GetLinesFromStringBuilder (line 2515) | private void GetLinesFromStringBuilder()
      method FlushMessageQueue (line 2579) | private void FlushMessageQueue()
      method WaitUtilEOF (line 2612) | internal void WaitUtilEOF()
    class DataReceivedEventArgs (line 2625) | public class DataReceivedEventArgs : EventArgs
      method DataReceivedEventArgs (line 2628) | internal DataReceivedEventArgs(string data) => this._data = data;
    class ProcessWaitHandle (line 2632) | internal class ProcessWaitHandle : WaitHandle
      method ProcessWaitHandle (line 2634) | [ResourceExposure(ResourceScope.None)]
    class SafeThreadHandle (line 2649) | [SuppressUnmanagedCodeSecurityAttribute]
      method SafeThreadHandle (line 2652) | internal SafeThreadHandle() : base(true) { }
      method InitialSetHandle (line 2653) | internal void InitialSetHandle(IntPtr h)
      method ReleaseHandle (line 2658) | override protected bool ReleaseHandle()
      method CloseHandle (line 2662) | [DllImport("kernel32.dll", ExactSpelling = true, CharSet = System.Ru...
    class SafeLocalMemHandle (line 2666) | [HostProtectionAttribute(MayLeakOnAbort = true)]
      method SafeLocalMemHandle (line 2670) | [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
      method LocalFree (line 2675) | [DllImport("kernel32.dll")]
      method ReleaseHandle (line 2679) | override protected bool ReleaseHandle()
    class SafeProcessHandle (line 2685) | [SuppressUnmanagedCodeSecurityAttribute]
      method SafeProcessHandle (line 2691) | internal SafeProcessHandle() : base(true) { }
      method SafeProcessHandle (line 2692) | internal SafeProcessHandle(IntPtr handle) : base(true)
      method SafeProcessHandle (line 2696) | [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
      method OpenProcess (line 2701) | [DllImport("kernel32.dll", CharSet = System.Runtime.InteropServices....
      method InitialSetHandle (line 2704) | internal void InitialSetHandle(IntPtr h)
      method ReleaseHandle (line 2709) | override protected bool ReleaseHandle()
      method CloseHandle (line 2713) | [DllImport("kernel32.dll", ExactSpelling = true, CharSet = System.Ru...
    class ProcessStartInfo (line 2717) | [TypeConverter(typeof(ExpandableObjectConverter)),
      method ProcessStartInfo (line 2748) | public ProcessStartInfo() { }
      method ProcessStartInfo (line 2749) | internal ProcessStartInfo(Process parent)
      method ProcessStartInfo (line 2756) | [ResourceExposure(ResourceScope.Machine)]
      method ProcessStartInfo (line 2765) | [ResourceExposure(ResourceScope.Machine)]
    class StringDictionaryWithComparer (line 3115) | [Serializable]
      method StringDictionaryWithComparer (line 3118) | public StringDictionaryWithComparer() : this((IEqualityComparer)Stri...
      method StringDictionaryWithComparer (line 3119) | public StringDictionaryWithComparer(IEqualityComparer comparer) => t...
      method Add (line 3129) | public override void Add(string key, string value)
      method ContainsKey (line 3134) | public override bool ContainsKey(string key) => key != null ? this.c...
      method Remove (line 3135) | public override void Remove(string key)
    class StringDictionary (line 3142) | [Serializable]
      method Add (line 3188) | public virtual void Add(string key, string value)
      method Clear (line 3195) | public virtual void Clear() => this.contents.Clear();
      method ContainsKey (line 3201) | public virtual bool ContainsKey(string key)
      method ContainsValue (line 3210) | public virtual bool ContainsValue(string value) => this.contents.Con...
      method CopyTo (line 3222) | public virtual void CopyTo(Array array, int index) => this.contents....
      method GetEnumerator (line 3225) | public virtual IEnumerator GetEnumerator() => (IEnumerator)this.cont...
      method Remove (line 3230) | public virtual void Remove(string key)
      method ReplaceHashtable (line 3235) | internal void ReplaceHashtable(Hashtable useThisHashtableInstead) =>...
      method AsGenericDictionary (line 3236) | internal IDictionary<string, string> AsGenericDictionary() => (IDict...
      class GenericAdapter (line 3238) | private class GenericAdapter : IDictionary<string, string>, ICollect...
        method GenericAdapter (line 3243) | internal GenericAdapter(StringDictionary stringDictionary) => this...
        method Add (line 3244) | public void Add(string key, string value) => this[key] = value;
        method ContainsKey (line 3245) | public bool ContainsKey(string key) => this.m_stringDictionary.Con...
        method Clear (line 3246) | public void Clear() => this.m_stringDictionary.Clear();
        method Remove (line 3279) | public bool Remove(string key)
        method TryGetValue (line 3285) | public bool TryGetValue(string key, out string value)
        method Add (line 3295) | void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<st...
        method Contains (line 3296) | bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePa...
        method CopyTo (line 3301) | void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair...
        method Remove (line 3310) | bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair...
        method GetEnumerator (line 3316) | IEnumerator IEnumerable.GetEnumerator() => (IEnumerator)this.GetEn...
        method GetEnumerator (line 3317) | public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
        type KeyOrValue (line 3322) | internal enum KeyOrValue
        class ICollectionToGenericCollectionAdapter (line 3328) | private class ICollectionToGenericCollectionAdapter : ICollection<...
          method ICollectionToGenericCollectionAdapter (line 3332) | public ICollectionToGenericCollectionAdapter(StringDictionary so...
          method Add (line 3337) | public void Add(string item) => this.ThrowNotSupportedException();
          method Clear (line 3338) | public void Clear() => this.ThrowNotSupportedException();
          method ThrowNotSupportedException (line 3339) | public void ThrowNotSupportedException()
          method Contains (line 3344) | public bool Contains(string item) => this._keyOrValue == StringD...
          method CopyTo (line 3345) | public void CopyTo(string[] array, int arrayIndex) => this.GetUn...
          method Remove (line 3348) | public bool Remove(string item)
          method GetUnderlyingCollection (line 3353) | private ICollection GetUnderlyingCollection() => this._keyOrValu...
          method GetEnumerator (line 3354) | public IEnumerator<string> GetEnumerator()
          method GetEnumerator (line 3358) | IEnumerator IEnumerable.GetEnumerator() => this.GetUnderlyingCol...

FILE: TrustedUninstaller.Shared/ControlWriter.cs
  class Class1 (line 9) | class Class1

FILE: TrustedUninstaller.Shared/Defender.cs
  class Defender (line 26) | public static class Defender
    method RenameAllChildFiles (line 58) | private static void RenameAllChildFiles(string dir, bool reset)
    method DisableDefenderPrivileged (line 85) | [InterprocessMethod(Level.Administrator)]
    method Cripple (line 110) | [InterprocessMethod(Level.Administrator)]
    method DeCripple (line 126) | [InterprocessMethod(Level.Administrator)]
    method DisableBlocklist (line 144) | [InterprocessMethod(Level.Administrator)]
    method DisableUCPD (line 213) | [InterprocessMethod(Level.Administrator)]
    method KillAndDisable (line 275) | [InterprocessMethod(Level.Administrator)]
    method InstallService (line 433) | private static void InstallService()
    method EnableDontDisplayLastUsername (line 463) | private static bool EnableDontDisplayLastUsername()
    method AllowServiceSafeBoot (line 480) | private static void AllowServiceSafeBoot()
    method UninstallService (line 490) | public static void UninstallService(IntPtr service)
    method WaitForServiceStatus (line 504) | private static bool WaitForServiceStatus(IntPtr service, Win32.Service...
    method RunPSCommand (line 549) | private static int RunPSCommand(string command, [CanBeNull] DataReceiv...
    method RunCommand (line 551) | private static int RunCommand(string exe, string arguments, [CanBeNull...
    method ExtractCab (line 583) | private static string ExtractCab()
    method Disable (line 607) | [InterprocessMethod(Level.Administrator)]
    method GetDefenderPrivileges (line 847) | public static void GetDefenderPrivileges()
    method StartElevatedProcess (line 859) | [InterprocessMethod(Level.Administrator)]
    type ProcessType (line 876) | public
    method Kill (line 884) | public static bool Kill()
    method CreateWinDefendToken (line 996) | private static Win32.TokensEx.SafeTokenHandle CreateWinDefendToken(Win...
    method ImpersonateProcessByName (line 1147) | private static void ImpersonateProcessByName(string name, out Win32.To...

FILE: TrustedUninstaller.Shared/Exceptions/ErrorHandlingException.cs
  class ErrorHandlingException (line 6) | public class ErrorHandlingException : Exception
    method ErrorHandlingException (line 8) | public ErrorHandlingException(TaskAction.ExitCodeAction action, string...

FILE: TrustedUninstaller.Shared/Exceptions/InvalidRegistryEntryException.cs
  class InvalidRegistryEntryException (line 5) | public class InvalidRegistryEntryException : Exception
    method InvalidRegistryEntryException (line 7) | public InvalidRegistryEntryException() { }
    method InvalidRegistryEntryException (line 8) | public InvalidRegistryEntryException(string message) : base(message) { }
    method InvalidRegistryEntryException (line 9) | public InvalidRegistryEntryException(string message, Exception inner) ...

FILE: TrustedUninstaller.Shared/Exceptions/TaskInProgressException.cs
  class TaskInProgressException (line 5) | public class TaskInProgressException : Exception
    method TaskInProgressException (line 7) | public TaskInProgressException() {}
    method TaskInProgressException (line 8) | public TaskInProgressException(string message) : base(message) {}
    method TaskInProgressException (line 9) | public TaskInProgressException(string message, Exception inner) : base...

FILE: TrustedUninstaller.Shared/Globals.cs
  class Globals (line 16) | public class Globals
  class WizardMetadata (line 21) | [Serializable]
    method Construct (line 33) | public virtual void Construct()
    method Serialize (line 45) | public string Serialize(ISerializer serializer) => serializer.Serializ...

FILE: TrustedUninstaller.Shared/ISO.cs
  class ISO (line 6) | [Serializable]

FILE: TrustedUninstaller.Shared/NativeProcess.cs
  type SECURITY_ATTRIBUTES (line 15) | [StructLayout(LayoutKind.Sequential)]
  type PROCESS_INFORMATION (line 23) | [StructLayout(LayoutKind.Sequential)]
  type STARTUPINFO (line 33) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
  type STARTUPINFOEX (line 56) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
  class NativeProcess (line 63) | public class NativeProcess
    method CreateProcessW (line 65) | [DllImport("kernel32.dll")]
    method UpdateProcThreadAttribute (line 73) | [DllImport("kernel32.dll", SetLastError = true)]
    method InitializeProcThreadAttributeList (line 79) | [DllImport("kernel32.dll", SetLastError = true)]
    method DeleteProcThreadAttributeList (line 84) | [DllImport("kernel32.dll", SetLastError = true)]
    method CloseHandle (line 88) | [DllImport("kernel32.dll", SetLastError = true)]
    method WaitForSingleObject (line 96) | [DllImport("kernel32.dll", SetLastError = true)]
    method StartProcessAsTI (line 103) | [InterprocessMethod(Level.Administrator)]

FILE: TrustedUninstaller.Shared/NtStatus.cs
  type NtStatus (line 3) | internal enum NtStatus

FILE: TrustedUninstaller.Shared/OOBE.cs
  class OOBESoftware (line 8) | public class OOBESoftware
  class OOBE (line 17) | [Serializable]
    type InternetRequirementLevel (line 20) | public enum InternetRequirementLevel

FILE: TrustedUninstaller.Shared/Parser/PlaybookParser.cs
  class PlaybookParser (line 19) | public static class PlaybookParser

FILE: TrustedUninstaller.Shared/Parser/TaskActionResolver.cs
  class TaskActionResolver (line 11) | internal class TaskActionResolver : INodeTypeResolver
    method Resolve (line 13) | public bool Resolve(NodeEvent? nodeEvent, ref Type currentType)

FILE: TrustedUninstaller.Shared/Playbook.cs
  class VersionNumber (line 33) | [Serializable]
    method WriteXml (line 36) | public void WriteXml(XmlWriter writer)
    method ReadXml (line 41) | public void ReadXml(XmlReader reader)
    method GetSchema (line 53) | public XmlSchema GetSchema() => null;
    method IsEqual (line 92) | public bool IsEqual(VersionNumber other) => Major == other.Major && Mi...
    method IsGreaterThan (line 93) | public bool IsGreaterThan(VersionNumber other) => Major > other.Major ...
    method IsLessThan (line 94) | public bool IsLessThan(VersionNumber other) => other.IsGreaterThan(this);
    method IsGreaterThanOrEqualTo (line 96) | public bool IsGreaterThanOrEqualTo(VersionNumber other) => IsGreaterTh...
    method IsLessThanOrEqualTo (line 97) | public bool IsLessThanOrEqualTo(VersionNumber other) => IsLessThan(oth...
    method Equals (line 99) | public override bool Equals(object obj)
    method ToString (line 106) | public override string ToString() => Major + "." + Minor + "." + Revis...
    method GetVersionNumber (line 108) | public static VersionNumber GetVersionNumber(string toBeParsed)
  type ErrorLevel (line 141) | public enum ErrorLevel
  class Playbook (line 148) | public class Playbook : XmlDeserializable
    method MeasureStringWidth (line 150) | public double MeasureStringWidth(string candidate, Typeface typeface, ...
    method Validate (line 164) | public override void Validate()
    method GetAppliedPlaybooks (line 262) | [NotNull]
    method LastAppliedMatch (line 321) | [CanBeNull]
    method IsUpgradeApplicable (line 339) | public bool IsUpgradeApplicable(string oldVersion)
    method GetVersionNumber (line 378) | public VersionNumber GetVersionNumber()
    method LatestPlaybookVersion (line 383) | public async Task<string> LatestPlaybookVersion()
    method GetPlaybookVersions (line 416) | public async Task<List<string>> GetPlaybookVersions()
    method DownloadLatestPlaybook (line 452) | public async Task DownloadLatestPlaybook(BackgroundWorker worker = null)
    method GetRepository (line 532) | public string GetRepository()
    method GetPlaybookGitPlatform (line 543) | public string GetPlaybookGitPlatform()
    method IsValidGit (line 553) | public bool IsValidGit()
    method ToString (line 562) | public override string ToString()
    class CheckboxPage (line 571) | public class CheckboxPage : FeaturePage
      method Validate (line 573) | public override void Validate()
      class CheckboxOption (line 586) | public class CheckboxOption : Option
    class RadioPage (line 598) | public class RadioPage : FeaturePage
      method Validate (line 600) | public override void Validate()
      class RadioOption (line 618) | public class RadioOption : Option
      method OptionNames (line 625) | [CanBeNull] public override string[] OptionNames() => Options?.Selec...
    class RadioImagePage (line 627) | public class RadioImagePage : FeaturePage
      method Validate (line 629) | public override void Validate()
      class RadioImageOption (line 650) | public class RadioImageOption : Option
      method OptionNames (line 665) | [CanBeNull] public override string[] OptionNames() => Options?.Selec...
    class FeaturePage (line 671) | public abstract class FeaturePage : XmlDeserializable
      method Validate (line 673) | public override void Validate() => throw new Exception("FeaturePage ...
      class Option (line 684) | public class Option
      class Line (line 694) | public class Line
      method OptionNames (line 705) | [CanBeNull] public virtual string[] OptionNames() => Options?.Select...
    class Package (line 711) | public class Package : XmlDeserializable
      method Validate (line 713) | public override void Validate()
  type ComponentIcon (line 738) | public enum ComponentIcon
  class ISOSettings (line 745) | public class ISOSettings
  class OOBESettings (line 751) | public class OOBESettings
  class BulletPoint (line 756) | public class BulletPoint

FILE: TrustedUninstaller.Shared/Predicates/IPredicate.cs
  type IPredicate (line 9) | interface IPredicate
    method Evaluate (line 11) | public Task<bool> Evaluate();

FILE: TrustedUninstaller.Shared/ProcessPrivilege.cs
  type Privilege (line 18) | public enum Privilege
  class ProcessPrivilege (line 27) | public class ProcessPrivilege
    method ResetTokens (line 36) | internal static void ResetTokens()
    method StartPrivilegedTask (line 54) | public static void StartPrivilegedTask(AugmentedProcess.Process proces...
    method StartThread (line 74) | private static TaskCompletionSource<Exception> StartThread(AugmentedPr...
    method GetUserSession (line 115) | private static uint GetUserSession()
    method GetUserToken (line 161) | private static void GetUserToken(bool getPrivileges)
    method GetElevatedUserToken (line 194) | private static void GetElevatedUserToken(bool trustedInstaller)
    method GetSystemToken (line 474) | public static void GetSystemToken()
    method GetCurrentProcessToken (line 573) | public static Win32.TokensEx.SafeTokenHandle GetCurrentProcessToken()
    method GetProcessTokenByName (line 581) | private static Win32.TokensEx.SafeTokenHandle GetProcessTokenByName(st...

FILE: TrustedUninstaller.Shared/ProviderStatus.cs
  type SignatureStatusFlags (line 7) | [Flags]
  type AVStatusFlags (line 15) | [Flags]
  type ProviderFlags (line 23) | [Flags]
  type ProviderStatus (line 36) | [StructLayout(LayoutKind.Sequential)]

FILE: TrustedUninstaller.Shared/Requirements.cs
  class Requirements (line 26) | public static class Requirements
    type Requirement (line 28) | [Serializable]
    method MetRequirements (line 61) | public static async Task<Requirement[]> MetRequirements(this Requireme...
    type IRequirements (line 113) | public interface IRequirements
      method IsMet (line 115) | Task<bool> IsMet();
      method Meet (line 116) | Task<bool> Meet();
    class RequirementBase (line 118) | public class RequirementBase
      class ProgressEventArgs (line 120) | public class ProgressEventArgs : EventArgs
        method ProgressEventArgs (line 123) | public ProgressEventArgs(int percent)
      method OnProgressAdded (line 131) | protected void OnProgressAdded(int percent)
    class Battery (line 137) | public class Battery : RequirementBase, IRequirements
      class PowerState (line 139) | [StructLayout(LayoutKind.Sequential)]
        method PowerState (line 150) | private PowerState() {}
        method GetPowerState (line 152) | public static PowerState GetPowerState()
        method GetSystemPowerStatusRef (line 161) | [DllImport("Kernel32", EntryPoint = "GetSystemPowerStatus")]
      type ACLineStatus (line 166) | public enum ACLineStatus : byte
      type BatteryFlag (line 171) | public enum BatteryFlag : byte
      method IsMet (line 177) | public async Task<bool> IsMet()
      method Meet (line 192) | public Task<bool> Meet() => throw new NotImplementedException();
    class Internet (line 195) | public class Internet : RequirementBase, IRequirements
      method InternetCheckConnection (line 197) | [DllImport("wininet.dll", SetLastError = true)]
      method InternetGetConnectedState (line 200) | [DllImport("wininet.dll", SetLastError=true)]
      method IsMet (line 203) | public async Task<bool> IsMet()
      method Meet (line 231) | public Task<bool> Meet() => throw new NotImplementedException();
    class DefenderDisabled (line 234) | public class DefenderDisabled : RequirementBase, IRequirements
      method IsMet (line 236) | public async Task<bool> IsMet()
      method Meet (line 241) | public async Task<bool> Meet() => throw new NotImplementedException();
    class DefenderToggled (line 244) | public class DefenderToggled : RequirementBase, IRequirements
      method IsMet (line 246) | public async Task<bool> IsMet()
      method Meet (line 302) | public async Task<bool> Meet()
    class SearchCompletedCallback (line 308) | class SearchCompletedCallback : ISearchCompletedCallback
      method Invoke (line 310) | public void Invoke(ISearchJob searchJob, ISearchCompletedCallbackArg...
      method CompleteTask (line 316) | protected void CompleteTask()
    class NoPendingUpdates (line 330) | public class NoPendingUpdates : RequirementBase, IRequirements
      method IsMet (line 332) | public async Task<bool> IsMet()
      method Meet (line 345) | public Task<bool> Meet() => throw new NotImplementedException();
      method CheckDisposable (line 347) | [InterprocessMethod(Level.User)]
    class NoAntivirus (line 385) | public class NoAntivirus : RequirementBase, IRequirements
      method IsMet (line 387) | public async Task<bool> IsMet()
      method Meet (line 392) | public Task<bool> Meet() => throw new NotImplementedException();
    class Activation (line 395) | public class Activation : RequirementBase, IRequirements
      method IsMet (line 397) | public async Task<bool> IsMet()
      method Meet (line 402) | public Task<bool> Meet() => throw new NotImplementedException();
    class FreshInstall (line 405) | public class FreshInstall : RequirementBase, IRequirements
      method IsMet (line 407) | public async Task<bool> IsMet()
      method Meet (line 434) | public async Task<bool> Meet() => throw new NotImplementedException();
    class UCPDDisabled (line 436) | public class UCPDDisabled : RequirementBase, IRequirements
      method IsMet (line 438) | public async Task<bool> IsMet()
      method Meet (line 457) | public async Task<bool> Meet() => throw new NotImplementedException();
    class WindowsBuild (line 460) | public class WindowsBuild
      method IsMet (line 462) | public bool IsMet(string[] builds)
      method Meet (line 467) | public Task<bool> Meet() => throw new NotImplementedException();

FILE: TrustedUninstaller.Shared/Tasks/ITaskAction.cs
  type Scope (line 9) | public enum Scope
  type ITaskAction (line 17) | public interface ITaskAction
    method GetDefaultErrorAction (line 19) | public ErrorAction GetDefaultErrorAction();
    method GetRetryAllowed (line 20) | public bool GetRetryAllowed();
    method GetProgressWeight (line 21) | public int GetProgressWeight();
    method ResetProgress (line 22) | public void ResetProgress();
    method ErrorString (line 23) | public string ErrorString();
    method GetStatus (line 24) | public UninstallTaskStatus GetStatus(Output.OutputWriter output);
    method RunTask (line 25) | public Task<bool> RunTask(Output.OutputWriter output);
    method RunTaskOnMainThread (line 26) | public void RunTaskOnMainThread(Output.OutputWriter output);

FILE: TrustedUninstaller.Shared/Tasks/OutputProcessor.cs
  class TaskActionWithOutputProcessor (line 18) | public abstract class TaskActionWithOutputProcessor : Tasks.TaskAction
    method ExeRunning (line 20) | protected static bool ExeRunning(string name, int id)
    class OutputHandler (line 32) | protected class OutputHandler : IDisposable
      method GetOEMCP (line 34) | [System.Runtime.InteropServices.DllImport("kernel32.dll")]
      method OutputHandler (line 44) | public OutputHandler(string name, Process process, [NotNull] OutputW...
      method OutputHandler (line 65) | public OutputHandler(string name, AugmentedProcess.Process process, ...
      method StartProcess (line 86) | public void StartProcess(Privilege privilege = Privilege.TrustedInst...
      method CancelReading (line 110) | public void CancelReading()
      method TryLock (line 204) | private IDisposable TryLock(int timout = Timeout.Infinite)
      method Dispose (line 211) | public void Dispose()
      class Releaser (line 230) | private class Releaser : IDisposable
        method Releaser (line 234) | public Releaser(SemaphoreSlim semaphore) => this.semaphore = semap...
        method Dispose (line 235) | public void Dispose()
      method WriteErrorSafe (line 254) | private void WriteErrorSafe(object _, object args)
      method WriteError (line 293) | private void WriteError([NotNull] string text)
      method WriteOutputSafe (line 305) | private void WriteOutputSafe(object _, object args)
      method WriteOutput (line 344) | private void WriteOutput([NotNull] string text)
      method WriteUnsafe (line 355) | private void WriteUnsafe(string type, [NotNull] string text)
      method AddToCycle (line 488) | private void AddToCycle(OutputWriter.LineStream stream, ProgressPatt...
    class ProgressLine (line 508) | private class ProgressLine
      method ProgressLine (line 513) | public ProgressLine(OutputWriter.LineStream stream, ProgressPattern ...
    class ProgressGroup (line 516) | private class ProgressGroup
      method ProgressGroup (line 520) | public ProgressGroup(List<ProgressLine> lines) => Lines = new List<P...
    class ProgressPattern (line 523) | private class ProgressPattern
      method ProgressPattern (line 525) | private ProgressPattern() { }
      class ProgressItem (line 604) | private class ProgressItem
        method ProgressItem (line 610) | public ProgressItem(bool isParsable, string text, int index, [CanB...
        method SequenceEqual (line 612) | public static bool SequenceEqual([NotNull] List<ProgressItem> firs...
      method ProgressPattern (line 639) | public ProgressPattern(string text)
      method Compare (line 913) | public bool Compare([NotNull] ProgressPattern pattern)
      method SequenceEqual (line 1004) | public static bool SequenceEqual([NotNull] List<ProgressPattern> fir...
      method SequenceEqual (line 1020) | public static bool SequenceEqual([NotNull] List<ProgressLine> first,...
      method GetString (line 1035) | public string GetString(ProgressPattern comparison)
      method GetString (line 1064) | public string GetString()

FILE: TrustedUninstaller.Shared/Tasks/TaskAction.cs
  type ErrorAction (line 7) | public enum ErrorAction
  type ISOSetting (line 20) | public enum ISOSetting
  type OOBESetting (line 33) | public enum OOBESetting
  class TaskAction (line 40) | public abstract class TaskAction
    type ExitCodeAction (line 42) | public enum ExitCodeAction
    method IsISOCompatible (line 90) | public virtual string? IsISOCompatible() => null;
    method IsApplicableNumber (line 91) | protected bool IsApplicableNumber(string number, int value)

FILE: TrustedUninstaller.Shared/Tasks/TaskList.cs
  class TaskList (line 5) | public class TaskList

FILE: TrustedUninstaller.Shared/Tasks/UninstallTask.cs
  type PreviousOption (line 11) | public enum PreviousOption
  class UninstallTask (line 16) | public class UninstallTask
    method Update (line 62) | public void Update()

FILE: TrustedUninstaller.Shared/Tasks/UninstallTaskPrivilege.cs
  type UninstallTaskPrivilege (line 3) | public enum UninstallTaskPrivilege

FILE: TrustedUninstaller.Shared/Tasks/UninstallTaskStatus.cs
  type UninstallTaskStatus (line 3) | public enum UninstallTaskStatus

FILE: TrustedUninstaller.Shared/USB/BZip2.cs
  class BZip2 (line 8) | public class BZip2
    method Decompress (line 17) | public static void Decompress(Stream inStream, Stream outStream, bool ...
    class BZip2InputStream (line 59) | public class BZip2InputStream : Stream
      method BZip2InputStream (line 149) | public BZip2InputStream(Stream stream)
      method Flush (line 224) | public override void Flush()
      method Seek (line 236) | public override long Seek(long offset, SeekOrigin origin)
      method SetLength (line 247) | public override void SetLength(long value)
      method Write (line 260) | public override void Write(byte[] buffer, int offset, int count)
      method WriteByte (line 271) | public override void WriteByte(byte value)
      method Read (line 286) | public override int Read(byte[] buffer, int offset, int count)
      method Dispose (line 310) | protected override void Dispose(bool disposing)
      method ReadByte (line 322) | public override int ReadByte()
      method MakeMaps (line 359) | private void MakeMaps()
      method Initialize (line 373) | private void Initialize()
      method InitBlock (line 391) | private void InitBlock()
      method EndBlock (line 423) | private void EndBlock()
      method Complete (line 438) | private void Complete()
      method FillBuffer (line 449) | private void FillBuffer()
      method BsR (line 471) | private int BsR(int n)
      method BsGetUChar (line 483) | private char BsGetUChar()
      method BsGetIntVS (line 488) | private int BsGetIntVS(int numBits)
      method BsGetInt32 (line 493) | private int BsGetInt32()
      method RecvDecodingTables (line 502) | private void RecvDecodingTables()
      method GetAndMoveToFrontDecode (line 613) | private void GetAndMoveToFrontDecode()
      method SetupBlock (line 816) | private void SetupBlock()
      method SetupRandPartA (line 855) | private void SetupRandPartA()
      method SetupNoRandPartA (line 888) | private void SetupNoRandPartA()
      method SetupRandPartB (line 909) | private void SetupRandPartB()
      method SetupRandPartC (line 948) | private void SetupRandPartC()
      method SetupNoRandPartB (line 965) | private void SetupNoRandPartB()
      method SetupNoRandPartC (line 992) | private void SetupNoRandPartC()
      method SetDecompressStructureSizes (line 1009) | private void SetDecompressStructureSizes(int newSize100k)
      method CompressedStreamEOF (line 1028) | private static void CompressedStreamEOF()
      method BlockOverrun (line 1033) | private static void BlockOverrun()
      method BadBlockHeader (line 1038) | private static void BadBlockHeader()
      method CrcError (line 1043) | private static void CrcError()
      method HbCreateDecodeTables (line 1048) | private static void HbCreateDecodeTables(int[] limit, int[] baseArra...
    class BZip2Crc (line 1137) | public sealed class BZip2Crc : IChecksum
      method BZip2Crc (line 1156) | public BZip2Crc()
      method Reset (line 1164) | public void Reset()
      method Update (line 1192) | [MethodImpl(MethodImplOptions.AggressiveInlining)]
      method Update (line 1203) | public void Update(byte[] buffer)
      method Update (line 1219) | public void Update(ArraySegment<byte> segment)
      method Update (line 1230) | private void Update(byte[] data, int offset, int count)
      method SlowUpdateLoop (line 1256) | [MethodImpl(MethodImplOptions.NoInlining)]
    class CrcUtilities (line 1266) | internal static class CrcUtilities
      method GenerateSlicingLookupTable (line 1286) | internal static uint[] GenerateSlicingLookupTable(uint polynomial, b...
      method UpdateDataForNormalPoly (line 1329) | [MethodImpl(MethodImplOptions.AggressiveInlining)]
      method UpdateDataForReversedPoly (line 1354) | [MethodImpl(MethodImplOptions.AggressiveInlining)]
      method UpdateDataCommon (line 1394) | [MethodImpl(MethodImplOptions.AggressiveInlining)]
    type IChecksum (line 1427) | public interface IChecksum
      method Reset (line 1432) | void Reset();
      method Update (line 1445) | void Update(int bval);
      method Update (line 1453) | void Update(byte[] buffer);
      method Update (line 1461) | void Update(ArraySegment<byte> segment);
    class BZip2Exception (line 1467) | [Serializable]
      method BZip2Exception (line 1473) | public BZip2Exception()
      method BZip2Exception (line 1481) | public BZip2Exception(string message)
      method BZip2Exception (line 1491) | public BZip2Exception(string message, Exception innerException)
      method BZip2Exception (line 1507) | protected BZip2Exception(SerializationInfo info, StreamingContext co...
    class BZip2Constants (line 1513) | internal static class BZip2Constants

FILE: TrustedUninstaller.Shared/USB/Drive.cs
  class Drive (line 20) | internal class Drive
    class VolumeNameAndLetter (line 22) | internal class VolumeNameAndLetter
    method GetNextAvailableDriveLetter (line 28) | private static char GetNextAvailableDriveLetter()
    method CreatePartition (line 58) | internal static bool CreatePartition(uint driveIndex, long size, long ...
    method GetVolumePathNamesForVolumeNameW (line 265) | [DllImport("kernel32.dll", SetLastError = true)]
    method GetVolumeNameForVolumeMountPoint (line 272) | [DllImport("kernel32.dll", SetLastError = true)]
    method SetVolumeMountPoint (line 277) | [DllImport("kernel32.dll", SetLastError = true)]
    method DeleteVolumeMountPoint (line 281) | [DllImport("kernel32.dll")]
    method FindFirstVolume (line 284) | [DllImport("kernel32.dll", SetLastError = true)]
    method FindNextVolume (line 288) | [DllImport("kernel32.dll", SetLastError = true)]
    method DefineDosDevice (line 291) | [DllImport("kernel32.dll")]
    method QueryDosDevice (line 295) | [DllImport("Kernel32.dll")]
    method FindVolumeClose (line 305) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
    method GetVolumeMount (line 309) | public static VolumeNameAndLetter GetVolumeMount(USB.UsbDisk usb, long...
    method RemoveMounts (line 418) | public static void RemoveMounts(USB.UsbDisk usb)
    method GetVolumeHandle (line 466) | public static SafeFileHandle GetVolumeHandle(USB.UsbDisk usb, long par...
    method VerifyLetterMatches (line 536) | internal static bool VerifyLetterMatches(char letter, USB.UsbDisk usb,...
    method PrepareDrive (line 608) | internal static void PrepareDrive(USB.UsbDisk usb)
    method GetGeometry (line 622) | internal static DISK_GEOMETRY_EX GetGeometry(SafeFileHandle handle)
    method GetLayout (line 638) | internal static DRIVE_LAYOUT_INFORMATION_EX GetLayout(SafeFileHandle h...
    method LockLogicalHandles (line 656) | internal static void LockLogicalHandles(USB.UsbDisk usb, SafeFileHandl...
    method CreatePartitionGPT (line 676) | internal static int CreatePartitionGPT(USB.UsbDisk usb, long size, boo...
    method Chkdsk (line 878) | internal static void Chkdsk(char driveLetter)
    method ChkdskCallback (line 884) | public static bool ChkdskCallback(FmifsCallbackCommand Command, uint A...
    method Chkdsk (line 922) | [DllImport("fmifs.dll", CharSet = CharSet.Unicode)]
    type FmifsCallbackCommand (line 935) | public enum FmifsCallbackCommand
    method UnmountUEFINTFS (line 977) | internal static void UnmountUEFINTFS()
    method RemountSafe (line 994) | internal static void RemountSafe(char driveLetter)
    method TryFlushDrive (line 1027) | internal static void TryFlushDrive(uint driveIndex)
    method TryFlushDrive (line 1035) | internal static void TryFlushDrive(char driveLetter)
    method FlushDrive (line 1043) | internal static void FlushDrive(SafeFileHandle handle) => Win32.FlushF...
    method GetHandle (line 1045) | internal static SafeFileHandle GetHandle(string path, Win32.FileAttrib...
    method GetDriveHandle (line 1064) | internal static SafeFileHandle GetDriveHandle(uint driveIndex, Win32.F...

FILE: TrustedUninstaller.Shared/USB/Drivers.cs
  class DriverManager (line 22) | public class DriverManager
    class Drivers (line 24) | public class Drivers
    class Driver (line 30) | public class Driver
    method HandleDrivers (line 52) | public static async Task HandleDrivers(Action<double> onProgressChange...
    method HandleRemoteDriverList (line 121) | private static async Task HandleRemoteDriverList(Action<double> onProg...
    method TryParseEnum (line 201) | public static bool TryParseEnum<TEnum>(string value, out TEnum result)...
    method ExtractArchive (line 216) | private static void ExtractArchive(string filePath, string extractDest...
    method CopyDirectory (line 223) | static void CopyDirectory(string sourceDir, string destinationDir)
    method GetSHA256 (line 247) | private static string GetSHA256(string filePath)
    method GetDriverPathsFromInstalled (line 256) | public static string[] GetDriverPathsFromInstalled()
    method GetDriverPathsFromGlobal (line 322) | public static string[] GetDriverPathsFromGlobal()
    method GetDriverPathsFromOEMInfs (line 370) | public static string[] GetDriverPathsFromOEMInfs()
    class HttpProgressClient (line 396) | public class HttpProgressClient : IDisposable
      method HttpProgressClient (line 408) | public HttpProgressClient()
      method StartDownload (line 413) | public async Task StartDownload(string downloadUrl, string destinati...
      method GetAsync (line 429) | public Task<HttpResponseMessage> GetAsync(string link)
      method DownloadFileFromHttpResponseMessage (line 434) | private async Task DownloadFileFromHttpResponseMessage(HttpResponseM...
      method ProcessContentStream (line 445) | private async Task ProcessContentStream(long? totalDownloadSize, Str...
      method TriggerProgressChanged (line 476) | private void TriggerProgressChanged(long? totalDownloadSize, long to...
      method Dispose (line 490) | public void Dispose()

FILE: TrustedUninstaller.Shared/USB/Format.cs
  class Format (line 15) | public class Format
    type CallbackCommand (line 17) | private enum CallbackCommand
    method FormatEx (line 42) | [DllImport("fmifs.dll", EntryPoint = "FormatEx", CharSet = CharSet.Aut...
    method FormatDrive (line 46) | public static void FormatDrive(string guid, string label, char driveLe...
    type FormatStatus (line 69) | private enum FormatStatus
    method FormatCallback (line 78) | private static Int32 FormatCallback(CallbackCommand callBackCommand, i...

FILE: TrustedUninstaller.Shared/USB/ISO.cs
  class ISO (line 32) | public static class ISO
    method GetFileReadStream (line 34) | private static Stream GetFileReadStream(FileStream fileStream)
    method DD_ISO (line 110) | [SuppressMessage("ReSharper", "AccessToModifiedClosure")]
    method SetFilePointerEx (line 259) | [DllImport("kernel32.dll")]
    method DD_EFI_ISO (line 263) | internal static void DD_EFI_ISO(ref SafeFileHandle handle, uint driveI...
    method WriteISO (line 299) | internal static async Task WriteISO(string filePath, string path, [Can...
    method ExtractISODirectory (line 335) | private static (long PendingBytes, long TotalBytes) ExtractISODirector...

FILE: TrustedUninstaller.Shared/USB/ISOWIM.cs
  class ISOWIM (line 14) | public static class ISOWIM
    method SetBootWimRequirements (line 16) | public static void SetBootWimRequirements(string isoPath, bool? tpm, b...
    method SetInstallWimRequirements (line 59) | public static async Task SetInstallWimRequirements(string isoPath, str...
    method ConvertWIMToESD (line 123) | public static void ConvertWIMToESD(string isoPath)
    method GenerateUnattendXml (line 139) | public static string GenerateUnattendXml(

FILE: TrustedUninstaller.Shared/USB/InterMethods.cs
  class InterMethods (line 14) | public class InterMethods
    method WriteISO (line 16) | [InterprocessMethod(Level.Administrator)]

FILE: TrustedUninstaller.Shared/USB/Interop.cs
  class Helper (line 13) | internal static class Helper
    method FormatVolume (line 15) | [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConv...
    method DeletePartitions (line 19) | [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConv...
    method GetValue (line 26) | [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConv...
    method GetValues (line 35) | [DllImport("client-helper.dll", CharSet = CharSet.Unicode, CallingConv...
    method GetDWordValue (line 39) | internal static ulong GetDWordValue(IntPtr data, string key, string va...
    method GetQWordValue (line 42) | internal static ulong GetQWordValue(IntPtr data, string key, string va...
  class Win32 (line 46) | internal static class Win32
    type CM_GETIDLIST_FILTER (line 50) | [Flags]
    type PNP_VETO_TYPE (line 67) | internal enum PNP_VETO_TYPE
    method CM_Request_Device_Eject (line 84) | [DllImport("setupapi.dll")]
    method CM_Get_Device_ID_List_Size (line 93) | [DllImport("CfgMgr32.dll", SetLastError = true, CharSet = CharSet.Unic...
    method CM_Get_Device_ID_List (line 96) | [DllImport("CfgMgr32.dll", SetLastError = true, CharSet = CharSet.Unic...
    method CM_Get_Parent (line 99) | [DllImport("CfgMgr32.dll", CharSet = CharSet.Unicode)]
    method DefineDosDevice (line 105) | [DllImport("kernel32.dll")]
    method QueryDosDevice (line 109) | [DllImport("Kernel32.dll")]
    method ZeroMemory (line 118) | [DllImport("Kernel32.dll", EntryPoint = "RtlZeroMemory", SetLastError ...
    method SetupDiGetClassDevs (line 121) | [DllImport("setupapi.dll", CharSet = CharSet.Auto)]
    method SetupDiGetClassDevs (line 125) | [DllImport("setupapi.dll", CharSet = CharSet.Auto)]
    method SetupDiEnumDeviceInterfaces (line 129) | [DllImport(@"setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
    method SetupDiBuildDriverInfoList (line 133) | [DllImport("setupapi.dll", CharSet = CharSet.Unicode, SetLastError = t...
    method SetupDiDestroyDriverInfoList (line 139) | [DllImport("setupapi.dll", CharSet = CharSet.Unicode, SetLastError = t...
    method SetupDiBuildDriverInfoList (line 145) | [DllImport("setupapi.dll", CharSet = CharSet.Unicode, SetLastError = t...
    method SetupDiDestroyDriverInfoList (line 151) | [DllImport("setupapi.dll", CharSet = CharSet.Unicode, SetLastError = t...
    method SetupDiCreateDeviceInfoList (line 157) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
    method SetupDiGetDeviceInterfaceDetail (line 160) | [DllImport(@"setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
    method SetupDiGetDeviceInterfaceDetail (line 166) | [DllImport(@"setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
    method SetupDiEnumDeviceInfo (line 171) | [DllImport(@"setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
    method SetupDiEnumDriverInfo (line 175) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Unic...
    method SetupDiEnumDriverInfo (line 183) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Unic...
    method SetupDiGetDriverInfoDetail (line 191) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Unic...
    method SetupDiGetDriverInfoDetail (line 200) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Unic...
    method SetupDiGetDeviceRegistryProperty (line 209) | [DllImport("setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
    method SetupDiGetDevicePropertyW (line 215) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Unic...
    method SetupDiGetDeviceInstanceId (line 220) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
    method SetupDiDestroyDeviceInfoList (line 224) | [DllImport("setupapi.dll", SetLastError = false)]
    method SetupDiGetDeviceInstallParams (line 227) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Unic...
    method SetupDiSetDeviceInstallParams (line 230) | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Unic...
    method SetupGetInfDriverStoreLocation (line 233) | [DllImport("setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
    method SetupCopyOEMInf (line 242) | [DllImport("setupapi.dll", SetLastError = true)]
    method CM_Get_DevNode_Property_Keys (line 254) | [DllImport("CfgMgr32.dll", CharSet = CharSet.Unicode)]
    method CM_Get_DevNode_Property (line 258) | [DllImport("CfgMgr32.dll", CharSet = CharSet.Unicode)]
    method CM_Get_Device_ID_Size (line 262) | [DllImport("setupapi.dll", SetLastError = true)]
    method CM_Get_Device_ID (line 265) | [DllImport("setupapi.dll", SetLastError = true)]
    method CM_Get_Child (line 269) | [DllImport("setupapi.dll", SetLastError = true)]
    method CM_Get_Sibling (line 272) | [DllImport("setupapi.dll", SetLastError = true)]
    method CM_Locate_DevNodeA (line 275) | [DllImport("setupapi.dll", SetLastError = true)]
    method DeviceIoControl (line 278) | [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true, ...
    method DeviceIoControl (line 285) | [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true, ...
    method CreateFile (line 291) | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    method WriteFile (line 301) | [DllImport("kernel32.dll")]
    method WriteFile (line 306) | [DllImport("kernel32.dll")]
    method FlushFileBuffers (line 311) | [DllImport("kernel32.dll", SetLastError = true)]
    method CloseHandle (line 314) | [DllImport("kernel32.dll", SetLastError = true)]
    method FillMemory (line 320) | [DllImport("kernel32.dll", EntryPoint = "RtlFillMemory", SetLastError ...
    method UpdateDriverForPlugAndPlayDevices (line 323) | [DllImport("newdev.dll", SetLastError = true)]
    method DiInstallDriver (line 332) | [DllImport("newdev.dll", SetLastError = true)]
    type INSTALLFLAG (line 342) | public enum INSTALLFLAG
    type DIIRFLAG (line 350) | [Flags]
    type SPOST (line 357) | public enum SPOST : uint
    type SP_COPY (line 365) | [Flags]
    type DEVPROPKEY (line 397) | [StructLayout(LayoutKind.Sequential)]
    class DevicePropertyTypes (line 404) | internal static class DevicePropertyTypes
    class DevicePropertyKeys (line 442) | internal static class DevicePropertyKeys
    type DiGetClassFlags (line 1340) | [Flags]
    type CmFlags (line 1350) | [Flags]
    type SP_DEVICE_INTERFACE_DATA (line 1357) | [StructLayout(LayoutKind.Sequential)]
    type SP_DEVINFO_DATA (line 1366) | [StructLayout(LayoutKind.Sequential)]
    type SP_DEVICE_INTERFACE_DETAIL_DATA (line 1375) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    type SP_DRVINFO_DATA (line 1384) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    type SP_DRVINFO_DETAIL_DATA (line 1400) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    type SP_DEVINSTALL_PARAMS (line 1418) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
      method Initialize (line 1432) | public void Initialize()
    type SP_ORIGINAL_FILE_INFO (line 1438) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    type FILETIME (line 1453) | [StructLayout(LayoutKind.Sequential)]
    type SPDIT (line 1460) | public enum SPDIT
    type SPDRP (line 1470) | internal enum SPDRP
    type FileAccess (line 1505) | [Flags]
    type FileShare (line 1577) | [Flags]
    type FileMode (line 1607) | internal enum FileMode : uint
    type FileAttributes (line 1639) | [Flags]
    type LARGE_INTEGER (line 1669) | [StructLayout(LayoutKind.Explicit, Size = 8)]
      method ToInt64 (line 1677) | internal long ToInt64()
      method FromInt64 (line 1683) | internal static LARGE_INTEGER FromInt64(long value)
    class STORAGE_DEVICE_NUMBER (line 1693) | [StructLayout(LayoutKind.Sequential)]
    class DISK_EXTENT (line 1701) | [StructLayout(LayoutKind.Sequential, Size = 8)]
    class VOLUME_DISK_EXTENTS (line 1709) | [StructLayout(LayoutKind.Sequential)]
    type DISK_GEOMETRY (line 1719) | [StructLayout(LayoutKind.Explicit)]
    class DISK_GEOMETRY_EX (line 1772) | [StructLayout(LayoutKind.Sequential)]
    type MEDIA_TYPE (line 1783) | internal enum MEDIA_TYPE : int
    type PARTITION_STYLE (line 1816) | internal enum PARTITION_STYLE : uint
    type PARTITION_INFORMATION_MBR (line 1837) | [StructLayout(LayoutKind.Explicit)]
    type PARTITION_INFORMATION_GPT (line 1916) | [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
    type DRIVE_LAYOUT_INFORMATION_MBR (line 1948) | [StructLayout(LayoutKind.Explicit)]
    type DRIVE_LAYOUT_INFORMATION_GPT (line 1960) | [StructLayout(LayoutKind.Explicit)]
    type PARTITION_INFORMATION_EX (line 1988) | [StructLayout(LayoutKind.Explicit)]
    type DRIVE_LAYOUT_INFORMATION_UNION (line 2033) | [StructLayout(LayoutKind.Explicit)]
    type DRIVE_LAYOUT_INFORMATION_EX (line 2044) | [StructLayout(LayoutKind.Explicit)]
    type CREATE_DISK_MBR (line 2080) | [StructLayout(LayoutKind.Explicit)]
    type CREATE_DISK_GPT (line 2086) | [StructLayout(LayoutKind.Explicit)]
    type CREATE_DISK (line 2094) | [StructLayout(LayoutKind.Explicit)]
    class IoCtl (line 2108) | internal class IoCtl /* constants */
      method CTL_CODE (line 2178) | internal static UInt32 CTL_CODE(UInt32 DeviceType, UInt32 Function, ...
    class SafeHGlobalHandle (line 2184) | public class SafeHGlobalHandle : SafeHandle
      method SafeHGlobalHandle (line 2186) | public SafeHGlobalHandle(IntPtr handle) : base(IntPtr.Zero, true)
      method ReleaseHandle (line 2196) | protected override bool ReleaseHandle()
    class FileLock (line 2203) | public static class FileLock
      method RmRegisterResources (line 2211) | [DllImport("rstrtmgr.dll", CharSet = CharSet.Unicode)]
      method RmStartSession (line 2220) | [DllImport("rstrtmgr.dll", CharSet = CharSet.Auto)]
      method RmEndSession (line 2223) | [DllImport("rstrtmgr.dll")]
      method RmGetList (line 2226) | [DllImport("rstrtmgr.dll")]
      method WhoIsLocking (line 2233) | public static List<Process> WhoIsLocking(string path)
      type RM_UNIQUE_PROCESS (line 2299) | [StructLayout(LayoutKind.Sequential)]
      type RM_APP_TYPE (line 2306) | private enum RM_APP_TYPE
      type RM_PROCESS_INFO (line 2317) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

FILE: TrustedUninstaller.Shared/USB/OSDownload.cs
  class OSDownload (line 19) | public class OSDownload
    method HumanReadableBytes (line 21) | public static string HumanReadableBytes(double input)
    method GetInstalledLanguageName (line 82) | public static string GetInstalledLanguageName()
    type OS (line 99) | public enum OS
    method GetDownloadLinkAsyncResilient (line 107) | public static async Task<(string Link, string? Version, string? Hash)>...
    method GetOSDownloadLinkTask (line 133) | private static Task<(string Link, string? Version, string? Hash)> GetO...
    method DownloadISOAsync (line 142) | public static async Task DownloadISOAsync(string isoDownloadLink, stri...
    method GetWindowsDownloadLinkAsync (line 177) | private static async Task<(string Link, string? Version, string? Hash)...
    method GetUbuntuGeoMirror (line 252) | private static async Task<string> GetUbuntuGeoMirror(HttpClient httpCl...
    method GetUbuntuDownloadLinkAsync (line 284) | public static async Task<(string Link, string Version, string Hash)> G...
    method GetArchDownloadLinkAsync (line 350) | public static async Task<(string Link, string? Version, string? Hash)>...
    method GetSteamOSDownloadLinkAsync (line 379) | public static async Task<(string Link, string? Version, string? Hash)>...
    method GetSHA256 (line 382) | public static string GetSHA256(string filePath)

FILE: TrustedUninstaller.Shared/USB/USB.cs
  class USB (line 23) | public class USB
    class UsbDevice (line 25) | public class UsbDevice
    class UsbDisk (line 33) | public class UsbDisk
      method IsDisk (line 261) | public bool IsDisk()
    method GetDevices (line 303) | [InterprocessMethod(Level.Administrator)]
    method GetUSBDisk (line 565) | private static UsbDisk GetUSBDisk(IntPtr diskInterface, Win32.SP_DEVIN...
    method HumanReadableDiskSize (line 1000) | public static string HumanReadableDiskSize(long input)
    method GetProperties (line 1038) | private static Dictionary<string, object> GetProperties(uint usbDevice,
    method Eject (line 1189) | public static void Eject(string deviceId)
    class PositionComparer (line 1201) | public class PositionComparer : IComparer<string>
      method PositionComparer (line 1205) | public PositionComparer(ArrayList keys)
      method Compare (line 1210) | public int Compare(string s1, string s2)
    class MarshalEx (line 1216) | private static class MarshalEx
      method ReadByteArray (line 1218) | internal static Byte[] ReadByteArray(IntPtr source, Int32 startIndex...
      method ReadByteArray (line 1225) | internal static Byte[] ReadByteArray(IntPtr source, Int32 length)
      method ReadGuid (line 1230) | internal static Guid ReadGuid(IntPtr source, Int32 length)
      method ReadMultiSzStringList (line 1236) | internal static String[] ReadMultiSzStringList(IntPtr source, Int32 ...
      method ReadFileTime (line 1257) | internal static DateTime ReadFileTime(IntPtr source)
      method ReadSecurityDescriptor (line 1263) | internal static RawSecurityDescriptor ReadSecurityDescriptor(IntPtr ...
    class NotificationContext (line 1271) | public class NotificationContext
      method Register (line 1275) | public void Register(CM_NOTIFY_CALLBACK callback)
      method Unregister (line 1293) | public void Unregister()
      method CM_Register_Notification (line 1308) | [DllImport("CfgMgr32.dll")]
      method CM_Unregister_Notification (line 1316) | [DllImport("CfgMgr32.dll")]
      type CM_NOTIFY_FILTER (line 1321) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack...
        type UNION (line 1330) | [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
      type CM_NOTIFY_FILTER_FLAGS (line 1364) | [Flags]
      type CM_NOTIFY_FILTER_TYPE (line 1372) | internal enum CM_NOTIFY_FILTER_TYPE
      type CM_NOTIFY_EVENT_DATA (line 1387) | public struct CM_NOTIFY_EVENT_DATA
      type CM_NOTIFY_ACTION (line 1401) | public enum CM_NOTIFY_ACTION

FILE: TrustedUninstaller.Shared/WimLib/Compressors/Compressor.cs
  class Compressor (line 30) | public class Compressor : IDisposable
    method Compressor (line 42) | private Compressor(IntPtr ptr)
    method Dispose (line 54) | public void Dispose()
    method Dispose (line 60) | protected virtual void Dispose(bool disposing)
    method Create (line 106) | public static Compressor Create(CompressionType ctype, int maxBlockSiz...
    method Compress (line 139) | public unsafe int Compress(ReadOnlySpan<byte> uncompressedSpan, Span<b...
    method Compress (line 181) | public unsafe int Compress(byte[] uncompressedData, int uncompressedOf...
    method Compress (line 222) | public unsafe ulong Compress(byte* uncompressedBuf, ulong uncompressed...
    method CheckReadWriteArgs (line 234) | [MethodImpl(MethodImplOptions.AggressiveInlining)]

FILE: TrustedUninstaller.Shared/WimLib/Compressors/Decompressor.cs
  class Decompressor (line 29) | public class Decompressor : IDisposable
    method Decompressor (line 41) | private Decompressor(IntPtr ptr)
    method Dispose (line 53) | public void Dispose()
    method Dispose (line 59) | protected virtual void Dispose(bool disposing)
    method Create (line 90) | public static Decompressor Create(CompressionType ctype, int maxBlockS...
    method Decompress (line 125) | public unsafe bool Decompress(ReadOnlySpan<byte> compressedSpan, Span<...
    method Decompress (line 165) | public unsafe bool Decompress(byte[] compressedData, int compressedOff...
    method Decompress (line 201) | public unsafe bool Decompress(byte* compressedBuf, ulong compressedSiz...
    method CheckReadWriteArgs (line 213) | [MethodImpl(MethodImplOptions.AggressiveInlining)]

FILE: TrustedUninstaller.Shared/WimLib/DynLoader/DynLoaderBase.cs
  class DynLoaderBase (line 36) | public abstract class DynLoaderBase : IDisposable
    method DynLoaderBase (line 46) | protected DynLoaderBase()
    method DynLoaderBase (line 102) | [Obsolete("Left as ABI compatibility only, remove its override.")]
    method Dispose (line 107) | public void Dispose()
    method Dispose (line 113) | protected virtual void Dispose(bool disposing)
    method GlobalCleanup (line 121) | private void GlobalCleanup()
    method LoadLibrary (line 137) | public void LoadLibrary()
    method LoadLibrary (line 146) | public void LoadLibrary(string? libPath)
    method LoadLibrary (line 155) | public void LoadLibrary(object? loadData)
    method LoadLibrary (line 165) | public void LoadLibrary(string? libPath, object? loadData)
    method GetFuncPtr (line 281) | protected T GetFuncPtr<T>() where T : Delegate
    method GetFuncPtr (line 295) | protected T GetFuncPtr<T>(string funcSymbol) where T : Delegate
    method GetRawFuncPtr (line 357) | protected IntPtr GetRawFuncPtr(string funcSymbol)
    method HasFuncSymbol (line 394) | protected bool HasFuncSymbol(string funcSymbol)
    method HandleLoadData (line 416) | protected virtual void HandleLoadData(object? data)
    method LoadFunctions (line 426) | protected abstract void LoadFunctions();
    method ResetFunctions (line 430) | protected abstract void ResetFunctions();
    method PtrToStringAuto (line 482) | public string? PtrToStringAuto(IntPtr ptr)
    method StringToHGlobalAuto (line 505) | public IntPtr StringToHGlobalAuto(string? str)
    method StringToCoTaskMemAuto (line 525) | public IntPtr StringToCoTaskMemAuto(string? str)

FILE: TrustedUninstaller.Shared/WimLib/DynLoader/LoadManagerBase.cs
  class LoadManagerBase (line 38) | public abstract class LoadManagerBase<T> where T : DynLoaderBase
    method EnsureLoaded (line 77) | public void EnsureLoaded()
    method EnsureNotLoaded (line 89) | public void EnsureNotLoaded()
    method CreateLoader (line 107) | protected abstract T CreateLoader();
    method CreateLoader (line 115) | [Obsolete("Left as ABI compatibility only, remove its override.")]
    method PreInitHook (line 129) | protected virtual void PreInitHook() { }
    method PostInitHook (line 136) | protected virtual void PostInitHook() { }
    method PreDisposeHook (line 143) | protected virtual void PreDisposeHook() { }
    method PostDisposeHook (line 150) | protected virtual void PostDisposeHook() { }
    method GlobalInit (line 160) | public void GlobalInit()
    method GlobalInit (line 172) | public void GlobalInit(string? libPath)
    method GlobalInit (line 184) | public void GlobalInit(object? loadData)
    method GlobalInit (line 197) | public void GlobalInit(string? libPath, object? loadData)
    method GlobalCleanup (line 227) | public void GlobalCleanup()
    method TryGlobalCleanup (line 247) | public bool TryGlobalCleanup()
    method InternalCleanup (line 259) | private void InternalCleanup()

FILE: TrustedUninstaller.Shared/WimLib/DynLoader/NativeMethods.cs
  class NativeMethods (line 31) | internal class NativeMethods
    class Win32 (line 34) | internal static class Win32
      method LoadLibraryExW (line 37) | [DllImport("kernel32.dll", SetLastError = true)]
      method GetProcAddress (line 46) | [DllImport("kernel32.dll", CharSet = CharSet.Ansi, SetLastError = tr...
      method FreeLibrary (line 50) | [DllImport("kernel32.dll")]
      method FormatMessageW (line 57) | [DllImport("kernel32.dll", SetLastError = true)]
      method GetLastErrorMsg (line 68) | public static string? GetLastErrorMsg(int errorCode)
      method MakeLangId (line 88) | public static uint MakeLangId(ushort priLangId, ushort subLangId)
    class Linux (line 101) | internal static class Linux
      method DLOpen (line 107) | [DllImport(Library, EntryPoint = "dlopen", CallingConvention = Calli...
      method DLClose (line 110) | [DllImport(Library, EntryPoint = "dlclose", CallingConvention = Call...
      method DLErrorPtr (line 113) | [DllImport(Library, EntryPoint = "dlerror", CallingConvention = Call...
      method DLError (line 115) | public static string? DLError()
      method DLSym (line 125) | [DllImport(Library, EntryPoint = "dlsym", CallingConvention = Callin...
    class Mac (line 131) | internal static class Mac
      method DLOpen (line 137) | [DllImport(Library, EntryPoint = "dlopen", CallingConvention = Calli...
      method DLClose (line 140) | [DllImport(Library, EntryPoint = "dlclose", CallingConvention = Call...
      method DLErrorPtr (line 143) | [DllImport(Library, EntryPoint = "dlerror", CallingConvention = Call...
      method DLError (line 145) | public static string? DLError()
      method DLSym (line 155) | [DllImport(Library, EntryPoint = "dlsym", CallingConvention = Callin...

FILE: TrustedUninstaller.Shared/WimLib/DynLoader/PlatformConvention.cs
  type PlatformDataModel (line 32) | public enum PlatformDataModel
  type PlatformLongSize (line 54) | public enum PlatformLongSize
  type PlatformBitness (line 73) | public enum PlatformBitness
  type UnicodeConvention (line 91) | public enum UnicodeConvention

FILE: TrustedUninstaller.Shared/WimLib/DynLoader/SafeLibHandle.cs
  class NetSafeLibHandle (line 35) | internal class NetSafeLibHandle : SafeHandle
    method NetSafeLibHandle (line 37) | public NetSafeLibHandle(string libPath) : base(IntPtr.Zero, true)
    method ReleaseHandle (line 69) | protected override bool ReleaseHandle()
  class WinSafeLibHandle (line 76) | internal class WinSafeLibHandle : SafeHandle
    method WinSafeLibHandle (line 82) | public WinSafeLibHandle(string libPath) : base(IntPtr.Zero, true)
    method ReleaseHandle (line 91) | protected override bool ReleaseHandle()
  class LinuxSafeLibHandle (line 98) | internal class LinuxSafeLibHandle : SafeHandle
    method LinuxSafeLibHandle (line 103) | public LinuxSafeLibHandle(string libPath) : base(IntPtr.Zero, true)
    method ReleaseHandle (line 112) | protected override bool ReleaseHandle()
  class MacSafeLibHandle (line 119) | internal class MacSafeLibHandle : SafeHandle
    method MacSafeLibHandle (line 124) | public MacSafeLibHandle(string libPath) : base(IntPtr.Zero, true)
    method ReleaseHandle (line 133) | protected override bool ReleaseHandle()

FILE: TrustedUninstaller.Shared/WimLib/Helper.cs
  class StringHelper (line 27) | internal class StringHelper
    method ReplaceEx (line 29) | public static string ReplaceEx(string str, string oldValue, string new...

FILE: TrustedUninstaller.Shared/WimLib/IterateCallback.cs
  class ManagedIterateDirTreeCallback (line 40) | internal class ManagedIterateDirTreeCallback
    method ManagedIterateDirTreeCallback (line 47) | public ManagedIterateDirTreeCallback(IterateDirTreeCallback callback, ...
    method NativeCallback (line 56) | private int NativeCallback(IntPtr entryPtr, IntPtr userCtx)
  class ManagedIterateLookupTableCallback (line 107) | internal class ManagedIterateLookupTableCallback
    method ManagedIterateLookupTableCallback (line 114) | public ManagedIterateLookupTableCallback(IterateLookupTableCallback ca...
    method NativeCallback (line 123) | private int NativeCallback(ResourceEntry resource, IntPtr userCtx)

FILE: TrustedUninstaller.Shared/WimLib/NativeStructs.cs
  type CompressionType (line 60) | public enum CompressionType : int
  type ProgressMsg (line 108) | public enum ProgressMsg
  type CallbackStatus (line 315) | public enum CallbackStatus : int
  type ErrorCode (line 335) | public enum ErrorCode : int
  type IterateDirTreeFlags (line 496) | [Flags]
  type IterateLookupTableFlags (line 523) | [Flags]
  type AddFlags (line 531) | [Flags]
  type ChangeFlags (line 674) | [Flags]
  type DeleteFlags (line 707) | [Flags]
  type ExportFlags (line 723) | [Flags]
  type ExtractFlags (line 770) | [Flags]
  type MountFlags (line 921) | [Flags]
  type OpenFlags (line 961) | [Flags]
  type UnmountFlags (line 991) | [Flags]
  type UpdateFlags (line 1033) | [Flags]
  type WriteFlags (line 1045) | [Flags]
  type InitFlags (line 1210) | [Flags]
  type RefFlags (line 1251) | [Flags]
  type CompressorFlags (line 1272) | [Flags]
  class WimInfo (line 1283) | [StructLayout(LayoutKind.Sequential)]
  class CaptureSource (line 1429) | public class CaptureSource
    method CaptureSource (line 1441) | public CaptureSource(string fsSourcePath, string wimTargetPath)
  class UpdateCommand (line 1449) | public class UpdateCommand
    method SetAdd (line 1555) | public static UpdateCommand SetAdd(string fsSourcePath, string wimTarg...
    method SetAdd (line 1567) | public static UpdateCommand SetAdd(AddCommand add)
    method SetDelete (line 1579) | public static UpdateCommand SetDelete(string wimPath, DeleteFlags dele...
    method SetDelete (line 1589) | public static UpdateCommand SetDelete(DeleteCommand del)
    method SetRename (line 1599) | public static UpdateCommand SetRename(string wimSourcePath, string wim...
    method SetRename (line 1610) | public static UpdateCommand SetRename(RenameCommand ren)
    method ToNativeStruct32 (line 1623) | internal UpdateCommand32 ToNativeStruct32()
    method ToNativeStruct64 (line 1651) | internal UpdateCommand64 ToNativeStruct64()
  type UpdateOp (line 1683) | [Flags]
  class AddCommand (line 1702) | public class AddCommand
    method AddCommand (line 1722) | public AddCommand(string fsSourcePath, string wimTargetPath, string co...
  class DeleteCommand (line 1731) | public class DeleteCommand
    method DeleteCommand (line 1742) | public DeleteCommand(string wimPath, DeleteFlags deleteFlags)
  class RenameCommand (line 1749) | public class RenameCommand
    method RenameCommand (line 1760) | public RenameCommand(string wimSourcePath, string wimTargetPath)
  type UpdateCommand32 (line 1778) | [StructLayout(LayoutKind.Explicit)]
    method Free (line 1869) | public void Free()
    method FreePtr (line 1888) | internal static void FreePtr(ref IntPtr ptr)
    method UpdatePtr (line 1895) | internal static void UpdatePtr(ref IntPtr ptr, string str)
    method ToManagedClass (line 1903) | public UpdateCommand ToManagedClass()
  type UpdateCommand64 (line 1927) | [StructLayout(LayoutKind.Explicit)]
    method Free (line 2018) | public void Free()
    method FreePtr (line 2037) | internal static void FreePtr(ref IntPtr ptr)
    method UpdatePtr (line 2044) | internal static void UpdatePtr(ref IntPtr ptr, string str)
    method ToManagedClass (line 2052) | public UpdateCommand ToManagedClass()
  class DirEntryBase (line 2073) | [StructLayout(LayoutKind.Sequential)]
  class DirEntry (line 2216) | public class DirEntry
  type ReparseTag (line 2336) | public enum ReparseTag : uint
  type WimTimeSpec (line 2354) | [StructLayout(LayoutKind.Sequential)]
    method ToDateTime (line 2371) | internal DateTime ToDateTime(int high)
  class WimObjectId (line 2395) | [StructLayout(LayoutKind.Sequential)]
  class ResourceEntry (line 2444) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
  class StreamEntry (line 2528) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

FILE: TrustedUninstaller.Shared/WimLib/ProgressCallback.cs
  class ManagedProgressCallback (line 42) | internal class ManagedProgressCallback
    method ManagedProgressCallback (line 49) | public ManagedProgressCallback(ProgressCallback callback, object userD...
    method NativeCallback (line 58) | private CallbackStatus NativeCallback(ProgressMsg msgType, IntPtr info...
  class WriteStreamsProgress (line 139) | [StructLayout(LayoutKind.Sequential)]
  type ScanDentryStatus (line 195) | public enum ScanDentryStatus : uint
  class ScanProgress (line 225) | [StructLayout(LayoutKind.Sequential)]
  class ExtractProgress (line 288) | [StructLayout(LayoutKind.Sequential)]
  class RenameProgress (line 380) | [StructLayout(LayoutKind.Sequential)]
  class UpdateProgress (line 404) | public class UpdateProgress
  class UpdateProgressBase (line 425) | [StructLayout(LayoutKind.Sequential)]
    method ToManaged (line 456) | public UpdateProgress ToManaged()
  class IntegrityProgress (line 472) | [StructLayout(LayoutKind.Sequential)]
  class SplitProgress (line 509) | [StructLayout(LayoutKind.Sequential)]
  class ReplaceProgress (line 543) | [StructLayout(LayoutKind.Sequential)]
  class WimBootExcludeProgress (line 558) | [StructLayout(LayoutKind.Sequential)]
  class UnmountProgress (line 578) | [StructLayout(LayoutKind.Sequential)]
  class DoneWithFileProgress (line 610) | [StructLayout(LayoutKind.Sequential)]
  class VerifyImageProgress (line 636) | [StructLayout(LayoutKind.Sequential)]
  class VerifyStreamsProgress (line 650) | [StructLayout(LayoutKind.Sequential)]
  class TestFileExclusionProgress (line 666) | [StructLayout(LayoutKind.Sequential)]
  class HandleErrorProgress (line 692) | [StructLayout(LayoutKind.Sequential)]

FILE: TrustedUninstaller.Shared/WimLib/WimLibException.cs
  class WimLibException (line 31) | [Serializable]
    method WimLibException (line 37) | public WimLibException(ErrorCode errorCode)
    method WimLibException (line 43) | public WimLibException()
    method WimLibException (line 48) | public WimLibException(string message)
    method WimLibException (line 54) | public WimLibException(string message, Exception innerException)
    method ForgeErrorMessages (line 61) | internal static string ForgeErrorMessages(ErrorCode errorCode, bool full)
    method CheckErrorCode (line 73) | internal static void CheckErrorCode(ErrorCode ret)
    method WimLibException (line 80) | protected WimLibException(SerializationInfo info, StreamingContext ctx)
    method GetObjectData (line 85) | public override void GetObjectData(SerializationInfo info, StreamingCo...

FILE: TrustedUninstaller.Shared/WimLib/WimLibLoadManager.cs
  class WimLibLoadManager (line 25) | internal sealed class WimLibLoadManager : LoadManagerBase<WimLibLoader>
    method CreateLoader (line 30) | protected override WimLibLoader CreateLoader() => new WimLibLoader();

FILE: TrustedUninstaller.Shared/WimLib/WimLibLoader.cs
  class WimLibLoader (line 34) | internal sealed class WimLibLoader : DynLoaderBase
    method WimLibLoader (line 42) | public WimLibLoader() : base() { }
    method GetErrorFilePath (line 55) | internal string GetErrorFilePath()
    method GetErrorPrintState (line 62) | internal ErrorPrintState GetErrorPrintState()
    method LoadFunctions (line 88) | protected override void LoadFunctions()
    method ResetFunctions (line 358) | protected override void ResetFunctions()
    class Utf16d (line 546) | internal class Utf16d
      type CaptureSourceBaseL32 (line 850) | [StructLayout(LayoutKind.Sequential, CharSet = StructCharSet)]
        method CaptureSourceBaseL32 (line 867) | public CaptureSourceBaseL32(string fsSourcePath, string wimTargetP...
      type CaptureSourceBaseL64 (line 882) | [StructLayout(LayoutKind.Sequential, CharSet = StructCharSet)]
        method CaptureSourceBaseL64 (line 899) | public CaptureSourceBaseL64(string fsSourcePath, string wimTargetP...
    class Utf8d (line 911) | internal class Utf8d
      type CaptureSourceBaseL32 (line 1216) | [StructLayout(LayoutKind.Sequential, CharSet = StructCharSet)]
        method CaptureSourceBaseL32 (line 1233) | public CaptureSourceBaseL32(string fsSourcePath, string wimTargetP...
      type CaptureSourceBaseL64 (line 1248) | [StructLayout(LayoutKind.Sequential, CharSet = StructCharSet)]
        method CaptureSourceBaseL64 (line 1265) | public CaptureSourceBaseL64(string fsSourcePath, string wimTargetP...
    method SetErrorFile (line 1316) | internal void SetErrorFile()
    method SetErrorFile (line 1322) | internal void SetErrorFile(string path)
    method SetPrintErrors (line 1369) | internal void SetPrintErrors(bool showMessages)
    method GetErrors (line 1390) | internal string[] GetErrors()
    method GetLastError (line 1407) | internal string GetLastError()
    method ResetErrorFile (line 1425) | internal void ResetErrorFile()
    method AddEmptyImage (line 1445) | internal ErrorCode AddEmptyImage(IntPtr wim, string name, out int newI...
    method AddImage (line 1454) | internal ErrorCode AddImage(IntPtr wim, string source, string name, st...
    method AddImageMultiSource (line 1463) | internal ErrorCode AddImageMultiSource(IntPtr wim, CaptureSource[] sou...
    method AddTree (line 1529) | internal ErrorCode AddTree(IntPtr wim, int image, string fsSourcePath,...
    method DeletePath (line 1554) | internal ErrorCode DeletePath(IntPtr wim, int image, string path, Dele...
    method ExportImage (line 1565) | internal ErrorCode ExportImage(IntPtr srcWim, int srcImage, IntPtr des...
    method ExtractImage (line 1576) | internal ErrorCode ExtractImage(IntPtr wim, int image, string target, ...
    method ExtractPathList (line 1585) | internal ErrorCode ExtractPathList(IntPtr wim, int image, string targe...
    method ExtractPaths (line 1594) | internal ErrorCode ExtractPaths(IntPtr wim, int image, string target, ...
    method GetImageProperty (line 1623) | internal IntPtr GetImageProperty(IntPtr wim, int image, string propert...
    method IsImageNameInUse (line 1647) | internal bool IsImageNameInUse(IntPtr wim, string name)
    method ResolveImage (line 1656) | internal int ResolveImage(IntPtr wim, string imageNameOrNum)
    method IterateDirTree (line 1692) | internal int IterateDirTree(IntPtr wim, int image, string path, Iterat...
    method Join (line 1716) | internal ErrorCode Join(string[] swms, uint numSwms, string outputPath...
    method JoinWithProgress (line 1725) | internal ErrorCode JoinWithProgress(string[] swms, uint numSwms, strin...
    method OpenWim (line 1736) | internal ErrorCode OpenWim(string wimFile, OpenFlags openFlags, out In...
    method OpenWimWithProgress (line 1745) | internal ErrorCode OpenWimWithProgress(string wimFile, OpenFlags openF...
    method MountImage (line 1756) | internal ErrorCode MountImage(IntPtr wim, int image, string dir, Mount...
    method ReferenceResourceFiles (line 1767) | internal ErrorCode ReferenceResourceFiles(IntPtr wim, string[] resourc...
    method RenamePath (line 1795) | internal ErrorCode RenamePath(IntPtr wim, int image, string sourcePath...
    method SetImageDescription (line 1806) | internal ErrorCode SetImageDescription(IntPtr wim, int image, string d...
    method SetImageFlags (line 1815) | internal ErrorCode SetImageFlags(IntPtr wim, int image, string flags)
    method SetImageName (line 1824) | internal ErrorCode SetImageName(IntPtr wim, int image, string name)
    method SetImageProperty (line 1833) | internal ErrorCode SetImageProperty(IntPtr wim, int image, string prop...
    method Split (line 1877) | internal ErrorCode Split(IntPtr wim, string swmName, ulong partSize, W...
    method UnmountImage (line 1896) | internal ErrorCode UnmountImage(string dir, UnmountFlags unmountFlags)
    method UnmountImageWithProgress (line 1905) | internal ErrorCode UnmountImageWithProgress(string dir, UnmountFlags u...
    method Write (line 1936) | internal ErrorCode Write(IntPtr wim, string path, int image, WriteFlag...
    method SetBitField (line 2015) | internal static void SetBitField(ref uint bitField, int bitShift, bool...
    method GetBitField (line 2023) | internal static bool GetBitField(uint bitField, int bitShift)
  type ErrorPrintState (line 2034) | public enum ErrorPrintState

FILE: TrustedUninstaller.Shared/WimLib/WimStruct.cs
  class Wim (line 33) | public class Wim : IDisposable
    method GlobalInit (line 45) | public static void GlobalInit() => GlobalInit(InitFlags.None);
    method GlobalInit (line 50) | public static void GlobalInit(InitFlags flags)
    method GlobalInit (line 62) | public static void GlobalInit(string libPath) => GlobalInit(libPath, I...
    method GlobalInit (line 68) | public static void GlobalInit(string libPath, InitFlags flags)
    method GlobalCleanup (line 80) | public static void GlobalCleanup()
    method TryGlobalCleanup (line 98) | public static bool TryGlobalCleanup()
    method Wim (line 145) | private Wim(IntPtr ptr)
    method Dispose (line 159) | public void Dispose()
    method Dispose (line 165) | protected virtual void Dispose(bool disposing)
    method GetErrorString (line 187) | public static string GetErrorString(ErrorCode code)
    method GetErrors (line 204) | public static string[] GetErrors()
    method GetLastError (line 223) | public static string GetLastError()
    method ResetErrorFile (line 233) | public static void ResetErrorFile()
    method SetPrintErrors (line 252) | public static void SetPrintErrors(bool showMessages)
    method AddEmptyImage (line 278) | public int AddEmptyImage(string name)
    method AddImage (line 318) | public void AddImage(string source, string name, string configFile, Ad...
    method AddImageMultiSource (line 345) | public void AddImageMultiSource(IEnumerable<CaptureSource> sources, st...
    method AddTree (line 363) | public void AddTree(int image, string fsSourcePath, string wimTargetPa...
    method CreateNewWim (line 379) | public static Wim CreateNewWim(CompressionType type)
    method DeleteImage (line 399) | public void DeleteImage(int image)
    method DeletePath (line 415) | public void DeletePath(int image, string path, DeleteFlags deleteFlags)
    method ExportImage (line 453) | public void ExportImage(int srcImage, Wim destWim, string destName, st...
    method ExtractImage (line 483) | public void ExtractImage(int image, string target, ExtractFlags extrac...
    method ExtractPath (line 525) | public void ExtractPath(int image, string target, string path, Extract...
    method ExtractPaths (line 568) | public void ExtractPaths(int image, string target, IEnumerable<string>...
    method ExtractPathList (line 589) | public void ExtractPathList(int image, string target, string pathListF...
    method GetImageDescription (line 602) | public string GetImageDescription(int image)
    method GetImageName (line 617) | public string GetImageName(int image)
    method GetImageProperty (line 642) | public string GetImageProperty(int image, string propertyName)
    method GetWimInfo (line 653) | public WimInfo GetWimInfo()
    method GetXmlData (line 674) | public string GetXmlData()
    method IsImageNameInUse (line 697) | public bool IsImageNameInUse(string name)
    method ResolveImage (line 720) | public int ResolveImage(string imageNameOrNum)
    method IterateDirTree (line 796) | public int IterateDirTree(int image, string path, IterateDirTreeFlags ...
    method IterateDirTree (line 837) | public int IterateDirTree(int image, string path, IterateDirTreeFlags ...
    method IterateDirTree (line 888) | public int IterateDirTree(int image, string path, IterateDirTreeFlags ...
    method IterateDirTree (line 919) | public int IterateDirTree(int image, string path, IterateDirTreeFlags ...
    method IterateLookupTable (line 968) | public int IterateLookupTable(IterateLookupTableFlags flags, IterateLo...
    method IterateLookupTable (line 984) | public int IterateLookupTable(IterateLookupTableFlags flags, IterateLo...
    method Join (line 1010) | public static void Join(IEnumerable<string> swms, string outputPath, O...
    method Join (line 1034) | public static void Join(IEnumerable<string> swms, string outputPath, O...
    method Join (line 1058) | public static void Join(IEnumerable<string> swms, string outputPath, O...
    method OpenWim (line 1081) | public static Wim OpenWim(string wimFile, OpenFlags openFlags)
    method OpenWim (line 1110) | public static Wim OpenWim(string wimFile, OpenFlags openFlags, Progres...
    method MountImage (line 1168) | public void MountImage(int image, string dir, MountFlags mountFlags, s...
    method ReferenceResourceFile (line 1198) | public void ReferenceResourceFile(string resourceWimFileOrGlobs, RefFl...
    method ReferenceResourceFiles (line 1235) | public void ReferenceResourceFiles(IEnumerable<string> resourceWimFile...
    method ReferenceResources (line 1250) | public void ReferenceResources(IEnumerable<Wim> resourceWims)
    method ReferenceTemplateImage (line 1283) | public void ReferenceTemplateImage(int newImage, int templateImage)
    method ReferenceTemplateImage (line 1319) | public void ReferenceTemplateImage(int newImage, Wim template, int tem...
    method RegisterCallback (line 1335) | public void RegisterCallback(ProgressCallback callback)
    method RegisterCallback (line 1351) | public void RegisterCallback(ProgressCallback callback, object userData)
    method RenamePath (line 1374) | public void RenamePath(int image, string sourcePath, string destPath)
    method SetImageDescription (line 1392) | public void SetImageDescription(int image, string description)
    method SetImageFlags (line 1408) | public void SetImageFlags(int image, string flags)
    method SetImageName (line 1424) | public void SetImageName(int image, string name)
    method SetImageProperty (line 1452) | public void SetImageProperty(int image, string propertyName, string pr...
    method SetWimInfo (line 1471) | public void SetWimInfo(WimInfo info, ChangeFlags which)
    method SetOutputChunkSize (line 1495) | public void SetOutputChunkSize(uint chunkSize)
    method SetOutputPackChunkSize (line 1512) | public void SetOutputPackChunkSize(uint chunkSize)
    method SetOutputCompressionType (line 1529) | public void SetOutputCompressionType(CompressionType compType)
    method SetOutputPackCompressionType (line 1545) | public void SetOutputPackCompressionType(CompressionType compType)
    method Split (line 1574) | public void Split(string swmName, ulong partSize, WriteFlags writeFlags)
    method VerifyWim (line 1596) | public void VerifyWim()
    method UnmountImage (line 1617) | public static void UnmountImage(string dir, UnmountFlags unmountFlags)
    method UnmountImage (line 1643) | public static void UnmountImage(string dir, UnmountFlags unmountFlags,...
    method UpdateImage (line 1664) | public void UpdateImage(int image, UpdateCommand cmd, UpdateFlags upda...
    method UpdateImage (line 1710) | public void UpdateImage(int image, IEnumerable<UpdateCommand> cmds, Up...
    method Write (line 1774) | public void Write(string path, int image, WriteFlags writeFlags, uint ...
    method Overwrite (line 1808) | public void Overwrite(WriteFlags writeFlags, uint numThreads)
    method FileExists (line 1826) | public bool FileExists(int image, string wimFilePath)
    method DirExists (line 1858) | public bool DirExists(int image,
Condensed preview — 139 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,607K chars).
[
  {
    "path": ".gitea/workflows/github_mirror.yaml",
    "chars": 536,
    "preview": "name: GitHub Mirror\n\non:\n  push:\n    branches:\n      - public\n\njobs:\n  mirror_to_github:\n    runs-on: ubuntu-latest\n    "
  },
  {
    "path": ".gitignore",
    "chars": 10441,
    "preview": "# AME GUI Resource Playbooks\nTrustedUninstaller.GUI/resources/Shared-PB/*\nTrustedUninstaller.GUI/resources/W10-PB/*\nTrus"
  },
  {
    "path": "Core/Actions/CmdAction.cs",
    "chars": 4686,
    "preview": "using System;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n"
  },
  {
    "path": "Core/Actions/CoreActions.cs",
    "chars": 386,
    "preview": "using System.Threading.Tasks;\n\nnamespace Core.Actions\n{\n    public interface ICoreAction\n    {\n        public void RunT"
  },
  {
    "path": "Core/Actions/RegistryKeyAction.cs",
    "chars": 7312,
    "preview": "#nullable enable\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.InteropService"
  },
  {
    "path": "Core/Actions/RegistryValueAction.cs",
    "chars": 10812,
    "preview": "#nullable enable\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Secur"
  },
  {
    "path": "Core/Actions/RunAction.cs",
    "chars": 6819,
    "preview": "using System;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Threading;\nusing System.Thread"
  },
  {
    "path": "Core/Actions/ServiceAction.cs",
    "chars": 20692,
    "preview": "#nullable enable\nusing System;\nusing System.Collections.Specialized;\nusing System.Configuration.Install;\nusing System.D"
  },
  {
    "path": "Core/Actions/TaskKillAction.cs",
    "chars": 19167,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Lin"
  },
  {
    "path": "Core/Actions/UninstallTaskStatus.cs",
    "chars": 127,
    "preview": "namespace Core.Actions\n{\n    public enum UninstallTaskStatus\n    {\n        Completed,\n        InProgress,\n        ToDo\n"
  },
  {
    "path": "Core/Core.projitems",
    "chars": 2261,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Propert"
  },
  {
    "path": "Core/Core.shproj",
    "chars": 1033,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild"
  },
  {
    "path": "Core/Core.shproj.DotSettings",
    "chars": 956,
    "preview": "<wpf:ResourceDictionary xml:space=\"preserve\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:s=\"clr-namesp"
  },
  {
    "path": "Core/Exceptions/UnexpectedException.cs",
    "chars": 337,
    "preview": "using System;\n\nnamespace Core.Exceptions\n{\n    public class UnexpectedException : Exception\n    {\n        public Unexpe"
  },
  {
    "path": "Core/Helper/Interop/Helper.cs",
    "chars": 1892,
    "preview": "using System;\nusing System.Globalization;\nusing System.Runtime.InteropServices;\n\nnamespace Core\n{\n    public static cla"
  },
  {
    "path": "Core/Helper/client-helper.sln",
    "chars": 1417,
    "preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.6.3381"
  },
  {
    "path": "Core/Helper/client-helper.vcxproj",
    "chars": 7841,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msb"
  },
  {
    "path": "Core/Helper/client-helper.vcxproj.filters",
    "chars": 1249,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "Core/Helper/dllmain.cpp",
    "chars": 433,
    "preview": "// dllmain.cpp : Defines the entry point for the DLL application.\n#include \"pch.h\"\n\nBOOL APIENTRY DllMain( HMODULE hModu"
  },
  {
    "path": "Core/Helper/framework.h",
    "chars": 149,
    "preview": "#pragma once\n\n#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers\n// Windows Heade"
  },
  {
    "path": "Core/Helper/pch.cpp",
    "chars": 28912,
    "preview": "#define _CRT_SECURE_NO_WARNINGS\n\n#include \"pch.h\"\n\n\nstruct offsets {\n    long  block_size;\n    char  block_type[2]; // "
  },
  {
    "path": "Core/Helper/pch.h",
    "chars": 704,
    "preview": "// pch.h: This is a precompiled header file.\n// Files listed below are compiled only once, improving build performance f"
  },
  {
    "path": "Core/Miscellaneous/Serializables.cs",
    "chars": 2347,
    "preview": "using System;\nusing System.Runtime.Serialization;\nusing JetBrains.Annotations;\n\nnamespace Core.Miscellaneous\n{\n    publ"
  },
  {
    "path": "Core/Miscellaneous/StreamReaderWithPosition.cs",
    "chars": 11177,
    "preview": "using System;\nusing System.Diagnostics.Contracts;\nusing System.IO;\nusing System.Reflection;\nusing System.Text;\n\nnamespa"
  },
  {
    "path": "Core/Miscellaneous/XmlDeserializer.cs",
    "chars": 9492,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nu"
  },
  {
    "path": "Core/Services/Config.cs",
    "chars": 3496,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Globalization;\nusing System.Runtime.Serialization;\nusin"
  },
  {
    "path": "Core/Services/Log.cs",
    "chars": 46329,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "Core/Services/Output.cs",
    "chars": 26162,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing "
  },
  {
    "path": "Core/Utilities/IdManagers.cs",
    "chars": 886,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Core\n{\n    public class IdManager\n    {\n "
  },
  {
    "path": "Core/Utilities/StringUtils.cs",
    "chars": 1807,
    "preview": "using System;\n\nnamespace Core\n{\n    public class StringUtils\n    {\n        public static string HumanReadableBytes(ulon"
  },
  {
    "path": "Core/Utilities/Wrap.cs",
    "chars": 130051,
    "preview": "using System;\nusing System.ComponentModel.DataAnnotations;\nusing System.Reflection;\nusing System.Runtime.InteropService"
  },
  {
    "path": "Interprocess/InterLink.cs",
    "chars": 87553,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Collections.ObjectMod"
  },
  {
    "path": "Interprocess/Interprocess.projitems",
    "chars": 996,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Propert"
  },
  {
    "path": "Interprocess/Interprocess.shproj",
    "chars": 1041,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild"
  },
  {
    "path": "Interprocess/JsonSerializables.cs",
    "chars": 6247,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.T"
  },
  {
    "path": "Interprocess/LevelController.cs",
    "chars": 7038,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Runtime.Ex"
  },
  {
    "path": "Interprocess/Levels.cs",
    "chars": 4732,
    "preview": "using System;\n\nnamespace Interprocess\n{\n    public enum Level\n    {\n        Any,\n        Disposable,\n        \n        /"
  },
  {
    "path": "Interprocess/Serialization.cs",
    "chars": 23326,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO.P"
  },
  {
    "path": "Interprocess/SynchronousIOCanceler.cs",
    "chars": 3058,
    "preview": "using System;\nusing System.Runtime.InteropServices;\nusing System.Threading;\n\nnamespace Interprocess\n{\n    public class "
  },
  {
    "path": "Interprocess/Threads.cs",
    "chars": 38797,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing Sy"
  },
  {
    "path": "LICENSE.md",
    "chars": 1098,
    "preview": "The MIT License (MIT)\n\nCopyright (c) Ameliorated LLC. All rights reserved.\n\nPermission is hereby granted, free of charge"
  },
  {
    "path": "ManagedWimLib/Compressors/Compressor.cs",
    "chars": 11801,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "ManagedWimLib/Compressors/Decompressor.cs",
    "chars": 10481,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "ManagedWimLib/Helper.cs",
    "chars": 1714,
    "preview": "/*\n    Licensed under LGPLv3\n\n    C# Wrapper written by Hajin Jang\n    Copyright (C) 2017-2019 Hajin Jang\n\n    This fil"
  },
  {
    "path": "ManagedWimLib/IterateCallback.cs",
    "chars": 4831,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "ManagedWimLib/ManagedWimLib.csproj",
    "chars": 5632,
    "preview": "<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildE"
  },
  {
    "path": "ManagedWimLib/ManagedWimLib.netfx.targets",
    "chars": 8149,
    "preview": "<!--\n *\n * WARNING: This MSBuild file requires MSBuild 4.0 features.\n * \n * Based on System.Data.SQLite.Core.targets, wr"
  },
  {
    "path": "ManagedWimLib/NUGET_README.md",
    "chars": 1195,
    "preview": "# ManagedWimLib\n\nCross-platform [wimlib](https://wimlib.net) pinvoke library for .NET.\n\n[wimlib](https://wimlib.net) is "
  },
  {
    "path": "ManagedWimLib/NativeStructs.cs",
    "chars": 113508,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n\n"
  },
  {
    "path": "ManagedWimLib/NugetPack.cmd",
    "chars": 216,
    "preview": "@echo off\nSETLOCAL ENABLEEXTENSIONS\n\nREM %~dp0 => absolute path of directory where batch file exists\ncd %~dp0\nSET BASE=%"
  },
  {
    "path": "ManagedWimLib/ProgressCallback.cs",
    "chars": 28650,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "ManagedWimLib/WimLibException.cs",
    "chars": 2790,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "ManagedWimLib/WimLibLoadManager.cs",
    "chars": 1187,
    "preview": "/*\n    Licensed under LGPLv3\n\n    C# Wrapper written by Hajin Jang\n    Copyright (C) 2017-2020 Hajin Jang\n\n    This fil"
  },
  {
    "path": "ManagedWimLib/WimLibLoader.cs",
    "chars": 90873,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "ManagedWimLib/WimStruct.cs",
    "chars": 107262,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "README.md",
    "chars": 1623,
    "preview": "# AME Wizard Core\n\nCore functionality used by AME Wizard.\n\n## CLI Usage\n\n*We do not recommend CLI usage for normal users"
  },
  {
    "path": "TrustedUninstaller.CLI/CLI.cs",
    "chars": 22978,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing Sys"
  },
  {
    "path": "TrustedUninstaller.CLI/CommandLine.cs",
    "chars": 13631,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.ComponentModel.DataAnnotation"
  },
  {
    "path": "TrustedUninstaller.CLI/Properties/AssemblyInfo.cs",
    "chars": 1479,
    "preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing TrustedUnin"
  },
  {
    "path": "TrustedUninstaller.CLI/TrustedUninstaller.CLI.csproj",
    "chars": 8710,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
  },
  {
    "path": "TrustedUninstaller.CLI/app.manifest",
    "chars": 3283,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<assembly manifestVersion=\"1.0\" xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n  <ass"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/AppxAction.cs",
    "chars": 12093,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n//using Windows.Applic"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/CmdAction.cs",
    "chars": 9494,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\n"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/DownloadAction.cs",
    "chars": 12068,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing Sys"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/FileAction.cs",
    "chars": 32786,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Configuration.Install;\nusing System.Diagnostics;\nusing Sys"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/LanguageAction.cs",
    "chars": 2024,
    "preview": "using System;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Threading.Tasks;\nusing System.Windo"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/LineInFileAction.cs",
    "chars": 3516,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/PowershellAction.cs",
    "chars": 8869,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing Sys"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/RegistryKeyAction.cs",
    "chars": 19362,
    "preview": "#nullable enable\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing Syste"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/RegistryValueAction.cs",
    "chars": 23327,
    "preview": "#nullable enable\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing Syste"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/RunAction.cs",
    "chars": 11906,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing Sys"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/ScheduledTaskAction.cs",
    "chars": 11618,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.DirectoryServices.ActiveDirectory;\nusing System.Linq;\nusin"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/ServiceAction.cs",
    "chars": 26133,
    "preview": "#nullable enable\nusing System;\nusing System.Collections.Specialized;\nusing System.Configuration.Install;\nusing System.D"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/ShortcutAction.cs",
    "chars": 2531,
    "preview": "using System;\nusing System.IO;\nusing System.Threading.Tasks;\nusing Core;\nusing TrustedUninstaller.Shared.Tasks;\nusing Y"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/SoftwareAction.cs",
    "chars": 34180,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing Sys"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/SystemPackageAction.cs",
    "chars": 5062,
    "preview": "using System;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing TrustedUninstaller.Shared.Exceptions;\nusing Truste"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/TaskAction.cs",
    "chars": 1278,
    "preview": "using System;\nusing System.Threading.Tasks;\nusing Core;\nusing TrustedUninstaller.Shared.Tasks;\nusing YamlDotNet.Seriali"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/TaskKillAction.cs",
    "chars": 22796,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Lin"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/UpdateAction.cs",
    "chars": 2183,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusi"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/UserAction.cs",
    "chars": 3776,
    "preview": "using System;\nusing System.DirectoryServices;\nusing System.Threading.Tasks;\nusing TrustedUninstaller.Shared.Tasks;\nusin"
  },
  {
    "path": "TrustedUninstaller.Shared/Actions/WriteStatusAction.cs",
    "chars": 1965,
    "preview": "using System;\nusing System.IO;\nusing System.Threading.Tasks;\nusing Core;\nusing TrustedUninstaller.Shared.Tasks;\nusing Y"
  },
  {
    "path": "TrustedUninstaller.Shared/AmeliorationUtil.cs",
    "chars": 79974,
    "preview": "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Glob"
  },
  {
    "path": "TrustedUninstaller.Shared/AugmentedProcess.cs",
    "chars": 155496,
    "preview": "using System.Text;\nusing System.Threading;\nusing System.Runtime.InteropServices;\nusing System.ComponentModel;\nusing Sys"
  },
  {
    "path": "TrustedUninstaller.Shared/ControlWriter.cs",
    "chars": 187,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
  },
  {
    "path": "TrustedUninstaller.Shared/Defender.cs",
    "chars": 56860,
    "preview": "using System.IO;\nusing System.Windows;\nusing Core.Actions;\nusing System;\nusing System.Collections.Generic;\nusing System"
  },
  {
    "path": "TrustedUninstaller.Shared/Exceptions/ErrorHandlingException.cs",
    "chars": 410,
    "preview": "using System;\nusing TrustedUninstaller.Shared.Tasks;\n\nnamespace TrustedUninstaller.Shared.Exceptions\n{\n    public class"
  },
  {
    "path": "TrustedUninstaller.Shared/Exceptions/InvalidRegistryEntryException.cs",
    "chars": 375,
    "preview": "using System;\n\nnamespace TrustedUninstaller.Shared.Exceptions\n{\n    public class InvalidRegistryEntryException : Except"
  },
  {
    "path": "TrustedUninstaller.Shared/Exceptions/TaskInProgressException.cs",
    "chars": 348,
    "preview": "using System;\n\nnamespace TrustedUninstaller.Shared.Exceptions\n{\n    public class TaskInProgressException : Exception\n  "
  },
  {
    "path": "TrustedUninstaller.Shared/Globals.cs",
    "chars": 1870,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq"
  },
  {
    "path": "TrustedUninstaller.Shared/ISO.cs",
    "chars": 707,
    "preview": "using System;\nusing JetBrains.Annotations;\n\nnamespace TrustedUninstaller.Shared\n{\n    [Serializable]\n    public class I"
  },
  {
    "path": "TrustedUninstaller.Shared/NativeProcess.cs",
    "chars": 7619,
    "preview": "using Microsoft.Win32.SafeHandles;\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.IO"
  },
  {
    "path": "TrustedUninstaller.Shared/NtStatus.cs",
    "chars": 162,
    "preview": "namespace TrustedUninstaller.Shared\n{\n    internal enum NtStatus\n    {\n        NT_SUCCESS,\n        NT_INFORMATION,\n    "
  },
  {
    "path": "TrustedUninstaller.Shared/OOBE.cs",
    "chars": 1286,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Xml.Serialization;\nusing JetBrains.Annotations;\n\nnamespace"
  },
  {
    "path": "TrustedUninstaller.Shared/Parser/PlaybookParser.cs",
    "chars": 3504,
    "preview": "#nullable enable\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing Syste"
  },
  {
    "path": "TrustedUninstaller.Shared/Parser/TaskActionResolver.cs",
    "chars": 3237,
    "preview": "\nusing System;\nusing TrustedUninstaller.Shared.Actions;\nusing TrustedUninstaller.Shared.Tasks;\nusing YamlDotNet.Core.Ev"
  },
  {
    "path": "TrustedUninstaller.Shared/Playbook.cs",
    "chars": 30937,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Glo"
  },
  {
    "path": "TrustedUninstaller.Shared/Predicates/IPredicate.cs",
    "chars": 244,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
  },
  {
    "path": "TrustedUninstaller.Shared/ProcessPrivilege.cs",
    "chars": 31132,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.IO;"
  },
  {
    "path": "TrustedUninstaller.Shared/Properties/AssemblyInfo.cs",
    "chars": 1486,
    "preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing TrustedUnin"
  },
  {
    "path": "TrustedUninstaller.Shared/ProviderStatus.cs",
    "chars": 918,
    "preview": "using System;\nusing System.Runtime.InteropServices;\n\nnamespace TrustedUninstaller.Shared\n{\n    //Byte 0\n    [Flags]\n   "
  },
  {
    "path": "TrustedUninstaller.Shared/Requirements.cs",
    "chars": 16815,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\n"
  },
  {
    "path": "TrustedUninstaller.Shared/Tasks/ITaskAction.cs",
    "chars": 747,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Core;\n\nnamespace"
  },
  {
    "path": "TrustedUninstaller.Shared/Tasks/OutputProcessor.cs",
    "chars": 53427,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing Sy"
  },
  {
    "path": "TrustedUninstaller.Shared/Tasks/TaskAction.cs",
    "chars": 4545,
    "preview": "using System.Globalization;\nusing JetBrains.Annotations;\nusing YamlDotNet.Serialization;\n\nnamespace TrustedUninstaller."
  },
  {
    "path": "TrustedUninstaller.Shared/Tasks/TaskList.cs",
    "chars": 215,
    "preview": "using System.Collections.Generic;\n\nnamespace TrustedUninstaller.Shared.Tasks\n{\n    public class TaskList\n    {\n        "
  },
  {
    "path": "TrustedUninstaller.Shared/Tasks/UninstallTask.cs",
    "chars": 2634,
    "preview": "using System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing JetBrains.Annotations;\nu"
  },
  {
    "path": "TrustedUninstaller.Shared/Tasks/UninstallTaskPrivilege.cs",
    "chars": 137,
    "preview": "namespace TrustedUninstaller.Shared.Tasks\n{\n    public enum UninstallTaskPrivilege\n    {\n        Admin,\n        Trusted"
  },
  {
    "path": "TrustedUninstaller.Shared/Tasks/UninstallTaskStatus.cs",
    "chars": 146,
    "preview": "namespace TrustedUninstaller.Shared.Tasks\n{\n    public enum UninstallTaskStatus\n    {\n        Completed,\n        InProg"
  },
  {
    "path": "TrustedUninstaller.Shared/TrustedUninstaller.Shared.csproj",
    "chars": 13200,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/BZip2.cs",
    "chars": 60274,
    "preview": "using System;\nusing System.IO;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.Serialization;\n\nnamespace is"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/Drive.cs",
    "chars": 50141,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.IO;"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/Drivers.cs",
    "chars": 23406,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.IO.Compression;\nusing System.Net;\nusing S"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/Format.cs",
    "chars": 3139,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropService"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/ISO.cs",
    "chars": 15100,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\nusing "
  },
  {
    "path": "TrustedUninstaller.Shared/USB/ISOWIM.cs",
    "chars": 8536,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\nusing System.Threading.Tasks;\nusing"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/InterMethods.cs",
    "chars": 4516,
    "preview": "using System;\nusing System.ComponentModel;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nus"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/Interop.cs",
    "chars": 102449,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.Runt"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/OSDownload.cs",
    "chars": 17151,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Net.Http;\nusing System"
  },
  {
    "path": "TrustedUninstaller.Shared/USB/USB.cs",
    "chars": 69288,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Global"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/Compressors/Compressor.cs",
    "chars": 11801,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/Compressors/Decompressor.cs",
    "chars": 10481,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/DynLoader/DynLoaderBase.cs",
    "chars": 22618,
    "preview": "/*\n    Copyright (C) 2019-present Hajin Jang\n    Licensed under MIT License.\n \n    MIT License\n\n    Permission is hereb"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/DynLoader/LoadManagerBase.cs",
    "chars": 9128,
    "preview": "/*\n    Copyright (C) 2019-present Hajin Jang\n    Licensed under MIT License.\n \n    MIT License\n\n    Permission is hereb"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/DynLoader/NativeMethods.cs",
    "chars": 7132,
    "preview": "/*\n    Copyright (C) 2019-present Hajin Jang\n    Licensed under MIT License.\n \n    MIT License\n\n    Permission is hereb"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/DynLoader/PlatformConvention.cs",
    "chars": 3563,
    "preview": "/*\n    Copyright (C) 2019-present Hajin Jang\n    Licensed under MIT License.\n \n    MIT License\n\n    Permission is hereb"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/DynLoader/SafeLibHandle.cs",
    "chars": 5979,
    "preview": "/*\n    Copyright (C) 2019-present Hajin Jang\n    Licensed under MIT License.\n \n    MIT License\n\n    Permission is hereb"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/Helper.cs",
    "chars": 1714,
    "preview": "/*\n    Licensed under LGPLv3\n\n    C# Wrapper written by Hajin Jang\n    Copyright (C) 2017-2019 Hajin Jang\n\n    This fil"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/IterateCallback.cs",
    "chars": 4831,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/NativeStructs.cs",
    "chars": 113508,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n\n"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/ProgressCallback.cs",
    "chars": 28650,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/WimLibException.cs",
    "chars": 2790,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/WimLibLoadManager.cs",
    "chars": 1187,
    "preview": "/*\n    Licensed under LGPLv3\n\n    C# Wrapper written by Hajin Jang\n    Copyright (C) 2017-2020 Hajin Jang\n\n    This fil"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/WimLibLoader.cs",
    "chars": 90873,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "TrustedUninstaller.Shared/WimLib/WimStruct.cs",
    "chars": 107262,
    "preview": "/*\n    Licensed under LGPLv3\n\n    Derived from wimlib's original header files\n    Copyright (C) 2012-2018 Eric Biggers\n"
  },
  {
    "path": "TrustedUninstaller.Shared/WimWrapper.cs",
    "chars": 16976,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing Syst"
  },
  {
    "path": "TrustedUninstaller.Shared/WinUtil.cs",
    "chars": 41779,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.IO;"
  },
  {
    "path": "TrustedUninstaller.sln",
    "chars": 1876,
    "preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.1.3191"
  }
]

// ... and 2 more files (download for full content)

About this extraction

This page contains the full source code of the Ameliorated-LLC/trusted-uninstaller-cli GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 139 files (2.4 MB), approximately 638.2k tokens, and a symbol index with 2239 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!