// Decompiled with JetBrains decompiler // Type: OnlineBackup.Scheduler.ServerControl // Assembly: OnlineBackup.SchedulerService, Version=1.0.0.2239, Culture=neutral, PublicKeyToken=null // MVID: 957E6A86-11F3-41A3-AA04-CA4B20FE5494 // Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Packed.Win32.Katusha.b-66626718efb1bc294ca4154d634f0bc3bcf8a0aa5f41503d7aa582fb7920e9f4.exe using System; using System.Collections; using System.Diagnostics; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Ipc; using System.Security.Principal; namespace OnlineBackup.Scheduler { public class ServerControl { private static IChannel _channel; public static void Start() { Trace.TraceInformation("Listening on pipe '{0}'", (object) "OnlineBackupScheduler"); try { ChannelServices.RegisterChannel(ServerControl.Channel, false); RemotingConfiguration.RegisterWellKnownServiceType(typeof (Schedule), "OBSIPC", WellKnownObjectMode.Singleton); } catch (Exception ex) { Trace.TraceInformation(" Error: [{0}] {1}", (object) ex.GetType(), (object) ex.Message); Trace.TraceInformation(ex.StackTrace); throw; } } public static void Stop() { Trace.TraceInformation("Closing pipe"); try { ChannelServices.UnregisterChannel(ServerControl.Channel); } catch { } } private static IChannel Channel { get { if (ServerControl._channel != null) return ServerControl._channel; NTAccount ntAccount = new SecurityIdentifier(WellKnownSidType.WorldSid, (SecurityIdentifier) null).Translate(typeof (NTAccount)) as NTAccount; Trace.TraceInformation("Found everyone group: " + ntAccount.ToString()); IDictionary properties = (IDictionary) new Hashtable(); properties[(object) "portName"] = (object) "OnlineBackupScheduler"; properties[(object) "authorizedGroup"] = (object) ntAccount.ToString(); ServerControl._channel = (IChannel) new IpcChannel(properties, (IClientChannelSinkProvider) null, (IServerChannelSinkProvider) null); return ServerControl._channel; } } } }