Beispiel #1
0
        private void method_17(string string_6)
        {
            string str = this.method_4("patcher.exe");

            new GClass78().method_5(string.Format("{0}/res/SNES/bootDrc.tga", (object)Class67.CDNWiiUUSBHelperURL), str, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0);
            GClass91.smethod_2(str, this.WorkPath, string.Format("-f -s -z9 -nolib \"{0}\"", (object)string_6), "CAFE_ROOT", this.WorkPath);
        }
Beispiel #2
0
        private static string smethod_4()
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass91.Class78 class78 = new GClass91.Class78();
            // ISSUE: reference to a compiler-generated field
            class78.list_0 = new List <string>();
            if (Environment.Is64BitOperatingSystem)
            {
                string str = GClass91.smethod_3(System.IO.Path.Combine(Environment.GetEnvironmentVariable("ProgramW6432"), "Java"), "java.exe");
                if (str != null)
                {
                    // ISSUE: reference to a compiler-generated field
                    class78.list_0.Add(str);
                }
            }
            string str1 = GClass91.smethod_3(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Java"), "java.exe");

            if (str1 != null)
            {
                // ISSUE: reference to a compiler-generated field
                class78.list_0.Add(str1);
            }
            // ISSUE: reference to a compiler-generated field
            if (class78.list_0.Count == 0)
            {
                return((string)null);
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated method
            return(class78.list_0.First <string>(new Func <string, bool>(class78.method_0)));
        }
Beispiel #3
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();
        }
Beispiel #4
0
 public frmInjectionAnimation(GClass91 gclass91_1)
 {
     this.InitializeComponent();
     this.Region     = Class97.smethod_6((Form)this, 40);
     this.gclass91_0 = gclass91_1;
     try
     {
         this.int_3            = this.pctAarrow.Left;
         this.timer_1.Interval = 25;
         this.timer_1.Start();
         this.bitmap_0 = (Bitmap)Image.FromStream((Stream) new MemoryStream(new GClass78().DownloadFile(string.Format("http://art.gametdb.com/wii/disc/{0}/{1}.png", this.gclass91_0.ToInject.Region == "USA" ? (object)"US" : (object)"EN", (object)this.gclass91_0.ToInject.ProductId))));
         this.bitmap_0.SetResolution(96f, 96f);
         this.timer_0.Interval = 30;
         this.timer_0.Start();
     }
     catch
     {
     }
     try
     {
         this.windowsMediaPlayer_0 = (WindowsMediaPlayer) new WindowsMediaPlayerClass();
         // ISSUE: method pointer
         this.windowsMediaPlayer_0.add_PlayStateChange(new _WMPOCXEvents_PlayStateChangeEventHandler((object)this, (UIntPtr)__methodptr(method_3)));
     }
     catch
     {
     }
 }
Beispiel #5
0
 protected GClass91(GClass32 gclass32_1)
 {
     this.WorkPath = gclass32_1.String_2;
     this.ToInject = gclass32_1;
     if (!GClass91.Boolean_1 && GClass91.smethod_4() == null)
     {
         Class67.smethod_7("java.exe");
         if (GClass91.smethod_4() == null)
         {
             int num = (int)RadMessageBox.Show("Java was not installed, it is required to build custom games.");
             throw new Exception("Java is not installed!");
         }
     }
     this.Name = this.ToInject.Name;
     try
     {
         this.Name = this.method_6("name").Replace("\\n", "\n");
     }
     catch
     {
     }
 }
Beispiel #6
0
 protected override void vmethod_3()
 {
     this.method_2((GClass32)this.GClass30_0);
     GClass91.smethod_1(GClass91.String_0, this.WorkPath, string.Format("-jar \"{0}\" -in rawFiles", (object)"NUSPacker.jar"));
 }
Beispiel #7
0
 protected override void vmethod_3()
 {
     this.method_2(GClass28.dictionary_0[new TitleId("00050000101B1100")]);
     GClass91.smethod_1(GClass91.String_0, this.WorkPath, string.Format("-jar \"{0}\" -in rawFiles", (object)"NUSPacker.jar"));
 }
Beispiel #8
0
 public override void vmethod_2()
 {
     base.vmethod_2();
     Task.Run((Action)(() =>
     {
         try
         {
             string string_0_1 = this.Force43 ? string.Format("{0}/res/nintendont/autoboot43.dol", (object)Class67.String_2) : "https://cdn.wiiuusbhelper.com/res/nintendont/autoboot.dol";
             this.method_11(0);
             string string_0_2 = this.method_4("rawFiles\\content\\hif_000000.nfs");
             string str1 = this.method_4("rawFiles\\content\\game.iso");
             string path1 = this.method_4("new-image\\");
             string sourceFileName1 = this.method_4(Alphaleonis.Win32.Filesystem.Path.Combine(path1, "PunEmu [CEMU69].iso"));
             string sourceFileName2 = this.method_4("nfs2iso2nfs.exe");
             string str2 = this.method_4("rawFiles\\content\\nfs2iso2nfs.exe");
             string path2 = this.method_4("rawFiles\\content\\hif_000000.nfs");
             string sourceFileName3 = this.method_4("workdir.tmp2\\ticket.bin");
             string str3 = this.method_4("rawFiles\\code\\rvlt.tik");
             string sourceFileName4 = this.method_4("workdir.tmp2\\tmd.bin");
             string str4 = this.method_4("rawFiles\\code\\rvlt.tmd");
             string str5 = this.method_4("production_output");
             string str6 = this.method_4("output");
             string string_0_3 = this.method_4("workdir.tmp\\");
             string string_1 = this.method_4(Alphaleonis.Win32.Filesystem.Path.Combine(string_0_3, "sys", "main.dol"));
             string[] strArray = new string[2]
             {
                 this.method_4("workdir.tmp\\files\\game.iso"),
                 this.method_4("workdir.tmp\\files\\disc2.iso")
             };
             GClass6.smethod_8("https://cdn.wiiuusbhelper.com/res/nintendont/vc-template.zip", this.WorkPath);
             GClass6.smethod_5(this.method_4("workdir.tmp2"));
             GClass6.smethod_5(str5);
             GClass6.smethod_5(str6);
             GClass6.smethod_6(str4);
             GClass6.smethod_6(str3);
             GClass6.smethod_6(string_0_2);
             GClass6.smethod_6(str1);
             GClass6.smethod_6(str2);
             Task task = this.method_7();
             this.method_11(1);
             if (this.string_3 != null && this.ToInject.Platform == Platform.Gamecube)
             {
                 new GClass78().method_5(string_0_1, string_1, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0);
                 for (int index = 0; index < this.string_3.Length; ++index)
                 {
                     if (this.CompressIso)
                     {
                         this.method_15(this.string_3[index], strArray[index]);
                     }
                     else
                     {
                         Alphaleonis.Win32.Filesystem.File.Copy(this.string_3[index], strArray[index]);
                     }
                 }
                 if (!Alphaleonis.Win32.Filesystem.File.Exists(strArray[0]))
                 {
                     throw new Exception("The iso was not shrinked sucessfully. Cannot continue.");
                 }
             }
             if (this.ToInject.Platform == Platform.Wii_Custom)
             {
                 if (this.PatchWifi)
                 {
                     if (((IEnumerable <string>) new string[3]
                     {
                         "RMCP01",
                         "RMCE01",
                         "RMCJ01"
                     }).Contains <string>(this.ToInject.ProductId))
                     {
                         Alphaleonis.Win32.Filesystem.File.Copy(this.string_3[0], this.method_4(Alphaleonis.Win32.Filesystem.Path.GetFileName(this.string_3[0])));
                         using (MemoryStream memoryStream = new MemoryStream(new GClass78().method_2(string.Format("{0}/res/Wii/mk_patcher.zip", (object)Class67.String_2))))
                         {
                             using (ZipArchive zipArchive_0 = new ZipArchive((Stream)memoryStream))
                                 zipArchive_0.smethod_0(this.WorkPath, true);
                         }
                         GClass91.smethod_0("patch-wiimmfi.bat", this.WorkPath);
                         GClass6.smethod_6(this.method_4(Alphaleonis.Win32.Filesystem.Path.GetFileName(this.string_3[0])));
                         sourceFileName1 = new Alphaleonis.Win32.Filesystem.DirectoryInfo(this.method_4("wiimmfi-images/")).GetFiles()[0].FullName;
                     }
                     else if (((IEnumerable <string>) new string[3]
                     {
                         "RSBP01",
                         "RSBE01",
                         "RSBJ01"
                     }).Contains <string>(this.ToInject.ProductId))
                     {
                         GClass91.smethod_1(this.method_4("PackOnline.bat"), this.WorkPath, string.Format("\"{0}\"", (object)this.string_3[0]));
                         sourceFileName1 = Alphaleonis.Win32.Filesystem.Path.Combine(path1, "patched.iso");
                     }
                     else
                     {
                         GClass6.smethod_5(string_0_3);
                         GClass91.smethod_1(this.method_4("Extract.bat"), this.WorkPath, string.Format("\"{0}\"", (object)this.string_3[0]));
                         GClass91.smethod_0(this.method_4("Pack.bat"), this.WorkPath);
                         GClass6.smethod_5(string_0_3);
                         string fullName = new Alphaleonis.Win32.Filesystem.DirectoryInfo(path1).GetFiles()[0].FullName;
                         GClass91.smethod_1(this.method_4("PackOnline.bat"), this.WorkPath, string.Format("\"{0}\"", (object)fullName));
                         GClass6.smethod_6(fullName);
                         sourceFileName1 = Alphaleonis.Win32.Filesystem.Path.Combine(path1, "patched.iso");
                     }
                 }
                 else
                 {
                     GClass6.smethod_5(string_0_3);
                     GClass91.smethod_1(this.method_4("Extract.bat"), this.WorkPath, string.Format("\"{0}\"", (object)this.string_3[0]));
                     GClass91.smethod_0(this.method_4("Pack.bat"), this.WorkPath);
                     GClass6.smethod_5(string_0_3);
                     string fullName = new Alphaleonis.Win32.Filesystem.DirectoryInfo(path1).GetFiles()[0].FullName;
                     Alphaleonis.Win32.Filesystem.File.Move(fullName, Alphaleonis.Win32.Filesystem.Path.Combine(Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(fullName), "game.iso"));
                     sourceFileName1 = Alphaleonis.Win32.Filesystem.Path.Combine(Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(fullName), "game.iso");
                 }
             }
             else if (this.ToInject.Platform == Platform.Gamecube)
             {
                 GClass91.smethod_0(this.method_4("Pack.bat"), this.WorkPath);
                 GClass6.smethod_5(string_0_3);
                 sourceFileName1 = new Alphaleonis.Win32.Filesystem.DirectoryInfo(path1).GetFiles()[0].FullName;
             }
             this.method_11(2);
             GClass91.smethod_1(this.method_4("GetTik.bat"), this.WorkPath, string.Format("\"{0}\"", (object)sourceFileName1));
             GClass6.smethod_6(strArray[0]);
             GClass6.smethod_6(strArray[1]);
             Alphaleonis.Win32.Filesystem.File.Copy(sourceFileName3, str3);
             Alphaleonis.Win32.Filesystem.File.Copy(sourceFileName4, str4);
             Alphaleonis.Win32.Filesystem.File.Move(sourceFileName1, str1);
             Alphaleonis.Win32.Filesystem.File.Copy(sourceFileName2, str2);
             if (this.ToInject.Platform == Platform.Gamecube)
             {
                 GClass91.smethod_1(str2, Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(str2), "-homebrew -passthrough");
             }
             else if (this.ToInject.Platform == Platform.Wii_Custom)
             {
                 GClass91.smethod_1(str2, Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(str2), "-passthrough");
             }
             if (!Alphaleonis.Win32.Filesystem.File.Exists(path2))
             {
                 throw new Exception("Injection did not complete sucessfully. Cannot continue.");
             }
             GClass6.smethod_6(str1);
             GClass6.smethod_6(str2);
             this.method_11(3);
             task.Wait();
             this.vmethod_3();
             if (this.Production)
             {
                 this.method_3(str6, str5);
             }
             GClass6.smethod_5(this.method_4("workdir.tmp2"));
             GClass6.smethod_5(this.method_4("tmp"));
             GClass6.smethod_6(string_0_2);
             this.method_8();
             this.method_9();
         }
         catch (Exception ex)
         {
             this.method_10(ex);
         }
     }));
 }
Beispiel #9
0
 private void method_15(string string_5, string string_6)
 {
     GClass91.smethod_1(this.method_4("GCM.exe"), new Alphaleonis.Win32.Filesystem.DirectoryInfo(string_5).Parent.FullName, string.Format("-sh \"{0}\" \"{1}\"", (object)string_5, (object)string_6));
 }