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); } }
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); }
private void method_10(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.Class53 class53 = new GClass78.Class53(); // ISSUE: reference to a compiler-generated field class53.gclass78_0 = this; // ISSUE: reference to a compiler-generated field class53.long_0 = (long)ulong_1; HttpWebRequest http = WebRequest.CreateHttp(string_0); http.Proxy = (IWebProxy)webProxy_0; http.Method = "GET"; http.AddRange((long)ulong_1); http.Timeout = 10000; http.ReadWriteTimeout = 15000; int int_5 = (int)(ulong_1 / 65536UL); using (WebResponse response = http.GetResponse()) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type GClass78.Class54 class54 = new GClass78.Class54(); // ISSUE: reference to a compiler-generated field class54.class53_0 = class53; // ISSUE: reference to a compiler-generated field class54.long_0 = response.ContentLength + (long)ulong_1; using (Stream0 stream_0 = new Stream0(response.GetResponseStream())) { int bufferSize = GClass28.bool_0 ? 4096 : 65536; using (FileStream fileStream = new FileStream(string_1, FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite, bufferSize)) { fileStream.Seek((long)ulong_1, SeekOrigin.Begin); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field while (this.bool_1 && class54.class53_0.long_0 < class54.long_0) { byte[] numArray = new byte[65536]; stream_0.Int64_0 = (long)this.MaximumSpeed; long long_3; if (genum4_0 == GClass78.GEnum4.const_1) { // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method numArray = stream_0.smethod_3(numArray.Length, class54.action_0 ?? (class54.action_0 = new Action <int>(class54.method_0))); if (numArray.Length < 65536) { throw new Exception("Block has invalid size"); } if (GClass28.bool_1 && Class85.smethod_0(numArray, byte_0, int_5, byte_1, byte_2) == Enum3.const_1) { throw new Exception("Invalid block"); } ++int_5; long_3 = 65536L; } else { long_3 = (long)stream_0.Read(numArray, 0, numArray.Length); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field class54.class53_0.long_0 += long_3; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field this.method_11(new Class58(long_3, class54.class53_0.long_0, class54.long_0)); } if (long_3 != 0L) { fileStream.Write(numArray, 0, (int)long_3); } else { break; } } fileStream.Flush(); } } } }