diff --git a/UWUVCI AIO WPF/App.config b/UWUVCI AIO WPF/App.config
index 6352b73..183a96b 100644
--- a/UWUVCI AIO WPF/App.config
+++ b/UWUVCI AIO WPF/App.config
@@ -49,6 +49,9 @@
False
+
+
+
diff --git a/UWUVCI AIO WPF/Classes/BootImage.cs b/UWUVCI AIO WPF/Classes/BootImage.cs
index 7d84b4d..0c58775 100644
--- a/UWUVCI AIO WPF/Classes/BootImage.cs
+++ b/UWUVCI AIO WPF/Classes/BootImage.cs
@@ -3,6 +3,7 @@ using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
using System.Linq;
+using System.Text.RegularExpressions;
namespace UWUVCI_AIO_WPF.Classes
{
@@ -136,8 +137,17 @@ namespace UWUVCI_AIO_WPF.Classes
if (Frame != null)
g.DrawImage(Frame, new Rectangle(0, 0, 1280, 720));
- if (NameLine1 != null && NameLine2 != null)
+ var isNotEnglish = false;
+
+ if (!string.IsNullOrEmpty(NameLine1) || !string.IsNullOrEmpty(NameLine2))
{
+ var regex = "^[a-zA-Z0-9\\d\\s\\.\\'\\&\\\\(\\)\\-\\:\\;\\.\\,\\?\\^\\¿]*$";
+ var match = Regex.Match(NameLine1, regex);
+ var match2 = Regex.Match(NameLine2, regex);
+ if (!match.Success || !match2.Success)
+ if (!NameLine1.Contains("é") || !NameLine2.Contains("é"))
+ isNotEnglish = true;
+
Pen outlineBold = new Pen(Color.FromArgb(222, 222, 222), 5.0F);
Pen shadowBold = new Pen(Color.FromArgb(190, 190, 190), 7.0F);
Rectangle rectangleNL1 = Longname ? new Rectangle(578, 313, 640, 50) : new Rectangle(578, 340, 640, 50);
@@ -171,10 +181,16 @@ namespace UWUVCI_AIO_WPF.Classes
}
}
+
if (Released > 0)
{
GraphicsPath r = new GraphicsPath();
- r.AddString("Released: " + Released.ToString(), font.FontFamily,
+
+ var releasedString = "Released: " + Released.ToString();
+ if (isNotEnglish)
+ releasedString = Released.ToString() + "年発売";
+
+ r.AddString(releasedString, font.FontFamily,
(int)(FontStyle.Regular),
g.DpiY * 25.0F / 72.0F, new Rectangle(586, 450, 600, 40), format);
g.DrawPath(shadow, r);
@@ -185,12 +201,18 @@ namespace UWUVCI_AIO_WPF.Classes
if (Players > 0)
{
string pStr = Players >= 4 ? "1-4" : (Players == 1 ? "1" : "1-" + Players.ToString());
+
+ if (isNotEnglish)
+ pStr = "プレイ人数 " + pStr + "人";
+ else
+ pStr = "Players: " + pStr;
+
GraphicsPath p = new GraphicsPath();
-
- p.AddString("Players: " + pStr, font.FontFamily,
+
+ p.AddString(pStr, font.FontFamily,
(int)(FontStyle.Regular),
g.DpiY * 25.0F / 72.0F, new Rectangle(586, 496, 600, 40), format);
-
+
g.DrawPath(shadow, p);
g.DrawPath(outline, p);
g.FillPath(brush, p);
diff --git a/UWUVCI AIO WPF/Classes/Injection.cs b/UWUVCI AIO WPF/Classes/Injection.cs
index 79a7b84..f82d692 100644
--- a/UWUVCI AIO WPF/Classes/Injection.cs
+++ b/UWUVCI AIO WPF/Classes/Injection.cs
@@ -573,20 +573,13 @@ namespace UWUVCI_AIO_WPF
{
string savedir = Directory.GetCurrentDirectory();
mvvm.msg = "Extracting Homebrew Base...";
- if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
- Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
- using (Process zip = new Process())
- {
- if (!mvm.debug)
- {
- zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
- }
- zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
- zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\"";
- zip.Start();
- zip.WaitForExit();
- }
+ if (Directory.Exists(Path.Combine(tempPath, "TempBase")))
+ Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
+
+ Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
+
+ ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath));
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
mvvm.Progress = 20;
@@ -685,8 +678,8 @@ namespace UWUVCI_AIO_WPF
toiso.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
// toiso.StartInfo.CreateNoWindow = true;
}
- toiso.StartInfo.FileName = Path.Combine(toolsPath, "ConvertToIso.exe");
- toiso.StartInfo.Arguments = $"\"{romPath}\"";
+ toiso.StartInfo.FileName = Path.Combine(toolsPath, "wit.exe");
+ toiso.StartInfo.Arguments = $"copy --source \"{romPath}\" --dest \"{Path.Combine(tempPath, "pre.iso")}\" -I";
toiso.Start();
toiso.WaitForExit();
@@ -1037,20 +1030,13 @@ namespace UWUVCI_AIO_WPF
{
string savedir = Directory.GetCurrentDirectory();
mvvm.msg = "Extracting Nintendont Base...";
- if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
+
+ if (Directory.Exists(Path.Combine(tempPath, "TempBase")))
+ Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
+
Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
- using (Process zip = new Process()){
- if (!mvm.debug)
- {
-
- zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
- }
- zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
- zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\"";
- zip.Start();
- zip.WaitForExit();
- }
-
+ ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath));
+
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
mvvm.Progress = 20;
mvvm.msg = "Applying Nintendont";
@@ -1479,12 +1465,14 @@ namespace UWUVCI_AIO_WPF
else
{
mvvm.msg = "Extracting Nintendont Base...";
- if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
+
+ if (Directory.Exists(Path.Combine(tempPath, "TempBase")))
+ Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
+
Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
- tik.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
- tik.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\"";
- tik.Start();
- tik.WaitForExit();
+
+ ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath));
+
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
mvvm.Progress = 30;
mvvm.msg = "Applying Nintendont";
@@ -2369,44 +2357,29 @@ namespace UWUVCI_AIO_WPF
{
string RomName = string.Empty;
- using (Process getRomName = new Process())
- {
- mvvm.msg = "Getting BaseRom Name...";
- getRomName.StartInfo.UseShellExecute = false;
- getRomName.StartInfo.CreateNoWindow = false;
- getRomName.StartInfo.RedirectStandardOutput = true;
- getRomName.StartInfo.FileName = "cmd.exe";
- Console.WriteLine(Directory.GetCurrentDirectory());
- //getRomName.StartInfo.Arguments = $"/c \"Tools\\7za.exe\" l \"temp\\baserom\\content\\0010\\rom.zip\" | findstr \"WUP\"";
- getRomName.StartInfo.Arguments = "/c bin\\Tools\\7za.exe l bin\\temp\\baserom\\content\\0010\\rom.zip | findstr WUP";
- getRomName.Start();
- getRomName.WaitForExit();
- var s = getRomName.StandardOutput.ReadToEnd();
- var split = s.Split(' ');
- RomName = split[split.Length - 1].Replace("\r\n", "");
- mvvm.Progress = 15;
- }
- using (Process RomEdit = new Process())
- {
- mvvm.msg = "Removing BaseRom...";
- RomEdit.StartInfo.UseShellExecute = false;
- RomEdit.StartInfo.CreateNoWindow = true;
- RomEdit.StartInfo.RedirectStandardOutput = true;
- RomEdit.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
- //d Path.Combine(baseRomPath, "content", "0010", "rom.zip")
- RomEdit.StartInfo.Arguments = $"d bin\\temp\\baserom\\content\\0010\\rom.zip";
- RomEdit.Start();
- RomEdit.WaitForExit();
- mvvm.Progress = 40;
- mvvm.msg = "Injecting ROM...";
- File.Copy(injectRomPath, $"{RomName}");
- RomEdit.StartInfo.Arguments = $"u bin\\temp\\baserom\\content\\0010\\rom.zip {RomName}";
- RomEdit.Start();
- RomEdit.WaitForExit();
- mvvm.Progress = 80;
- }
- File.Delete(RomName);
+ mvvm.msg = "Getting BaseRom Name...";
+ var zipLocation = Path.Combine(baseRomPath, "content", "0010", "rom.zip");
+ using (var zip = ZipFile.Open(zipLocation, ZipArchiveMode.Read))
+ foreach (var file in zip.Entries)
+ if (file.Name.Contains("WUP"))
+ {
+ RomName = file.Name;
+ break;
+ }
+ mvvm.Progress = 15;
+ var romPath = Directory.GetCurrentDirectory() + "\\" + RomName;
+ mvvm.msg = "Removing BaseRom...";
+ File.Delete(romPath);
+ File.Delete(zipLocation);
+ File.Copy(injectRomPath, romPath);
+
+ using (var stream = new FileStream(zipLocation, FileMode.Create))
+ using (var archive = new ZipArchive(stream, ZipArchiveMode.Create))
+ archive.CreateEntryFromFile(romPath, Path.GetFileName(romPath));
+
+ mvvm.Progress = 80;
+ File.Delete(RomName);
}
diff --git a/UWUVCI AIO WPF/Classes/ToolCheck.cs b/UWUVCI AIO WPF/Classes/ToolCheck.cs
index 84caa5f..83e3029 100644
--- a/UWUVCI AIO WPF/Classes/ToolCheck.cs
+++ b/UWUVCI AIO WPF/Classes/ToolCheck.cs
@@ -2,8 +2,10 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
+using System.IO.Compression;
using System.Net;
using System.Security.Cryptography;
+using System.Threading;
namespace UWUVCI_AIO_WPF.Classes
{
@@ -23,7 +25,6 @@ namespace UWUVCI_AIO_WPF.Classes
"WiiUDownloader.exe",
"wiiurpxtool.exe",
"INICreator.exe",
- "7za.exe",
"blank.ini",
"FreeImage.dll",
"BuildPcePkg.exe",
@@ -33,7 +34,6 @@ namespace UWUVCI_AIO_WPF.Classes
"nintendont.dol",
"nintendont_force.dol",
"GetExtTypePatcher.exe",
- "wbfs_file.exe",
"wit.exe",
"cygwin1.dll",
"cygz.dll",
@@ -58,7 +58,8 @@ namespace UWUVCI_AIO_WPF.Classes
"font2.ttf",
"forwarder.dol",
"gba1.zip",
- "gba2.zip"
+ "gba2.zip",
+ "c2w_patcher.exe"
};
public static bool DoesToolsFolderExist()
@@ -73,15 +74,19 @@ namespace UWUVCI_AIO_WPF.Classes
public static bool IsToolRight(string name)
{
bool ret = false;
- WebClient client = new WebClient();
- client.DownloadFile(backupulr + name + ".md5", name + ".md5");
- StreamReader sr = new StreamReader(name + ".md5");
- var md5 = sr.ReadLine();
+ var md5 = "";
+ using (WebClient client = new WebClient())
+ {
+ client.DownloadFile(backupulr + name + ".md5", name + ".md5");
+ using (StreamReader sr = new StreamReader(name + ".md5"))
+ md5 = sr.ReadLine();
+ }
+
if(CalculateMD5(name) == md5)
{
ret = true;
}
- sr.Close();
+
File.Delete(name + ".md5");
return ret;
}
@@ -116,38 +121,18 @@ namespace UWUVCI_AIO_WPF.Classes
if (!File.Exists(path))
return false;
- if (path.ToLower().Contains("gba1.zip"))
- {
- string p = Path.GetDirectoryName(path);
- if (!File.Exists(Path.Combine(p, "MArchiveBatchTool.exe")))
- {
- using (Process extract = new Process())
+ if (path.ToLower().Contains("gba1.zip") || path.ToLower().Contains("gba2.zip"))
+ if (!File.Exists(Path.Combine(FolderName, "MArchiveBatchTool.exe")) || !File.Exists(Path.Combine(FolderName, "ucrtbase.dll")))
+ try
{
- extract.StartInfo.UseShellExecute = false;
- extract.StartInfo.CreateNoWindow = false;
- extract.StartInfo.FileName = "cmd.exe";
- extract.StartInfo.Arguments = "/c bin\\Tools\\7za.exe x bin\\Tools\\gba1.zip -obin\\Tools";
- extract.Start();
- extract.WaitForExit();
+ ZipFile.ExtractToDirectory(path, FolderName);
}
- }
- }
- else if (path.ToLower().Contains("gba2.zip"))
- {
- string p = Path.GetDirectoryName(path);
- if (!File.Exists(Path.Combine(p, "ucrtbase.dll")))
- {
- using (Process extract = new Process())
+ catch (Exception)
{
- extract.StartInfo.UseShellExecute = false;
- extract.StartInfo.CreateNoWindow = false;
- extract.StartInfo.FileName = "cmd.exe";
- extract.StartInfo.Arguments = "/c bin\\Tools\\7za.exe x bin\\Tools\\gba2.zip -obin\\Tools";
- extract.Start();
- extract.WaitForExit();
+ Thread.Sleep(200);
+ DoesToolExist(path);
}
- }
- }
+
return true;
}
diff --git a/UWUVCI AIO WPF/Models/MainViewModel.cs b/UWUVCI AIO WPF/Models/MainViewModel.cs
index 9a978fc..46aa9b1 100644
--- a/UWUVCI AIO WPF/Models/MainViewModel.cs
+++ b/UWUVCI AIO WPF/Models/MainViewModel.cs
@@ -504,6 +504,16 @@ namespace UWUVCI_AIO_WPF
catch (Exception) { }
cm.ShowDialog();
}
+ else
+ {
+ var cm = new Custom_Message("No Update Available", "This is currently the latest version.");
+ try
+ {
+ cm.Owner = mw;
+ }
+ catch (Exception) { }
+ cm.ShowDialog();
+ }
}
}
@@ -1470,10 +1480,28 @@ namespace UWUVCI_AIO_WPF
}
+ }
+ public static int GetDeterministicHashCode(string str)
+ {
+ unchecked
+ {
+ int hash1 = (5381 << 16) + 5381;
+ int hash2 = hash1;
+
+ for (int i = 0; i < str.Length; i += 2)
+ {
+ hash1 = ((hash1 << 5) + hash1) ^ str[i];
+ if (i == str.Length - 1)
+ break;
+ hash2 = ((hash2 << 5) + hash2) ^ str[i + 1];
+ }
+
+ return hash1 + (hash2 * 1566083941);
+ }
}
public bool checkSysKey(string key)
{
- if (key.GetHashCode() == -589797700)
+ if (GetDeterministicHashCode(key) == -589797700)
{
Properties.Settings.Default.SysKey = key;
Properties.Settings.Default.Save();
@@ -1487,7 +1515,7 @@ namespace UWUVCI_AIO_WPF
}
public bool checkSysKey1(string key)
{
- if (key.GetHashCode() == -1230232583)
+ if (GetDeterministicHashCode(key) == -1230232583)
{
Properties.Settings.Default.SysKey1 = key;
Properties.Settings.Default.Save();
@@ -2340,7 +2368,7 @@ namespace UWUVCI_AIO_WPF
}
public bool checkcKey(string key)
{
- if (1274359530 == key.ToLower().GetHashCode())
+ if (-485504051 == GetDeterministicHashCode(key.ToLower()))
{
Settings.Default.Ckey = key.ToLower();
ckeys = true;
@@ -2353,7 +2381,7 @@ namespace UWUVCI_AIO_WPF
}
public bool isCkeySet()
{
- if (Settings.Default.Ckey.ToLower().GetHashCode() == 1274359530)
+ if (GetDeterministicHashCode(Settings.Default.Ckey.ToLower()) == -485504051)
{
ckeys = true;
return true;
@@ -2366,7 +2394,7 @@ namespace UWUVCI_AIO_WPF
}
public bool checkKey(string key)
{
- if (GbTemp.KeyHash == key.ToLower().GetHashCode())
+ if (GbTemp.KeyHash == GetDeterministicHashCode(key.ToLower()))
{
UpdateKeyInFile(key, $@"bin\keys\{GetConsoleOfBase(gbTemp).ToString().ToLower()}.vck", GbTemp, GetConsoleOfBase(gbTemp));
return true;
@@ -2873,7 +2901,6 @@ namespace UWUVCI_AIO_WPF
using (var md5 = MD5.Create())
{
var name = new byte[] { };
- bool skip = false;
using (var fs = new FileStream(path,
FileMode.Open,
FileAccess.Read))
@@ -2886,30 +2913,19 @@ namespace UWUVCI_AIO_WPF
repoid = rgx.Replace(repoid, "");
- DOSTUFF:
- if (repoid.Length < 4 && !skip)
+ if (repoid.Length < 4)
{
- fs.Seek(0xFFB2, SeekOrigin.Begin);
- fs.Read(procode, 0, 4);
-
- repoid = rgx.Replace(ByteArrayToString(procode), "");
- if (repoid.Length < 4)
- {
- repoid = "Unknown";
- skip = true;
- goto DOSTUFF;
- }
-
fs.Seek(0xFFC0, SeekOrigin.Begin);
procode = new byte[21];
fs.Read(procode, 0, 21);
name = procode;
+ repoid = ByteArrayToString(procode);
+ repoid = rgx.Replace(repoid, "");
}
- else
+
+ if (repoid.Length < 4)
{
-
-
fs.Seek(0x7FC0, SeekOrigin.Begin);
procode = new byte[21];
fs.Read(procode, 0, 21);
diff --git a/UWUVCI AIO WPF/Properties/AssemblyInfo.cs b/UWUVCI AIO WPF/Properties/AssemblyInfo.cs
index e8eaf24..26d7d79 100644
--- a/UWUVCI AIO WPF/Properties/AssemblyInfo.cs
+++ b/UWUVCI AIO WPF/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@ using System.Windows;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.0.3.0")]
-[assembly: AssemblyFileVersion("3.0.3.0")]
+[assembly: AssemblyVersion("3.999.0.0")]
+[assembly: AssemblyFileVersion("3.999.0.0")]
diff --git a/UWUVCI AIO WPF/Properties/Settings.Designer.cs b/UWUVCI AIO WPF/Properties/Settings.Designer.cs
index 9ebefd8..e499f33 100644
--- a/UWUVCI AIO WPF/Properties/Settings.Designer.cs
+++ b/UWUVCI AIO WPF/Properties/Settings.Designer.cs
@@ -178,5 +178,19 @@ namespace UWUVCI_AIO_WPF.Properties {
this["gczw"] = value;
}
}
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string Ancast
+ {
+ get
+ {
+ return ((string)(this["ancast"]));
+ }
+ set
+ {
+ this["ancast"] = value;
+ }
+ }
}
}
diff --git a/UWUVCI AIO WPF/UI/Frames/InjectFrames/Configurations/WiiConfig.xaml b/UWUVCI AIO WPF/UI/Frames/InjectFrames/Configurations/WiiConfig.xaml
index 3001d80..3744054 100644
--- a/UWUVCI AIO WPF/UI/Frames/InjectFrames/Configurations/WiiConfig.xaml
+++ b/UWUVCI AIO WPF/UI/Frames/InjectFrames/Configurations/WiiConfig.xaml
@@ -54,5 +54,7 @@
+
+
diff --git a/UWUVCI AIO WPF/UI/Frames/InjectFrames/Configurations/WiiConfig.xaml.cs b/UWUVCI AIO WPF/UI/Frames/InjectFrames/Configurations/WiiConfig.xaml.cs
index c0be8ba..46fddfa 100644
--- a/UWUVCI AIO WPF/UI/Frames/InjectFrames/Configurations/WiiConfig.xaml.cs
+++ b/UWUVCI AIO WPF/UI/Frames/InjectFrames/Configurations/WiiConfig.xaml.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
+using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@@ -17,6 +18,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.Properties;
using UWUVCI_AIO_WPF.UI.Windows;
+using WiiUDownloaderLibrary;
namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
@@ -256,10 +258,30 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
cm.ShowDialog();
}
-
}
+ }
+ public string ReadAncastFromOtp()
+ {
+ var ret = "";
+ using (var dialog = new System.Windows.Forms.OpenFileDialog())
+ {
+ dialog.Filter = "OTP.bin | otp.bin";
+ var res = dialog.ShowDialog();
+ if (res == System.Windows.Forms.DialogResult.OK)
+ {
+ var filepath = dialog.FileName;
+ var test = new byte[16];
-
+ using (var fs = new FileStream(filepath, FileMode.Open, FileAccess.Read))
+ {
+ fs.Seek(0x90, SeekOrigin.Begin);
+ fs.Read(test, 0, 16);
+ }
+ foreach (var b in test)
+ ret += string.Format("{0:X2}", b);
+ }
+ }
+ return ret;
}
private void InjectGame(object sender, RoutedEventArgs e)
@@ -307,6 +329,108 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.LR = false;
}
mvm.GameConfiguration.GameName = gn.Text;
+
+ if (!string.IsNullOrEmpty(ancastKey.Text))
+ {
+ ancastKey.Text = ancastKey.Text.ToUpper();
+
+ var toolsPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "Tools");
+ var tempPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "temp");
+ var downloadPath = System.IO.Path.Combine(tempPath, "download");
+ var c2wPath = System.IO.Path.Combine(tempPath, "C2W");
+ var imgFileCode = System.IO.Path.Combine(c2wPath, "code", "c2w.img");
+ var imgFile = System.IO.Path.Combine(c2wPath, "c2w.img");
+ var c2wFile = System.IO.Path.Combine(c2wPath, "c2w_patcher.exe");
+
+ var sourceData = ancastKey.Text;
+ var tempSource = Encoding.ASCII.GetBytes(sourceData);
+ var tmpHash = MD5.Create().ComputeHash(tempSource);
+ var hash = BitConverter.ToString(tmpHash);
+
+ if (hash == "31-8D-1F-9D-98-FB-08-E7-7C-7F-E1-77-AA-49-05-43")
+ {
+ Settings.Default.Ancast = ancastKey.Text;
+ string[] ancastKeyCopy = { ancastKey.Text };
+
+ Task.Run(() =>
+ {
+ mvm.Progress += 5;
+
+ Directory.CreateDirectory(tempPath + "\\C2W");
+
+ var titleIds = new List()
+ {
+ "0005001010004000",
+ "0005001010004001"
+ };
+
+ foreach (var titleId in titleIds)
+ {
+ Task.Run(() => Downloader.DownloadAsync(titleId, downloadPath)).GetAwaiter().GetResult();
+ mvm.Progress += 5;
+ }
+
+ foreach (var titleId in titleIds)
+ {
+ CSharpDecrypt.CSharpDecrypt.Decrypt(new string[] { Settings.Default.Ckey, System.IO.Path.Combine(downloadPath, titleId), c2wPath });
+ mvm.Progress += 5;
+ }
+
+ File.WriteAllLines(c2wPath + "\\starbuck_key.txt", ancastKeyCopy);
+
+ File.Copy(System.IO.Path.Combine(toolsPath, "c2w_patcher.exe"), c2wFile, true);
+
+ File.Copy(imgFileCode, imgFile, true);
+
+ mvm.Progress += 5;
+
+ var currentDir = Directory.GetCurrentDirectory();
+ Directory.SetCurrentDirectory(c2wPath);
+ using (Process c2w = new Process())
+ {
+ c2w.StartInfo.FileName = "c2w_patcher.exe";
+ c2w.StartInfo.Arguments = $"-nc";
+ c2w.Start();
+ c2w.WaitForExit();
+ }
+ Directory.SetCurrentDirectory(currentDir);
+
+ File.Copy(System.IO.Path.Combine(c2wPath, "c2p.img"), imgFileCode, true);
+ mvm.Progress = 100;
+ }).GetAwaiter();
+ }
+ else
+ {
+ var cm = new Custom_Message("C2W Error", "Ancast code is incorrect.\nNot continuing with inject.");
+ cm.ShowDialog();
+ return;
+ }
+
+ var message = new DownloadWait("Setting Up C2W - Please Wait", "", mvm);
+ try
+ {
+ message.changeOwner(mvm.mw);
+ }
+ catch (Exception) { }
+ message.ShowDialog();
+ mvm.Progress = 0;
+ File.Delete(imgFileCode);
+ try
+ {
+ Directory.Delete(downloadPath, true);
+ }
+ catch { }
+ File.Delete(c2wFile);
+ File.Delete(c2wPath + "\\starbuck_key.txt");
+ File.Delete(System.IO.Path.Combine(c2wPath, "c2p.img"));
+ File.Delete(imgFileCode);
+ try
+ {
+ Directory.Delete(System.IO.Path.Combine(c2wPath, "code"), true);
+ }
+ catch { }
+ }
+
mvm.Inject(false);
}
@@ -943,5 +1067,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
+ private void ancast_OTP(object sender, RoutedEventArgs e)
+ {
+ ancastKey.Text = ReadAncastFromOtp();
+ }
}
}
diff --git a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml
index 433a0b6..bcf05e7 100644
--- a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml
+++ b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml
@@ -46,7 +46,7 @@
-
+
diff --git a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs
index 015c25f..5d43143 100644
--- a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs
+++ b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs
@@ -71,7 +71,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_5(object sender, RoutedEventArgs e)
{
- Custom_Message cm = new Custom_Message("Credits", "UWUVCI AIO - NicoAICP, Morilli, ZestyTS\nBeta Testers/Contributors - wowjinxy, Danis, Adolfobenjaminv\n\n7za - Igor Pavlov\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Converter - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns, ZestyTS\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94 and many more\nWii-VMC - wanikoko\nIcon/TV Bootimages - Flump, ZestyTS\nNKit - Nanook\nImage Creation Base - Phacox\nWiiGameLanguage Patcher - ReturnerS\nChangeAspectRatio - andot\nvWii Title Forwarder - Fix94");
+ Custom_Message cm = new Custom_Message("Credits", "UWUVCI AIO - NicoAICP, Morilli, ZestyTS\nBeta Testers/Contributors - wowjinxy, Danis, Adolfobenjaminv\n\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Converter - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns, ZestyTS\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94 and many more\nWii-VMC - wanikoko\nIcon/TV Bootimages - Flump, ZestyTS\nNKit - Nanook\nImage Creation Base - Phacox\nWiiGameLanguage Patcher - ReturnerS\nChangeAspectRatio - andot\nvWii Title Forwarder - Fix94");
try
{
cm.Owner = (FindResource("mvm") as MainViewModel).mw;
@@ -143,7 +143,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_13(object sender, RoutedEventArgs e)
{
- Process.Start("https://ko-fi.com/uwuvci");
+ Process.Start("https://ko-fi.com/zestyts");
}
}
}
diff --git a/UWUVCI AIO WPF/UI/Frames/StartFrame.xaml b/UWUVCI AIO WPF/UI/Frames/StartFrame.xaml
index 904cf3d..58bdc37 100644
--- a/UWUVCI AIO WPF/UI/Frames/StartFrame.xaml
+++ b/UWUVCI AIO WPF/UI/Frames/StartFrame.xaml
@@ -9,8 +9,13 @@
Title="SettingsFrame" >
-
-