Exemplo n.º 1
0
        public static bool smethod_13(bool bool_0)
        {
            int num = (int)RadMessageBox.Show("Please select a location to store your games. Note : it is not recommended to chose a location such as 'Program Files' since it requires Admin privileges.");
            CommonOpenFileDialog commonOpenFileDialog1 = new CommonOpenFileDialog();

            commonOpenFileDialog1.IsFolderPicker = true;
            commonOpenFileDialog1.Title          = "Please chose where to store your games.";
            CommonOpenFileDialog commonOpenFileDialog2 = commonOpenFileDialog1;

            while (commonOpenFileDialog2.ShowDialog() != CommonFileDialogResult.Cancel)
            {
                if (GClass6.smethod_2(commonOpenFileDialog2.FileName))
                {
                    DirectoryInfo directoryInfo = new DirectoryInfo(commonOpenFileDialog2.FileName);
                    string        str           = commonOpenFileDialog2.FileName;
                    if (directoryInfo.Name == "DATA" || directoryInfo.Name == "DATA_3DS")
                    {
                        str = directoryInfo.Parent.FullName;
                    }
                    Settings.Default.Path = str;
                    Settings.Default.Save();
                    return(true);
                }
            }
            return(!bool_0);
        }
Exemplo n.º 2
0
 public SelectClient()
 {
     Load      += new EventHandler(SelectClient_Load);
     gclass6_0  = new GClass6();
     gclass22_0 = new GClass22();
     InitializeComponent();
 }
Exemplo n.º 3
0
        public static void smethod_2()
        {
            if (!Settings.Default.Path.Contains("Program Files") || !Settings.Default.ShowProgramFilesWarning)
            {
                return;
            }
            int num = (int)RadMessageBox.Show("It appears you have chosen to store your games in Program Files. This could lead to a number of issues since this is a restricted location. It is advised that you chose another location which does not require admin privileges such as your personnal folder.");

            switch (RadMessageBox.Show("Would you like to set a new location now (strongly recommended)? Chosing cancel will disable future warnings.", "Problem detected", MessageBoxButtons.YesNoCancel))
            {
            case DialogResult.Cancel:
                Settings.Default.ShowProgramFilesWarning = false;
                Settings.Default.Save();
                break;

            case DialogResult.Yes:
                string str1 = Path.Combine(Settings.Default.Path, "DATA");
                string str2 = Path.Combine(Settings.Default.Path, "DATA_3DS");
                do
                {
                    ;
                }while (!Class97.smethod_13(true) || !GClass6.smethod_2(Settings.Default.Path));
                if (Directory.Exists(str1))
                {
                    Class97.smethod_8(str1, Settings.Default.Path);
                }
                if (!Directory.Exists(str2))
                {
                    break;
                }
                Class97.smethod_8(str2, Settings.Default.Path);
                break;
            }
        }
Exemplo n.º 4
0
        private void method_15()
        {
            string str1 = Path.Combine(this.WorkPath, "rawFiles");

            Directory.CreateDirectory(str1);
            this.GClass30_0.method_16(str1, false, false, (IEnumerable <GClass12>)null, false);
            Task task = this.method_7();

            this.method_11(1);
            string fullName = new DirectoryInfo(Path.Combine(str1, "content", "rom")).GetFiles()[0].FullName;

            GClass6.smethod_6(fullName);
            System.IO.File.WriteAllBytes(fullName, this.method_18(this.string_3, new int?()));
            try
            {
                string fileName = Path.GetFileName(fullName);
                this.method_5("config", Path.Combine(str1, "content", "config"));
                string str2 = Path.Combine(str1, "content", "config", fileName + ".ini");
                GClass6.smethod_6(str2);
                System.IO.File.Move(Path.Combine(str1, "content", "config", "config"), str2);
            }
            catch
            {
            }
            GClass6.smethod_8(string.Format("{0}/res/SNES/vc-template.zip", (object)Class67.String_2), this.WorkPath);
            task.Wait();
            this.method_11(3);
            this.vmethod_3();
            this.method_8();
            this.method_9();
        }
Exemplo n.º 5
0
        public static void smethod_0(string string_5)
        {
            string currentDirectory = Directory.GetCurrentDirectory();

            Directory.SetCurrentDirectory(string_5);
            try
            {
                Class30.bool_2 = true;
                Class30.bool_9 = true;
                Class30.smethod_4(Class30.string_0);
                byte[] byte_3 = Class30.smethod_7("hif_unpack.nfs", "hif_dec.nfs", Class30.smethod_6(Class30.string_1, "hif_unpack.nfs", false));
                GClass6.smethod_6("hif_unpack.nfs");
                Class30.smethod_5("hif_dec.nfs", "hif.nfs", Class30.byte_0, Class30.smethod_2(Class30.byte_0.Length), true, byte_3);
                GClass6.smethod_6("hif_dec.nfs");
                Class30.smethod_10("hif.nfs");
                GClass6.smethod_6("hif.nfs");
            }
            catch
            {
                Directory.SetCurrentDirectory(currentDirectory);
                throw;
            }
            finally
            {
                Directory.SetCurrentDirectory(currentDirectory);
            }
        }
Exemplo n.º 6
0
        private void method_4(object object_0, GClass87 gclass87_0)
        {
            this.Event_1 -= new EventHandler <GClass87>(this.method_4);
            if (!gclass87_0.bool_0)
            {
                using (MemoryStream memoryStream1 = new MemoryStream(gclass87_0.byte_0))
                {
                    MemoryStream memoryStream2 = new MemoryStream();
                    try
                    {
                        new Bitmap(Image.FromStream((Stream)memoryStream1), new Size(48, 48)).Save((Stream)memoryStream2, ImageFormat.Png);
                        File.WriteAllBytes(gclass87_0.string_0, memoryStream2.ToArray());
                        this.Image = Image.FromStream((Stream)memoryStream2);
                    }
                    catch (Exception ex)
                    {
                        GClass6.smethod_6(gclass87_0.string_0);
                        return;
                    }
                }
            }
            else
            {
                this.Image = Image.FromStream((Stream) new MemoryStream(gclass87_0.byte_0));
            }
            // ISSUE: reference to a compiler-generated field
            EventHandler <GClass84> eventHandler2 = this.eventHandler_2;

            if (eventHandler2 == null)
            {
                return;
            }
            eventHandler2((object)this, new GClass84(this.Image));
        }
Exemplo n.º 7
0
        private static void smethod_18()
        {
            if (Class67.zipArchive_0 != null)
            {
                return;
            }
            string path     = Path.Combine(GClass88.DirectoryCache, "etag");
            string str      = Path.Combine(GClass88.DirectoryCache, "db");
            string string_2 = GClass6.Get_URL_File_Metadata(Class67.DataV6URL);

            if (System.IO.File.Exists(path) && System.IO.File.Exists(str))
            {
                if (!(System.IO.File.ReadAllText(path) != string_2) && new FileInfo(str).Length != 0L)
                {
                    using (MemoryStream memoryStream_0 = new MemoryStream(System.IO.File.ReadAllBytes(str)))
                        Class67.smethod_16(memoryStream_0);
                }
                else
                {
                    Class67.smethod_17(string_2);
                }
            }
            else
            {
                Class67.smethod_17(string_2);
            }
        }
Exemplo n.º 8
0
        private List <GClass16> method_11(string string_0)
        {
            GClass14 gclass14_0 = this.method_2(string_0);

            if (!this.method_9(string_0))
            {
                this.method_10(gclass14_0);
            }
            using (MD5 md5 = MD5.Create())
            {
                if (!md5.ComputeHash(Alphaleonis.Win32.Filesystem.File.ReadAllBytes(this.method_12(string_0))).smethod_5(gclass14_0.Md5.smethod_6()))
                {
                    this.method_10(gclass14_0);
                }
            }
            GClass6.Unzip(Alphaleonis.Win32.Filesystem.File.ReadAllBytes(this.method_12(string_0)), this.String_0);
            using (FileStream fileStream = Alphaleonis.Win32.Filesystem.File.OpenRead(this.method_12(string_0)))
            {
                using (ZipArchive zipArchive = new ZipArchive((Stream)fileStream, ZipArchiveMode.Read))
                {
                    try
                    {
                        return(JsonConvert.DeserializeObject <List <GClass16> >(zipArchive.Entries.First <ZipArchiveEntry>((Func <ZipArchiveEntry, bool>)(zipArchiveEntry_0 => zipArchiveEntry_0.Name == "usbhelper.mappings")).smethod_7()));
                    }
                    catch
                    {
                        return(new List <GClass16>());
                    }
                }
            }
        }
Exemplo n.º 9
0
        private void timer_0_Tick(object sender, EventArgs e)
        {
            bool flag = GClass6.smethod_16("Steam");

            this.cmdSteam.Enabled      = !flag;
            this.lblCloseSteam.Visible = flag;
        }
Exemplo n.º 10
0
        private void method_15()
        {
            string str1 = Path.Combine(this.WorkPath, "rawFiles");

            Directory.CreateDirectory(str1);
            this.GClass30_0.method_16(str1, false, false, (IEnumerable <GClass12>)null, false);
            string string_3_1     = this.method_4("rpl2elf.exe");
            string string_3_2     = this.method_4("RetroInject.exe");
            string str2           = this.method_4("game.elf");
            string string_6       = this.method_4("game_injected.elf");
            string sourceFileName = this.method_4("game_injected.rpx");
            string fullName       = ((IEnumerable <FileInfo>) new DirectoryInfo(Path.Combine(str1, "code")).GetFiles()).First <FileInfo>((Func <FileInfo, bool>)(fileInfo_0 => fileInfo_0.Extension == ".rpx")).FullName;

            GClass6.Download_Unzip(string.Format("{0}/res/SNES/vc-template.zip", (object)Class67.CDNWiiUUSBHelperURL), this.WorkPath);
            Task task = this.method_7();

            this.method_11(1);
            GClass91.smethod_1(string_3_1, this.WorkPath, string.Format(" \"{0}\"  \"{1}\"", (object)fullName, (object)str2));
            GClass91.smethod_1(string_3_2, this.WorkPath, string.Format(" \"{0}\"  \"{1}\"  \"{2}\"  ", (object)str2, (object)this.string_3, (object)string_6));
            this.method_11(2);
            this.method_17(string_6);
            GClass6.smethod_6(fullName);
            System.IO.File.Move(sourceFileName, fullName);
            task.Wait();
            this.method_11(3);
            this.vmethod_3();
            this.method_8();
            this.method_9();
        }
Exemplo n.º 11
0
        private static void smethod_6(GClass30 gclass30_0, string string_0, string string_1, string string_2, string string_3, string string_4, string string_5)
        {
            string str1 = System.IO.Path.Combine(string_1, gclass30_0.TitleId.IdRaw + ".lnk");
            string str2 = System.IO.Path.Combine(string_1, string_0 + ".lnk");
            // ISSUE: variable of a compiler-generated type
            WshShell instance = (WshShell)Activator.CreateInstance(Marshal.GetTypeFromCLSID(new Guid("72C24DD5-D70A-438B-8A42-98424B88AFB8")));

            // ISSUE: reference to a compiler-generated field
            if (GClass128.Class113.callSite_0 == null)
            {
                // ISSUE: reference to a compiler-generated field
                GClass128.Class113.callSite_0 = CallSite <Func <CallSite, object, IWshShortcut> > .Create(Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof(IWshShortcut), typeof(GClass128)));
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated method
            // ISSUE: variable of a compiler-generated type
            IWshShortcut wshShortcut = GClass128.Class113.callSite_0.Target((CallSite)GClass128.Class113.callSite_0, instance.CreateShortcut(str1));

            wshShortcut.Arguments        = string_5;
            wshShortcut.Description      = string_4;
            wshShortcut.IconLocation     = string_3;
            wshShortcut.TargetPath       = string_2;
            wshShortcut.WorkingDirectory = System.IO.Path.GetDirectoryName(string_2);
            // ISSUE: reference to a compiler-generated method
            wshShortcut.Save();
            GClass6.smethod_6(str2);
            Alphaleonis.Win32.Filesystem.File.Move(str1, str2);
            GClass128.SHChangeNotify(134217728, 4096, IntPtr.Zero, IntPtr.Zero);
        }
Exemplo n.º 12
0
 public static void smethod_2(GClass32 gclass32_0)
 {
     try
     {
         string str1 = GClass128.smethod_9(gclass32_0);
         if (str1 == null)
         {
             return;
         }
         string string_1 = GClass128.smethod_8(gclass32_0);
         foreach (string user in SteamManager.GetUsers(SteamManager.GetSteamFolder()))
         {
             ulong  num   = GClass128.smethod_3(gclass32_0.Name, string_1);
             string path2 = "config";
             string path3 = "grid";
             string str2  = System.IO.Path.Combine(user, path2, path3);
             System.IO.Directory.CreateDirectory(str2);
             string destFileName = System.IO.Path.Combine(str2, ((long)num).ToString() + ".png");
             System.IO.File.Copy(str1, destFileName, true);
         }
         GClass6.smethod_6(str1);
     }
     catch
     {
     }
 }
Exemplo n.º 13
0
 public static bool smethod_2(string string_0)
 {
     if (!string.IsNullOrEmpty(string_0) && Alphaleonis.Win32.Filesystem.Directory.Exists(string_0))
     {
         return(GClass6.smethod_1(string_0));
     }
     return(false);
 }
Exemplo n.º 14
0
 public static string smethod_13(DataSize dataSize_0, GStruct3 gstruct3_0)
 {
     if (gstruct3_0.ulong_0 > 0UL)
     {
         return(GClass6.smethod_12(GStruct3.smethod_1(dataSize_0, gstruct3_0)));
     }
     return("Not available at the moment.");
 }
Exemplo n.º 15
0
 public static void smethod_0(string string_1)
 {
     if (!GClass88.smethod_1(string_1))
     {
         return;
     }
     GClass6.smethod_6(GClass88.smethod_11(string_1));
 }
Exemplo n.º 16
0
 public static void smethod_0(string string_1)
 {
     if (!GClass88.Check_If_Exists_In_Cache_Dir(string_1))
     {
         return;
     }
     GClass6.smethod_6(GClass88.Combine_Cache_Dir_With_String_1(string_1));
 }
Exemplo n.º 17
0
 private static void smethod_5(string string_2)
 {
     try
     {
         GClass6.smethod_6(string_2);
     }
     catch
     {
     }
 }
Exemplo n.º 18
0
 public virtual void vmethod_1()
 {
     try
     {
         GClass6.smethod_5(this.CurrentGamePath);
     }
     catch
     {
     }
 }
Exemplo n.º 19
0
        private static void smethod_17(string string_2)
        {
            string string_0_1 = Path.Combine(GClass88.CachePath, "etag");
            string string_0_2 = Path.Combine(GClass88.CachePath, "db");

            using (MemoryStream memoryStream_0 = new MemoryStream(new GClass78().method_2(Class67.String_5)))
                Class67.smethod_16(memoryStream_0);
            GClass6.smethod_6(string_0_1);
            GClass6.smethod_6(string_0_2);
        }
Exemplo n.º 20
0
        private static void smethod_17(string string_2)
        {
            string string_0_1 = Path.Combine(GClass88.DirectoryCache, "etag");
            string string_0_2 = Path.Combine(GClass88.DirectoryCache, "db");

            using (MemoryStream memoryStream_0 = new MemoryStream(new GClass78().DownloadFile(Class67.DataV6URL)))
                Class67.smethod_16(memoryStream_0);
            GClass6.smethod_6(string_0_1);
            GClass6.smethod_6(string_0_2);
        }
Exemplo n.º 21
0
 public void method_3()
 {
     GClass6.smethod_6(this.String_1);
     GClass6.smethod_6(this.String_3);
     try
     {
         GClass6.smethod_5(this.String_5);
     }
     catch
     {
     }
 }
Exemplo n.º 22
0
 public bool method_11()
 {
     this.method_6();
     try
     {
         GClass6.smethod_5(this.OutputPath);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 23
0
        private void cmdImport_Click(object sender, EventArgs e)
        {
            if (this.lstSaves.SelectedItem == null || RadMessageBox.Show("You are about to import a save. If you already have any local save data, it will be OVERWRITTEN. If you are using Cloud Saving, your cloud save will also be OVERWRITTEN. Continue?", "Continue?", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return;
            }
            GClass95 gclass95 = this.gclass32_0.method_14(false);

            GClass6.smethod_5(gclass95.FileSaveLocation);
            GClass27.smethod_7(string.Format("{0}/communitysaves/cdn/{1}", (object)Class67.CloudWiiUUSBHelperURL, (object)(this.lstSaves.SelectedItem.Tag as frmCommunitySaves.Class131).Md5), gclass95.FileSaveLocation);
            if (Settings.Default.EnableCloudSaving)
            {
                gclass95.method_2(gclass95.vmethod_0(), Settings.Default.CloudUserName, Settings.Default.CloudPassWord);
            }
            int num = (int)RadMessageBox.Show("Save imported!");
        }
Exemplo n.º 24
0
        public void method_2(string string_2, string string_3, string string_4)
        {
            if (string_2 == null)
            {
                return;
            }
            string str = Path.Combine(Path.GetDirectoryName(string_2), Convert.ToBase64String(Encoding.UTF8.GetBytes(string_3 + " " + string_4 + " " + this.gclass30_0.TitleId.IdRaw)));

            GClass6.smethod_6(str);
            System.IO.File.Move(string_2, str);
            string text = Class67.smethod_14(str, string.Format("{0}/saves/upload_save_b64.php", (object)Class67.String_1));

            if (!(text != "OK"))
            {
                return;
            }
            int num = (int)RadMessageBox.Show(text);
        }
Exemplo n.º 25
0
 public void method_1()
 {
     foreach (Alphaleonis.Win32.Filesystem.FileInfo file in new Alphaleonis.Win32.Filesystem.DirectoryInfo(this.WorkPath).GetFiles("*", System.IO.SearchOption.AllDirectories))
     {
         if (System.IO.Directory.GetParent(file.FullName).Name != "output")
         {
             GClass6.smethod_6(file.FullName);
         }
     }
     foreach (Alphaleonis.Win32.Filesystem.FileInfo file in new Alphaleonis.Win32.Filesystem.DirectoryInfo(System.IO.Path.Combine(this.WorkPath, "output")).GetFiles())
     {
         FileSystem.MoveFile(file.FullName, file.FullName.Replace("output\\", ""));
     }
     foreach (Alphaleonis.Win32.Filesystem.DirectoryInfo directory in new Alphaleonis.Win32.Filesystem.DirectoryInfo(this.WorkPath).GetDirectories())
     {
         directory.Delete(true);
     }
 }
Exemplo n.º 26
0
 public List <GClass14> method_1()
 {
     try
     {
         this.list_1 = JsonConvert.DeserializeObject <List <GClass14> >(GClass6.smethod_20("https://cloud.wiiuusbhelper.com/mods/list_mods.php", new NameValueCollection()
         {
             {
                 "titleid",
                 this.gclass32_0.TitleId.IdRaw
             }
         }));
         return(this.list_1);
     }
     catch (Exception ex)
     {
         return(new List <GClass14>());
     }
 }
Exemplo n.º 27
0
        public static void smethod_3(string string_2, string string_3, bool bool_3 = true)
        {
            string str = string_3;

            foreach (string file in Directory.GetFiles(string_2, "*.*", SearchOption.AllDirectories))
            {
                if (!(file == str) && (!bool_3 || !file.Contains("meta")))
                {
                    try
                    {
                        GClass6.smethod_6(file);
                    }
                    catch
                    {
                    }
                }
            }
            GClass95.smethod_2(string_2);
        }
Exemplo n.º 28
0
        public static bool smethod_12(bool bool_0)
        {
            CommonOpenFileDialog commonOpenFileDialog1 = new CommonOpenFileDialog();

            commonOpenFileDialog1.Title          = "Please chose where to store extracted games.";
            commonOpenFileDialog1.IsFolderPicker = true;
            CommonOpenFileDialog commonOpenFileDialog2 = commonOpenFileDialog1;

            while (commonOpenFileDialog2.ShowDialog() != CommonFileDialogResult.Cancel)
            {
                if (GClass6.smethod_2(commonOpenFileDialog2.FileName))
                {
                    Settings.Default.ExtractFolder = commonOpenFileDialog2.FileName;
                    Settings.Default.Save();
                    return(true);
                }
            }
            return(!bool_0);
        }
Exemplo n.º 29
0
        public string method_25(GClass82 gclass82_0, string string_15)
        {
            if (!Directory.Exists(this.String_8))
            {
                Directory.CreateDirectory(this.String_8);
            }
            string str1 = ((long)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds).ToString();
            string str2 = Path.Combine(this.String_8, str1 + ".zip");

            try
            {
                BackupWiiUSaves.BackupWiiUSave((GClass30)this, gclass82_0.IPAddress_0, str2);
            }
            catch
            {
                GClass6.smethod_6(str2);
                throw;
            }
            if (!File.Exists(str2))
            {
                return((string)null);
            }
            using (FileStream fileStream = File.Open(str2, FileMode.Open, FileAccess.ReadWrite))
            {
                using (ZipArchive zipArchive = new ZipArchive((Stream)fileStream, ZipArchiveMode.Update))
                {
                    using (StreamWriter streamWriter = new StreamWriter(zipArchive.CreateEntry("meta.json").Open()))
                    {
                        string str3 = JsonConvert.SerializeObject((object)new SaveDescription()
                        {
                            Description = string_15,
                            Timestamp   = str1,
                            Region      = this.Region,
                            Name        = this.Name,
                            TitleId     = this.TitleId.IdRaw
                        });
                        streamWriter.Write(str3);
                    }
                }
            }
            return(str2);
        }
Exemplo n.º 30
0
 internal GClass95(GClass30 gclass30_1, string string_2, string string_3, bool bool_3 = true, bool bool_4 = false)
 {
     this.gclass30_0 = gclass30_1;
     this.FullScreen = bool_4;
     this.Name       = string_2;
     try
     {
         if (!Directory.Exists(this.String_6))
         {
             Directory.CreateDirectory(this.String_6);
         }
     }
     catch (Exception ex)
     {
         int num = (int)RadMessageBox.Show("An error occured while initializing the emulators. Most likely you have unplugged the drive on which your games are stored. The emulation settings will now be cleared and the application will close.\n" + ex.ToString());
         try
         {
             GClass6.smethod_5(Path.Combine(GClass17.string_0));
         }
         catch
         {
         }
         Environment.Exit(0);
         return;
     }
     if (!Directory.Exists(this.String_5))
     {
         Directory.CreateDirectory(this.String_5);
     }
     if (!Directory.Exists(this.String_4))
     {
         Directory.CreateDirectory(this.String_4);
     }
     this.Url    = string_3;
     this.bool_0 = bool_3;
     if (!bool_3)
     {
         return;
     }
     this.method_1();
 }