Ejemplo n.º 1
0
        private static List <int> smethod_8(byte[] byte_1, byte[] byte_2, int int_5, int int_6, byte[] byte_3, byte byte_4)
        {
            List <int> intList = new List <int>();

            for (int index = 0; index < int_6; ++index)
            {
                byte[] byte_1_1 = new byte[65536];
                Buffer.BlockCopy((Array)byte_1, index * 65536, (Array)byte_1_1, 0, 65536);
                if (Class85.smethod_0(byte_1_1, byte_2, index + int_5, byte_3, byte_4) == Enum3.const_1)
                {
                    intList.Add(index + int_5);
                }
            }
            return(intList);
        }
Ejemplo n.º 2
0
        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();
                    }
                }
            }
        }