public static RunWorkerCompletedEventArgs FixGameGuardError(bool cleanFix, string gameLocation, Func <int, bool> progress_callback)
        {
            RunWorkerCompletedEventArgs result = null;

            using (var webc = Components.WebClientManger.WebClientPool.GetWebClient_PSO2Download(true))
            {
                webc.CacheStorage = Components.CacheStorage.DefaultStorage;
                result            = PSO2UpdateManager.RedownloadFile(webc, DefaultValues.Filenames.GameGuardDes + DefaultValues.Web.FakeFileExtension, Path.Combine(gameLocation, DefaultValues.Filenames.GameGuardDes), progress_callback);
                if (result.Error != null || result.Cancelled)
                {
                    return(result);
                }
                result = PSO2UpdateManager.RedownloadFile(webc, DefaultValues.Filenames.GameGuardConfig + DefaultValues.Web.FakeFileExtension, Path.Combine(gameLocation, DefaultValues.Filenames.GameGuardConfig), progress_callback);
                if (result.Error != null || result.Cancelled)
                {
                    return(result);
                }
                webc.CacheStorage = null;
            }
            if (cleanFix)
            {
                // Delete the game's gameguard folder
                Directory.Delete(Path.Combine(gameLocation, "GameGuard"), true);
                // Delete the registry
                Microsoft.Win32.Registry.LocalMachine.DeleteSubKeyTree("SYSTEM\\CurrentControlSet\\Services\\npggsvc", false);
                // Delete the 3 (or 6???) hidden files in SystemRoot
                string sysRoot = Environment.GetFolderPath(Environment.SpecialFolder.System);
                File.Delete(Path.Combine(sysRoot, "gamemon.des"));
                File.Delete(Path.Combine(sysRoot, "npptnt2.sys"));
                File.Delete(Path.Combine(sysRoot, "nppt9x.vxd"));
            }
            return(result);
        }
        public static RunWorkerCompletedEventArgs RedownloadCensorFile(string pso2Dir, Func <int, bool> progress_callback)
        {
            RunWorkerCompletedEventArgs result = null;

            if (!string.IsNullOrWhiteSpace(pso2Dir))
            {
                string censorfilepath = Path.Combine(pso2Dir, "data", "win32", "ffbff2ac5b7a7948961212cefd4d402c");
                using (var webc = Components.WebClientManger.WebClientPool.GetWebClient_PSO2Download(true))
                {
                    webc.CacheStorage = Components.CacheStorage.DefaultStorage;
                    result            = PSO2UpdateManager.RedownloadFile(webc, "ffbff2ac5b7a7948961212cefd4d402c" + DefaultValues.Web.FakeFileExtension, censorfilepath, progress_callback);
                    webc.CacheStorage = null;
                }
            }
            else
            {
                result = new RunWorkerCompletedEventArgs(null, new ArgumentNullException(), false);
            }
            return(result);
        }