Example #1
0
        public static Enum3 smethod_0(byte[] byte_1, byte[] byte_2, int int_5, byte[] byte_3, byte byte_4)
        {
            byte[] numArray1 = new byte[16];
            numArray1[1] = byte_4;
            byte[] byte_3_1 = numArray1;
            SHA1   shA1     = SHA1.Create();

            byte[] byte_1_1 = new byte[1024];
            Buffer.BlockCopy((Array)byte_1, 0, (Array)byte_1_1, 0, 1024);
            byte[] numArray2 = Class85.smethod_5(byte_1_1, byte_3, byte_3_1);
            numArray2[1] ^= byte_4;
            int srcOffset1 = int_5 % 16 * 20;
            int srcOffset2 = (16 + int_5 / 16 % 16) * 20;
            int srcOffset3 = (32 + int_5 / 256 % 16) * 20;
            int srcOffset4 = int_5 / 4096 % 16 * 20;

            byte[] byte_0_1 = new byte[20];
            byte[] byte_1_2 = new byte[20];
            byte[] byte_0_2 = new byte[20];
            byte[] byte_1_3 = new byte[20];
            Buffer.BlockCopy((Array)numArray2, srcOffset1, (Array)byte_0_1, 0, 20);
            Buffer.BlockCopy((Array)numArray2, srcOffset1, (Array)byte_3_1, 0, 16);
            byte[] byte_1_4 = new byte[64512];
            Buffer.BlockCopy((Array)byte_1, 1024, (Array)byte_1_4, 0, 64512);
            byte[] buffer1 = Class85.smethod_5(byte_1_4, byte_3, byte_3_1);
            byte[] hash1   = shA1.ComputeHash(buffer1);
            if (!GClass27.smethod_1(byte_0_1, hash1))
            {
                return(Enum3.const_1);
            }
            if (int_5 % 16 == 0)
            {
                byte[] buffer2 = new byte[320];
                Buffer.BlockCopy((Array)numArray2, srcOffset1, (Array)buffer2, 0, 320);
                Buffer.BlockCopy((Array)numArray2, srcOffset2, (Array)byte_1_2, 0, 20);
                if (!GClass27.smethod_1(shA1.ComputeHash(buffer2), byte_1_2))
                {
                    return(Enum3.const_1);
                }
            }
            if (int_5 % 256 == 0)
            {
                byte[] buffer2 = new byte[320];
                Buffer.BlockCopy((Array)numArray2, srcOffset2, (Array)buffer2, 0, 320);
                Buffer.BlockCopy((Array)numArray2, srcOffset3, (Array)byte_0_2, 0, 20);
                byte[] hash2 = shA1.ComputeHash(buffer2);
                if (!GClass27.smethod_1(byte_0_2, hash2))
                {
                    return(Enum3.const_1);
                }
            }
            if (int_5 % 4096 != 0)
            {
                return(Enum3.const_0);
            }
            byte[] buffer3 = new byte[320];
            Buffer.BlockCopy((Array)numArray2, srcOffset3, (Array)buffer3, 0, 320);
            Buffer.BlockCopy((Array)byte_2, srcOffset4, (Array)byte_1_3, 0, 20);
            return(!GClass27.smethod_1(shA1.ComputeHash(buffer3), byte_1_3) ? Enum3.const_1 : Enum3.const_0);
        }
Example #2
0
 public static GClass104.GEnum7 smethod_1(Stream stream_0)
 {
     byte[] buffer = new byte[4];
     if (stream_0.Length > 68L)
     {
         stream_0.Seek(64L, SeekOrigin.Begin);
         stream_0.Read(buffer, 0, buffer.Length);
         if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0)) == (int)GClass104.uint_1)
         {
             return(GClass104.GEnum7.const_1);
         }
     }
     if (stream_0.Length > 132L)
     {
         stream_0.Seek(128L, SeekOrigin.Begin);
         stream_0.Read(buffer, 0, buffer.Length);
         if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0)) == (int)GClass104.uint_1)
         {
             return(GClass104.GEnum7.const_2);
         }
     }
     if (stream_0.Length > 4L)
     {
         stream_0.Seek(0L, SeekOrigin.Begin);
         stream_0.Read(buffer, 0, buffer.Length);
         if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0)) == (int)GClass104.uint_0)
         {
             return(GClass104.GEnum7.const_3);
         }
     }
     return(GClass104.GEnum7.const_0);
 }
Example #3
0
 internal static void smethod_0()
 {
     try
     {
         string str1 = Path.Combine(GClass88.DirectoryCache, "packs");
         Directory.CreateDirectory(str1);
         GClass27.smethod_7("https://github.com/slashiee/cemu_graphic_packs/archive/master.zip", str1);
         string[] files = Directory.GetFiles(str1, "*", System.IO.SearchOption.AllDirectories);
         string   str2  = Path.Combine(new Cemu((GClass30)null, false).Root_BIN_Path, "graphicPacks");
         Directory.CreateDirectory(str2);
         foreach (string path in ((IEnumerable <string>)files).Where <string>((Func <string, bool>)(string_0 => string_0.Contains("rules.txt"))))
         {
             string directoryName = Path.GetDirectoryName(path);
             string str3          = Path.Combine(str2, new DirectoryInfo(Path.GetDirectoryName(path)).Name);
             if (Directory.Exists(Path.Combine(str2, str3)))
             {
                 Directory.Delete(str3, true);
             }
             try
             {
                 FileSystem.MoveDirectory(directoryName, str3);
             }
             catch
             {
             }
         }
     }
     catch
     {
     }
 }
Example #4
0
 internal static void smethod_10()
 {
     if (GClass27.InSysDir("msvcp140.dll"))
     {
         return;
     }
     Class67.smethod_7("vcredist_x642015.exe");
 }
Example #5
0
 private bool method_16(byte[] byte_1, int int_1 = 0)
 {
     using (SHA1 shA1 = SHA1.Create())
     {
         shA1.TransformFinalBlock(byte_1, int_1, byte_1.Length - int_1);
         return(GClass27.smethod_1(this.Byte_0, shA1.Hash));
     }
 }
Example #6
0
 internal static void smethod_4()
 {
     if (GClass27.smethod_2("xinput1_3.dll") && (!Environment.Is64BitOperatingSystem || GClass27.smethod_3("xinput1_3.dll")))
     {
         return;
     }
     Class67.smethod_7("dxwebsetup.exe");
 }
Example #7
0
 private void method_4(Stream stream_0)
 {
     stream_0.Seek(0L, SeekOrigin.Begin);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_1)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_0)), 0, 4);
     stream_0.Write(this.byte_1, 0, this.byte_1.Length);
     stream_0.Write(this.byte_0, 0, this.byte_0.Length);
 }
Example #8
0
 internal static void CheckOrInstallDirectXRuntime()
 {
     if (GClass27.InSysDir("xinput1_3.dll") && (!Environment.Is64BitOperatingSystem || GClass27.InWinSysWOW64("xinput1_3.dll")))
     {
         return;
     }
     Class67.smethod_7("dxwebsetup.exe");
 }
Example #9
0
 private static void smethod_8(string string_2, string string_3, string string_4)
 {
     if (GClass27.InSysDir(string_2) && (!Environment.Is64BitOperatingSystem || GClass27.InWinSysWOW64(string_2)))
     {
         return;
     }
     Class67.smethod_7(string_3);
     Class67.smethod_7(string_4);
 }
Example #10
0
 public void method_0(Stream stream_0)
 {
     stream_0.Seek(0L, SeekOrigin.Begin);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_3)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_7)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_0)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_4)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_5)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_6)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_1)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_2)), 0, 4);
 }
Example #11
0
 public static GClass104.GEnum7 smethod_0(byte[] byte_0)
 {
     if (byte_0.Length > 68 && (int)GClass27.smethod_5(BitConverter.ToUInt32(byte_0, 64)) == (int)GClass104.uint_1)
     {
         return(GClass104.GEnum7.const_1);
     }
     if (byte_0.Length > 132 && (int)GClass27.smethod_5(BitConverter.ToUInt32(byte_0, 128)) == (int)GClass104.uint_1)
     {
         return(GClass104.GEnum7.const_2);
     }
     return(byte_0.Length > 4 && (int)GClass27.smethod_5(BitConverter.ToUInt32(byte_0, 0)) == (int)GClass104.uint_0 ? GClass104.GEnum7.const_3 : GClass104.GEnum7.const_0);
 }
Example #12
0
            private void method_2(Stream stream_0)
            {
                stream_0.Seek(0L, SeekOrigin.Begin);
                byte[] buffer1 = new byte[4];
                if (!this.bool_1)
                {
                    stream_0.Read(this.byte_0, 0, this.byte_0.Length);
                }
                stream_0.Read(this.byte_9, 0, this.byte_9.Length);
                stream_0.Read(buffer1, 0, 4);
                if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0)) != (int)this.uint_3)
                {
                    throw new Exception("Invalid Magic!");
                }
                stream_0.Read(buffer1, 0, 4);
                if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0)) != (int)this.uint_4)
                {
                    throw new Exception("Invalid Header Size!");
                }
                stream_0.Read(buffer1, 0, 4);
                this.uint_6 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(buffer1, 0, 4);
                this.uint_2 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(buffer1, 0, 4);
                this.uint_0 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(buffer1, 0, 4);
                this.uint_5 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(buffer1, 0, 4);
                this.uint_1 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(this.byte_7, 0, this.byte_7.Length);
                stream_0.Read(this.byte_2, 0, this.byte_2.Length);
                stream_0.Read(this.byte_4, 0, this.byte_4.Length);
                stream_0.Read(this.byte_3, 0, this.byte_3.Length);
                stream_0.Read(this.byte_11, 0, this.byte_11.Length);
                stream_0.Read(this.byte_6, 0, this.byte_6.Length);
                stream_0.Read(this.byte_1, 0, this.byte_1.Length);
                stream_0.Read(this.byte_12, 0, this.byte_12.Length);
                stream_0.Read(this.byte_13, 0, this.byte_13.Length);
                stream_0.Read(this.byte_8, 0, this.byte_8.Length);
                stream_0.Read(this.byte_10, 0, this.byte_10.Length);
                stream_0.Read(this.byte_5, 0, this.byte_5.Length);
                stream_0.Seek(-16L, SeekOrigin.Current);
                stream_0.Write(new byte[16], 0, 16);
                byte[] buffer2 = new byte[stream_0.Length];
                stream_0.Seek(0L, SeekOrigin.Begin);
                stream_0.Read(buffer2, 0, buffer2.Length);
                MD5 md5 = MD5.Create();

                byte[] hash = md5.ComputeHash(buffer2, this.bool_1 ? 0 : 64, 1536);
                md5.Clear();
                this.bool_0 = GClass27.smethod_1(hash, this.byte_5);
            }
Example #13
0
 private void method_3(Stream stream_0)
 {
     stream_0.Seek(0L, SeekOrigin.Begin);
     byte[] buffer = new byte[4];
     stream_0.Read(buffer, 0, 4);
     if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0)) != (int)this.uint_1)
     {
         throw new Exception("Invalid Magic!");
     }
     stream_0.Read(buffer, 0, 4);
     this.uint_0 = GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0));
     stream_0.Read(this.byte_1, 0, this.byte_1.Length);
     stream_0.Read(this.byte_0, 0, this.byte_0.Length);
 }
Example #14
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!");
        }
Example #15
0
        private void method_3(Stream stream_0)
        {
            int num1 = 0;

            for (int index = 0; index < this.gclass100_0.GClass101_0.Length - 1; ++index)
            {
                num1 += GClass27.smethod_0((int)this.gclass100_0.GClass101_0[index].Size.TotalBytes, 64);
            }
            this.gclass108_0.UInt32_0 = (uint)num1 + (uint)(int)this.gclass100_0.GClass101_0[this.gclass100_0.GClass101_0.Length - 1].Size.TotalBytes;
            byte[] buffer1  = File.ReadAllBytes(this.string_2);
            byte[] buffer2  = File.ReadAllBytes(this.string_0);
            byte[] numArray = File.ReadAllBytes(this.string_1);
            GClass99.smethod_7(numArray, GEnum3.const_3);
            this.gclass108_0.UInt32_2 = (uint)(484 + this.gclass100_0.GClass101_0.Length * 36);
            this.gclass108_0.UInt32_1 = 0U;
            stream_0.Seek(0L, SeekOrigin.Begin);
            this.gclass108_0.method_0(stream_0);
            stream_0.Seek((long)GClass27.smethod_0((int)stream_0.Position, 64), SeekOrigin.Begin);
            stream_0.Write(buffer2, 0, buffer2.Length);
            stream_0.Seek((long)GClass27.smethod_0((int)stream_0.Position, 64), SeekOrigin.Begin);
            stream_0.Write(numArray, 0, numArray.Length);
            stream_0.Seek((long)GClass27.smethod_0((int)stream_0.Position, 64), SeekOrigin.Begin);
            stream_0.Write(buffer1, 0, (int)this.gclass108_0.UInt32_2);
            byte[] buffer3 = new byte[4096];
            long   num2    = 0;

            foreach (GClass101 gclass101_0 in this.gclass100_0.GClass101_0)
            {
                stream_0.Seek((long)GClass27.smethod_0((int)stream_0.Position, 64), SeekOrigin.Begin);
                using (FileStream fileStream = File.OpenRead(this.method_2(gclass101_0)))
                {
                    int count;
                    do
                    {
                        count = fileStream.Read(buffer3, 0, buffer3.Length);
                        stream_0.Write(buffer3, 0, count);
                        num2 += (long)count;
                    }while (count > 0);
                }
                this.method_4((int)((double)num2 / (double)this.gclass108_0.UInt32_0 * 100.0));
            }
            while (stream_0.Position % 64L != 0L)
            {
                stream_0.WriteByte((byte)0);
            }
        }
Example #16
0
        public void method_4(string string_7, bool bool_6, bool bool_7, bool bool_8)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass30.Class46 class46 = new GClass30.Class46();
            // ISSUE: reference to a compiler-generated field
            class46.string_1 = string_7;
            // ISSUE: reference to a compiler-generated field
            class46.bool_0 = bool_8;
            // ISSUE: reference to a compiler-generated field
            class46.bool_1 = bool_7;
            // ISSUE: reference to a compiler-generated field
            class46.bool_2 = bool_6;
            if (this.System != GEnum3.const_0)
            {
                throw new Exception("This process can only be done on CTR titles");
            }
            // ISSUE: reference to a compiler-generated field
            Directory.CreateDirectory(class46.string_1);
            // ISSUE: reference to a compiler-generated field
            class46.frmWait_0 = new FrmWait("USB Helper is extracting your title...", true);
            // ISSUE: reference to a compiler-generated field
            class46.string_0 = Path.Combine(Path.GetTempPath(), "game.cia");
            // ISSUE: reference to a compiler-generated field
            this.method_5(class46.string_1, "game");
            // ISSUE: reference to a compiler-generated field
            GClass27.smethod_11(class46.string_1);
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            ProcessStartInfo processStartInfo = new ProcessStartInfo()
            {
                FileName         = Path.Combine(class46.string_1, "PART1"),
                WorkingDirectory = class46.string_1
            };
            Process process = new Process();

            process.StartInfo           = processStartInfo;
            process.EnableRaisingEvents = true;
            // ISSUE: reference to a compiler-generated method
            process.Exited += new EventHandler(class46.method_0);
            process.Start();
            // ISSUE: reference to a compiler-generated field
            int num = (int)class46.frmWait_0.ShowDialog();
        }
Example #17
0
        public void method_3(string string_7, bool bool_6 = false)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass30.Class45 class45 = new GClass30.Class45();
            // ISSUE: reference to a compiler-generated field
            class45.string_0 = string_7;
            // ISSUE: reference to a compiler-generated field
            class45.bool_0 = bool_6;
            if (this.System != GEnum3.const_0)
            {
                return;
            }
            // ISSUE: reference to a compiler-generated field
            if (!Directory.Exists(class45.string_0))
            {
                // ISSUE: reference to a compiler-generated field
                Directory.CreateDirectory(class45.string_0);
            }
            // ISSUE: reference to a compiler-generated field
            class45.frmWait_0 = new FrmWait("Please wait while USB Helper prepares your game", false);
            // ISSUE: reference to a compiler-generated field
            GClass27.smethod_11(class45.string_0);
            // ISSUE: reference to a compiler-generated field
            ProcessStartInfo processStartInfo = new ProcessStartInfo()
            {
                FileName         = "PART1",
                WorkingDirectory = class45.string_0,
                CreateNoWindow   = true,
                WindowStyle      = ProcessWindowStyle.Hidden
            };
            Process process = new Process();

            process.StartInfo           = processStartInfo;
            process.EnableRaisingEvents = true;
            // ISSUE: reference to a compiler-generated method
            process.Exited += new EventHandler(class45.method_0);
            // ISSUE: reference to a compiler-generated field
            this.method_5(class45.string_0, "game");
            process.Start();
            // ISSUE: reference to a compiler-generated field
            int num = (int)class45.frmWait_0.ShowDialog();
        }
Example #18
0
        internal static void smethod_7(string string_2)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            Class67.Class70 class70 = new Class67.Class70();
            // ISSUE: reference to a compiler-generated field
            class70.string_0 = Path.Combine(Path.GetTempPath(), string_2);
            // ISSUE: reference to a compiler-generated field
            GClass27.smethod_9(string.Format("{0}/res/prerequisites/{1}", (object)Class67.CDNWiiUUSBHelperURL, (object)string_2), class70.string_0, (string)null);
            Process process = new Process();

            // ISSUE: reference to a compiler-generated field
            process.StartInfo.FileName        = class70.string_0;
            process.EnableRaisingEvents       = true;
            process.StartInfo.UseShellExecute = true;
            process.StartInfo.Verb            = "runas";
            // ISSUE: reference to a compiler-generated method
            process.Exited += new EventHandler(class70.method_0);
            process.Start();
            process.WaitForExit();
        }
Example #19
0
        private static bool smethod_10(GClass30 gclass30_0, GClass101 gclass101_0, byte[] byte_1)
        {
            string str = Path.Combine(gclass30_0.OutputPath, gclass101_0.ContentId.ToString("x8") + ".app");

            byte[] numArray = Class85.smethod_9(gclass101_0.Index);
            byte[] byte_0;
            if (gclass30_0.System != SystemType.SystemWiiU && gclass30_0.System != SystemType.SystemWii)
            {
                if (gclass30_0.System != SystemType.System3DS)
                {
                    throw new NotImplementedException();
                }
                byte_0 = Class85.smethod_3(str, byte_1, numArray);
            }
            else
            {
                byte[] array = File.ReadAllBytes(str);
                Array.Resize <byte>(ref array, GClass27.smethod_0(array.Length, 16));
                byte_0 = SHA1.Create().ComputeHash(Class85.smethod_5(array, byte_1, numArray), 0, (int)gclass101_0.ContentSize.TotalBytes);
            }
            return(GClass27.smethod_1(byte_0, gclass101_0.Hash));
        }
Example #20
0
        public byte[] method_4(string string_0, int int_1)
        {
            string string_1 = GClass88.smethod_8(string_0);

            if (GClass88.smethod_1(string_1))
            {
                if ((DateTime.Now - GClass88.smethod_6(string_1)).TotalHours <= (double)int_1)
                {
                    return(GClass88.smethod_4(string_1));
                }
                byte[] byte_1 = new WebClient().UploadValues(string.Format("{0}/requestZipHash.php", (object)Class67.String_0), new NameValueCollection()
                {
                    {
                        "url",
                        Convert.ToBase64String(Encoding.UTF8.GetBytes(string_0))
                    }
                });
                using (MD5 md5 = MD5.Create())
                {
                    byte[] buffer = GClass88.smethod_4(string_1);
                    if (GClass27.smethod_1(md5.ComputeHash(buffer), byte_1))
                    {
                        return(buffer);
                    }
                }
            }
            using (MemoryStream memoryStream = new MemoryStream(this.method_2(string.Format("{0}/zipProxy.php?url=", (object)Class67.String_0) + Convert.ToBase64String(Encoding.UTF8.GetBytes(string_0)))))
            {
                using (ZipArchive zipArchive = new ZipArchive((Stream)memoryStream))
                {
                    ZipArchiveEntry entry    = zipArchive.GetEntry("content");
                    byte[]          numArray = new byte[entry.Length];
                    using (Stream stream = entry.Open())
                        stream.Read(numArray, 0, numArray.Length);
                    GClass88.smethod_9(new Uri(string_0), numArray);
                    return(numArray);
                }
            }
        }
Example #21
0
        public void method_23(string string_15, string string_16)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass32.Class42 class42 = new GClass32.Class42();
            // ISSUE: reference to a compiler-generated field
            class42.string_0 = string_15;
            // ISSUE: reference to a compiler-generated field
            class42.string_1 = string_16;
            // ISSUE: reference to a compiler-generated field
            class42.frmWait_0 = new FrmWait("Please wait while USB Helper prepares your game", false);
            // ISSUE: reference to a compiler-generated field
            class42.string_2 = Path.Combine(Path.GetTempPath(), "ext_usb_helper");
            // ISSUE: reference to a compiler-generated field
            Directory.CreateDirectory(class42.string_2);
            // ISSUE: reference to a compiler-generated field
            Directory.CreateDirectory(class42.string_0);
            // ISSUE: reference to a compiler-generated field
            this.method_3(class42.string_2, true);
            // ISSUE: reference to a compiler-generated field
            GClass27.smethod_11(class42.string_2);
            // ISSUE: reference to a compiler-generated field
            ProcessStartInfo processStartInfo = new ProcessStartInfo()
            {
                FileName         = "makerom.exe",
                WorkingDirectory = class42.string_2,
                Arguments        = "-f cia -o game.cia -content game.cxi:0:0"
            };
            Process process = new Process();

            process.StartInfo           = processStartInfo;
            process.EnableRaisingEvents = true;
            // ISSUE: reference to a compiler-generated method
            process.Exited += new EventHandler(class42.method_0);
            process.Start();
            // ISSUE: reference to a compiler-generated field
            int num = (int)class42.frmWait_0.ShowDialog();
        }
Example #22
0
            private void method_5(Stream stream_0)
            {
                stream_0.Seek(0L, SeekOrigin.Begin);
                if (!this.bool_1)
                {
                    stream_0.Write(this.byte_0, 0, this.byte_0.Length);
                }
                stream_0.Write(this.byte_9, 0, this.byte_9.Length);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_3)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_4)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_6)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_2)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_0)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_5)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_1)), 0, 4);
                stream_0.Write(this.byte_7, 0, this.byte_7.Length);
                stream_0.Write(this.byte_2, 0, this.byte_2.Length);
                stream_0.Write(this.byte_4, 0, this.byte_4.Length);
                stream_0.Write(this.byte_3, 0, this.byte_3.Length);
                stream_0.Write(this.byte_11, 0, this.byte_11.Length);
                stream_0.Write(this.byte_6, 0, this.byte_6.Length);
                stream_0.Write(this.byte_1, 0, this.byte_1.Length);
                stream_0.Write(this.byte_12, 0, this.byte_12.Length);
                stream_0.Write(this.byte_13, 0, this.byte_13.Length);
                stream_0.Write(this.byte_8, 0, this.byte_8.Length);
                stream_0.Write(this.byte_10, 0, this.byte_10.Length);
                int position = (int)stream_0.Position;

                this.byte_5 = new byte[16];
                stream_0.Write(this.byte_5, 0, this.byte_5.Length);
                byte[] numArray = new byte[stream_0.Position];
                stream_0.Seek(0L, SeekOrigin.Begin);
                stream_0.Read(numArray, 0, numArray.Length);
                this.method_1(numArray, this.bool_1 ? 0 : 64);
                stream_0.Seek((long)position, SeekOrigin.Begin);
                stream_0.Write(this.byte_5, 0, this.byte_5.Length);
            }
Example #23
0
        private static void smethod_7(System.IO.DriveInfo driveInfo_0)
        {
            string    path      = Alphaleonis.Win32.Filesystem.Path.Combine(driveInfo_0.Name, "apps", "nintendont", "boot.dol");
            WebClient webClient = new WebClient();

            webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
            try
            {
                bool flag;
                if (!Alphaleonis.Win32.Filesystem.File.Exists(path))
                {
                    flag = true;
                }
                else
                {
                    byte[] byte_0   = (byte[])null;
                    byte[] numArray = Alphaleonis.Win32.Filesystem.File.ReadAllBytes(path);
                    byte[] bytes    = Encoding.ASCII.GetBytes("blob " + numArray.Length.ToString() + "\0");
                    byte[] buffer   = new byte[numArray.Length + bytes.Length];
                    Buffer.BlockCopy((Array)bytes, 0, (Array)buffer, 0, bytes.Length);
                    Buffer.BlockCopy((Array)numArray, 0, (Array)buffer, bytes.Length, numArray.Length);
                    using (SHA1 shA1 = SHA1.Create())
                        byte_0 = shA1.ComputeHash(buffer);
                    byte[] byte_1 = ((IEnumerable <GClass21>)JsonConvert.DeserializeObject <GClass21[]>(webClient.DownloadString("https://api.github.com/repos/FIX94/Nintendont/contents//loader"))).First <GClass21>((Func <GClass21, bool>)(gclass21_0 => gclass21_0.name == "loader.dol")).sha.smethod_6();
                    flag = !GClass27.smethod_1(byte_0, byte_1);
                }
                if (!flag || RadMessageBox.Show("USB Helper was unable to detect Nintendont, or a new version is available. It is required to be able to play GC games. Would you like USB Helper to install it for you?", "Nintendont", MessageBoxButtons.YesNo) != DialogResult.Yes)
                {
                    return;
                }
                GClass94.smethod_9(driveInfo_0);
            }
            catch
            {
            }
        }
Example #24
0
 public static void smethod_10(string string_0)
 {
     GClass27.smethod_7(string.Format("{0}/res/starter/starter.zip", (object)Class67.CDNWiiUUSBHelperURL), string_0);
 }
Example #25
0
 private void method_10(GClass14 gclass14_0)
 {
     GClass27.smethod_9(gclass14_0.DownloadLink, this.method_12(gclass14_0.Name), string.Format("Downloading {0}", (object)gclass14_0.Name));
 }
Example #26
0
 public static void smethod_10(System.IO.DriveInfo driveInfo_0)
 {
     GClass27.smethod_9(string.Format("{0}/res/nintendont/nincfg.bin", (object)Class67.String_2), driveInfo_0.Name + "nincfg.bin", (string)null);
 }
Example #27
0
 public static void smethod_9(System.IO.DriveInfo driveInfo_0)
 {
     Alphaleonis.Win32.Filesystem.Directory.CreateDirectory(Alphaleonis.Win32.Filesystem.Path.Combine(driveInfo_0.Name, "apps", "nintendont"));
     GClass27.smethod_9("https://github.com/FIX94/Nintendont/blob/master/loader/loader.dol?raw=true", Alphaleonis.Win32.Filesystem.Path.Combine(driveInfo_0.Name, "apps", "nintendont", "boot.dol"), (string)null);
 }
Example #28
0
 public static void smethod_10(string string_0)
 {
     GClass27.smethod_7(string.Format("{0}/res/starter/starter.zip", (object)Class67.String_2), string_0);
 }
Example #29
0
 public static void smethod_11(string string_0)
 {
     GClass27.smethod_7(string.Format("{0}/res/emulators/extract_toolkit.zip", (object)Class67.CDNWiiUUSBHelperURL), string_0);
 }
Example #30
0
        public static GStruct7 smethod_4(GClass30 gclass30_0, GClass101 gclass101_0, byte[] byte_1)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            Class85.Class87 class87 = new Class85.Class87();
            // ISSUE: reference to a compiler-generated field
            class87.byte_1 = byte_1;
            // ISSUE: reference to a compiler-generated field
            class87.gclass101_0 = gclass101_0;
            List <int> list_1 = new List <int>();
            // ISSUE: reference to a compiler-generated field
            string path1 = Path.Combine(gclass30_0.OutputPath, class87.gclass101_0.ContentId.ToString("x8") + ".app");
            // ISSUE: reference to a compiler-generated field
            string path2 = Path.Combine(gclass30_0.OutputPath, class87.gclass101_0.ContentId.ToString("x8") + ".h3");

            // ISSUE: reference to a compiler-generated field
            if (!class87.gclass101_0.Boolean_0)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                if (!Class85.smethod_10(gclass30_0, class87.gclass101_0, class87.byte_1))
                {
                    // ISSUE: reference to a compiler-generated field
                    return(new GStruct7(class87.gclass101_0, new List <int>(), false, true));
                }
                // ISSUE: reference to a compiler-generated field
                return(new GStruct7(class87.gclass101_0, new List <int>(), false, false));
            }
            if (!File.Exists(path2))
            {
                // ISSUE: reference to a compiler-generated field
                return(new GStruct7(class87.gclass101_0, list_1, true, true));
            }
            // ISSUE: reference to a compiler-generated field
            class87.byte_0 = File.ReadAllBytes(path2);
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            if (!GClass27.smethod_1(SHA1.Create().ComputeHash(class87.byte_0), class87.gclass101_0.Hash))
            {
                // ISSUE: reference to a compiler-generated field
                return(new GStruct7(class87.gclass101_0, list_1, true, true));
            }
            using (FileStream fileStream = File.OpenRead(path1))
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                Class85.Class88 class88 = new Class85.Class88();
                // ISSUE: reference to a compiler-generated field
                class88.class87_0 = class87;
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                int int_5 = (int)(class88.class87_0.gclass101_0.Size.TotalBytes / 65536UL);
                int num1  = (int)Math.Ceiling((double)int_5 / 768.0);
                int num2  = 0;
                // ISSUE: reference to a compiler-generated field
                class88.bool_0 = Enumerable.Repeat <bool>(false, 3).ToArray <bool>();
                // ISSUE: reference to a compiler-generated field
                class88.list_0 = Enumerable.Repeat <List <int> >(new List <int>(), 3).ToArray <List <int> >();
                Thread[] threadArray = new Thread[3];
                for (int index = 0; index < 3; ++index)
                {
                    if (Class85.byte_0[index] == null)
                    {
                        Class85.byte_0[index] = new byte[16777216];
                    }
                }
                for (int index1 = 0; index1 < num1; ++index1)
                {
                    // ISSUE: object of a compiler-generated type is created
                    // ISSUE: variable of a compiler-generated type
                    Class85.Class89 class89 = new Class85.Class89();
                    // ISSUE: reference to a compiler-generated field
                    class89.class88_0 = class88;
                    // ISSUE: reference to a compiler-generated field
                    class89.tuple_0 = Class85.smethod_11(int_5, 3, 256);
                    // ISSUE: reference to a compiler-generated field
                    int_5 -= class89.tuple_0.Item2;
                    for (int index2 = 0; index2 < 3; ++index2)
                    {
                        // ISSUE: object of a compiler-generated type is created
                        // ISSUE: variable of a compiler-generated type
                        Class85.Class90 class90 = new Class85.Class90();
                        // ISSUE: reference to a compiler-generated field
                        class90.class89_0 = class89;
                        // ISSUE: reference to a compiler-generated field
                        class90.int_0 = index2;
                        // ISSUE: reference to a compiler-generated field
                        class90.int_1 = num2;
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        class90.class89_0.class88_0.bool_0[index2] = false;
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        class90.class89_0.class88_0.list_0[index2] = new List <int>();
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        fileStream.Read(Class85.byte_0[index2], 0, class90.class89_0.tuple_0.Item1[index2] * 65536);
                        if (Class85.byte_0[index2].Length != 0)
                        {
                            // ISSUE: reference to a compiler-generated method
                            threadArray[index2] = new Thread(new ThreadStart(class90.method_0))
                            {
                                IsBackground = true
                            };
                            threadArray[index2].Start();
                        }
                        else
                        {
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            class90.class89_0.class88_0.bool_0[index2] = true;
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            class90.class89_0.class88_0.list_0[index2] = new List <int>();
                        }
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        num2 += class90.class89_0.tuple_0.Item1[index2];
                    }
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    while (!Class85.smethod_7(class89.class88_0.bool_0))
                    {
                        Thread.Sleep(10);
                    }
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    foreach (List <int> intList in class89.class88_0.list_0)
                    {
                        list_1.AddRange((IEnumerable <int>)intList);
                    }
                }
            }
            // ISSUE: reference to a compiler-generated field
            return(new GStruct7(class87.gclass101_0, list_1, false, false));
        }