示例#1
0
        // Token: 0x06000BE8 RID: 3048 RVA: 0x00023BE8 File Offset: 0x00021DE8
        public static string GetHwid(HwidStrength hwidStrength, bool ignoreNullValues = false)
        {
            string text = null;
            uint?  num  = null;

            foreach (Processor processor in HardwareGatherer.GetProcessors())
            {
                if (processor.Id != null)
                {
                    text = processor.Id;
                }
            }
            foreach (HardDrive hardDrive in HardwareGatherer.GetHardDrives())
            {
                if (hardDrive.Signature != null)
                {
                    num = hardDrive.Signature;
                }
            }
            string serialNumber     = BiosGatherer.GetSerialNumber();
            string activeMacAddress = NetGatherer.GetActiveMacAddress();

            switch (hwidStrength)
            {
            case HwidStrength.Light:
                if (ignoreNullValues || text != null)
                {
                    return(DataRecoveryHelper.GetMd5Hash(text + Environment.UserName).Replace("-", string.Empty));
                }
                return(null);

            case HwidStrength.Medium:
                if (ignoreNullValues || (text != null && num != null))
                {
                    return(DataRecoveryHelper.GetMd5Hash(text + num + Environment.UserName).Replace("-", string.Empty));
                }
                return(null);

            case HwidStrength.Strong:
                if (ignoreNullValues || (text != null && num != null && serialNumber != null && activeMacAddress != null))
                {
                    return(DataRecoveryHelper.GetMd5Hash(string.Concat(new object[]
                    {
                        text,
                        num,
                        serialNumber,
                        activeMacAddress,
                        Environment.UserName
                    })).Replace("-", string.Empty));
                }
                return(null);

            default:
                return(null);
            }
        }
示例#2
0
        // Token: 0x06000BE2 RID: 3042 RVA: 0x000236AC File Offset: 0x000218AC
        public static ulong?GetTotalMemoryCapacity()
        {
            ulong?num = new ulong?(0UL);

            foreach (RamStick ramStick in HardwareGatherer.GetRamSticks())
            {
                num += ramStick.Capacity;
            }
            ulong?num2 = num;
            ulong num3 = 0UL;

            if (!(num2.GetValueOrDefault() == num3 & num2 != null))
            {
                return(num);
            }
            return(null);
        }
示例#3
0
        // Token: 0x06000BE6 RID: 3046 RVA: 0x00023A50 File Offset: 0x00021C50
        public static uint?GetTotalGpuMemoryCapacity()
        {
            uint?num = new uint?(0u);

            foreach (GraphicsCard graphicsCard in HardwareGatherer.GetGraphicsCards())
            {
                num += graphicsCard.MemoryCapacity;
            }
            uint?num2 = num;
            uint num3 = 0u;

            if (!(num2.GetValueOrDefault() == num3 & num2 != null))
            {
                return(num);
            }
            return(null);
        }