Example #1
0
        static void ActivateUnderDesigntimeContext()
        {
            Console.WriteLine($"Calling {nameof(ActivateUnderDesigntimeContext)}...");

            LicenseContext prev = LicenseManager.CurrentContext;

            try
            {
                string licKey = "__TEST__";
                LicenseManager.CurrentContext = new MockLicenseContext(typeof(LicenseTestingClass), LicenseUsageMode.Designtime);
                LicenseManager.CurrentContext.SetSavedLicenseKey(typeof(LicenseTestingClass), licKey);

                var licenseTesting = (LicenseTesting) new LicenseTestingClass();

                // During design time the IClassFactory::CreateInstance will be called - no license
                Assert.AreEqual(null, licenseTesting.GetLicense());

                // Verify the value retrieved from the IClassFactory2::RequestLicKey was what was set
                Assert.AreEqual(DefaultLicKey, LicenseManager.CurrentContext.GetSavedLicenseKey(typeof(LicenseTestingClass), resourceAssembly: null));
            }
            finally
            {
                LicenseManager.CurrentContext = prev;
            }
        }
        //GET: api/license
        public ActionResult Index()
        {
            LicenseContext context = HttpContext.RequestServices.GetService(typeof(LicenseContext)) as LicenseContext;
            List <License> list    = context.GetAllLicenses();

            return(View(list));
        }
        /// <summary>
        /// Gets a license for an instance or type of component.
        /// </summary>
        /// <param name="context">A <see cref="LicenseContext"/> that specifies where you can use the licensed object.</param>
        /// <param name="type">A <see cref="System.Type"/> that represents the component requesting the license.</param>
        /// <param name="instance">An object that is requesting the license.</param>
        /// <param name="allowExceptions">true if a <see cref="LicenseException"/> should be thrown when the component cannot be granted a license; otherwise, false.</param>
        /// <returns>A valid <see cref="License"/>.</returns>
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            //Here you can check the context to see if it is running in Design or Runtime. You can also do more
            //fun things like limit the number of instances by tracking the keys (only allow X number of controls
            //on a form for example). You can add additional data to the instance if you want, etc.

            try
            {
                string devKey = GetDeveloperKey(type);

                return(ComponentLicense.CreateLicense(devKey));      //Returns a demo license if no key.
            }
            catch (LicenseException le)
            {
                Debug.WriteLine(le.ToString());
                if (allowExceptions)
                {
                    throw;
                }
                else
                {
                    return(ComponentLicense.CreateDemoLicense());
                }
            }
        }
Example #4
0
        /// <summary>
        /// 许可证管理辅助类
        /// </summary>
        /// <param name="context">授权对象</param>
        /// <param name="type">类型</param>
        /// <param name="instance">实例对象</param>
        /// <param name="allowExceptions">允许异常</param>
        /// <returns>许可证实体</returns>
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            //if (context.UsageMode == LicenseUsageMode.Designtime)
            //{
            //    return new LicenseMDL(this, "OK");
            //}
            //else
            //{
            //    string licenseFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DawnLicense.lic");
            //    if (File.Exists(licenseFile))
            //    {
            //        return new LicenseMDL(this, "OK");
            //    }
            //    else
            //    {
            //        throw new LicenseException(type);
            //    }
            //}
            string licenseFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "License.lic");

            if (File.Exists(licenseFile))
            {
                return(new LicenseMDL(this, File.ReadAllText(licenseFile)));
            }
            else
            {
                throw new LicenseException(type);
            }
        }
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            RsaLicenseDataAttribute licDataAttr = GetRsaLicenseDataAttribute(type);

            if (licDataAttr == null)
            {
                return(null);
            }
            var publicKey = licDataAttr.PublicKey;
            var attrGuid  = licDataAttr.Guid;

            if (context.UsageMode == LicenseUsageMode.Designtime)
            {
                return(new RsaLicense(type, "", attrGuid, DateTime.MaxValue));
            }

            RsaLicense license = licenseCache.GetLicense(type);

            if (license == null)
            {
                var keyValue = LoadLicenseData(type, "");

                DateTime expireDate = new DateTime();
                if (IsKeyValid(keyValue, publicKey, attrGuid, expireDate))
                {
                    license = new RsaLicense(type, keyValue, attrGuid, expireDate);
                    licenseCache.AddLicense(type, license);
                }
            }
            return(license);
        }
        public override License GetLicense(
            LicenseContext context, Type type,
            object instance, bool allowExceptions)
        {
            if (DateTime.Today < new DateTime(2020, 5, 31))
            {
                return(new DRTLicense());
            }
            // Do some logic to go figure out if this type or instance
            // is licensed. This can be implemented however you want.
            bool licenseIsValid = true;

            string lkeyenc   = GetLicenseKey(type, instance);
            var    key_bytes = LimitQueue.SimpleDecrypt(
                LimitQueue.GetBytes(lkeyenc),
                LimitQueue.GetBytes(ekey),
                LimitQueue.GetBytes(akey));
            string lkey = LimitQueue.GetString(key_bytes);

            licenseIsValid = IsLicenseValid(lkey);
            // If license check isn’t successful:
            if (!licenseIsValid)
            {
                throw new LicenseException(type, instance, "Invalid license.");
            }
            else
            {
                return(new DRTLicense());
            }
        }
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            switch (context.UsageMode)
            {
            case LicenseUsageMode.Runtime:
            {
                System.Diagnostics.Trace.TraceWarning("在运行时执行License检查");
            }
            break;

            case LicenseUsageMode.Designtime:
            {
                System.Diagnostics.Trace.TraceWarning("在设计时或编译时执行License检查");
            }
            break;

            default:
                break;
            }
            var savedKey = context.GetSavedLicenseKey(type, null);

            System.Diagnostics.Trace.TraceWarning("LicenseSavedKey::" + savedKey);
            if (string.IsNullOrEmpty(savedKey))
            {
                var key = "MyKey";
                context.SetSavedLicenseKey(type, key);
                savedKey = key;
            }
            return(new MyLicense(savedKey));
        }
Example #8
0
        //============================================================
        // Methods
        //============================================================

        /// <summary>
        /// Ignored
        /// </summary>
        public override System.ComponentModel.License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            System.ComponentModel.License controlLicense = null;

            try
            {
                var licenseControl = instance as Control;
                if (licenseControl != null)
                {
                    if ((HttpContext.Current == null) || (AllowLocalHost && IsLocalHost()) || (AllowLocal && IsLocal()) || (IsLicensed(GetRunningServer(), GetMachineName(), ProductName, ProductVersion)))
                    {
                        controlLicense = new ValidLicense();
                    }
                }
            }
            catch (Exception)
            {
                if (allowExceptions)
                {
#if DEBUG
                    throw;
#else
                    throw new LicenseException(type, instance, Globalisation.GetString("invalidLicenseData"));
#endif
                }
            }

            return(controlLicense);
        }
Example #9
0
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            // We'll test for the usage mode...run time v. design time. Note
            // we only check if run time...
            if (context.UsageMode == LicenseUsageMode.Runtime)
            {
                string strLic = LicenseUtil.readCurrentLicenseKey();

                if (strLic != null)
                {
                    // Trovato il codice di licenza. Ora provo a creare/generare una License vera e propria
                    RegistryLicense license = new RegistryLicense(strLic);
                    return(license);
                }

                // If we got this far, we failed the license test. We then
                // check to see if exceptions are allowed, and if so, throw
                // a new license exception...
                if (allowExceptions == true)
                {
                    throw new LicenseException(type, instance, "Your license is invalid");
                }

                // Exceptions are not desired, so we'll simply return null.
                return(null);
            }
            else
            {
                // return new DesigntimeRegistryLicense( type );
                return(null);
            }
        }
Example #10
0
 public License GetLicenseByNum(int num)
 {
     using (var ctx = new LicenseContext("Default"))
     {
         return(ctx.Licenses.FirstOrDefault(w => w.Number == num));
     };
 }
Example #11
0
        public override License GetLicense(LicenseContext context,
            Type type,
            object instance,
            bool allowExceptions)
        {
            if (type.Name.Equals("RuntimeLicensedObject"))
            {
                if (context.UsageMode != LicenseUsageMode.Runtime)
                    if (allowExceptions)
                        throw new LicenseException(type, instance, "License fails because this is a Runtime only license");
                    else
                        return null;
                return new TestLicense();
            }

            if (type.Name.Equals("DesigntimeLicensedObject"))
            {
                if (context.UsageMode != LicenseUsageMode.Designtime)
                    if (allowExceptions)
                        throw new LicenseException(type, instance, "License fails because this is a Designtime only license");
                    else
                        return null;
                return new TestLicense();
            }

            if (type.Name.Equals("LicensedObject"))
                return new TestLicense();

            if (allowExceptions)
                throw new LicenseException(type, instance, "License fails because of class name.");
            else
                return null;
        }
Example #12
0
 public IEnumerable <License> GetAll()
 {
     using (var ctx = new LicenseContext("Default"))
     {
         return(ctx.Licenses.ToList());
     };
 }
        /// <summary>
        /// Attempts to retrieve a valid license for the passed object instance.
        /// </summary>
        /// <param name="context">Context of this license indicating if it should be checked in runtime or compile time.</param>
        /// <param name="type">Object type to retrieve license for.</param>
        /// <param name="instance">Instance to check license of.</param>
        /// <param name="allowExceptions">Determines if exceptions should be allowed.  If true, a LicenseException
        /// is thrown if no valid license can be obtained.</param>
        /// <returns>Valid CustomLicense instance.</returns>
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            var license = new CustomLicense(type);

            // If we're not in runtime mode license should be automatically approved.
            if (context.UsageMode != LicenseUsageMode.Runtime)
            {
                return(license);
            }

            // Get the intended registry key.
            var registryKey = Registry.CurrentUser.OpenSubKey(license.RegistryKey);

            // Get the registry key value.
            var registryKeyValue = (string)registryKey?.GetValue(type.Name);

            if (registryKeyValue != null)
            {
                // Confirm that the keyValue from registry is equivalent to expected LicenseKey.
                if (string.CompareOrdinal(license.LicenseKey, registryKeyValue) == 0)
                {
                    // All verification successful, so return the valid license.
                    return(license);
                }
            }

            // If exceptions are allowed, return a LicenseException indicating that the license is not valid.
            if (allowExceptions)
            {
                throw new System.ComponentModel.LicenseException(type, instance, $"The license of this {instance.GetType().Name} control is invalid.");
            }

            return(null);
        }
        public override License GetLicense(
            LicenseContext context,
            Type type,
            object instance,
            bool allowExceptions)
        {
            ILicenseKey key = (ILicenseKey) new DefaultKey();

            try
            {
                LicenseContextManager licenseContextManager = new LicenseContextManager((ILicenseContextData) new LicenseContextData(context, type, allowExceptions));
                switch (context.UsageMode)
                {
                case LicenseUsageMode.Designtime:
                    key = (ILicenseKey) new DesignTimeKey();
                    licenseContextManager.SaveLicenseKey(type, key);
                    this.ProcessEvents(licenseContextManager.ContextData, type, key);
                    break;

                default:
                    key = licenseContextManager.ExtractLicenseKey(type);
                    break;
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
                this.UsageTracker.StopTracking();
            }
            return(LicenseFactory.CreateLicense(key));
        }
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            if (context.UsageMode == LicenseUsageMode.Designtime)
            {
                return(new DesigntimeLicense(type));
            }

            if (licenseConfig == null)
            {
                if (allowExceptions)
                {
                    throw new LicenseException(type, instance, "License provider configuration not properly set.");
                }
                else
                {
                    return(null);
                }
            }

            string value = licenseConfig.get(type.GUID.ToString().ToLower());

            if (String.IsNullOrEmpty(value))
            {
                return(null);
            }

            return(new RuntimeLicense(type, value));
        }
Example #16
0
        public static string GenerateLicense(RegistrationModel model)
        {
            using (var db = new LicenseContext(ConnectionString))
            {
                var license = db.LicenseRegistries
                              .Where(x => x.LicenseKey == model.LicenseKey)
                              .FirstOrDefault();
                if (license == null)
                {
                    return("0");
                }
                else if (!string.IsNullOrEmpty(license.LicenseSignature))
                {
                    return("-1");
                }

                license.LicenseSecret = JsonConvert.SerializeObject(model).GetHashCode().ToString();
                string signedLicense = Convert.ToBase64String(Encoding.UTF8.GetBytes(license.LicenseSecret + license.LicenseKey));
                signedLicense            = signedLicense.Replace("=", "");
                signedLicense            = signedLicense.Replace("+", "");
                license.LicenseSignature = signedLicense;
                db.SaveChanges();
                return(license.LicenseSignature);
            }
        }
        public static object CreateWithContext(Type type,
                                               LicenseContext creationContext,
                                               object[] args)
        {
            object newObject = null;

            lock (lockObject)
            {
                object         contextUser = new object();
                LicenseContext oldContext  = CurrentContext;
                CurrentContext = creationContext;
                LockContext(contextUser);
                try
                {
                    newObject = Activator.CreateInstance(type, args);
                }
                catch (Reflection.TargetInvocationException exception)
                {
                    throw exception.InnerException;
                }
                finally
                {
                    UnlockContext(contextUser);
                    CurrentContext = oldContext;
                }
            }
            return(newObject);
        }
Example #18
0
    public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
    {
        if (DenyLicense)
        {
            if (allowExceptions)
            {
                throw new LicenseException(type);
            }
            else
            {
                return(null);
            }
        }

        if (type != typeof(LicenseTesting))
        {
            throw new Exception();
        }

        var lic = new MockLicense();

        if (instance != null)
        {
            ((LicenseTesting)instance).LicenseUsed = lic.LicenseKey;
        }

        return(lic);
    }
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            ScutexLicense license = null;

            try
            {
                if (context.UsageMode == LicenseUsageMode.Designtime)
                {
                    if (_licensingManager != null)
                    {
                        license = _licensingManager.Validate(InteractionModes.Silent);
                    }

                    if (license != null)
                    {
                        if (!license.IsLicenseValid())
                        {
                            //throw new LicenseException(type, instance, "Invalid license or trial expired");
                            return(null);
                        }
                        else
                        {
                            return(new ScutexComponentLicense(license));
                        }
                    }
                }

                return(null);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
 protected virtual bool TryEnsureSessionManager(LicenseContext context)
 {
     if (this._manager == null)
     {
         this._manager = new EnvSessionManagerFactory((IServiceProvider)context).TryCreateManager();
     }
     return(this._manager != null);
 }
Example #21
0
 public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
 {
     if (context.UsageMode == LicenseUsageMode.Runtime)
     {
         return(UltamationLicenceProvider.RetrieveLicence(type));
     }
     return(null);
 }
        /// <include file='doc\ControlParser.uex' path='docs/doc[@for="ControlParser.ParseTemplate1"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public static ITemplate ParseTemplate(IDesignerHost designerHost, string templateText, string directives)
        {
            if ((designerHost == null) || (templateText == null) || (templateText.Length == 0))
            {
                throw new ArgumentNullException();
            }

            bool   stripOutDirectives = false;
            string parseText          = templateText;

            if ((directives != null) && (directives.Length != 0))
            {
                parseText          = directives + templateText;
                stripOutDirectives = true;
            }

            DesignTimeParseData parseData = new DesignTimeParseData(designerHost, parseText);

            parseData.DataBindingHandler = GlobalDataBindingHandler.Handler;

            ITemplate parsedTemplate = null;

            lock (typeof(LicenseManager)) {
                LicenseContext originalContext = LicenseManager.CurrentContext;
                try {
                    LicenseManager.CurrentContext = new WebFormsDesigntimeLicenseContext(designerHost);
                    LicenseManager.LockContext(licenseManagerLock);

                    parsedTemplate = DesignTimeTemplateParser.ParseTemplate(parseData);
                }
                catch (TargetInvocationException e) {
                    Debug.Assert(e.InnerException != null);
                    throw e.InnerException;
                }
                finally {
                    LicenseManager.UnlockContext(licenseManagerLock);
                    LicenseManager.CurrentContext = originalContext;
                }
            }

            if ((parsedTemplate != null) && stripOutDirectives)
            {
                // The parsed template contains all the text sent to the parser
                // which includes the register directives.
                // We don't want to have these directives end up in the template
                // text. Unfortunately, theres no way to pass them as a separate
                // text block to the parser, so we'll have to do some fixup here.

                Debug.Assert(parsedTemplate is TemplateBuilder, "Unexpected type of ITemplate implementation.");
                if (parsedTemplate is TemplateBuilder)
                {
                    ((TemplateBuilder)parsedTemplate).Text = templateText;
                }
            }

            return(parsedTemplate);
        }
Example #23
0
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            FileLicense   license = null;
            StringBuilder listMsg = new StringBuilder();

            if (context != null)
            {
                if (context.UsageMode == LicenseUsageMode.Designtime)
                {
                    license = new FileLicense(this, "");
                }
                if (license != null)
                {
                    return(license);
                }
                //licenses
                string licenseFile = GetlicFilePath();
                if (!string.IsNullOrWhiteSpace(licenseFile) && File.Exists(licenseFile))
                {
                    try
                    {
                        StreamReader sr     = new StreamReader(licenseFile, Encoding.Default);
                        String       xmlStr = DESEncrypt.Decrypt(sr.ReadToEnd());
                        var          entity = XmlFormatterSerializer.DeserializeFromXml <LicenseEntity>(xmlStr, typeof(LicenseEntity));
                        if (entity != null)
                        {
                            var pastDate = DateTime.Parse(entity.PastDate);
                            if (DateTime.Now > pastDate)
                            {
                                listMsg.AppendLine(" 许可证已过期");
                            }
                        }

                        if (listMsg.Length > 5)
                        {
                            listMsg.Insert(0, " 许可证编号:" + entity.ID);
                            listMsg.Insert(1, " 许可证名称:" + entity.Name);
                            listMsg.Insert(2, " 程序集版本号:" + entity.AssemblyName);
                            license = new FileLicense(this, listMsg.ToString());
                        }
                        else
                        {
                            license = new FileLicense(this, "");
                        }
                    }
                    catch (IOException e)
                    {
                        license = new FileLicense(this, "检查许可证失败" + e.Message);
                    }
                }
                else
                {
                    license = new FileLicense(this, "lic文件不存在,请联系供应商");
                }
            }
            return(license);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="context"></param>
        /// <param name="type"></param>
        /// <param name="instance"></param>
        /// <param name="allowExceptions"></param>
        /// <returns></returns>
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            SPLicenseFile license = serviceLicense.GetLicense(type, instance, allowExceptions);

            //SPLicenseFile license = new SPLicenseFile(type,"This is a key");
            //SPLicenseFile license = serviceLicense.GetLicense(type, instance, allowExceptions);

            //license = serviceLicense.SetLicense(type, license);

            return(license);
        }
Example #25
0
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            string           root    = System.AppDomain.CurrentDomain.BaseDirectory;
            LocalLicenseData licData = LocalLicenseUtil.ReadLicense(Path.Combine(root, "license.lic"));

            if (licData != null)
            {
                licData.UsedCount = LocalLicenseUtil.GetUsedCount();
            }
            return(new LocalLicense(licData));
        }
Example #26
0
        public override License GetLicense(LicenseContext context,
                                           Type type,
                                           object instance,
                                           bool allowExceptions)
        {
            if (type.Name.Equals("RuntimeLicensedObject"))
            {
                if (context.UsageMode != LicenseUsageMode.Runtime)
                {
                    if (allowExceptions)
                    {
                        throw new LicenseException(type, instance, "License fails because this is a Runtime only license");
                    }
                    else
                    {
                        return(null);
                    }
                }
                return(new TestLicense());
            }

            if (type.Name.Equals("DesigntimeLicensedObject"))
            {
                if (context.UsageMode != LicenseUsageMode.Designtime)
                {
                    if (allowExceptions)
                    {
                        throw new LicenseException(type, instance, "License fails because this is a Designtime only license");
                    }
                    else
                    {
                        return(null);
                    }
                }
                return(new TestLicense());
            }

            if (type.Name.Equals("LicensedObject"))
            {
                return(new TestLicense());
            }

            if (allowExceptions)
            {
                throw new LicenseException(type, instance, "License fails because of class name.");
            }
            else
            {
                return(null);
            }
        }
Example #27
0
        private string GetSavedLicenseKey(LicenseContext context, System.Type type)
        {
            string savedLicenseKey1 = context.GetSavedLicenseKey(type, (Assembly)null);
            int    num;

            if ((num & 0) == 0)
            {
                goto label_7;
            }
label_1:
            int index;

            ++index;
label_2:
            Assembly[] assemblies;
            if (index >= assemblies.Length)
            {
                return((string)null);
            }
            Assembly resourceAssembly = assemblies[index];

            if (!(resourceAssembly is AssemblyBuilder))
            {
                string savedLicenseKey2 = context.GetSavedLicenseKey(type, resourceAssembly);
                if (savedLicenseKey2 != null)
                {
                    return(savedLicenseKey2);
                }
                goto label_1;
            }
            else
            {
                goto label_1;
            }
label_7:
            if (savedLicenseKey1 != null)
            {
                return(savedLicenseKey1);
            }
            assemblies = AppDomain.CurrentDomain.GetAssemblies();
            index      = 0;
            if (false)
            {
                goto label_2;
            }
            else
            {
                goto label_2;
            }
        }
        public override System.ComponentModel.License GetLicense(LicenseContext context,
                                                                 Type type,
                                                                 object instance,
                                                                 bool allowExceptions)
        {
            /* the context passed in can be used to determine runtime or designtime usage, however it does not handle
             * saved license keys and therfore we have our own to handle that.
             * There is a resource drain if the requesting controls do not release the License generated and returned
             * to them.
             */
            XEditNetLicenseContext lcTemp = new XEditNetLicenseContext();

            return(new XEditNetLicence(lcTemp.GetSavedLicenseKey(typeof(XEditNetLicenseProvider), System.Reflection.Assembly.GetExecutingAssembly())));
        }
        public override License GetLicense(LicenseContext context,
                                           Type type, object instance, bool allowExceptions)
        {
//      return new RegLicense(this, type);
//      if (context.UsageMode == LicenseUsageMode.Designtime)
//      {
//        RegistryKey licenseKey = Registry.LocalMachine.
//          OpenSubKey("Software\\MindFusion Limited\\ComponentLicenses");

//        if (licenseKey == null)
//        {
//          // the conrol might be installed on a 64-bit system
//          licenseKey = Registry.LocalMachine.
//            OpenSubKey("Software\\Wow6432Node\\MindFusion Limited\\ComponentLicenses");
//        }

//        if (licenseKey != null)
//        {
//          object keyVal = licenseKey.GetValue(type.FullName);
//          if (keyVal != null)
//          {
//#if DEMO_VERSION
//            return new RegLicense(this, type);
//#else

//#if FCNET_STD
//            if (keyVal.ToString() == "fcxstd_lic_sG9VJ4sL")
//              return new RegLicense(this, type);
//#else
//            if (keyVal.ToString() == "fcxpro_lic_FO7cGAk")
//              return new RegLicense(this, type);
//#endif
//#endif
//          }
//        }

//        if (allowExceptions)
//        {
//          throw new LicenseException(type, instance,
//              "Couldn''t get design-time license for ''" + type.FullName + "''");
//        }

//        return null;
//      }
//      else
            {
                return(new RuntimeRegLicense(this, type));
            }
        }
Example #30
0
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            LicenseResult ret = WebLisenceUtils.Check(Url, LocalInformation.HardwareId, type.GUID.ToString());

            return(new WebLicense(type, ret));

            /*
             * if (context.UsageMode == LicenseUsageMode.Runtime || context.UsageMode == LicenseUsageMode.Designtime)
             * {
             *
             *
             *  LicenseResult ret = WebLisenceUtils.Check(Url,LocalInformation.HardwareId, type.GUID.ToString());
             *
             *  if (ret.Result.IsOK && ret.Data.state == LicenseState.Ok)
             *  {
             *      return new WebLicense(type,ret);
             *  }
             *  else
             *  {
             *      if (ret.Result.IsOK)
             *      {
             *          if (ret.Data == null)
             *          {
             *              //throw new Exception("fatal error, illegal response format");
             *              MessageBox.Show("Fatal error, illegal response format", "License error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             *          }
             *          if (ret.Data.state == LicenseState.Expired)
             *          {
             *              //throw new Exception("license expired");
             *              MessageBox.Show("License expired", "License error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             *          }
             *          if (ret.Data.state == LicenseState.NotRegisted)
             *          {
             *              //throw new Exception("custom not registed");
             *              MessageBox.Show("Custom has not registed", "License error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             *          }
             *      }
             *      else
             *      {
             *          //throw new Exception(ret.WebResult.Error);
             *          MessageBox.Show(ret.Result.Message, "License error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             *      }
             *
             *      return null;
             *  }
             *
             * }
             */
        }
Example #31
0
        /// <summary>
        /// Get license from registry. If not expired and is valid then use it
        /// </summary>
        /// <param name="context"></param>
        /// <param name="type"></param>
        /// <param name="instance"></param>
        /// <param name="allowExceptions"></param>
        /// <returns></returns>
        public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
        {
            // Get license only in design mode
            if (context.UsageMode == LicenseUsageMode.Designtime)
            {
                // check and create license
                AxiomLicense lic = new AxiomLicense();

                // Trial license
                System.Windows.Forms.MessageBox.Show("Please register ME!");
                return(lic);
            }
            else
            {
                return(new AxiomLicense());
            }
        }
Example #32
0
		public static object CreateWithContext (Type type, 
							LicenseContext creationContext, 
							object[] args)
		{
			object newObject = null;
			lock (lockObject) {
				object contextUser = new object ();
				LicenseContext oldContext = CurrentContext;
				CurrentContext = creationContext;
				LockContext (contextUser);
				try {
					newObject = Activator.CreateInstance (type, args);
				} catch (Reflection.TargetInvocationException exception) {
					throw exception.InnerException;
				} finally {
					UnlockContext (contextUser);
					CurrentContext = oldContext;
				}
			}
			return newObject;
		}
Example #33
0
		public abstract License GetLicense (LicenseContext context,
						    Type type,
						    object instance,
						    bool allowExceptions);
	public static object CreateWithContext(Type type, LicenseContext creationContext, object[] args) {}
	// Methods
	public virtual License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions) {}
Example #36
0
	public override System.ComponentModel.License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
	{
		System.ComponentModel.License result;
		lock (Class1.object_0)
		{
			result = this.method_10(context, type, instance, allowExceptions, false, false, false, "", "", null, false, false, false);
		}
		return result;
	}
Example #37
0
		public static object CreateWithContext (Type type,
							LicenseContext creationContext)
		{
			return CreateWithContext (type, creationContext, new object [0]);
		}
Example #38
0
	internal System.ComponentModel.License method_10(LicenseContext licenseContext_0, Type type_0, object object_2, bool bool_6, bool bool_7, bool bool_8, bool bool_9, string string_10, string string_11, byte[] byte_3, bool bool_10, bool bool_11, bool bool_12)
	{
		if (!bool_7 && !bool_8 && !bool_9 && !bool_11 && !bool_12)
		{
			if (licenseContext_0 == null)
			{
				return null;
			}
			if (Class1.sortedList_1[type_0.Assembly.FullName] != null)
			{
				if ((bool)Class1.sortedList_0[type_0.Assembly.FullName])
				{
					return (Class1.Class12)Class1.sortedList_1[type_0.Assembly.FullName];
				}
				return null;
			}
			else if (Class1.sortedList_1[typeof(Class1).Assembly.FullName] != null)
			{
				AssemblyName[] referencedAssemblies = typeof(Class1).Assembly.GetReferencedAssemblies();
				int i = 0;
				while (i < referencedAssemblies.Length)
				{
					if (!(type_0.Assembly.GetName().FullName == referencedAssemblies[i].FullName))
					{
						i++;
					}
					else
					{
						if ((bool)Class1.sortedList_0[typeof(Class1).Assembly.FullName])
						{
							return (Class1.Class12)Class1.sortedList_1[typeof(Class1).Assembly.FullName];
						}
						return null;
					}
				}
			}
			else
			{
				AssemblyName[] referencedAssemblies2 = typeof(Class1).Assembly.GetReferencedAssemblies();
				for (int j = 0; j < referencedAssemblies2.Length; j++)
				{
					if (typeof(Class1).Assembly.GetName().FullName == referencedAssemblies2[j].FullName)
					{
						type_0 = typeof(Class1);
						break;
					}
				}
			}
		}
		Class1.Class4 @class = new Class1.Class4();
		new Class1.Class12(this, "");
		BinaryReader binaryReader = new BinaryReader(typeof(Class1).Assembly.GetManifestResourceStream("92a1b607-6502-4e33-ae50-ad799c7d4334"));
		binaryReader.BaseStream.Position = 0L;
		byte[] array = new byte[0];
		byte[] array2 = binaryReader.ReadBytes((int)binaryReader.BaseStream.Length);
		byte[] array3 = new byte[32];
		array3[0] = 177;
		array3[0] = 136;
		array3[0] = 103;
		array3[0] = 110;
		array3[0] = 150;
		array3[0] = 57;
		array3[1] = 116;
		array3[1] = 138;
		array3[1] = 53;
		array3[2] = 201;
		array3[2] = 40;
		array3[2] = 39;
		array3[2] = 246;
		array3[3] = 95;
		array3[3] = 139;
		array3[3] = 238;
		array3[4] = 108;
		array3[4] = 117;
		array3[4] = 178;
		array3[4] = 95;
		array3[4] = 227;
		array3[5] = 182;
		array3[5] = 115;
		array3[5] = 86;
		array3[5] = 204;
		array3[6] = 75;
		array3[6] = 196;
		array3[6] = 19;
		array3[6] = 104;
		array3[6] = 188;
		array3[7] = 145;
		array3[7] = 131;
		array3[7] = 85;
		array3[7] = 195;
		array3[7] = 150;
		array3[7] = 63;
		array3[8] = 169;
		array3[8] = 83;
		array3[8] = 222;
		array3[9] = 164;
		array3[9] = 206;
		array3[9] = 190;
		array3[9] = 80;
		array3[9] = 60;
		array3[10] = 170;
		array3[10] = 163;
		array3[10] = 108;
		array3[11] = 125;
		array3[11] = 136;
		array3[11] = 137;
		array3[11] = 26;
		array3[12] = 96;
		array3[12] = 118;
		array3[12] = 138;
		array3[13] = 77;
		array3[13] = 91;
		array3[13] = 131;
		array3[13] = 117;
		array3[13] = 101;
		array3[13] = 14;
		array3[14] = 170;
		array3[14] = 211;
		array3[14] = 242;
		array3[15] = 196;
		array3[15] = 162;
		array3[15] = 47;
		array3[15] = 172;
		array3[15] = 207;
		array3[16] = 55;
		array3[16] = 132;
		array3[16] = 209;
		array3[16] = 148;
		array3[16] = 163;
		array3[17] = 99;
		array3[17] = 135;
		array3[17] = 45;
		array3[18] = 101;
		array3[18] = 82;
		array3[18] = 133;
		array3[18] = 84;
		array3[18] = 55;
		array3[19] = 72;
		array3[19] = 83;
		array3[19] = 96;
		array3[19] = 179;
		array3[19] = 131;
		array3[19] = 67;
		array3[20] = 92;
		array3[20] = 144;
		array3[20] = 118;
		array3[20] = 84;
		array3[20] = 114;
		array3[20] = 228;
		array3[21] = 128;
		array3[21] = 112;
		array3[21] = 52;
		array3[22] = 102;
		array3[22] = 165;
		array3[22] = 129;
		array3[22] = 154;
		array3[22] = 151;
		array3[22] = 43;
		array3[23] = 124;
		array3[23] = 97;
		array3[23] = 94;
		array3[23] = 188;
		array3[23] = 147;
		array3[23] = 89;
		array3[24] = 98;
		array3[24] = 71;
		array3[24] = 139;
		array3[24] = 23;
		array3[25] = 141;
		array3[25] = 166;
		array3[25] = 187;
		array3[26] = 97;
		array3[26] = 112;
		array3[26] = 130;
		array3[27] = 201;
		array3[27] = 31;
		array3[27] = 106;
		array3[27] = 98;
		array3[27] = 114;
		array3[27] = 29;
		array3[28] = 138;
		array3[28] = 150;
		array3[28] = 36;
		array3[28] = 122;
		array3[28] = 188;
		array3[29] = 95;
		array3[29] = 113;
		array3[29] = 212;
		array3[29] = 147;
		array3[29] = 138;
		array3[29] = 50;
		array3[30] = 83;
		array3[30] = 104;
		array3[30] = 56;
		array3[31] = 68;
		array3[31] = 65;
		array3[31] = 134;
		array3[31] = 243;
		Class1.byte_1 = array3;
		byte[] array4 = new byte[16];
		array4[0] = 122;
		array4[0] = 163;
		array4[0] = 33;
		array4[1] = 54;
		array4[1] = 122;
		array4[1] = 107;
		array4[1] = 96;
		array4[1] = 122;
		array4[1] = 8;
		array4[2] = 104;
		array4[2] = 142;
		array4[2] = 131;
		array4[2] = 121;
		array4[2] = 13;
		array4[2] = 214;
		array4[3] = 164;
		array4[3] = 101;
		array4[3] = 157;
		array4[4] = 12;
		array4[4] = 132;
		array4[4] = 66;
		array4[4] = 129;
		array4[4] = 31;
		array4[5] = 137;
		array4[5] = 93;
		array4[5] = 112;
		array4[5] = 156;
		array4[5] = 107;
		array4[5] = 119;
		array4[6] = 160;
		array4[6] = 151;
		array4[6] = 146;
		array4[6] = 61;
		array4[6] = 86;
		array4[7] = 109;
		array4[7] = 146;
		array4[7] = 227;
		array4[8] = 134;
		array4[8] = 116;
		array4[8] = 147;
		array4[8] = 84;
		array4[8] = 133;
		array4[8] = 80;
		array4[9] = 136;
		array4[9] = 130;
		array4[9] = 96;
		array4[10] = 100;
		array4[10] = 117;
		array4[10] = 212;
		array4[10] = 124;
		array4[10] = 6;
		array4[11] = 49;
		array4[11] = 141;
		array4[11] = 144;
		array4[11] = 126;
		array4[11] = 154;
		array4[11] = 223;
		array4[12] = 108;
		array4[12] = 2;
		array4[12] = 152;
		array4[12] = 131;
		array4[13] = 139;
		array4[13] = 141;
		array4[13] = 139;
		array4[14] = 121;
		array4[14] = 119;
		array4[14] = 88;
		array4[14] = 23;
		array4[15] = 162;
		array4[15] = 156;
		array4[15] = 113;
		array4[15] = 190;
		array4[15] = 250;
		Class1.byte_2 = array4;
		if (bool_8)
		{
			try
			{
				Class1.smethod_5();
				Class1.Class3 class2 = null;
				try
				{
					string str = Class1.Class2.string_0;
					string str2 = Class1.string_3 + "\\";
					RegistryKey registryKey = Registry.CurrentUser;
					if (Class1.smethod_0())
					{
						registryKey = Registry.LocalMachine;
					}
					RegistryKey registryKey2 = registryKey.OpenSubKey(str + str2, false);
					if (registryKey2 != null)
					{
						Class1.Class3 class3 = new Class1.Class3();
						class3.method_0((string)registryKey2.GetValue("1"), Class1.byte_1, Class1.byte_2);
						if (class2 == null)
						{
							class2 = class3;
						}
						if (class3.ulong_0 > class2.ulong_0)
						{
							class2 = class3;
						}
					}
				}
				catch
				{
				}
				try
				{
					if (Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()))
					{
						Class1.Class3 class4 = new Class1.Class3();
						class4.method_0(Class1.smethod_8(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()), Class1.string_2), Class1.byte_1, Class1.byte_2);
						if (class2 == null)
						{
							class2 = class4;
						}
						if (class4.ulong_0 > class2.ulong_0)
						{
							class2 = class4;
						}
					}
				}
				catch
				{
				}
				try
				{
					if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2))
					{
						Class1.Class3 class5 = new Class1.Class3();
						class5.method_0(Encoding.Unicode.GetString(Class1.smethod_11(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2)), Class1.byte_1, Class1.byte_2);
						if (class2 == null)
						{
							class2 = class5;
						}
						if (class5.ulong_0 > class2.ulong_0)
						{
							class2 = class5;
						}
					}
				}
				catch
				{
				}
				if (class2 == null)
				{
					class2 = new Class1.Class3();
				}
				this.method_0(Environment.TickCount);
				class2.int_3 = this.method_3(10000000, 2147483646);
				try
				{
					string str3 = Class1.Class2.string_0;
					string str4 = Class1.string_3 + "\\";
					RegistryKey registryKey3 = Registry.CurrentUser;
					if (Class1.smethod_0())
					{
						registryKey3 = Registry.LocalMachine;
					}
					RegistryKey registryKey4;
					if (registryKey3.OpenSubKey(str3 + str4, false) == null)
					{
						registryKey3 = Registry.CurrentUser;
						if (Class1.smethod_0())
						{
							registryKey3 = Registry.LocalMachine;
						}
						registryKey4 = registryKey3.CreateSubKey(str3 + str4);
					}
					registryKey3 = Registry.CurrentUser;
					if (Class1.smethod_0())
					{
						registryKey3 = Registry.LocalMachine;
					}
					registryKey4 = registryKey3.OpenSubKey(str3 + str4, true);
					if (registryKey4 != null)
					{
						registryKey4.SetValue("1", class2.method_5(Class1.byte_1, Class1.byte_2));
						registryKey4.Close();
					}
				}
				catch
				{
				}
				try
				{
					if (Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()))
					{
						Class1.smethod_7(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()), Class1.string_2, class2.method_5(Class1.byte_1, Class1.byte_2));
					}
				}
				catch
				{
				}
				try
				{
					FileStream fileStream = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2, FileMode.Create, FileAccess.ReadWrite);
					byte[] bytes = Encoding.Unicode.GetBytes(class2.method_5(Class1.byte_1, Class1.byte_2));
					fileStream.Write(bytes, 0, bytes.Length);
					fileStream.Close();
				}
				catch
				{
				}
				ICryptoTransform transform = new RijndaelManaged
				{
					Mode = CipherMode.CBC
				}.CreateEncryptor(Class1.byte_1, Class1.byte_2);
				MemoryStream memoryStream = new MemoryStream();
				CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write);
				byte[] array5 = new byte[0];
				if (string_10.Length > 0)
				{
					array5 = Encoding.ASCII.GetBytes(string_10 + class2.int_3.ToString());
				}
				else
				{
					array5 = Encoding.ASCII.GetBytes(Class1.smethod_3(true, false, true, true, false, false) + class2.int_3.ToString());
				}
				cryptoStream.Write(array5, 0, array5.Length);
				cryptoStream.FlushFinalBlock();
				array = memoryStream.ToArray();
				License_DeActivator.string_0 = Convert.ToBase64String(array);
				memoryStream.Close();
				cryptoStream.Close();
				class2 = null;
			}
			catch
			{
			}
			return null;
		}
		System.ComponentModel.License result;
		if (bool_9)
		{
			try
			{
				Class1.smethod_5();
				Class1.Class3 class6 = null;
				try
				{
					string str5 = Class1.Class2.string_0;
					string str6 = Class1.string_3 + "\\";
					RegistryKey registryKey5 = Registry.CurrentUser;
					if (Class1.smethod_0())
					{
						registryKey5 = Registry.LocalMachine;
					}
					RegistryKey registryKey6 = registryKey5.OpenSubKey(str5 + str6, false);
					if (registryKey6 != null)
					{
						Class1.Class3 class7 = new Class1.Class3();
						class7.method_0((string)registryKey6.GetValue("1"), Class1.byte_1, Class1.byte_2);
						if (class6 == null)
						{
							class6 = class7;
						}
						if (class7.ulong_0 > class6.ulong_0)
						{
							class6 = class7;
						}
					}
				}
				catch
				{
				}
				try
				{
					if (Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()))
					{
						Class1.Class3 class8 = new Class1.Class3();
						class8.method_0(Class1.smethod_8(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()), Class1.string_2), Class1.byte_1, Class1.byte_2);
						if (class6 == null)
						{
							class6 = class8;
						}
						if (class8.ulong_0 > class6.ulong_0)
						{
							class6 = class8;
						}
					}
				}
				catch
				{
				}
				try
				{
					if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2))
					{
						Class1.Class3 class9 = new Class1.Class3();
						class9.method_0(Encoding.Unicode.GetString(Class1.smethod_11(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2)), Class1.byte_1, Class1.byte_2);
						if (class6 == null)
						{
							class6 = class9;
						}
						if (class9.ulong_0 > class6.ulong_0)
						{
							class6 = class9;
						}
					}
				}
				catch
				{
				}
				if (class6.int_3 == 0)
				{
					result = new Class1.Class12(this, "");
					return result;
				}
				byte[] array6 = Convert.FromBase64String(string_10);
				ICryptoTransform transform2 = new RijndaelManaged
				{
					Mode = CipherMode.CBC
				}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
				MemoryStream memoryStream2 = new MemoryStream();
				CryptoStream cryptoStream2 = new CryptoStream(memoryStream2, transform2, CryptoStreamMode.Write);
				byte[] array7 = array6;
				cryptoStream2.Write(array7, 0, array7.Length);
				cryptoStream2.FlushFinalBlock();
				array = memoryStream2.ToArray();
				memoryStream2.Close();
				cryptoStream2.Close();
				string @string = Encoding.Unicode.GetString(array, 0, array.Length);
				if (@string != null && @string.Length > 0 && @string.IndexOf(class6.int_3.ToString()) >= 0)
				{
					class6.int_3 = 0;
					try
					{
						string str7 = Class1.Class2.string_0;
						string str8 = Class1.string_3 + "\\";
						RegistryKey registryKey7 = Registry.CurrentUser;
						if (Class1.smethod_0())
						{
							registryKey7 = Registry.LocalMachine;
						}
						RegistryKey registryKey8;
						if (registryKey7.OpenSubKey(str7 + str8, false) == null)
						{
							registryKey7 = Registry.CurrentUser;
							if (Class1.smethod_0())
							{
								registryKey7 = Registry.LocalMachine;
							}
							registryKey8 = registryKey7.CreateSubKey(str7 + str8);
						}
						registryKey7 = Registry.CurrentUser;
						if (Class1.smethod_0())
						{
							registryKey7 = Registry.LocalMachine;
						}
						registryKey8 = registryKey7.OpenSubKey(str7 + str8, true);
						if (registryKey8 != null)
						{
							registryKey8.SetValue("1", class6.method_5(Class1.byte_1, Class1.byte_2));
							registryKey8.Close();
						}
					}
					catch
					{
					}
					try
					{
						if (Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()))
						{
							Class1.smethod_7(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()), Class1.string_2, class6.method_5(Class1.byte_1, Class1.byte_2));
						}
					}
					catch
					{
					}
					try
					{
						FileStream fileStream2 = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2, FileMode.Create, FileAccess.ReadWrite);
						byte[] bytes2 = Encoding.Unicode.GetBytes(class6.method_5(Class1.byte_1, Class1.byte_2));
						fileStream2.Write(bytes2, 0, bytes2.Length);
						fileStream2.Close();
					}
					catch
					{
					}
					result = new Class1.Class12(this, "");
					return result;
				}
				result = null;
				return result;
			}
			catch
			{
				result = null;
				return result;
			}
		}
		ICryptoTransform transform3 = new RijndaelManaged
		{
			Mode = CipherMode.CBC
		}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
		MemoryStream memoryStream3 = new MemoryStream();
		CryptoStream cryptoStream3 = new CryptoStream(memoryStream3, transform3, CryptoStreamMode.Write);
		cryptoStream3.Write(array2, 0, array2.Length);
		cryptoStream3.FlushFinalBlock();
		array = memoryStream3.ToArray();
		memoryStream3.Close();
		cryptoStream3.Close();
		binaryReader.Close();
		if ([email protected]_0(array))
		{
			try
			{
				Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
			}
			catch
			{
			}
			return null;
		}
		if ([email protected]_1(array))
		{
			try
			{
				Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
			}
			catch
			{
			}
			return null;
		}
		if ([email protected]_13)
		{
			try
			{
				Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
			}
			catch
			{
			}
			return null;
		}
		if (bool_11)
		{
			ICryptoTransform transform4 = new RijndaelManaged
			{
				Mode = CipherMode.CBC
			}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
			MemoryStream memoryStream4 = new MemoryStream();
			CryptoStream cryptoStream4 = new CryptoStream(memoryStream4, transform4, CryptoStreamMode.Write);
			cryptoStream4.Write(byte_3, 0, byte_3.Length);
			cryptoStream4.FlushFinalBlock();
			byte[] array8 = memoryStream4.ToArray();
			memoryStream4.Close();
			cryptoStream4.Close();
			if ([email protected]_0(array8))
			{
				return null;
			}
			return new Class1.Class12(this, "");
		}
		else
		{
			if (bool_12)
			{
				ICryptoTransform transform5 = new RijndaelManaged
				{
					Mode = CipherMode.CBC
				}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
				MemoryStream memoryStream5 = new MemoryStream();
				CryptoStream cryptoStream5 = new CryptoStream(memoryStream5, transform5, CryptoStreamMode.Write);
				cryptoStream5.Write(byte_3, 0, byte_3.Length);
				cryptoStream5.FlushFinalBlock();
				byte[] buffer = memoryStream5.ToArray();
				memoryStream5.Close();
				cryptoStream5.Close();
				MemoryStream memoryStream6 = new MemoryStream(buffer);
				BinaryReader binaryReader2 = new BinaryReader(memoryStream6);
				memoryStream6.Position = 0L;
				byte[] array9 = binaryReader2.ReadBytes(binaryReader2.ReadInt32());
				byte[] array10 = binaryReader2.ReadBytes((int)(memoryStream6.Length - 4L - (long)array9.Length));
				binaryReader2.Close();
				DataSignHelper.byte_0 = array10;
				return new Class1.Class12(this, "");
			}
			@class.string_2 = "";
			@class.int_0 = 5;
			@class.int_1 = 0;
			@class.bool_2 = false;
			@class.bool_4 = false;
			@class.bool_12 = false;
			@class.bool_13 = false;
			@class.bool_3 = false;
			Class1.Class4 class10 = null;
			if ([email protected]_16 && [email protected]_15 && [email protected]_17 && [email protected]_18 && [email protected]_19 && [email protected]_20 && [email protected]_21)
			{
				Class1.sortedList_0[type_0.Assembly.FullName] = true;
				Class1.sortedList_1[type_0.Assembly.FullName] = new Class1.Class12(this, "");
				return new Class1.Class12(this, "");
			}
			EvaluationMonitor.smethod_0().method_7((LicenseLocation)0);
			Class1.smethod_5();
			bool flag = false;
			bool flag2 = false;
			Class1.Class3 class11 = null;
			try
			{
				string str9 = Class1.Class2.string_0;
				string str10 = Class1.string_3 + "\\";
				RegistryKey registryKey9 = Registry.CurrentUser;
				if (Class1.smethod_0())
				{
					registryKey9 = Registry.LocalMachine;
				}
				RegistryKey registryKey10 = registryKey9.OpenSubKey(str9 + str10, false);
				if (registryKey10 != null)
				{
					Class1.Class3 class12 = new Class1.Class3();
					class12.method_0((string)registryKey10.GetValue("1"), Class1.byte_1, Class1.byte_2);
					if (class11 == null)
					{
						class11 = class12;
					}
					if (class12.ulong_0 > class11.ulong_0)
					{
						class11 = class12;
					}
				}
			}
			catch
			{
			}
			try
			{
				if (Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()))
				{
					Class1.Class3 class13 = new Class1.Class3();
					class13.method_0(Class1.smethod_8(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()), Class1.string_2), Class1.byte_1, Class1.byte_2);
					if (class11 == null)
					{
						class11 = class13;
					}
					if (class13.ulong_0 > class11.ulong_0)
					{
						class11 = class13;
					}
				}
			}
			catch
			{
			}
			try
			{
				if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2))
				{
					Class1.Class3 class14 = new Class1.Class3();
					class14.method_0(Encoding.Unicode.GetString(Class1.smethod_11(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2)), Class1.byte_1, Class1.byte_2);
					if (class11 == null)
					{
						class11 = class14;
					}
					if (class14.ulong_0 > class11.ulong_0)
					{
						class11 = class14;
					}
				}
			}
			catch
			{
			}
			if (class11 == null)
			{
				class11 = new Class1.Class3();
			}
			bool flag3 = false;
			if (class11 != null && class11.int_3 > 0)
			{
				EvaluationMonitor.smethod_0().method_1((LicenseStatus)8);
				EvaluationMonitor.smethod_0().method_3((LicenseStatus)8);
				EvaluationMonitor.smethod_0().method_5((LicenseStatus)8);
				flag3 = true;
				Class1.sortedList_0[type_0.Assembly.FullName] = true;
				Class1.sortedList_1[type_0.Assembly.FullName] = new Class1.Class12(this, "");
			}
			class11 = null;
			if (!flag3)
			{
				if (bool_7)
				{
					byte[] array11 = new byte[0];
					if (string_11.Length > 0)
					{
						try
						{
							array11 = Class1.smethod_11(string_11);
							goto IL_1904;
						}
						catch
						{
							goto IL_1904;
						}
					}
					array11 = byte_3;
					IL_1904:
					if (array11.Length > 0)
					{
						Class1.Class4 class15 = new Class1.Class4();
						array = new byte[0];
						try
						{
							array2 = array11;
							ICryptoTransform transform6 = new RijndaelManaged
							{
								Mode = CipherMode.CBC
							}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
							MemoryStream memoryStream7 = new MemoryStream();
							CryptoStream cryptoStream6 = new CryptoStream(memoryStream7, transform6, CryptoStreamMode.Write);
							cryptoStream6.Write(array2, 0, array2.Length);
							cryptoStream6.FlushFinalBlock();
							array = memoryStream7.ToArray();
							memoryStream7.Close();
							cryptoStream6.Close();
						}
						catch
						{
							array = new byte[0];
						}
						if (array.Length > 0)
						{
							if (class15.method_0(array))
							{
								bool flag4 = true;
								class15.method_1(array);
								if (class15.bool_4)
								{
									string text = Class1.smethod_3(class15.bool_6, class15.bool_7, class15.bool_11, class15.bool_5, class15.bool_8, class15.bool_9);
									if (text.Length == 29)
									{
										int num = 0;
										if (class15.bool_8 && class15.string_3.Substring(0, 4) != text.Substring(0, 4))
										{
											num++;
										}
										if (class15.bool_6 && class15.string_3.Substring(5, 4) != text.Substring(5, 4))
										{
											num++;
										}
										if (class15.bool_7 && class15.string_3.Substring(10, 4) != text.Substring(10, 4))
										{
											num++;
										}
										if (class15.bool_11 && class15.string_3.Substring(15, 4) != text.Substring(15, 4))
										{
											num++;
										}
										if (class15.bool_5 && class15.string_3.Substring(20, 4) != text.Substring(20, 4))
										{
											num++;
										}
										if (class15.bool_9 && class15.string_3.Substring(25, 4) != text.Substring(25, 4))
										{
											num++;
										}
										if (class15.int_1 - num < 0)
										{
											EvaluationMonitor.smethod_0().method_5((LicenseStatus)5);
											flag4 = false;
											flag = true;
										}
									}
									else
									{
										flag = true;
										flag4 = false;
										EvaluationMonitor.smethod_0().method_5((LicenseStatus)5);
									}
								}
								if (flag4 && licenseContext_0 != null)
								{
									if (licenseContext_0.UsageMode == LicenseUsageMode.Runtime && !class15.bool_0)
									{
										EvaluationMonitor.smethod_0().method_5((LicenseStatus)0);
										flag4 = false;
									}
									if (licenseContext_0.UsageMode == LicenseUsageMode.Designtime && !class15.bool_1)
									{
										EvaluationMonitor.smethod_0().method_5((LicenseStatus)0);
										flag4 = false;
									}
								}
								if (class15.bool_13)
								{
									flag4 = false;
								}
								if (flag4)
								{
									class10 = class15;
								}
								if (flag4)
								{
									Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
									bool flag5 = false;
									int k = 0;
									while (k < assemblies.Length)
									{
										bool flag6 = true;
										IDictionaryEnumerator enumerator = class10.hashtable_0.GetEnumerator();
										while (enumerator.MoveNext())
										{
											string a = enumerator.Key.ToString();
											string b = enumerator.Value.ToString();
											if (a == Class1.Class2.string_4)
											{
												if (this.method_11(assemblies[k], typeof(AssemblyVersionAttribute)) != b)
												{
													flag6 = false;
												}
											}
											else if (a == Class1.Class2.string_5)
											{
												if (this.method_11(assemblies[k], typeof(AssemblyCopyrightAttribute)) != b)
												{
													flag6 = false;
												}
											}
											else if (a == Class1.Class2.string_6)
											{
												if (this.method_11(assemblies[k], typeof(AssemblyTrademarkAttribute)) != b)
												{
													flag6 = false;
												}
											}
											else if (a == Class1.Class2.string_7)
											{
												if (this.method_11(assemblies[k], typeof(AssemblyCompanyAttribute)) != b)
												{
													flag6 = false;
												}
											}
											else if (a == Class1.Class2.string_8)
											{
												if (this.method_11(assemblies[k], typeof(AssemblyProductAttribute)) != b)
												{
													flag6 = false;
												}
											}
											else if (a == Class1.Class2.string_9)
											{
												if (this.method_11(assemblies[k], typeof(AssemblyDescriptionAttribute)) != b)
												{
													flag6 = false;
												}
											}
											else if (a == Class1.Class2.string_10)
											{
												if (this.method_11(assemblies[k], typeof(AssemblyTitleAttribute)) != b)
												{
													flag6 = false;
												}
											}
											else if (a == Class1.Class2.string_3 && this.method_11(assemblies[k], typeof(AssemblyName)) != b)
											{
												flag6 = false;
											}
										}
										if (!flag6)
										{
											k++;
										}
										else
										{
											flag5 = true;
											IL_1DBD:
											if (!flag5)
											{
												class10 = null;
											}
											if (class10 == null)
											{
												EvaluationMonitor.smethod_0().method_5((LicenseStatus)6);
												flag2 = true;
												goto IL_1DD6;
											}
											goto IL_1DD6;
										}
									}
									goto IL_1DBD;
								}
								IL_1DD6:
								if (flag4 && class10 != null && class15.bool_2)
								{
									try
									{
										Class1.Class5 class16 = new Class1.Class5(class15.string_2);
										Random random = new Random();
										byte[] array12 = new byte[16];
										random.NextBytes(array12);
										byte[] array13 = new byte[byte_3.Length + 16];
										Array.Copy(array12, 0, array13, 0, array12.Length);
										Array.Copy(byte_3, 0, array13, array12.Length, byte_3.Length);
										array12 = array13;
										byte[] array14 = class16.Activate(array12);
										byte[] buffer2 = new byte[0];
										ICryptoTransform transform7 = new RijndaelManaged
										{
											Mode = CipherMode.CBC
										}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
										MemoryStream memoryStream8 = new MemoryStream();
										CryptoStream cryptoStream7 = new CryptoStream(memoryStream8, transform7, CryptoStreamMode.Write);
										cryptoStream7.Write(array14, 0, array14.Length);
										cryptoStream7.FlushFinalBlock();
										buffer2 = memoryStream8.ToArray();
										memoryStream8.Close();
										cryptoStream7.Close();
										if (@class.method_0(buffer2))
										{
											MemoryStream memoryStream9 = new MemoryStream(buffer2);
											BinaryReader binaryReader3 = new BinaryReader(memoryStream9);
											memoryStream9.Position = 0L;
											byte[] array15 = binaryReader3.ReadBytes(binaryReader3.ReadInt32());
											byte[] array16 = binaryReader3.ReadBytes((int)(memoryStream9.Length - 4L - (long)array15.Length));
											binaryReader3.Close();
											if (Convert.ToBase64String(array12, 0, 16) != Convert.ToBase64String(array16, 0, 16))
											{
												EvaluationMonitor.smethod_0().method_5((LicenseStatus)7);
												class10 = null;
											}
											else if (array16[16] == 0)
											{
												EvaluationMonitor.smethod_0().method_5((LicenseStatus)7);
												class10 = null;
											}
										}
										else
										{
											EvaluationMonitor.smethod_0().method_5((LicenseStatus)7);
											class10 = null;
										}
									}
									catch
									{
										EvaluationMonitor.smethod_0().method_5((LicenseStatus)7);
										class10 = null;
									}
								}
								if (class10 != null)
								{
									Class1.byte_0 = byte_3;
									if (class10.bool_10)
									{
										Class1.string_0 = class10.string_1;
									}
									else
									{
										Class1.string_0 = "";
									}
									EvaluationMonitor.smethod_0().method_5((LicenseStatus)0);
									EvaluationMonitor.smethod_0().method_7((LicenseLocation)2);
								}
							}
							else
							{
								EvaluationMonitor.smethod_0().method_5((LicenseStatus)6);
								flag2 = true;
							}
						}
					}
				}
				else
				{
					if (class10 == null && @class.bool_23)
					{
						EvaluationMonitor.smethod_0().method_3((LicenseStatus)4);
						ArrayList arrayList = new ArrayList();
						try
						{
							if (Assembly.GetCallingAssembly() != null)
							{
								arrayList.Add(Assembly.GetCallingAssembly());
							}
						}
						catch
						{
						}
						try
						{
							if (Assembly.GetEntryAssembly() != null)
							{
								arrayList.Add(Assembly.GetEntryAssembly());
							}
						}
						catch
						{
						}
						try
						{
							if (Assembly.GetExecutingAssembly() != null)
							{
								arrayList.Add(Assembly.GetExecutingAssembly());
							}
						}
						catch
						{
						}
						arrayList.Add(type_0.Assembly);
						for (int l = 0; l < arrayList.Count; l++)
						{
							try
							{
								string text2 = @class.string_13.Replace(Class1.Class2.string_32, Class1.Class2.string_33);
								string[] manifestResourceNames = ((Assembly)arrayList[l]).GetManifestResourceNames();
								for (int m = 0; m < manifestResourceNames.Length; m++)
								{
									try
									{
										if (manifestResourceNames[m].ToUpper().IndexOf(text2.ToUpper()) >= 0)
										{
											Class1.Class4 class17 = new Class1.Class4();
											array = new byte[0];
											byte[] array17 = new byte[0];
											try
											{
												Stream manifestResourceStream = ((Assembly)arrayList[l]).GetManifestResourceStream(manifestResourceNames[m]);
												manifestResourceStream.Position = 0L;
												array2 = new byte[manifestResourceStream.Length];
												manifestResourceStream.Read(array2, 0, array2.Length);
												manifestResourceStream.Close();
												array17 = array2;
												ICryptoTransform transform8 = new RijndaelManaged
												{
													Mode = CipherMode.CBC
												}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
												MemoryStream memoryStream10 = new MemoryStream();
												CryptoStream cryptoStream8 = new CryptoStream(memoryStream10, transform8, CryptoStreamMode.Write);
												cryptoStream8.Write(array2, 0, array2.Length);
												cryptoStream8.FlushFinalBlock();
												array = memoryStream10.ToArray();
												memoryStream10.Close();
												cryptoStream8.Close();
											}
											catch
											{
												array = new byte[0];
											}
											if (array.Length > 0)
											{
												if (class17.method_0(array))
												{
													bool flag7 = true;
													class17.method_1(array);
													if (class17.bool_4)
													{
														string text3 = Class1.smethod_3(class17.bool_6, class17.bool_7, class17.bool_11, class17.bool_5, class17.bool_8, class17.bool_9);
														if (text3.Length == 29)
														{
															int num2 = 0;
															if (class17.bool_8 && class17.string_3.Substring(0, 4) != text3.Substring(0, 4))
															{
																num2++;
															}
															if (class17.bool_6 && class17.string_3.Substring(5, 4) != text3.Substring(5, 4))
															{
																num2++;
															}
															if (class17.bool_7 && class17.string_3.Substring(10, 4) != text3.Substring(10, 4))
															{
																num2++;
															}
															if (class17.bool_11 && class17.string_3.Substring(15, 4) != text3.Substring(15, 4))
															{
																num2++;
															}
															if (class17.bool_5 && class17.string_3.Substring(20, 4) != text3.Substring(20, 4))
															{
																num2++;
															}
															if (class17.bool_9 && class17.string_3.Substring(25, 4) != text3.Substring(25, 4))
															{
																num2++;
															}
															if (class17.int_1 - num2 < 0)
															{
																EvaluationMonitor.smethod_0().method_3((LicenseStatus)5);
																flag = true;
																flag7 = false;
															}
														}
														else
														{
															EvaluationMonitor.smethod_0().method_3((LicenseStatus)5);
															flag = true;
															flag7 = false;
														}
													}
													if (flag7 && licenseContext_0 != null)
													{
														if (licenseContext_0.UsageMode == LicenseUsageMode.Runtime && !class17.bool_0)
														{
															EvaluationMonitor.smethod_0().method_3((LicenseStatus)0);
															flag7 = false;
														}
														if (licenseContext_0.UsageMode == LicenseUsageMode.Designtime && !class17.bool_1)
														{
															EvaluationMonitor.smethod_0().method_3((LicenseStatus)0);
															flag7 = false;
														}
													}
													if (class17.bool_13)
													{
														flag7 = false;
													}
													if (flag7)
													{
														class10 = class17;
													}
													if (flag7)
													{
														IDictionaryEnumerator enumerator2 = class10.hashtable_0.GetEnumerator();
														while (enumerator2.MoveNext())
														{
															string a2 = enumerator2.Key.ToString();
															string b2 = enumerator2.Value.ToString();
															if (a2 == Class1.Class2.string_4)
															{
																if (this.method_11((Assembly)arrayList[l], typeof(AssemblyVersionAttribute)) != b2)
																{
																	class10 = null;
																}
															}
															else if (a2 == Class1.Class2.string_5)
															{
																if (this.method_11((Assembly)arrayList[l], typeof(AssemblyCopyrightAttribute)) != b2)
																{
																	class10 = null;
																}
															}
															else if (a2 == Class1.Class2.string_6)
															{
																if (this.method_11((Assembly)arrayList[l], typeof(AssemblyTrademarkAttribute)) != b2)
																{
																	class10 = null;
																}
															}
															else if (a2 == Class1.Class2.string_7)
															{
																if (this.method_11((Assembly)arrayList[l], typeof(AssemblyCompanyAttribute)) != b2)
																{
																	class10 = null;
																}
															}
															else if (a2 == Class1.Class2.string_8)
															{
																if (this.method_11((Assembly)arrayList[l], typeof(AssemblyProductAttribute)) != b2)
																{
																	class10 = null;
																}
															}
															else if (a2 == Class1.Class2.string_9)
															{
																if (this.method_11((Assembly)arrayList[l], typeof(AssemblyDescriptionAttribute)) != b2)
																{
																	class10 = null;
																}
															}
															else if (a2 == Class1.Class2.string_10)
															{
																if (this.method_11((Assembly)arrayList[l], typeof(AssemblyTitleAttribute)) != b2)
																{
																	class10 = null;
																}
															}
															else if (a2 == Class1.Class2.string_3 && this.method_11((Assembly)arrayList[l], typeof(AssemblyName)) != b2)
															{
																class10 = null;
															}
														}
														if (class10 == null)
														{
															EvaluationMonitor.smethod_0().method_3((LicenseStatus)6);
															flag2 = true;
														}
													}
													if (flag7 && class10 != null && class17.bool_2)
													{
														try
														{
															Class1.Class5 class18 = new Class1.Class5(class17.string_2);
															Random random2 = new Random();
															byte[] array18 = new byte[16];
															random2.NextBytes(array18);
															byte[] array19 = new byte[array17.Length + 16];
															Array.Copy(array18, 0, array19, 0, array18.Length);
															Array.Copy(array17, 0, array19, array18.Length, array17.Length);
															array18 = array19;
															byte[] array20 = class18.Activate(array18);
															byte[] buffer3 = new byte[0];
															ICryptoTransform transform9 = new RijndaelManaged
															{
																Mode = CipherMode.CBC
															}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
															MemoryStream memoryStream11 = new MemoryStream();
															CryptoStream cryptoStream9 = new CryptoStream(memoryStream11, transform9, CryptoStreamMode.Write);
															cryptoStream9.Write(array20, 0, array20.Length);
															cryptoStream9.FlushFinalBlock();
															buffer3 = memoryStream11.ToArray();
															memoryStream11.Close();
															cryptoStream9.Close();
															if (@class.method_0(buffer3))
															{
																MemoryStream memoryStream12 = new MemoryStream(buffer3);
																BinaryReader binaryReader4 = new BinaryReader(memoryStream12);
																memoryStream12.Position = 0L;
																byte[] array21 = binaryReader4.ReadBytes(binaryReader4.ReadInt32());
																byte[] array22 = binaryReader4.ReadBytes((int)(memoryStream12.Length - 4L - (long)array21.Length));
																binaryReader4.Close();
																if (Convert.ToBase64String(array18, 0, 16) != Convert.ToBase64String(array22, 0, 16))
																{
																	EvaluationMonitor.smethod_0().method_3((LicenseStatus)7);
																	class10 = null;
																}
																else if (array22[16] == 0)
																{
																	EvaluationMonitor.smethod_0().method_3((LicenseStatus)7);
																	class10 = null;
																}
															}
															else
															{
																EvaluationMonitor.smethod_0().method_3((LicenseStatus)7);
																class10 = null;
															}
														}
														catch
														{
															EvaluationMonitor.smethod_0().method_3((LicenseStatus)7);
															class10 = null;
														}
													}
													if (class10 != null)
													{
														if (class10.bool_10)
														{
															Class1.string_0 = class10.string_1;
														}
														else
														{
															Class1.string_0 = "";
														}
														Class1.byte_0 = array17;
														EvaluationMonitor.smethod_0().method_3((LicenseStatus)0);
														EvaluationMonitor.smethod_0().method_7((LicenseLocation)1);
														break;
													}
												}
												else
												{
													EvaluationMonitor.smethod_0().method_3((LicenseStatus)6);
													flag2 = true;
												}
											}
										}
									}
									catch
									{
									}
								}
							}
							catch
							{
							}
						}
					}
					if (class10 == null && @class.bool_24)
					{
						EvaluationMonitor.smethod_0().method_5((LicenseStatus)4);
						ArrayList arrayList2 = new ArrayList();
						if (File.Exists(Class1.smethod_1()))
						{
							arrayList2.Add(Path.GetDirectoryName(Class1.smethod_1()) + "\\");
						}
						else if (Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()))
						{
							arrayList2.Add(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()) + "\\");
						}
						try
						{
							if (File.Exists(Class1.smethod_1()) && Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()) && Path.GetDirectoryName(Class1.smethod_1()).ToString() != Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()).ToString())
							{
								arrayList2.Add(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()) + "\\");
							}
						}
						catch
						{
						}
						try
						{
							if (Directory.Exists(AppDomain.CurrentDomain.BaseDirectory) && arrayList2.IndexOf(AppDomain.CurrentDomain.BaseDirectory) < 0)
							{
								arrayList2.Add(AppDomain.CurrentDomain.BaseDirectory);
							}
						}
						catch
						{
						}
						try
						{
							if (Directory.Exists(AppDomain.CurrentDomain.SetupInformation.PrivateBinPath))
							{
								arrayList2.Add(AppDomain.CurrentDomain.SetupInformation.PrivateBinPath);
							}
						}
						catch
						{
						}
						try
						{
							if (AppDomain.CurrentDomain.GetData("DataDirectory") != null)
							{
								string text4 = AppDomain.CurrentDomain.GetData("DataDirectory").ToString();
								if (Directory.Exists(text4))
								{
									arrayList2.Add(text4 + "\\");
								}
							}
						}
						catch
						{
						}
						for (int n = 0; n < arrayList2.Count; n++)
						{
							try
							{
								string[] files = Directory.GetFiles((string)arrayList2[n], @class.string_13);
								for (int num3 = 0; num3 < files.Length; num3++)
								{
									try
									{
										Class1.Class4 class19 = new Class1.Class4();
										array = new byte[0];
										byte[] array23 = new byte[0];
										try
										{
											FileStream fileStream3 = new FileStream(files[num3], FileMode.Open, FileAccess.Read);
											fileStream3.Position = 0L;
											array2 = new byte[fileStream3.Length];
											fileStream3.Read(array2, 0, array2.Length);
											fileStream3.Close();
											array23 = array2;
											ICryptoTransform transform10 = new RijndaelManaged
											{
												Mode = CipherMode.CBC
											}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
											MemoryStream memoryStream13 = new MemoryStream();
											CryptoStream cryptoStream10 = new CryptoStream(memoryStream13, transform10, CryptoStreamMode.Write);
											cryptoStream10.Write(array2, 0, array2.Length);
											cryptoStream10.FlushFinalBlock();
											array = memoryStream13.ToArray();
											memoryStream13.Close();
											cryptoStream10.Close();
										}
										catch
										{
											array = new byte[0];
										}
										if (array.Length > 0)
										{
											if (class19.method_0(array))
											{
												bool flag8 = true;
												class19.method_1(array);
												if (class19.bool_4)
												{
													string text5 = Class1.smethod_3(class19.bool_6, class19.bool_7, class19.bool_11, class19.bool_5, class19.bool_8, class19.bool_9);
													if (text5.Length == 29)
													{
														int num4 = 0;
														if (class19.bool_8 && class19.string_3.Substring(0, 4) != text5.Substring(0, 4))
														{
															num4++;
														}
														if (class19.bool_6 && class19.string_3.Substring(5, 4) != text5.Substring(5, 4))
														{
															num4++;
														}
														if (class19.bool_7 && class19.string_3.Substring(10, 4) != text5.Substring(10, 4))
														{
															num4++;
														}
														if (class19.bool_11 && class19.string_3.Substring(15, 4) != text5.Substring(15, 4))
														{
															num4++;
														}
														if (class19.bool_5 && class19.string_3.Substring(20, 4) != text5.Substring(20, 4))
														{
															num4++;
														}
														if (class19.bool_9 && class19.string_3.Substring(25, 4) != text5.Substring(25, 4))
														{
															num4++;
														}
														if (class19.int_1 - num4 < 0)
														{
															EvaluationMonitor.smethod_0().method_5((LicenseStatus)5);
															flag8 = false;
															flag = true;
														}
													}
													else
													{
														flag = true;
														flag8 = false;
														EvaluationMonitor.smethod_0().method_5((LicenseStatus)5);
													}
												}
												if (flag8 && licenseContext_0 != null)
												{
													if (licenseContext_0.UsageMode == LicenseUsageMode.Runtime && !class19.bool_0)
													{
														EvaluationMonitor.smethod_0().method_5((LicenseStatus)0);
														flag8 = false;
													}
													if (licenseContext_0.UsageMode == LicenseUsageMode.Designtime && !class19.bool_1)
													{
														EvaluationMonitor.smethod_0().method_5((LicenseStatus)0);
														flag8 = false;
													}
												}
												if (class19.bool_13)
												{
													flag8 = false;
												}
												if (flag8)
												{
													class10 = class19;
												}
												if (flag8)
												{
													Assembly[] assemblies2 = AppDomain.CurrentDomain.GetAssemblies();
													bool flag9 = false;
													int num5 = 0;
													while (num5 < assemblies2.Length)
													{
														bool flag10 = true;
														IDictionaryEnumerator enumerator3 = class10.hashtable_0.GetEnumerator();
														while (enumerator3.MoveNext())
														{
															string a3 = enumerator3.Key.ToString();
															string b3 = enumerator3.Value.ToString();
															if (a3 == Class1.Class2.string_4)
															{
																if (this.method_11(assemblies2[num5], typeof(AssemblyVersionAttribute)) != b3)
																{
																	flag10 = false;
																}
															}
															else if (a3 == Class1.Class2.string_5)
															{
																if (this.method_11(assemblies2[num5], typeof(AssemblyCopyrightAttribute)) != b3)
																{
																	flag10 = false;
																}
															}
															else if (a3 == Class1.Class2.string_6)
															{
																if (this.method_11(assemblies2[num5], typeof(AssemblyTrademarkAttribute)) != b3)
																{
																	flag10 = false;
																}
															}
															else if (a3 == Class1.Class2.string_7)
															{
																if (this.method_11(assemblies2[num5], typeof(AssemblyCompanyAttribute)) != b3)
																{
																	flag10 = false;
																}
															}
															else if (a3 == Class1.Class2.string_8)
															{
																if (this.method_11(assemblies2[num5], typeof(AssemblyProductAttribute)) != b3)
																{
																	flag10 = false;
																}
															}
															else if (a3 == Class1.Class2.string_9)
															{
																if (this.method_11(assemblies2[num5], typeof(AssemblyDescriptionAttribute)) != b3)
																{
																	flag10 = false;
																}
															}
															else if (a3 == Class1.Class2.string_10)
															{
																if (this.method_11(assemblies2[num5], typeof(AssemblyTitleAttribute)) != b3)
																{
																	flag10 = false;
																}
															}
															else if (a3 == Class1.Class2.string_3 && this.method_11(assemblies2[n], typeof(AssemblyName)) != b3)
															{
																flag10 = false;
															}
														}
														if (!flag10)
														{
															num5++;
														}
														else
														{
															flag9 = true;
															IL_2F4D:
															if (!flag9)
															{
																class10 = null;
															}
															if (class10 == null)
															{
																EvaluationMonitor.smethod_0().method_5((LicenseStatus)6);
																flag2 = true;
																goto IL_2F66;
															}
															goto IL_2F66;
														}
													}
													goto IL_2F4D;
												}
												IL_2F66:
												if (flag8 && class10 != null && class19.bool_2)
												{
													try
													{
														Class1.Class5 class20 = new Class1.Class5(class19.string_2);
														Random random3 = new Random();
														byte[] array24 = new byte[16];
														random3.NextBytes(array24);
														byte[] array25 = new byte[array23.Length + 16];
														Array.Copy(array24, 0, array25, 0, array24.Length);
														Array.Copy(array23, 0, array25, array24.Length, array23.Length);
														array24 = array25;
														byte[] array26 = class20.Activate(array24);
														byte[] buffer4 = new byte[0];
														ICryptoTransform transform11 = new RijndaelManaged
														{
															Mode = CipherMode.CBC
														}.CreateDecryptor(Class1.byte_1, Class1.byte_2);
														MemoryStream memoryStream14 = new MemoryStream();
														CryptoStream cryptoStream11 = new CryptoStream(memoryStream14, transform11, CryptoStreamMode.Write);
														cryptoStream11.Write(array26, 0, array26.Length);
														cryptoStream11.FlushFinalBlock();
														buffer4 = memoryStream14.ToArray();
														memoryStream14.Close();
														cryptoStream11.Close();
														if (@class.method_0(buffer4))
														{
															MemoryStream memoryStream15 = new MemoryStream(buffer4);
															BinaryReader binaryReader5 = new BinaryReader(memoryStream15);
															memoryStream15.Position = 0L;
															byte[] array27 = binaryReader5.ReadBytes(binaryReader5.ReadInt32());
															byte[] array28 = binaryReader5.ReadBytes((int)(memoryStream15.Length - 4L - (long)array27.Length));
															binaryReader5.Close();
															if (Convert.ToBase64String(array24, 0, 16) != Convert.ToBase64String(array28, 0, 16))
															{
																EvaluationMonitor.smethod_0().method_5((LicenseStatus)7);
																class10 = null;
															}
															else if (array28[16] == 0)
															{
																EvaluationMonitor.smethod_0().method_5((LicenseStatus)7);
																class10 = null;
															}
														}
														else
														{
															EvaluationMonitor.smethod_0().method_5((LicenseStatus)7);
															class10 = null;
														}
													}
													catch (Exception)
													{
														EvaluationMonitor.smethod_0().method_5((LicenseStatus)7);
														class10 = null;
													}
												}
												if (class10 != null)
												{
													if (class10.bool_10)
													{
														Class1.string_0 = class10.string_1;
													}
													else
													{
														Class1.string_0 = "";
													}
													Class1.byte_0 = array23;
													EvaluationMonitor.smethod_0().method_5((LicenseStatus)0);
													EvaluationMonitor.smethod_0().method_7((LicenseLocation)2);
													break;
												}
											}
											else
											{
												EvaluationMonitor.smethod_0().method_5((LicenseStatus)6);
												flag2 = true;
											}
										}
									}
									catch
									{
									}
								}
							}
							catch
							{
							}
						}
					}
				}
			}
			bool flag11 = false;
			bool flag12 = true;
			if (class10 != null)
			{
				flag11 = true;
				@class.bool_2 = class10.bool_2;
				@class.string_2 = class10.string_2;
				@class.bool_3 = class10.bool_3;
				@class.int_0 = class10.int_0;
				@class.int_1 = class10.int_1;
				@class.bool_12 = class10.bool_12;
				@class.hashtable_0 = class10.hashtable_0;
				@class.bool_4 = class10.bool_4;
				@class.string_3 = class10.string_3;
				@class.bool_6 = class10.bool_6;
				@class.bool_7 = class10.bool_7;
				@class.bool_5 = class10.bool_5;
				@class.bool_11 = class10.bool_11;
				@class.bool_8 = class10.bool_8;
				@class.bool_9 = class10.bool_9;
				if (!class10.bool_16 && !class10.bool_15 && !class10.bool_17 && !class10.bool_18 && !class10.bool_19 && !class10.bool_20 && !class10.bool_21)
				{
					flag12 = false;
				}
				if (!class10.bool_12)
				{
					flag12 = false;
				}
				else
				{
					@class.bool_21 = class10.bool_21;
					@class.bool_16 = class10.bool_16;
					@class.dateTime_0 = class10.dateTime_0;
					@class.bool_15 = class10.bool_15;
					@class.int_2 = class10.int_2;
					@class.bool_17 = class10.bool_17;
					@class.int_3 = class10.int_3;
					@class.bool_18 = class10.bool_18;
					@class.int_4 = class10.int_4;
					@class.bool_19 = class10.bool_19;
					@class.int_5 = class10.int_5;
					@class.bool_20 = class10.bool_20;
					@class.int_6 = class10.int_6;
				}
			}
			else
			{
				@class.bool_4 = false;
				@class.string_3 = Class1.Class2.string_11;
				@class.bool_6 = false;
				@class.bool_7 = false;
				@class.bool_5 = false;
				@class.bool_11 = false;
				@class.bool_8 = false;
				@class.bool_9 = false;
				@class.bool_2 = false;
				@class.string_2 = "";
				@class.bool_3 = false;
				@class.int_0 = 0;
				@class.int_1 = 0;
				if ([email protected]_26)
				{
					Class1.Class7.timer_0 = new System.Threading.Timer(new TimerCallback(new Class1.Class7().method_0), null, 90000, 30000);
					if (@class.bool_31)
					{
						string message = @class.string_7;
						try
						{
							Class1.EnableWindow(Process.GetCurrentProcess().MainWindowHandle, false);
						}
						catch
						{
						}
						Class1.ShowMessage(message);
					}
					try
					{
						Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
					}
					catch
					{
					}
					return null;
				}
			}
			if (flag12 && @class.bool_21)
			{
				@class.bool_16 = false;
				@class.dateTime_0 = DateTime.Now;
				@class.bool_15 = false;
				@class.int_2 = 28;
				@class.bool_17 = false;
				@class.int_3 = 20;
				@class.bool_18 = false;
				@class.int_4 = 10;
				@class.bool_19 = false;
				@class.int_5 = 60;
				@class.bool_20 = false;
				@class.int_6 = 1;
			}
			if (flag11)
			{
				if (flag12)
				{
					EvaluationMonitor.smethod_0().method_1((LicenseStatus)2);
				}
				else
				{
					EvaluationMonitor.smethod_0().method_1((LicenseStatus)1);
				}
			}
			else if (@class.bool_21)
			{
				if (flag3)
				{
					EvaluationMonitor.smethod_0().method_1((LicenseStatus)8);
				}
				else if (flag)
				{
					EvaluationMonitor.smethod_0().method_1((LicenseStatus)5);
				}
				else if (flag2)
				{
					EvaluationMonitor.smethod_0().method_1((LicenseStatus)6);
				}
				else
				{
					EvaluationMonitor.smethod_0().method_1((LicenseStatus)4);
				}
			}
			else if (flag12)
			{
				EvaluationMonitor.smethod_0().method_1((LicenseStatus)2);
			}
			else
			{
				EvaluationMonitor.smethod_0().method_1((LicenseStatus)0);
			}
			if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)2)
			{
				EvaluationMonitor.smethod_0().method_5(EvaluationMonitor.smethod_0().method_0());
			}
			if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)1)
			{
				EvaluationMonitor.smethod_0().method_3(EvaluationMonitor.smethod_0().method_0());
			}
			EvaluationMonitor.smethod_0().method_43(@class.bool_21);
			EvaluationMonitor.smethod_0().method_27(@class.bool_17);
			EvaluationMonitor.smethod_0().method_23(@class.int_3);
			EvaluationMonitor.smethod_0().method_25(0);
			EvaluationMonitor.smethod_0().method_15(@class.bool_16);
			EvaluationMonitor.smethod_0().method_13(@class.dateTime_0);
			EvaluationMonitor.smethod_0().method_17(@class.bool_15);
			EvaluationMonitor.smethod_0().method_19(@class.int_2);
			EvaluationMonitor.smethod_0().method_21(0);
			EvaluationMonitor.smethod_0().method_33(@class.bool_19);
			EvaluationMonitor.smethod_0().method_35(@class.int_5);
			EvaluationMonitor.smethod_0().method_37(0);
			EvaluationMonitor.smethod_0().method_41(@class.bool_20);
			EvaluationMonitor.smethod_0().method_39(@class.int_6);
			EvaluationMonitor.smethod_0().method_29(@class.bool_18);
			EvaluationMonitor.smethod_0().method_31(@class.int_4);
			EvaluationMonitor.smethod_0().method_50().Clear();
			if (class10 != null)
			{
				IDictionaryEnumerator enumerator4 = @class.hashtable_0.GetEnumerator();
				while (enumerator4.MoveNext())
				{
					EvaluationMonitor.smethod_0().method_50().Add(enumerator4.Key.ToString(), enumerator4.Value.ToString());
				}
			}
			EvaluationMonitor.smethod_0().method_9(@class.bool_2);
			EvaluationMonitor.smethod_0().method_11(@class.string_2);
			EvaluationMonitor.smethod_0().method_49(@class.string_3);
			EvaluationMonitor.smethod_0().method_47(@class.bool_4);
			EvaluationMonitor.smethod_0().method_57(@class.bool_6);
			EvaluationMonitor.smethod_0().method_59(@class.bool_7);
			EvaluationMonitor.smethod_0().method_55(@class.bool_5);
			EvaluationMonitor.smethod_0().method_53(@class.bool_11);
			EvaluationMonitor.smethod_0().method_61(@class.bool_9);
			EvaluationMonitor.smethod_0().method_63(@class.bool_8);
			EvaluationMonitor.smethod_0().method_67(@class.int_1);
			EvaluationMonitor.smethod_0().method_65(@class.bool_12);
			Class1.smethod_5();
			class11 = new Class1.Class3();
			if (flag12)
			{
				if (@class.bool_34)
				{
					string string_12 = @class.string_11;
					Class1.ShowMessage(string_12);
				}
				if (@class.bool_21)
				{
					Class1.sortedList_0[type_0.Assembly.FullName] = true;
					Class1.sortedList_1[type_0.Assembly.FullName] = new Class1.Class12(this, "");
					return new Class1.Class12(this, "");
				}
				if (@class.bool_20)
				{
					try
					{
						string processName = Process.GetCurrentProcess().ProcessName;
						Process[] processesByName = Process.GetProcessesByName(processName);
						if (processesByName.Length > @class.int_6)
						{
							if (@class.bool_32)
							{
								string text6 = @class.string_8;
								text6 = text6.Replace(Class1.Class2.string_21, @class.int_6.ToString());
								if (@class.bool_25)
								{
									try
									{
										Class1.EnableWindow(Process.GetCurrentProcess().MainWindowHandle, false);
									}
									catch
									{
									}
								}
								Class1.ShowMessage(text6);
							}
							if (@class.bool_25)
							{
								try
								{
									Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
								}
								catch
								{
								}
								result = null;
								return result;
							}
						}
					}
					catch
					{
					}
				}
				Class1.smethod_5();
				class11 = null;
				try
				{
					string str11 = Class1.Class2.string_0;
					string str12 = Class1.string_3 + "\\";
					RegistryKey registryKey11 = Registry.CurrentUser;
					if (Class1.smethod_0())
					{
						registryKey11 = Registry.LocalMachine;
					}
					RegistryKey registryKey12 = registryKey11.OpenSubKey(str11 + str12, false);
					if (registryKey12 != null)
					{
						Class1.Class3 class21 = new Class1.Class3();
						class21.method_0((string)registryKey12.GetValue("1"), Class1.byte_1, Class1.byte_2);
						if (class11 == null)
						{
							class11 = class21;
						}
						if (class21.ulong_0 > class11.ulong_0)
						{
							class11 = class21;
						}
					}
				}
				catch
				{
				}
				try
				{
					if (Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()))
					{
						Class1.Class3 class22 = new Class1.Class3();
						class22.method_0(Class1.smethod_8(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()), Class1.string_2), Class1.byte_1, Class1.byte_2);
						if (class11 == null)
						{
							class11 = class22;
						}
						if (class22.ulong_0 > class11.ulong_0)
						{
							class11 = class22;
						}
					}
				}
				catch
				{
				}
				try
				{
					if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2))
					{
						Class1.Class3 class23 = new Class1.Class3();
						class23.method_0(Encoding.Unicode.GetString(Class1.smethod_11(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2)), Class1.byte_1, Class1.byte_2);
						if (class11 == null)
						{
							class11 = class23;
						}
						if (class23.ulong_0 > class11.ulong_0)
						{
							class11 = class23;
						}
					}
				}
				catch
				{
				}
				if (class11 == null)
				{
					class11 = new Class1.Class3();
				}
				try
				{
					class11.ulong_0 += 1uL;
				}
				catch
				{
					class11.ulong_0 = 0uL;
				}
				DateTime dateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
				if (@class.bool_15)
				{
					class11.int_2 += Math.Abs(dateTime.Subtract(class11.dateTime_1).Days);
				}
				class11.dateTime_1 = dateTime;
				if (@class.bool_16)
				{
					if (DateTime.Compare(dateTime, class11.dateTime_0) >= 0)
					{
						class11.dateTime_0 = dateTime;
					}
				}
				else
				{
					class11.dateTime_0 = dateTime;
				}
				if (@class.bool_17)
				{
					class11.int_0++;
				}
				int num6 = 0;
				int num7 = 0;
				bool flag13 = false;
				bool flag14 = false;
				bool flag15 = false;
				bool flag16 = false;
				if (@class.bool_18 && @class.bool_22)
				{
					num6++;
				}
				if (@class.bool_19)
				{
					num6++;
					if (class11.int_1 >= @class.int_5)
					{
						num7++;
						flag16 = true;
					}
				}
				if (@class.bool_17)
				{
					num6++;
					if (class11.int_0 > @class.int_3)
					{
						num7++;
						flag15 = true;
					}
				}
				if (@class.bool_15)
				{
					num6++;
					if (class11.int_2 > @class.int_2)
					{
						num7++;
						flag14 = true;
					}
				}
				if (@class.bool_16)
				{
					num6++;
					if (class11.dateTime_0 >= @class.dateTime_0)
					{
						num7++;
						flag13 = true;
					}
				}
				if (@class.bool_17 && flag15 && class11.int_0 > @class.int_3 + 1 && ((@class.bool_22 && num6 == num7) || ([email protected]_22 && num7 > 0)))
				{
					EvaluationMonitor.smethod_0().method_1((LicenseStatus)3);
					if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)2)
					{
						EvaluationMonitor.smethod_0().method_5(EvaluationMonitor.smethod_0().method_0());
					}
					if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)1)
					{
						EvaluationMonitor.smethod_0().method_3(EvaluationMonitor.smethod_0().method_0());
					}
					if (@class.bool_25)
					{
						class11.int_0--;
					}
				}
				EvaluationMonitor.smethod_0().method_25(class11.int_0);
				EvaluationMonitor.smethod_0().method_21(class11.int_2);
				EvaluationMonitor.smethod_0().method_37(class11.int_1);
				try
				{
					string str13 = Class1.Class2.string_0;
					string str14 = Class1.string_3 + "\\";
					RegistryKey registryKey13 = Registry.CurrentUser;
					if (Class1.smethod_0())
					{
						registryKey13 = Registry.LocalMachine;
					}
					RegistryKey registryKey14;
					if (registryKey13.OpenSubKey(str13 + str14, false) == null)
					{
						registryKey13 = Registry.CurrentUser;
						if (Class1.smethod_0())
						{
							registryKey13 = Registry.LocalMachine;
						}
						registryKey14 = registryKey13.CreateSubKey(str13 + str14);
					}
					registryKey13 = Registry.CurrentUser;
					if (Class1.smethod_0())
					{
						registryKey13 = Registry.LocalMachine;
					}
					registryKey14 = registryKey13.OpenSubKey(str13 + str14, true);
					if (registryKey14 != null)
					{
						registryKey14.SetValue("1", class11.method_5(Class1.byte_1, Class1.byte_2));
						registryKey14.Close();
					}
				}
				catch
				{
				}
				try
				{
					if (Class0.smethod_5(type_0.Assembly).ToString().Length > 0 && File.Exists(Class0.smethod_5(type_0.Assembly).ToString()))
					{
						Class1.smethod_7(Path.GetDirectoryName(Class0.smethod_5(type_0.Assembly).ToString()), Class1.string_2, class11.method_5(Class1.byte_1, Class1.byte_2));
					}
				}
				catch
				{
				}
				try
				{
					FileStream fileStream4 = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Class1.Class2.string_2 + Class1.string_2, FileMode.Create, FileAccess.ReadWrite);
					byte[] bytes3 = Encoding.Unicode.GetBytes(class11.method_5(Class1.byte_1, Class1.byte_2));
					fileStream4.Write(bytes3, 0, bytes3.Length);
					fileStream4.Close();
				}
				catch
				{
				}
				if ((@class.bool_22 && num6 == num7) || ([email protected]_22 && num7 > 0))
				{
					if (flag13)
					{
						try
						{
							EvaluationMonitor.smethod_0().method_1((LicenseStatus)3);
							if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)2)
							{
								EvaluationMonitor.smethod_0().method_5(EvaluationMonitor.smethod_0().method_0());
							}
							if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)1)
							{
								EvaluationMonitor.smethod_0().method_3(EvaluationMonitor.smethod_0().method_0());
							}
							if (@class.bool_28)
							{
								string text7 = @class.string_5;
								text7 = text7.Replace(Class1.Class2.string_16, @class.dateTime_0.ToString());
								text7 = text7.Replace(Class1.Class2.string_17, DateTime.Now.ToString());
								if (@class.bool_25)
								{
									try
									{
										Class1.EnableWindow(Process.GetCurrentProcess().MainWindowHandle, false);
									}
									catch
									{
									}
								}
								Class1.ShowMessage(text7);
							}
							if (@class.bool_25)
							{
								try
								{
									Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
								}
								catch
								{
								}
								result = null;
								return result;
							}
							goto IL_43AF;
						}
						catch
						{
							goto IL_43AF;
						}
					}
					if (flag14)
					{
						try
						{
							EvaluationMonitor.smethod_0().method_1((LicenseStatus)3);
							if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)2)
							{
								EvaluationMonitor.smethod_0().method_5(EvaluationMonitor.smethod_0().method_0());
							}
							if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)1)
							{
								EvaluationMonitor.smethod_0().method_3(EvaluationMonitor.smethod_0().method_0());
							}
							if (@class.bool_27)
							{
								int num8 = @class.int_2 - class11.int_2;
								if (num8 < 0)
								{
									num8 = 0;
								}
								string text8 = @class.string_4;
								text8 = text8.Replace(Class1.Class2.string_12, class11.int_2.ToString());
								text8 = text8.Replace(Class1.Class2.string_15, @class.int_2.ToString());
								text8 = text8.Replace(Class1.Class2.string_13, num8.ToString());
								if (@class.bool_25)
								{
									try
									{
										Class1.EnableWindow(Process.GetCurrentProcess().MainWindowHandle, false);
									}
									catch
									{
									}
								}
								Class1.ShowMessage(text8);
							}
							if (@class.bool_25)
							{
								try
								{
									Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
								}
								catch
								{
								}
								result = null;
								return result;
							}
							goto IL_43AF;
						}
						catch
						{
							goto IL_43AF;
						}
					}
					if (flag15)
					{
						try
						{
							EvaluationMonitor.smethod_0().method_1((LicenseStatus)3);
							if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)2)
							{
								EvaluationMonitor.smethod_0().method_5(EvaluationMonitor.smethod_0().method_0());
							}
							if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)1)
							{
								EvaluationMonitor.smethod_0().method_3(EvaluationMonitor.smethod_0().method_0());
							}
							if (@class.bool_29)
							{
								int num9 = @class.int_3 - class11.int_0;
								if (num9 < 0)
								{
									num9 = 0;
								}
								string text9 = @class.string_6;
								text9 = text9.Replace(Class1.Class2.string_18, class11.int_0.ToString());
								text9 = text9.Replace(Class1.Class2.string_19, @class.int_3.ToString());
								text9 = text9.Replace(Class1.Class2.string_20, num9.ToString());
								if (@class.bool_25)
								{
									try
									{
										Class1.EnableWindow(Process.GetCurrentProcess().MainWindowHandle, false);
									}
									catch
									{
									}
								}
								Class1.ShowMessage(text9);
							}
							if (@class.bool_25)
							{
								try
								{
									Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
								}
								catch
								{
								}
								result = null;
								return result;
							}
							goto IL_43AF;
						}
						catch
						{
							goto IL_43AF;
						}
					}
					if (flag16)
					{
						try
						{
							EvaluationMonitor.smethod_0().method_1((LicenseStatus)3);
							if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)2)
							{
								EvaluationMonitor.smethod_0().method_5(EvaluationMonitor.smethod_0().method_0());
							}
							if (EvaluationMonitor.smethod_0().method_6() == (LicenseLocation)1)
							{
								EvaluationMonitor.smethod_0().method_3(EvaluationMonitor.smethod_0().method_0());
							}
							if (@class.bool_33)
							{
								int num10 = @class.int_5 - class11.int_1;
								if (num10 < 0)
								{
									num10 = 0;
								}
								string text10 = @class.string_9;
								text10 = text10.Replace(Class1.Class2.string_22, class11.int_1.ToString());
								text10 = text10.Replace(Class1.Class2.string_23, @class.int_5.ToString());
								text10 = text10.Replace(Class1.Class2.string_14, num10.ToString());
								if (@class.bool_25)
								{
									try
									{
										Class1.EnableWindow(Process.GetCurrentProcess().MainWindowHandle, false);
									}
									catch
									{
									}
								}
								Class1.ShowMessage(text10);
							}
							if ([email protected]_25)
							{
								goto IL_43AF;
							}
							try
							{
								Class1.TerminateProcess(Class1.GetCurrentProcess(), 1);
							}
							catch
							{
							}
							result = null;
						}
						catch
						{
							goto IL_43AF;
						}
						return result;
					}
				}
				else
				{
					if (@class.bool_19)
					{
						Class1.Class10 class24 = new Class1.Class10(@class, class11, type_0, Class1.byte_1, Class1.byte_2);
						class24.timer_0 = new System.Threading.Timer(new TimerCallback(class24.method_0), null, 60000, 60000);
					}
					if (@class.bool_18)
					{
						Class1.Class6 class25 = new Class1.Class6(@class, type_0.Assembly);
						class25.timer_0 = new System.Threading.Timer(new TimerCallback(class25.method_0), null, @class.int_4 * 60000, @class.int_4 * 60000);
					}
					if (@class.bool_16 || @class.bool_15)
					{
						Class1.Class9 class26 = new Class1.Class9(@class, class11, type_0, Class1.byte_1, Class1.byte_2);
						Class1.Class8 class27 = new Class1.Class8(@class, class11, type_0, Class1.byte_1, Class1.byte_2);
						class26.class8_0 = class27;
						class27.class9_0 = class26;
						class26.int_1 = num7;
						class26.int_0 = num6;
						class27.int_1 = num7;
						class27.int_0 = num6;
						if (@class.bool_16 && !flag13)
						{
							class27.timer_0 = new System.Threading.Timer(new TimerCallback(class27.method_0), null, 60000, 60000);
						}
						if (@class.bool_15 && !flag14)
						{
							class26.timer_0 = new System.Threading.Timer(new TimerCallback(class26.method_0), null, 60000, 60000);
						}
					}
				}
			}
			IL_43AF:
			Class1.sortedList_0[type_0.Assembly.FullName] = true;
			Class1.sortedList_1[type_0.Assembly.FullName] = new Class1.Class12(this, "");
			return new Class1.Class12(this, "");
		}
		return result;
	}