public Class631(string A_0, string A_1, string A_2, string A_3)
    {
        int num = 6;

        this.string_1 = A_0;
        this.string_2 = A_1;
        this.string_3 = A_2;
        this.string_0 = A_3;
        this.bool_1   = (A_0 != null) && Class641.smethod_0(A_0, BookmarkStart.b("䐫娭崯帱", num));
    }
    public void method_16(Class631 A_0, Uri A_1)
    {
        int num = 0;

        this.class631_0 = A_0;
        if (A_0 != null)
        {
            this.bool_1 = A_0.method_1();
        }
        this.int_0 = 1;
        if (this.bool_0)
        {
            if (this.string_4 != null)
            {
                this.textReader_0 = new StringReader(this.string_4);
            }
        }
        else if (this.string_3 == null)
        {
            this.method_28(BookmarkStart.b("猥䘧堩䤫崭弯帱䈳圵娷嘹夻ḽ┿ⱁぃ⽅㱇㍉汋楍⭏扑⥓煕", num), this.string_1);
        }
        else
        {
            string str4;
            if (A_1 != null)
            {
                this.uri_0 = new Uri(A_1, this.string_3);
            }
            else
            {
                this.uri_0 = new Uri(this.string_3);
            }
            Stream   responseStream = null;
            Encoding encoding       = Encoding.Default;
            if (((str4 = this.uri_0.Scheme) != null) && (str4 == BookmarkStart.b("䀥䄧䘩䤫", num)))
            {
                responseStream = new FileStream(this.uri_0.LocalPath, FileMode.Open, FileAccess.Read);
            }
            else
            {
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(this.method_5());
                request.UserAgent = BookmarkStart.b("欥䜧倩䔫䈭尯匱ᬳȵᘷਹ᰻ᘽ⌿ⵁ⥃㙅⥇㹉╋ⱍ㱏㝑潓罕捗", num);
                request.Timeout   = 0x2710;
                if (this.string_0 != null)
                {
                    request.Proxy = new WebProxy(this.string_0);
                }
                request.PreAuthenticate = false;
                request.Credentials     = CredentialCache.DefaultCredentials;
                WebResponse response    = request.GetResponse();
                Uri         responseUri = response.ResponseUri;
                if (!string.Equals(responseUri.AbsoluteUri, this.uri_0.AbsoluteUri, StringComparison.OrdinalIgnoreCase))
                {
                    this.uri_0 = responseUri;
                }
                string str   = response.ContentType.ToLowerInvariant();
                string str2  = str;
                int    index = str.IndexOf(';');
                if (index >= 0)
                {
                    str2 = str.Substring(0, index);
                }
                if (Class641.smethod_0(str2, BookmarkStart.b("別䴧利堫ĭ堯䘱夳娵", num)))
                {
                    this.bool_1 = true;
                }
                index    = str.IndexOf(BookmarkStart.b("䔥䀧䬩師崭唯䘱", num));
                encoding = Encoding.Default;
                if (index >= 0)
                {
                    int startIndex = str.IndexOf(BookmarkStart.b("ᬥ", num), index);
                    int length     = str.IndexOf(BookmarkStart.b("ᴥ", num), startIndex);
                    if (length < 0)
                    {
                        length = str.Length;
                    }
                    if (startIndex > 0)
                    {
                        startIndex++;
                        string name = str.Substring(startIndex, length - startIndex).Trim();
                        try
                        {
                            encoding = Encoding.GetEncoding(name);
                        }
                        catch (ArgumentException)
                        {
                        }
                    }
                }
                responseStream = response.GetResponseStream();
            }
            this.bool_3 = true;
            Class632 class2 = new Class632(responseStream, encoding);
            this.encoding_0   = class2.method_0();
            this.textReader_0 = class2;
        }
    }
Exemple #3
0
    internal Decoder method_11()
    {
        int num = 2;

        for (int i = this.method_2(); i != -1; i = this.method_2())
        {
            string str3;
            char   ch = (char)i;
            if (ch != '<')
            {
                continue;
            }
            string str2 = this.method_12();
            if ((str2 == null) || !Class641.smethod_0(str2, BookmarkStart.b("䔧伩堫伭", num)))
            {
                continue;
            }
            string str4 = null;
            string str  = null;
            goto Label_007D;
Label_004C:
            if (Class641.smethod_0(str2, BookmarkStart.b("䀧帩堫席ᴯ圱䔳䌵儷䰹", num)))
            {
                str4 = str3;
            }
            else if (Class641.smethod_0(str2, BookmarkStart.b("䬧䔩䈫娭唯就䀳", num)))
            {
                str = str3;
            }
Label_007D:
            str3 = this.method_8(out str2);
            if (str2 != null)
            {
                goto Label_004C;
            }
            if (((str4 != null) && Class641.smethod_0(str4, BookmarkStart.b("䬧䔩䈫娭唯就䀳ᬵ䰷䌹䰻嬽", num))) && (str != null))
            {
                int index = str.IndexOf(BookmarkStart.b("䬧䈩䴫尭䌯圱䀳", num));
                if (index >= 0)
                {
                    index = str.IndexOf(BookmarkStart.b("ᔧ", num), index);
                    if (index >= 0)
                    {
                        index++;
                        int length = str.IndexOf(BookmarkStart.b("ጧ", num), index);
                        if (length < 0)
                        {
                            length = str.Length;
                        }
                        string name = str.Substring(index, length - index).Trim();
                        try
                        {
                            Encoding encoding = Encoding.GetEncoding(name);
                            this.encoding_0 = encoding;
                            return(encoding.GetDecoder());
                        }
                        catch (ArgumentException)
                        {
                        }
                    }
                }
            }
        }
        return(null);
    }