Exemple #1
0
        public bool method_14()
        {
            if (this.PatchGame == null)
            {
                throw new Exception("This game is not patchable!");
            }
            GClass30 title = (GClass30)GClass28.dictionary_0[this.PatchGame];

            if (RadMessageBox.Show(string.Format("This title is a modified version of {0}.\nUSB Helper can build an iso for you by automatically patching the game from the eShop.\nThis way you do not have to provide the iso.\nProceed? (About {1}MB will of data will be downloaded)", (object)title.Name, (object)this.PatchSize), "Proceed?", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return(false);
            }
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass94.Class79 class79 = new GClass94.Class79();
            if (title.GEnum2_0 != GEnum2.const_2)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                GClass94.Class80 class80  = new GClass94.Class80();
                GClass80         gclass80 = new GClass80((WebProxy)null, true, true);
                // ISSUE: reference to a compiler-generated field
                class80.frmWait_0 = new FrmWait("USB Helper is downloading the base game", true);
                // ISSUE: reference to a compiler-generated method
                gclass80.Event_6 += new EventHandler <GEventArgs0>(class80.method_0);
                // ISSUE: reference to a compiler-generated method
                gclass80.Event_5 += new EventHandler <GClass81>(class80.method_1);
                gclass80.method_1(((IEnumerable <GClass30>) new GClass30[1]
                {
                    title
                }).ToList <GClass30>(), 100, 10000);
                // ISSUE: reference to a compiler-generated field
                int num = (int)class80.frmWait_0.ShowDialog();
            }
            Dolphin dolphin = new Dolphin(title, false);

            dolphin.method_5();
            string rom = dolphin.GetRom();

            // ISSUE: reference to a compiler-generated field
            class79.string_0 = new Alphaleonis.Win32.Filesystem.DirectoryInfo(rom).Parent.FullName;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            class79.string_1 = Alphaleonis.Win32.Filesystem.Path.Combine(class79.string_0, "workdir.tmp");
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            class79.string_2 = Alphaleonis.Win32.Filesystem.Path.Combine(class79.string_0, "patch.uhd");
            dolphin.method_12(true);
            int num1;
            // ISSUE: reference to a compiler-generated method
            FrmWait frmWait1 = new FrmWait("USB Helper is preparing the game...", new Action(class79.method_0), (Action <Exception>)(exception_0 => num1 = (int)RadMessageBox.Show(exception_0.ToString())));

            // ISSUE: reference to a compiler-generated field
            class79.frmWait_0 = new FrmWait("USB Helper is downloading the differential data", true);
            WebClient webClient = new WebClient();

            // ISSUE: reference to a compiler-generated method
            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(class79.method_1);
            // ISSUE: reference to a compiler-generated method
            webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(class79.method_2);
            // ISSUE: reference to a compiler-generated field
            webClient.DownloadFileAsync(new Uri(string.Format("{0}/res/Wii/template/{1}/patch.uhd", (object)Class67.String_2, (object)this.ToInject.ProductId)), class79.string_2);
            // ISSUE: reference to a compiler-generated field
            int num2 = (int)class79.frmWait_0.ShowDialog();
            int num3;
            // ISSUE: reference to a compiler-generated method
            FrmWait frmWait2 = new FrmWait("USB HELPER is patching the game...", new Action(class79.method_3), (Action <Exception>)(exception_0 => num3 = (int)RadMessageBox.Show(exception_0.ToString())));

            // ISSUE: reference to a compiler-generated field
            GClass6.smethod_6(class79.string_2);
            // ISSUE: reference to a compiler-generated field
            GClass6.smethod_5(class79.string_1);
            // ISSUE: reference to a compiler-generated field
            if (!this.vmethod_0(new Alphaleonis.Win32.Filesystem.DirectoryInfo(Alphaleonis.Win32.Filesystem.Path.Combine(class79.string_0, "new-image")).GetFiles()[0].FullName))
            {
                throw new Exception("The output iso was not recognized!");
            }
            int num4 = (int)new frmInjectionAnimation((GClass91)this).ShowDialog();

            dolphin.method_12(true);
            // ISSUE: reference to a compiler-generated field
            GClass6.smethod_5(Alphaleonis.Win32.Filesystem.Path.Combine(class79.string_0, "rawFiles"));
            return(true);
        }