// Token: 0x06001EEA RID: 7914 RVA: 0x00065C98 File Offset: 0x00063E98
        public Dictionary <string, Class307> method_9(Class96 data, string installFolder, bool usingVirtualServer, bool canMoveOrInstallFiles, HashSet <string> changedFiles, out bool success)
        {
            Dictionary <string, Class307> dictionary = new Dictionary <string, Class307>();

            success = true;
            lock (((ICollection)this.FILES).SyncRoot)
            {
                lock (((ICollection)data.FILES).SyncRoot)
                {
                    foreach (KeyValuePair <string, Class186> keyValuePair in data.FILES)
                    {
                        Class96.Class308 @class;
                        bool             flag3;
                        if (usingVirtualServer && Class136.smethod_6(keyValuePair.Key))
                        {
                            @class = new Class96.Class308(keyValuePair.Key, keyValuePair.Key + ".orig", Path.Combine(installFolder, keyValuePair.Key + ".orig"), keyValuePair.Key, Path.Combine(installFolder, keyValuePair.Key), true);
                            flag3  = true;
                        }
                        else
                        {
                            @class = new Class96.Class308(keyValuePair.Key, keyValuePair.Key, Path.Combine(installFolder, keyValuePair.Key), keyValuePair.Key + ".orig", Path.Combine(installFolder, keyValuePair.Key + ".orig"), false);
                            flag3  = false;
                        }
                        bool     flag4;
                        Struct43 @struct;
                        Enum23   @enum;
                        if (flag4 = this.FILES.ContainsKey(keyValuePair.Key))
                        {
                            @enum = keyValuePair.Value.method_5(this.FILES[keyValuePair.Key], @class.FilePath, out @struct);
                        }
                        else
                        {
                            @enum = keyValuePair.Value.method_3(@class.FilePath, out @struct);
                        }
                        if (@enum != Enum23.const_2)
                        {
                            if (!canMoveOrInstallFiles)
                            {
                                success = false;
                                break;
                            }
                            if (@enum == Enum23.const_1 && keyValuePair.Value.method_2(@struct))
                            {
                                @class.FileDetails = keyValuePair.Value.method_1(@struct);
                                dictionary.Add(keyValuePair.Key, @class);
                            }
                            else if (flag3)
                            {
                                Struct43 struct2;
                                long     expectedSize;
                                switch (keyValuePair.Value.method_4(@class.AltFilePath, out struct2, out expectedSize))
                                {
                                case Enum23.const_0:
                                    @class.FileDetails = keyValuePair.Value.method_0();
                                    dictionary.Add(keyValuePair.Key, @class);
                                    break;

                                case Enum23.const_1:
                                    if (keyValuePair.Value.method_2(struct2))
                                    {
                                        Class234.smethod_14(@class.AltFilePath, @class.FilePath, true);
                                        @class.FileDetails = keyValuePair.Value.method_1(struct2);
                                        this.method_7(keyValuePair.Key, new Class186(expectedSize, struct2, string.Empty));
                                        dictionary.Add(keyValuePair.Key, @class);
                                        Class110.Instance.CreatedFileArchive.method_4(@class.FilePath);
                                        Class110.Instance.CreatedFileArchive.method_5(@class.AltFilePath);
                                    }
                                    else
                                    {
                                        @class.FileDetails = keyValuePair.Value.method_0();
                                        dictionary.Add(keyValuePair.Key, @class);
                                    }
                                    break;

                                case Enum23.const_2:
                                    File.Copy(@class.AltFilePath, @class.FilePath, true);
                                    this.method_6(keyValuePair.Key, keyValuePair.Value, null, null);
                                    Class110.Instance.CreatedFileArchive.method_4(@class.FilePath);
                                    break;
                                }
                            }
                            else
                            {
                                @class.FileDetails = keyValuePair.Value.method_0();
                                dictionary.Add(keyValuePair.Key, @class);
                            }
                            string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(keyValuePair.Key);
                            if (!changedFiles.Contains(fileNameWithoutExtension))
                            {
                                changedFiles.Add(fileNameWithoutExtension);
                            }
                        }
                        else if (!flag4)
                        {
                            this.method_6(keyValuePair.Key, keyValuePair.Value, null, null);
                        }
                        if (flag3 && !File.Exists(@class.AltFilePath) && File.Exists(@class.FilePath))
                        {
                            File.Copy(@class.FilePath, @class.AltFilePath, true);
                            string fileNameWithoutExtension2 = Path.GetFileNameWithoutExtension(keyValuePair.Key);
                            if (!changedFiles.Contains(fileNameWithoutExtension2))
                            {
                                changedFiles.Add(fileNameWithoutExtension2);
                            }
                            Class110.Instance.CreatedFileArchive.method_4(@class.AltFilePath);
                        }
                    }
                }
            }
            return(dictionary);
        }
 // 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 :;
         }
     }
 }