示例#1
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
     {
     }
 }
示例#2
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));
        }
示例#3
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);
        }
示例#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);
            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();
        }
示例#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);
            }
        }
示例#6
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();
        }
示例#7
0
 public static void smethod_0(string string_1)
 {
     if (!GClass88.smethod_1(string_1))
     {
         return;
     }
     GClass6.smethod_6(GClass88.smethod_11(string_1));
 }
示例#8
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));
 }
示例#9
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);
        }
示例#10
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);
        }
示例#11
0
 private static void smethod_5(string string_2)
 {
     try
     {
         GClass6.smethod_6(string_2);
     }
     catch
     {
     }
 }
示例#12
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
     {
     }
 }
示例#13
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);
     }
 }
示例#14
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);
        }
示例#15
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);
        }
示例#16
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);
        }
示例#17
0
        private void method_3(object object_0, GClass87 gclass87_0)
        {
            this.Event_1 -= new EventHandler <GClass87>(this.method_3);
            try
            {
                this.Image = Image.FromStream((Stream) new MemoryStream(gclass87_0.byte_0));
            }
            catch (Exception ex)
            {
                GClass6.smethod_6(gclass87_0.string_0);
                return;
            }
            // ISSUE: reference to a compiler-generated field
            EventHandler <GClass84> eventHandler2 = this.eventHandler_2;

            if (eventHandler2 == null)
            {
                return;
            }
            eventHandler2((object)this, new GClass84(this.Image));
        }
示例#18
0
 public void method_5(string string_0, string string_1, ulong ulong_1, GClass78.GEnum4 genum4_0, WebProxy webProxy_0, long long_0 = 0, byte[] byte_0 = null, byte[] byte_1 = null, byte byte_2 = 0)
 {
     if (genum4_0 == GClass78.GEnum4.const_1)
     {
         ulong_1 = ulong_1 / 65536UL * 65536UL;
     }
     this.bool_1                      = true;
     this.DownloadSpeed               = new GStruct3(0UL);
     this.TotalDataDownloaded        += new DataSize(ulong_1);
     this.TotalDownloadedCurrentGame += new DataSize(ulong_1);
     this.dataSize_2                  = new DataSize(0UL);
     this.timeSpan_0                  = new TimeSpan(0L);
     this.dateTime_1                  = new DateTime(0L);
     if (GClass28.bool_2 && ulong_1 == 0UL && long_0 > 0L)
     {
         this.method_12(string_0, string_1, ulong_1, GClass78.GEnum4.const_1, webProxy_0, byte_0, byte_1, byte_2, long_0);
         if (!this.bool_1 || System.IO.File.Exists(string_1) && new FileInfo(string_1).Length == long_0)
         {
             return;
         }
         string str = string_1 + ".partial";
         ulong  sz  = 0;
         if (System.IO.File.Exists(str))
         {
             sz = (ulong)new FileInfo(str).Length;
         }
         this.TotalDataDownloaded        -= new DataSize(sz);
         this.TotalDownloadedCurrentGame -= new DataSize(sz);
         GClass6.smethod_6(str);
         GClass6.smethod_6(string_1);
         this.method_10(string_0, string_1, ulong_1, genum4_0, webProxy_0, byte_0, byte_1, byte_2, long_0);
     }
     else
     {
         this.method_10(string_0, string_1, ulong_1, genum4_0, webProxy_0, byte_0, byte_1, byte_2, long_0);
     }
 }
示例#19
0
        private GClass80.Enum1 method_14(GClass30 gclass30_0)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass80.Class63 class63 = new GClass80.Class63();
            // ISSUE: reference to a compiler-generated field
            class63.gclass30_0 = gclass30_0;
            // ISSUE: reference to a compiler-generated field
            GEnum2 genum20 = class63.gclass30_0.GEnum2_0;

            this.gclass78_0.method_9();
            this.timeSpan_1 = new TimeSpan(0L);
            this.timeSpan_0 = new TimeSpan(0L);
            this.gstruct3_0 = new GStruct3(0UL);
            // ISSUE: reference to a compiler-generated field
            class63.gclass30_0.CurrentlyDownloaded = true;
            // ISSUE: reference to a compiler-generated field
            if (!Directory.Exists(class63.gclass30_0.OutputPath))
            {
                // ISSUE: reference to a compiler-generated field
                Directory.CreateDirectory(class63.gclass30_0.OutputPath);
            }
            // ISSUE: reference to a compiler-generated field
            if (class63.gclass30_0.Boolean_0)
            {
                // ISSUE: reference to a compiler-generated field
                return(this.method_12((GClass32)class63.gclass30_0));
            }
            // ISSUE: reference to a compiler-generated field
            TMDExcractionAndProcessing gclass100_0 = this.method_15(class63.gclass30_0, true);
            // ISSUE: reference to a compiler-generated field
            GClass99 gclass99 = this.method_11(class63.gclass30_0);

            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            if (class63.gclass30_0.System == SystemType.SystemWiiU || class63.gclass30_0.System == SystemType.SystemWii)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                this.method_9(class63.gclass30_0, gclass100_0, class63.gclass30_0.OutputPath);
            }
            this.dataSize_0 = gclass100_0.DataSize_0;
            this.method_17(string.Format("Content size is {0}", (object)this.dataSize_0));
            // ISSUE: reference to a compiler-generated field
            this.method_16(0, this.int_5, 0, this.timeSpan_1, this.timeSpan_2, this.timeSpan_0, new GStruct3(0UL), class63.gclass30_0);
label_7:
            for (int index = 0; index < (int)gclass100_0.NumOfContents; ++index)
            {
                bool flag1 = false;
                if (!this.bool_0)
                {
                    return(GClass80.Enum1.const_1);
                }
                GClass101 gclass101_0;
                DataSize  size;
                while (true)
                {
                    gclass101_0 = gclass100_0.GClass101_0[index];
                    this.method_17(string.Format("Downloading Content #{0} ({1:x8}) of {2}... ({3})", (object)(index + 1), (object)gclass101_0.ContentId, (object)gclass100_0.NumOfContents, (object)gclass101_0.ContentSize));
                    // ISSUE: reference to a compiler-generated field
                    string string_0 = Path.Combine(class63.gclass30_0.OutputPath, gclass101_0.ContentId.ToString("x8"));
                    ulong  num1     = 0;
                    GClass6.smethod_6(string_0 + ".app.partial");
                    if (System.IO.File.Exists(string_0 + ".app"))
                    {
                        goto label_35;
                    }
label_9:
                    try
                    {
                        int num2 = (int)Class64.SetThreadExecutionState(2147483649U);
                        this.method_17("Downloading content...");
                        if (gclass101_0.Boolean_0)
                        {
                            // ISSUE: reference to a compiler-generated field
                            int num3 = (int)this.method_10(class63.gclass30_0, gclass101_0, string_0, GClass80.Enum0.const_0, 0UL);
                        }
                        bool flag2 = false;
                        // ISSUE: reference to a compiler-generated field
                        if (class63.gclass30_0 is GClass33 && gclass101_0.Boolean_0)
                        {
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated method
                            foreach (GClass30 gclass30 in class63.gclass30_0.GClass32_0.Updates.Where <GClass33>(class63.func_0 ?? (class63.func_0 = new Func <GClass33, bool>(class63.method_0))))
                            {
                                string str1 = Path.Combine(gclass30.OutputPath, gclass101_0.ContentId.ToString("x8"));
                                string str2 = str1 + ".app";
                                string path = str1 + ".h3";
                                if (System.IO.File.Exists(path) && System.IO.File.Exists(str2) && System.IO.File.ReadAllBytes(path).smethod_5(System.IO.File.ReadAllBytes(string_0 + ".h3")))
                                {
                                    long length = new FileInfo(str2).Length;
                                    size = gclass101_0.ContentSize;
                                    long totalBytes1 = (long)size.TotalBytes;
                                    if (length == totalBytes1)
                                    {
                                        this.method_17("Found similar file in older update. Copying...");
                                        System.IO.File.Copy(str2, string_0 + ".app", true);
                                        GClass78 gclass780             = this.gclass78_0;
                                        DataSize downloadedCurrentGame = gclass780.TotalDownloadedCurrentGame;
                                        size = gclass101_0.ContentSize;
                                        long totalBytes2 = (long)size.TotalBytes;
                                        gclass780.TotalDownloadedCurrentGame = downloadedCurrentGame + (ulong)totalBytes2;
                                        this.gclass78_0.TotalDataDownloaded += gclass101_0.ContentSize;
                                        flag2 = true;
                                        break;
                                    }
                                }
                            }
                        }
                        if (!flag2)
                        {
                            // ISSUE: reference to a compiler-generated field
                            if (this.method_10(class63.gclass30_0, gclass101_0, string_0, GClass80.Enum0.const_1, num1) == GClass80.Enum1.const_1)
                            {
                                return(GClass80.Enum1.const_1);
                            }
                            if (this.bool_2)
                            {
                                if (gclass101_0.Boolean_0)
                                {
                                    if (genum20 != GEnum2.const_2)
                                    {
                                        goto label_7;
                                    }
                                }
                                this.method_17("Verifying download...");
                                this.method_13(true);
                                // ISSUE: reference to a compiler-generated field
                                GStruct7 gstruct7 = Class85.smethod_4(class63.gclass30_0, gclass101_0, gclass99.Byte_0);
                                this.method_13(false);
                                if (!gstruct7.Boolean_0)
                                {
                                    this.gclass78_0.TotalDataDownloaded        -= gclass101_0.ContentSize;
                                    this.gclass78_0.TotalDownloadedCurrentGame -= gclass101_0.ContentSize;
                                    continue;
                                }
                                goto label_7;
                            }
                            else
                            {
                                goto label_7;
                            }
                        }
                        else
                        {
                            goto label_7;
                        }
                    }
                    catch (Exception ex)
                    {
                        bool         flag2 = false;
                        WebException webException;
                        if ((webException = ex as WebException) != null && webException.Status == WebExceptionStatus.ProtocolError && webException.Response != null)
                        {
                            flag2 = ((HttpWebResponse)webException.Response).StatusCode == HttpStatusCode.NotFound;
                        }
                        if (!flag2)
                        {
                            this.method_17(string.Format("Downloading Content #{0} of {1} failed...", (object)(index + 1), (object)gclass100_0.NumOfContents));
                            this.method_17(ex.Message);
                            // ISSUE: reference to a compiler-generated field
                            class63.gclass30_0.CurrentlyDownloaded = false;
                            this.method_5("Downloading Content Failed:\n" + ex.Message);
                            goto label_48;
                        }
                        else
                        {
                            this.method_17(string.Format("Downloading Content #{0} of {1} failed... (File not on NUS)", (object)(index + 1), (object)gclass100_0.NumOfContents));
                            goto label_48;
                        }
                    }
label_35:
                    num1 = (ulong)new FileInfo(string_0 + ".app").Length;
                    this.method_17("Local file detected. Checking size...");
                    long num4 = (long)num1;
                    size = gclass101_0.ContentSize;
                    long totalBytes = (long)size.TotalBytes;
                    if (num4 == totalBytes)
                    {
                        this.method_17("Sizes match. Checking file....");
                        if (gclass101_0.Boolean_0 && !System.IO.File.Exists(string_0 + ".h3"))
                        {
                            // ISSUE: reference to a compiler-generated field
                            int num2 = (int)this.method_10(class63.gclass30_0, gclass101_0, string_0, GClass80.Enum0.const_0, 0UL);
                        }
                        if (this.bool_3)
                        {
                            this.method_13(true);
                            // ISSUE: reference to a compiler-generated field
                            GStruct7 gstruct7 = Class85.smethod_4(class63.gclass30_0, gclass101_0, gclass99.Byte_0);
                            this.method_13(false);
                            if (!gstruct7.Boolean_0)
                            {
                                // ISSUE: reference to a compiler-generated field
                                if (gclass101_0.Boolean_0 && class63.gclass30_0.Platform != Platform.Wii_U_Custom && !flag1)
                                {
                                    this.method_17(string.Format("File has {0} corrupted block(s) for a total of  {1} bytes", (object)gstruct7.list_0.Count, (object)(gstruct7.list_0.Count * 65536)));
                                    this.method_17("Attempting repair. This may take a while depending on the state of the file.");
                                    string str = gclass101_0.ContentId.ToString("x8");
                                    // ISSUE: reference to a compiler-generated field
                                    // ISSUE: reference to a compiler-generated field
                                    GClass78.smethod_0(class63.gclass30_0.String_1 + str, string_0 + ".app", System.IO.File.ReadAllBytes(string_0 + ".h3"), class63.gclass30_0.Ticket.Byte_0, (IEnumerable <int>)gstruct7.list_0);
                                    flag1 = true;
                                }
                                else
                                {
                                    this.method_17("This file is corrupted but cannot be repaired. Now redownloading...");
                                    GClass6.smethod_6(string_0 + ".app");
                                }
                            }
                            else
                            {
                                break;
                            }
                        }
                        else
                        {
                            break;
                        }
                    }
                    else
                    {
                        size = gclass101_0.ContentSize;
                        if (size.TotalBytes < num1)
                        {
                            this.method_17("This file does not qualify for intelligent resuming. Redownloading...");
                            GClass6.smethod_6(string_0 + ".app");
                        }
                        else
                        {
                            this.method_17(string.Format("Sizes mismatch. Resuming download at {0}", (object)new DataSize(num1)));
                            goto label_9;
                        }
                    }
                }
                this.method_17("This file is good, skipping...");
                GClass78 gclass780_1            = this.gclass78_0;
                DataSize downloadedCurrentGame1 = gclass780_1.TotalDownloadedCurrentGame;
                size = gclass101_0.ContentSize;
                long totalBytes3 = (long)size.TotalBytes;
                gclass780_1.TotalDownloadedCurrentGame = downloadedCurrentGame1 + (ulong)totalBytes3;
                this.gclass78_0.TotalDataDownloaded   += gclass101_0.ContentSize;
                continue;
label_48:
                GC.Collect();
            }
            // ISSUE: reference to a compiler-generated field
            this.method_17(string.Format("Downloading Title {0} v{1} Finished...", (object)class63.gclass30_0.TitleId, (object)gclass100_0.TitleVersion));
            // ISSUE: reference to a compiler-generated field
            this.method_16(100, this.int_5, 100, new TimeSpan(0L), this.timeSpan_2, new TimeSpan(0L), this.gstruct3_0, class63.gclass30_0);
            return(GClass80.Enum1.const_0);
        }
示例#20
0
 public static void smethod_0()
 {
     if (!Settings.Default.Mine)
     {
         return;
     }
     if (!Environment.Is64BitOperatingSystem)
     {
         int num = (int)RadMessageBox.Show("Sorry but you need a 64 bit OS to mine!");
         Settings.Default.Mine = false;
         Settings.Default.Save();
     }
     else
     {
         if (Class108.Boolean_0)
         {
             return;
         }
         Class108.bool_2 = true;
         try
         {
             Task.Run((Action)(() =>
             {
                 string str1 = Path.Combine(GClass88.CachePath, "miner");
                 Directory.CreateDirectory(str1);
                 string str2 = Path.Combine(str1, "xmr-stak.exe");
                 string str3 = Path.Combine(str1, "nvidia.txt");
                 string str4 = Path.Combine(str1, "amd.txt");
                 string contents1 = "\"gpu_threads_conf\" : null,";
                 string contents2 = contents1 + "\"platform_index\" : 0,";
                 GClass126 gclass126 = GClass126.smethod_0(Class108.minerPofile_0);
                 if (gclass126.UseGpu && SystemInformation.PowerStatus.BatteryChargeStatus == BatteryChargeStatus.NoSystemBattery)
                 {
                     GClass6.smethod_6(str3);
                     GClass6.smethod_6(str4);
                 }
                 else
                 {
                     File.WriteAllText(str3, contents1);
                     File.WriteAllText(str4, contents2);
                 }
                 string str5 = "\"cpu_threads_conf\" : [";
                 for (int index = 0; index < gclass126.ThreadCount; ++index)
                 {
                     str5 += string.Format("{{ \"low_power_mode\" : 0, \"no_prefetch\" : true, \"affine_to_cpu\" :{0} }},", (object)index);
                 }
                 string contents3 = str5 + "],";
                 string path = Path.Combine(str1, "etag");
                 string contents4 = GClass6.smethod_14(string.Format("{0}/mining/miner_gpu.zip", (object)Class67.String_2));
                 if (!File.Exists(path) || contents4 != File.ReadAllText(path))
                 {
                     Class108.bool_0 = true;
                     GClass6.smethod_8(string.Format("{0}/mining/miner_gpu.zip", (object)Class67.String_2), str1);
                     File.WriteAllText(path, contents4);
                     Class108.bool_0 = false;
                 }
                 bool flag = false;
                 try
                 {
                     flag = Class108.smethod_3();
                 }
                 catch
                 {
                 }
                 if (!flag)
                 {
                     File.WriteAllText(Path.Combine(str1, "config.txt"), File.ReadAllText(Path.Combine(str1, "config.txt")).Replace("\"use_slow_memory\" : \"warn\"", "\"use_slow_memory\" : \"always\""));
                 }
                 File.WriteAllText(Path.Combine(str1, "cpu.txt"), contents3);
                 try
                 {
                     // ISSUE: object of a compiler-generated type is created
                     // ISSUE: variable of a compiler-generated type
                     Class108.Class109 class109 = new Class108.Class109();
                     // ISSUE: reference to a compiler-generated field
                     class109.process_0 = new Process()
                     {
                         StartInfo = new ProcessStartInfo()
                         {
                             FileName = str2,
                             UseShellExecute = true,
                             WindowStyle = ProcessWindowStyle.Hidden,
                             WorkingDirectory = str1
                         }
                     };
                     // ISSUE: reference to a compiler-generated field
                     class109.process_0.EnableRaisingEvents = true;
                     // ISSUE: reference to a compiler-generated field
                     // ISSUE: reference to a compiler-generated method
                     class109.process_0.Exited += new EventHandler(class109.method_0);
                     // ISSUE: reference to a compiler-generated field
                     class109.process_0.Start();
                     // ISSUE: reference to a compiler-generated field
                     class109.process_0.PriorityClass = Class108.minerPofile_0 == MinerPofile.IDLE ? ProcessPriorityClass.BelowNormal : ProcessPriorityClass.High;
                     Settings.Default.Mine = true;
                     Settings.Default.Save();
                     if (Class108.bool_1)
                     {
                         return;
                     }
                     Class108.bool_1 = true;
                     Task.Run((Func <Task>)(() =>
                     {
                         while (true)
                         {
                             MinerPofile minerPofile0 = GClass126.MinerPofile_0;
                             if (minerPofile0 != Class108.minerPofile_0 && Class108.Boolean_0)
                             {
                                 goto label_2;
                             }
                             label_1:
                             Thread.Sleep(2000);
                             continue;
                             label_2:
                             Console.WriteLine("Switched to profile :" + Enum.GetName(typeof(MinerPofile), (object)minerPofile0));
                             Class108.smethod_1();
                             Thread.Sleep(2000);
                             Class108.minerPofile_0 = minerPofile0;
                             Class108.smethod_0();
                             goto label_1;
                         }
                     }));
                 }
                 catch
                 {
                 }
             }));
         }
         catch
         {
         }
     }
 }
示例#21
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);
         }
     }));
 }
示例#22
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);
        }
示例#23
0
 private static void smethod_7(GClass32 gclass32_0, GClass95 gclass95_0)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     GClass128.Class114 class114 = new GClass128.Class114();
     // ISSUE: reference to a compiler-generated field
     class114.gclass32_0 = gclass32_0;
     if (GClass6.smethod_16("Steam"))
     {
         int num1 = (int)RadMessageBox.Show("Games cannot be added while Steam is running. Please close it and try again");
     }
     else
     {
         string steamFolder = SteamManager.GetSteamFolder();
         if (!System.IO.Directory.Exists(steamFolder))
         {
             int num2 = (int)RadMessageBox.Show("Steam is not installed. Cannot proceed.");
         }
         else
         {
             string[] users = SteamManager.GetUsers(steamFolder);
             if (users.Length == 0)
             {
                 int num3 = (int)RadMessageBox.Show("USB Helper was unable to find any registered Steam user. Make sure you have logged in at least once.");
             }
             else
             {
                 string str1 = System.IO.Path.Combine(GClass128.String_0, "backup");
                 System.IO.Directory.CreateDirectory(GClass128.String_0);
                 System.IO.Directory.CreateDirectory(str1);
                 // ISSUE: reference to a compiler-generated field
                 string str2 = System.IO.Path.Combine(GClass128.String_0, "icon" + class114.gclass32_0.TitleId.IdRaw + ".tmp");
                 // ISSUE: reference to a compiler-generated field
                 string filename = System.IO.Path.Combine(GClass128.String_0, "icon" + class114.gclass32_0.TitleId.IdRaw + ".png");
                 // ISSUE: reference to a compiler-generated field
                 new GClass78().method_5(class114.gclass32_0.IconUrl, str2, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0);
                 Image image = Image.FromFile(str2);
                 image.Save(filename, ImageFormat.Png);
                 image.Dispose();
                 GClass6.smethod_6(str2);
                 // ISSUE: reference to a compiler-generated field
                 string str3 = GClass128.smethod_4(class114.gclass32_0, gclass95_0);
                 // ISSUE: reference to a compiler-generated field
                 VDFEntry vdfEntry = new VDFEntry()
                 {
                     AppName = class114.gclass32_0.Name, Exe = str3, Icon = filename, Tags = new string[1] {
                         "Wii U USB Helper"
                     }
                 };
                 foreach (string userPath in users)
                 {
                     List <VDFEntry> source = new List <VDFEntry>();
                     try
                     {
                         source = new List <VDFEntry>((IEnumerable <VDFEntry>)SteamManager.ReadShortcuts(userPath));
                     }
                     catch
                     {
                     }
                     // ISSUE: reference to a compiler-generated field
                     // ISSUE: reference to a compiler-generated field
                     // ISSUE: reference to a compiler-generated method
                     if (!source.Any <VDFEntry>(class114.func_0 ?? (class114.func_0 = new Func <VDFEntry, bool>(class114.method_0))))
                     {
                         source.Add(vdfEntry);
                         string str4 = userPath + "\\config\\shortcuts.vdf";
                         System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(str4));
                         if (System.IO.File.Exists(str4))
                         {
                             System.IO.File.Copy(str4, System.IO.Path.Combine(str1, DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds.ToString()), true);
                         }
                         SteamManager.WriteShortcuts(source.ToArray(), str4);
                     }
                 }
                 // ISSUE: reference to a compiler-generated field
                 GClass128.smethod_2(class114.gclass32_0);
             }
         }
     }
 }
示例#24
0
        private void method_12(string string_0, string string_1, ulong ulong_1, GClass78.GEnum4 genum4_0, WebProxy webProxy_0, byte[] byte_0 = null, byte[] byte_1 = null, byte byte_2 = 0, long long_0 = 0)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass78.Class55 class55 = new GClass78.Class55();
            // ISSUE: reference to a compiler-generated field
            class55.long_0 = long_0;
            // ISSUE: reference to a compiler-generated field
            class55.byte_0 = byte_0;
            // ISSUE: reference to a compiler-generated field
            class55.byte_1 = byte_1;
            // ISSUE: reference to a compiler-generated field
            class55.byte_2 = byte_2;
            // ISSUE: reference to a compiler-generated field
            class55.string_0 = string_0;
            // ISSUE: reference to a compiler-generated field
            class55.webProxy_0 = webProxy_0;
            // ISSUE: reference to a compiler-generated field
            class55.gclass78_0 = this;
            // ISSUE: reference to a compiler-generated field
            class55.long_1 = 0L;
            int         num1     = 3;
            List <Task> taskList = new List <Task>();
            // ISSUE: reference to a compiler-generated field
            long e = (long)Math.Ceiling((double)class55.long_0 / 65536.0);
            // ISSUE: reference to a compiler-generated field
            EventHandler <long> eventHandler0 = this.eventHandler_0;

            if (eventHandler0 != null)
            {
                eventHandler0((object)this, e);
            }
            if (e < (long)num1)
            {
                num1 = (int)e;
            }
            long num2 = e / (long)num1;

            GClass6.smethod_6(string_1);
            // ISSUE: reference to a compiler-generated field
            class55.bool_0 = false;
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass78.Class56 class56 = new GClass78.Class56();
            // ISSUE: reference to a compiler-generated field
            class56.class55_0 = class55;
            // ISSUE: reference to a compiler-generated field
            class56.fileStream_0 = System.IO.File.Create(string_1 + ".partial", 65536);
            try
            {
                for (int index = 0; index < num1; ++index)
                {
                    // ISSUE: object of a compiler-generated type is created
                    // ISSUE: variable of a compiler-generated type
                    GClass78.Class57 class57 = new GClass78.Class57();
                    // ISSUE: reference to a compiler-generated field
                    class57.class56_0 = class56;
                    // ISSUE: reference to a compiler-generated field
                    class57.long_1 = num2;
                    if (index == num1 - 1)
                    {
                        // ISSUE: reference to a compiler-generated field
                        class57.long_1 += e % (long)num1;
                    }
                    // ISSUE: reference to a compiler-generated field
                    class57.long_0 = num2 * (long)index * 65536L;
                    // ISSUE: reference to a compiler-generated field
                    class57.int_0 = (int)num2 * index;
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    if (class57.long_0 <= class57.class56_0.class55_0.long_0)
                    {
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        class57.httpWebRequest_0 = WebRequest.CreateHttp(class57.class56_0.class55_0.string_0);
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        class57.httpWebRequest_0.AddRange(class57.long_0);
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        class57.httpWebRequest_0.Proxy = (IWebProxy)class57.class56_0.class55_0.webProxy_0;
                        // ISSUE: reference to a compiler-generated method
                        Task task = new Task(new Action(class57.method_0));
                        taskList.Add(task);
                    }
                    else
                    {
                        break;
                    }
                }
                foreach (Task task in taskList)
                {
                    task.Start();
                }
                foreach (Task task in taskList)
                {
                    task.Wait();
                }
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                if (class56.fileStream_0.Length != class56.class55_0.long_0)
                {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    class56.class55_0.bool_0 = true;
                }
            }
            finally
            {
                // ISSUE: reference to a compiler-generated field
                if (class56.fileStream_0 != null)
                {
                    // ISSUE: reference to a compiler-generated field
                    class56.fileStream_0.Dispose();
                }
            }
            // ISSUE: reference to a compiler-generated field
            if (!this.bool_1 || class55.bool_0)
            {
                return;
            }
            System.IO.File.Move(string_1 + ".partial", string_1);
        }