Beispiel #1
0
        internal static State[][] smethod_0()
        {
            List <State[]> list = state_1.ToList <State[]>();

            State[] item        = state_1[0];
            State[] stateArray2 = state_1[7];
            foreach (JsonToken token in Class186.smethod_3(typeof(JsonToken)))
            {
                if (list.Count > token)
                {
                    continue;
                }
                switch (token)
                {
                case JsonToken.Integer:
                case JsonToken.Float:
                case JsonToken.String:
                case JsonToken.Boolean:
                case JsonToken.Null:
                case JsonToken.Undefined:
                case JsonToken.Date:
                case JsonToken.Bytes:
                    break;

                default:
                {
                    list.Add(item);
                    continue;
                }
                }
                list.Add(stateArray2);
            }
            return(list.ToArray());
        }
 // Token: 0x06001EE4 RID: 7908 RVA: 0x000656B0 File Offset: 0x000638B0
 protected override void vmethod_2(BinaryReader reader, int version)
 {
     this.DownloadUrls = new List <Uri>();
     this.FILES        = new Dictionary <string, Class186>(StringComparer.OrdinalIgnoreCase);
     this.Properties   = new Class96.Class306();
     lock (((ICollection)this.FILES).SyncRoot)
     {
         this.FILES.Clear();
         int   num  = (int)reader.ReadInt16();
         short num2 = 0;
         while ((int)num2 < num)
         {
             Class186 @class = new Class186();
             string   key    = reader.ReadString();
             @class.Version      = reader.ReadString();
             @class.ExpectedSize = reader.ReadInt64();
             @class.ExpectedHash = reader.BaseStream.smethod_22();
             if (version > 1)
             {
                 @class.ForceRecheck = reader.ReadBoolean();
             }
             else
             {
                 @class.ForceRecheck = false;
             }
             this.FILES.Add(key, @class);
             num2 += 1;
         }
     }
 }
Beispiel #3
0
 internal Class62(Stream A_0)
 {
     this.class186_0 = new Class186();
     this.class299_0 = new Class299();
     byte[] buffer = new byte[4];
     this.int_0 = this.class299_0.method_1(A_0, buffer);
     this.int_1 = this.class299_0.method_1(A_0, buffer);
     this.class186_0.method_6(A_0);
 }
 // Token: 0x06001EE8 RID: 7912 RVA: 0x00065960 File Offset: 0x00063B60
 private void method_7(string name, Class186 file)
 {
     lock (((ICollection)this.FILES).SyncRoot)
     {
         if (this.FILES.ContainsKey(name))
         {
             this.FILES[name] = file;
         }
         else
         {
             this.FILES.Add(name, file);
         }
     }
 }
        // Token: 0x06001EE7 RID: 7911 RVA: 0x00065918 File Offset: 0x00063B18
        public void method_6(string name, Class186 file, Struct43?hashOverride = null, long?sizeOverride = null)
        {
            Class186 @class = file.method_0();

            if (hashOverride != null)
            {
                @class.ExpectedHash = hashOverride.Value;
            }
            if (sizeOverride != null)
            {
                @class.ExpectedSize = sizeOverride.Value;
            }
            this.method_7(name, @class);
        }
 // Token: 0x06001EE6 RID: 7910 RVA: 0x0006587C File Offset: 0x00063A7C
 public void method_5(string name, Class282 patch, Struct43?hashOverride = null, long?sizeOverride = null)
 {
     lock (((ICollection)this.FILES).SyncRoot)
     {
         Class186 @class = patch.method_0();
         if (hashOverride != null)
         {
             @class.ExpectedHash = hashOverride.Value;
         }
         if (sizeOverride != null)
         {
             @class.ExpectedSize = sizeOverride.Value;
         }
         if (this.FILES.ContainsKey(name))
         {
             this.FILES[name] = @class;
         }
         else
         {
             this.FILES.Add(name, @class);
         }
     }
 }
 // Token: 0x06001EE9 RID: 7913 RVA: 0x000659CC File Offset: 0x00063BCC
 public void method_8(Class96 data, HashSet <string> filesUpdated, string installPath)
 {
     lock (((ICollection)this.FILES).SyncRoot)
     {
         lock (filesUpdated)
         {
             if (data == null)
             {
                 using (HashSet <string> .Enumerator enumerator = filesUpdated.GetEnumerator())
                 {
                     while (enumerator.MoveNext())
                     {
                         string   str    = enumerator.Current;
                         string   text   = str + ".mf";
                         string   text2  = Path.Combine(installPath, text);
                         Class186 @class = new Class186(Class234.smethod_11(text2), Class513.smethod_0(text2), null);
                         if (this.FILES.ContainsKey(text))
                         {
                             @class.Version   = this.FILES[text].Version;
                             this.FILES[text] = @class;
                         }
                         else
                         {
                             this.FILES.Add(text, @class);
                         }
                     }
                     goto IL_20D;
                 }
             }
             lock (((ICollection)data.FILES).SyncRoot)
             {
                 foreach (string str2 in filesUpdated)
                 {
                     string   text3 = str2 + ".mf";
                     string   text4 = Path.Combine(installPath, text3);
                     Class186 value = new Class186(Class234.smethod_11(text4), Class513.smethod_0(text4), data.FILES[text3].Version);
                     if (this.FILES.ContainsKey(text3))
                     {
                         this.FILES[text3] = value;
                     }
                     else
                     {
                         this.FILES.Add(text3, value);
                     }
                 }
                 foreach (KeyValuePair <string, Class186> keyValuePair in data.FILES)
                 {
                     if (!this.FILES.ContainsKey(keyValuePair.Key))
                     {
                         this.FILES.Add(keyValuePair.Key, keyValuePair.Value.method_0());
                     }
                     else
                     {
                         this.FILES[keyValuePair.Key].Version = keyValuePair.Value.Version;
                     }
                 }
             }
             IL_20D :;
         }
     }
 }
Beispiel #8
0
        public void method_10(Class193 class1931)
        {
            if (class1931 == null)
            {
                throw new ArgumentNullException("entry");
            }
            if (_arrayList0 == null)
            {
                throw new InvalidOperationException("ZipOutputStream was finished");
            }
            if (_class1930 != null)
            {
                method_11();
            }
            if (_arrayList0.Count == 2147483647)
            {
                throw new ZipException("Too many entries for Zip file");
            }
            var @enum = class1931.method_27();
            var int_  = _int0;

            class1931.method_5(class1931.method_4() & 2048);
            _bool2 = false;
            var flag = true;

            if (@enum == Enum31.Const0)
            {
                class1931.method_5(class1931.method_4() & -9);
                if (class1931.method_23() >= 0L)
                {
                    if (class1931.method_21() < 0L)
                    {
                        class1931.method_22(class1931.method_23());
                    }
                    else if (class1931.method_21() != class1931.method_23())
                    {
                        throw new ZipException("Method STORED, but compressed size != size");
                    }
                }
                else if (class1931.method_21() >= 0L)
                {
                    class1931.method_24(class1931.method_21());
                }
                if (class1931.method_21() < 0L || class1931.method_25() < 0L)
                {
                    if (method_0())
                    {
                        flag = false;
                    }
                    else
                    {
                        @enum = Enum31.Const1;
                        int_  = 0;
                    }
                }
            }
            if (@enum == Enum31.Const1)
            {
                if (class1931.method_21() == 0L)
                {
                    class1931.method_24(class1931.method_21());
                    class1931.method_26(0L);
                    @enum = Enum31.Const0;
                }
                else if (class1931.method_23() < 0L || class1931.method_21() < 0L || class1931.method_25() < 0L)
                {
                    flag = false;
                }
            }
            if (!flag)
            {
                if (!method_0())
                {
                    class1931.method_5(class1931.method_4() | 8);
                }
                else
                {
                    _bool2 = true;
                }
            }
            if (method_1() != null)
            {
                class1931.method_1(true);
                if (class1931.method_25() < 0L)
                {
                    class1931.method_5(class1931.method_4() | 8);
                }
            }
            class1931.method_7(_long1);
            class1931.method_28(@enum);
            _enum310 = @enum;
            _long3   = -1L;
            if (_enum300 == Enum30.Const1 || (class1931.method_21() < 0L && _enum300 == Enum30.Const2))
            {
                class1931.method_13();
            }
            method_8(67324752);
            method_7(class1931.method_11());
            method_7(class1931.method_4());
            method_7((byte)@enum);
            method_8((int)class1931.method_17());
            if (flag)
            {
                method_8((int)class1931.method_25());
                if (class1931.method_15())
                {
                    method_8(-1);
                    method_8(-1);
                }
                else
                {
                    method_8(class1931.method_0() ? ((int)class1931.method_23() + 12) : ((int)class1931.method_23()));
                    method_8((int)class1931.method_21());
                }
            }
            else
            {
                if (_bool2)
                {
                    _long2 = Stream0.Position;
                }
                method_8(0);
                if (_bool2)
                {
                    _long3 = Stream0.Position;
                }
                if (class1931.method_15() && _bool2)
                {
                    method_8(-1);
                    method_8(-1);
                }
                else
                {
                    method_8(0);
                    method_8(0);
                }
            }
            var array = Class186.smethod_4(class1931.method_4(), class1931.method_20());

            if (array.Length > 65535)
            {
                throw new ZipException("Entry name too long.");
            }
            var @class = new Class202(class1931.method_29());

            if (class1931.method_15() && (flag || _bool2))
            {
                @class.method_8();
                if (flag)
                {
                    @class.method_12(class1931.method_21());
                    @class.method_12(class1931.method_23());
                }
                else
                {
                    @class.method_12(-1L);
                    @class.method_12(-1L);
                }
                @class.method_9(1);
                if ([email protected]_6(1))
                {
                    throw new ZipException("Internal error cant find extra data");
                }
                if (_bool2)
                {
                    _long3 = @class.method_4();
                }
            }
            else
            {
                @class.method_13(1);
            }
            var array2 = @class.method_0();

            method_7(array.Length);
            method_7(array2.Length);
            if (array.Length > 0)
            {
                Stream0.Write(array, 0, array.Length);
            }
            if (class1931.method_15() && _bool2)
            {
                _long3 += Stream0.Position;
            }
            if (array2.Length > 0)
            {
                Stream0.Write(array2, 0, array2.Length);
            }
            _long1    += 30 + array.Length + array2.Length;
            _class1930 = class1931;
            _class1920.vmethod_1();
            if (@enum == Enum31.Const1)
            {
                Class1940.method_0();
                Class1940.method_7(int_);
            }
            _long0 = 0L;
            if (class1931.method_0())
            {
                if (class1931.method_25() < 0L)
                {
                    method_12(class1931.method_17() << 16);
                    return;
                }
                method_12(class1931.method_25());
            }
        }
Beispiel #9
0
        public override void vmethod_0()
        {
            if (this.arrayList_0 == null)
            {
                return;
            }
            if (this.class193_0 != null)
            {
                this.method_11();
            }
            long num  = (long)this.arrayList_0.Count;
            long num2 = 0L;

            foreach (Class193 @class in this.arrayList_0)
            {
                this.method_8(33639248);
                this.method_7(45);
                this.method_7(@class.method_11());
                this.method_7(@class.method_4());
                this.method_7((int)((short)@class.method_27()));
                this.method_8((int)@class.method_17());
                this.method_8((int)@class.method_25());
                if ([email protected]_14() && @class.method_23() < 4294967295L)
                {
                    this.method_8((int)@class.method_23());
                }
                else
                {
                    this.method_8(-1);
                }
                if ([email protected]_14() && @class.method_21() < 4294967295L)
                {
                    this.method_8((int)@class.method_21());
                }
                else
                {
                    this.method_8(-1);
                }
                byte[] array = Class186.smethod_4(@class.method_4(), @class.method_20());
                if (array.Length > 65535)
                {
                    throw new ZipException("Name too long.");
                }
                Class202 class2 = new Class202(@class.method_29());
                if (@class.method_16())
                {
                    class2.method_8();
                    if (@class.method_14() || @class.method_21() >= 4294967295L)
                    {
                        class2.method_12(@class.method_21());
                    }
                    if (@class.method_14() || @class.method_23() >= 4294967295L)
                    {
                        class2.method_12(@class.method_23());
                    }
                    if (@class.method_6() >= 4294967295L)
                    {
                        class2.method_12(@class.method_6());
                    }
                    class2.method_9(1);
                }
                else
                {
                    class2.method_13(1);
                }
                byte[] array2 = class2.method_0();
                byte[] array3 = (@class.method_32() != null) ? Class186.smethod_4(@class.method_4(), @class.method_32()) : new byte[0];
                if (array3.Length > 65535)
                {
                    throw new ZipException("Comment too long.");
                }
                this.method_7(array.Length);
                this.method_7(array2.Length);
                this.method_7(array3.Length);
                this.method_7(0);
                this.method_7(0);
                if (@class.method_8() != -1)
                {
                    this.method_8(@class.method_8());
                }
                else if (@class.method_33())
                {
                    this.method_8(16);
                }
                else
                {
                    this.method_8(0);
                }
                if (@class.method_6() >= 4294967295L)
                {
                    this.method_8(-1);
                }
                else
                {
                    this.method_8((int)@class.method_6());
                }
                if (array.Length > 0)
                {
                    this.stream_0.Write(array, 0, array.Length);
                }
                if (array2.Length > 0)
                {
                    this.stream_0.Write(array2, 0, array2.Length);
                }
                if (array3.Length > 0)
                {
                    this.stream_0.Write(array3, 0, array3.Length);
                }
                num2 += (long)(46 + array.Length + array2.Length + array3.Length);
            }
            using (Stream25 stream = new Stream25(this.stream_0))
            {
                stream.method_1(num, num2, this.long_1, this.byte_1);
            }
            this.arrayList_0 = null;
        }
 public abstract void Visit(Class186 c);
 public override void Visit(Class186 c) { }
Beispiel #12
0
        private JsonSchema method_5(Type type_0, Required required_0, bool bool_0)
        {
            JsonConverter converter;
            Class134      class4 = new Class134 {
                type_0 = type_0
            };

            Class203.smethod_2(class4.type_0, "type");
            string str  = this.method_4(class4.type_0, false);
            string str2 = this.method_4(class4.type_0, true);

            if (!string.IsNullOrEmpty(str))
            {
                JsonSchema schema = this.jsonSchemaResolver_0.GetSchema(str);
                if (schema != null)
                {
                    if ((required_0 != Required.Always) && !smethod_0(schema.Type, JsonSchemaType.Null))
                    {
                        schema.Type = ((JsonSchemaType)schema.Type) | JsonSchemaType.Null;
                    }
                    if (bool_0 && (schema.Required != true))
                    {
                        schema.Required = true;
                    }
                    return(schema);
                }
            }
            if (this.ilist_0.Any <Class133>(new Func <Class133, bool>(class4.method_0)))
            {
                throw new JsonException("Unresolved circular reference for type '{0}'. Explicitly define an Id for the type using a JsonObject/JsonArray attribute or automatically generate a type Id using the UndefinedSchemaIdHandling property.".smethod_0(CultureInfo.InvariantCulture, class4.type_0));
            }
            JsonContract contract = this.ContractResolver.ResolveContract(class4.type_0);

            if (((converter = contract.Converter) != null) || ((converter = contract.JsonConverter_0) != null))
            {
                JsonSchema schema2 = converter.GetSchema();
                if (schema2 != null)
                {
                    return(schema2);
                }
            }
            this.method_0(new Class133(class4.type_0, new JsonSchema()));
            if (str2 != null)
            {
                this.JsonSchema_0.Id = str2;
            }
            if (bool_0)
            {
                this.JsonSchema_0.Required = true;
            }
            this.JsonSchema_0.Title       = this.method_2(class4.type_0);
            this.JsonSchema_0.Description = this.method_3(class4.type_0);
            if (converter != null)
            {
                this.JsonSchema_0.Type = 0x7f;
            }
            else
            {
                switch (contract.enum15_0)
                {
                case Enum15.Object:
                    this.JsonSchema_0.Type = new JsonSchemaType?(this.method_6(JsonSchemaType.Object, required_0));
                    this.JsonSchema_0.Id   = this.method_4(class4.type_0, false);
                    this.method_8(class4.type_0, (JsonObjectContract)contract);
                    goto Label_04CD;

                case Enum15.Array:
                    {
                        this.JsonSchema_0.Type = new JsonSchemaType?(this.method_6(JsonSchemaType.Array, required_0));
                        this.JsonSchema_0.Id   = this.method_4(class4.type_0, false);
                        JsonArrayAttribute attribute = Class139.smethod_0(class4.type_0) as JsonArrayAttribute;
                        bool flag = (attribute == null) || attribute.AllowNullItems;
                        Type type = Class194.smethod_18(class4.type_0);
                        if (type != null)
                        {
                            this.JsonSchema_0.Items = new List <JsonSchema>();
                            this.JsonSchema_0.Items.Add(this.method_5(type, !flag ? Required.Always : Required.Default, false));
                        }
                        goto Label_04CD;
                    }

                case Enum15.Primitive:
                    this.JsonSchema_0.Type = new JsonSchemaType?(this.method_10(class4.type_0, required_0));
                    if (((((JsonSchemaType)this.JsonSchema_0.Type) == JsonSchemaType.Integer) && class4.type_0.smethod_7()) && !class4.type_0.IsDefined(typeof(FlagsAttribute), true))
                    {
                        this.JsonSchema_0.Enum = new List <JToken>();
                        foreach (Class187 <long> class3 in Class186.smethod_2 <long>(class4.type_0))
                        {
                            JToken item = JToken.FromObject(class3.Prop_0);
                            this.JsonSchema_0.Enum.Add(item);
                        }
                    }
                    goto Label_04CD;

                case Enum15.String:
                    {
                        JsonSchemaType type2 = !Class194.smethod_9(contract.UnderlyingType) ? JsonSchemaType.String : this.method_6(JsonSchemaType.String, required_0);
                        this.JsonSchema_0.Type = new JsonSchemaType?(type2);
                        goto Label_04CD;
                    }

                case Enum15.Dictionary:
                    Type type3;
                    Type type4;
                    this.JsonSchema_0.Type = new JsonSchemaType?(this.method_6(JsonSchemaType.Object, required_0));
                    Class194.smethod_19(class4.type_0, out type3, out type4);
                    if ((type3 != null) && (this.ContractResolver.ResolveContract(type3).enum15_0 == Enum15.Primitive))
                    {
                        this.JsonSchema_0.AdditionalProperties = this.method_5(type4, Required.Default, false);
                    }
                    goto Label_04CD;

                case Enum15.Dynamic:
                case Enum15.Linq:
                    this.JsonSchema_0.Type = 0x7f;
                    goto Label_04CD;

                case Enum15.Serializable:
                    this.JsonSchema_0.Type = new JsonSchemaType?(this.method_6(JsonSchemaType.Object, required_0));
                    this.JsonSchema_0.Id   = this.method_4(class4.type_0, false);
                    this.method_9(class4.type_0, (JsonISerializableContract)contract);
                    goto Label_04CD;
                }
                throw new JsonException("Unexpected contract type: {0}".smethod_0(CultureInfo.InvariantCulture, contract));
            }
Label_04CD:
            return(this.method_1().JsonSchema_0);
        }
Beispiel #13
0
 internal Class62()
 {
     this.class186_0 = new Class186();
     this.class299_0 = new Class299();
 }
Beispiel #14
0
        public void method_10(Class193 class193_1)
        {
            if (class193_1 == null)
            {
                throw new ArgumentNullException("entry");
            }
            if (this.arrayList_0 == null)
            {
                throw new InvalidOperationException("ZipOutputStream was finished");
            }
            if (this.class193_0 != null)
            {
                this.method_11();
            }
            if (this.arrayList_0.Count == 2147483647)
            {
                throw new ZipException("Too many entries for Zip file");
            }
            Enum31 @enum = class193_1.method_27();
            int    int_  = this.int_0;

            class193_1.method_5(class193_1.method_4() & 2048);
            this.bool_2 = false;
            bool flag = true;

            if (@enum == Enum31.const_0)
            {
                class193_1.method_5(class193_1.method_4() & -9);
                if (class193_1.method_23() >= 0L)
                {
                    if (class193_1.method_21() < 0L)
                    {
                        class193_1.method_22(class193_1.method_23());
                    }
                    else if (class193_1.method_21() != class193_1.method_23())
                    {
                        throw new ZipException("Method STORED, but compressed size != size");
                    }
                }
                else if (class193_1.method_21() >= 0L)
                {
                    class193_1.method_24(class193_1.method_21());
                }
                if (class193_1.method_21() < 0L || class193_1.method_25() < 0L)
                {
                    if (base.method_0())
                    {
                        flag = false;
                    }
                    else
                    {
                        @enum = Enum31.const_1;
                        int_  = 0;
                    }
                }
            }
            if (@enum == Enum31.const_1)
            {
                if (class193_1.method_21() == 0L)
                {
                    class193_1.method_24(class193_1.method_21());
                    class193_1.method_26(0L);
                    @enum = Enum31.const_0;
                }
                else if (class193_1.method_23() < 0L || class193_1.method_21() < 0L || class193_1.method_25() < 0L)
                {
                    flag = false;
                }
            }
            if (!flag)
            {
                if (!base.method_0())
                {
                    class193_1.method_5(class193_1.method_4() | 8);
                }
                else
                {
                    this.bool_2 = true;
                }
            }
            if (base.method_1() != null)
            {
                class193_1.method_1(true);
                if (class193_1.method_25() < 0L)
                {
                    class193_1.method_5(class193_1.method_4() | 8);
                }
            }
            class193_1.method_7(this.long_1);
            class193_1.method_28(@enum);
            this.enum31_0 = @enum;
            this.long_3   = -1L;
            if (this.enum30_0 == Enum30.const_1 || (class193_1.method_21() < 0L && this.enum30_0 == Enum30.const_2))
            {
                class193_1.method_13();
            }
            this.method_8(67324752);
            this.method_7(class193_1.method_11());
            this.method_7(class193_1.method_4());
            this.method_7((int)((byte)@enum));
            this.method_8((int)class193_1.method_17());
            if (flag)
            {
                this.method_8((int)class193_1.method_25());
                if (class193_1.method_15())
                {
                    this.method_8(-1);
                    this.method_8(-1);
                }
                else
                {
                    this.method_8(class193_1.method_0() ? ((int)class193_1.method_23() + 12) : ((int)class193_1.method_23()));
                    this.method_8((int)class193_1.method_21());
                }
            }
            else
            {
                if (this.bool_2)
                {
                    this.long_2 = this.stream_0.Position;
                }
                this.method_8(0);
                if (this.bool_2)
                {
                    this.long_3 = this.stream_0.Position;
                }
                if (class193_1.method_15() && this.bool_2)
                {
                    this.method_8(-1);
                    this.method_8(-1);
                }
                else
                {
                    this.method_8(0);
                    this.method_8(0);
                }
            }
            byte[] array = Class186.smethod_4(class193_1.method_4(), class193_1.method_20());
            if (array.Length > 65535)
            {
                throw new ZipException("Entry name too long.");
            }
            Class202 @class = new Class202(class193_1.method_29());

            if (class193_1.method_15() && (flag || this.bool_2))
            {
                @class.method_8();
                if (flag)
                {
                    @class.method_12(class193_1.method_21());
                    @class.method_12(class193_1.method_23());
                }
                else
                {
                    @class.method_12(-1L);
                    @class.method_12(-1L);
                }
                @class.method_9(1);
                if ([email protected]_6(1))
                {
                    throw new ZipException("Internal error cant find extra data");
                }
                if (this.bool_2)
                {
                    this.long_3 = (long)@class.method_4();
                }
            }
            else
            {
                @class.method_13(1);
            }
            byte[] array2 = @class.method_0();
            this.method_7(array.Length);
            this.method_7(array2.Length);
            if (array.Length > 0)
            {
                this.stream_0.Write(array, 0, array.Length);
            }
            if (class193_1.method_15() && this.bool_2)
            {
                this.long_3 += this.stream_0.Position;
            }
            if (array2.Length > 0)
            {
                this.stream_0.Write(array2, 0, array2.Length);
            }
            this.long_1    += (long)(30 + array.Length + array2.Length);
            this.class193_0 = class193_1;
            this.class192_0.vmethod_1();
            if (@enum == Enum31.const_1)
            {
                this.class194_0.method_0();
                this.class194_0.method_7(int_);
            }
            this.long_0 = 0L;
            if (class193_1.method_0())
            {
                if (class193_1.method_25() < 0L)
                {
                    this.method_12(class193_1.method_17() << 16);
                    return;
                }
                this.method_12(class193_1.method_25());
            }
        }
        // Token: 0x06001EEC RID: 7916 RVA: 0x000664A8 File Offset: 0x000646A8
        public void method_11(string data)
        {
            Regex regex  = new Regex("^(FILE_){1}(?<fileName>.+){1}(\\.v){1}(?<fileVersion>\\d+\\.{1}\\d+){1}$");
            Regex regex2 = new Regex("^(PFILE_){1}(?<fileName>.+){1}(\\.v){1}(?<fileVersion>\\d+\\.{1}\\d+){1}(\\.pch){1}$");

            string[] array = data.Split(new char[]
            {
                '\r',
                '\n'
            }, StringSplitOptions.RemoveEmptyEntries);
            lock (((ICollection)this.FILES).SyncRoot)
            {
                this.FILES.Clear();
                foreach (string text in array)
                {
                    string[] array3 = text.Split(new char[]
                    {
                        '='
                    });
                    if (array3.Length == 2)
                    {
                        string key;
                        if ((key = array3[0]) != null)
                        {
                            if (Class529.dictionary_1 == null)
                            {
                                Class529.dictionary_1 = new Dictionary <string, int>(13)
                                {
                                    {
                                        "PATCHER_VERSION_STRING_SERVER",
                                        0
                                    },
                                    {
                                        "PATCHER_VERSION_STRING_SERVER_OSX",
                                        1
                                    },
                                    {
                                        "GAME_VERSION_TEXT",
                                        2
                                    },
                                    {
                                        "DOWNLOAD_PATCHER_CURRENT_VERSION",
                                        3
                                    },
                                    {
                                        "DOWNLOAD_PATCHER_CURRENT_VERSION_OSX",
                                        4
                                    },
                                    {
                                        "ACCOUNT_SERVER",
                                        5
                                    },
                                    {
                                        "GAME_SERVER",
                                        6
                                    },
                                    {
                                        "PANDA_DOWNLOAD_URL",
                                        7
                                    },
                                    {
                                        "PATCHER_BASE_URL_HEAVY_LIFTING",
                                        8
                                    },
                                    {
                                        "WEB_PAGE_LOGIN_RPC",
                                        9
                                    },
                                    {
                                        "REQUIRED_INSTALL_FILES",
                                        10
                                    },
                                    {
                                        "REQUIRED_INSTALL_FILES_OSX",
                                        11
                                    },
                                    {
                                        "REMOVE_OLD_FILE_LIST",
                                        12
                                    }
                                };
                            }
                            int num;
                            if (Class529.dictionary_1.TryGetValue(key, out num))
                            {
                                switch (num)
                                {
                                case 0:
                                    this.Properties.PATCHER_VERSION_STRING_SERVER = array3[1];
                                    goto IL_5EA;

                                case 1:
                                    this.Properties.PATCHER_VERSION_STRING_SERVER_OSX = array3[1];
                                    goto IL_5EA;

                                case 2:
                                    this.Properties.GAME_VERSION_TEXT = array3[1];
                                    goto IL_5EA;

                                case 3:
                                    this.Properties.DOWNLOAD_PATCHER_CURRENT_VERSION = array3[1];
                                    goto IL_5EA;

                                case 4:
                                    this.Properties.DOWNLOAD_PATCHER_CURRENT_VERSION_OSX = array3[1];
                                    goto IL_5EA;

                                case 5:
                                    this.Properties.ACCOUNT_SERVER = array3[1];
                                    goto IL_5EA;

                                case 6:
                                    this.Properties.GAME_SERVER = array3[1];
                                    goto IL_5EA;

                                case 7:
                                    this.Properties.PANDA_DOWNLOAD_URL = array3[1];
                                    try
                                    {
                                        lock (((ICollection)this.DownloadUrls).SyncRoot)
                                        {
                                            this.DownloadUrls.Insert(this.DownloadUrls.Count, new Uri(Class96.smethod_0(this.Properties.PANDA_DOWNLOAD_URL)));
                                        }
                                        goto IL_5EA;
                                    }
                                    catch (Exception ex)
                                    {
                                        ex.smethod_1(new object[]
                                        {
                                            array3[1]
                                        });
                                        goto IL_5EA;
                                    }
                                    break;

                                case 8:
                                    break;

                                case 9:
                                    this.Properties.WEB_PAGE_LOGIN_RPC = array3[1];
                                    goto IL_5EA;

                                case 10:
                                    this.Properties.REQUIRED_INSTALL_FILES = array3[1];
                                    goto IL_5EA;

                                case 11:
                                    this.Properties.REQUIRED_INSTALL_FILES_OSX = array3[1];
                                    goto IL_5EA;

                                case 12:
                                    this.Properties.REMOVE_OLD_FILE_LIST = array3[1];
                                    goto IL_5EA;

                                default:
                                    goto IL_3B8;
                                }
                                this.Properties.PATCHER_BASE_URL_HEAVY_LIFTING = array3[1];
                                string[] array4 = this.Properties.PATCHER_BASE_URL_HEAVY_LIFTING.Split(new char[]
                                {
                                    ';'
                                }, StringSplitOptions.RemoveEmptyEntries);
                                for (int j = array4.Length - 1; j >= 0; j--)
                                {
                                    try
                                    {
                                        lock (((ICollection)this.DownloadUrls).SyncRoot)
                                        {
                                            this.DownloadUrls.Insert(0, new Uri(Class96.smethod_0(array4[0])));
                                        }
                                    }
                                    catch (Exception ex2)
                                    {
                                        ex2.smethod_1(new object[]
                                        {
                                            array4[j]
                                        });
                                    }
                                }
                                goto IL_5EA;
                            }
                        }
IL_3B8:
                        if (array3[0].StartsWith("FILE"))
                        {
                            Match    match = regex.Match(array3[0]);
                            long     expectedSize;
                            Struct43 expectedHash;
                            if (match.Success && !match.Groups["fileName"].Value.Contains("OSX") && Class96.smethod_2(array3[1].Trim(), out expectedSize, out expectedHash))
                            {
                                if (!this.FILES.ContainsKey(match.Groups["fileName"].Value))
                                {
                                    this.FILES.Add(match.Groups["fileName"].Value, new Class186());
                                }
                                Class186 @class = this.FILES[match.Groups["fileName"].Value];
                                @class.Version      = match.Groups["fileVersion"].Value;
                                @class.ExpectedHash = expectedHash;
                                @class.ExpectedSize = expectedSize;
                            }
                        }
                        else if (array3[0].StartsWith("PFILE"))
                        {
                            Match    match = regex2.Match(array3[0]);
                            uint     expectedFileSize;
                            Struct43 expectedHash2;
                            uint     resultingFileSize;
                            Struct43 resultingHash;
                            if (match.Success && !match.Groups["fileName"].Value.Contains("OSX") && Class96.smethod_1(array3[1].Trim(), out expectedFileSize, out expectedHash2, out resultingFileSize, out resultingHash))
                            {
                                Class282 class2 = new Class282();
                                class2.ExpectedFileSize  = expectedFileSize;
                                class2.ExpectedHash      = expectedHash2;
                                class2.ResultingFileSize = resultingFileSize;
                                class2.ResultingHash     = resultingHash;
                                class2.Version           = match.Groups["fileVersion"].Value;
                                string value = match.Groups["fileName"].Value;
                                if (!this.FILES.ContainsKey(value))
                                {
                                    this.FILES.Add(value, new Class186());
                                }
                                lock (((ICollection)this.FILES[value].Patches).SyncRoot)
                                {
                                    this.FILES[value].Patches.Add(class2);
                                }
                            }
                        }
                    }
                    IL_5EA :;
                }
            }
        }
Beispiel #16
0
        public override void vmethod_0()
        {
            if (_arrayList0 == null)
            {
                return;
            }
            if (_class1930 != null)
            {
                method_11();
            }
            long num  = _arrayList0.Count;
            var  num2 = 0L;

            foreach (Class193 @class in _arrayList0)
            {
                method_8(33639248);
                method_7(45);
                method_7(@class.method_11());
                method_7(@class.method_4());
                method_7((short)@class.method_27());
                method_8((int)@class.method_17());
                method_8((int)@class.method_25());
                if ([email protected]_14() && @class.method_23() < 4294967295L)
                {
                    method_8((int)@class.method_23());
                }
                else
                {
                    method_8(-1);
                }
                if ([email protected]_14() && @class.method_21() < 4294967295L)
                {
                    method_8((int)@class.method_21());
                }
                else
                {
                    method_8(-1);
                }
                var array = Class186.smethod_4(@class.method_4(), @class.method_20());
                if (array.Length > 65535)
                {
                    throw new ZipException("Name too long.");
                }
                var class2 = new Class202(@class.method_29());
                if (@class.method_16())
                {
                    class2.method_8();
                    if (@class.method_14() || @class.method_21() >= 4294967295L)
                    {
                        class2.method_12(@class.method_21());
                    }
                    if (@class.method_14() || @class.method_23() >= 4294967295L)
                    {
                        class2.method_12(@class.method_23());
                    }
                    if (@class.method_6() >= 4294967295L)
                    {
                        class2.method_12(@class.method_6());
                    }
                    class2.method_9(1);
                }
                else
                {
                    class2.method_13(1);
                }
                var array2 = class2.method_0();
                var array3 = (@class.method_32() != null)
                    ? Class186.smethod_4(@class.method_4(), @class.method_32())
                    : new byte[0];
                if (array3.Length > 65535)
                {
                    throw new ZipException("Comment too long.");
                }
                method_7(array.Length);
                method_7(array2.Length);
                method_7(array3.Length);
                method_7(0);
                method_7(0);
                if (@class.method_8() != -1)
                {
                    method_8(@class.method_8());
                }
                else if (@class.method_33())
                {
                    method_8(16);
                }
                else
                {
                    method_8(0);
                }
                if (@class.method_6() >= 4294967295L)
                {
                    method_8(-1);
                }
                else
                {
                    method_8((int)@class.method_6());
                }
                if (array.Length > 0)
                {
                    Stream0.Write(array, 0, array.Length);
                }
                if (array2.Length > 0)
                {
                    Stream0.Write(array2, 0, array2.Length);
                }
                if (array3.Length > 0)
                {
                    Stream0.Write(array3, 0, array3.Length);
                }
                num2 += 46 + array.Length + array2.Length + array3.Length;
            }
            using (var stream = new Stream25(Stream0))
            {
                stream.method_1(num, num2, _long1, _byte1);
            }
            _arrayList0 = null;
        }
Beispiel #17
0
		// Token: 0x06001472 RID: 5234
		// RVA: 0x000126A0 File Offset: 0x000108A0
		public Class187(string string_0)
		{
			this.class186_0 = new Class186(string_0);
		}