Esempio n. 1
0
        // Token: 0x06000002 RID: 2 RVA: 0x00002050 File Offset: 0x00000250
        public static string GetCountry()
        {
            string result;

            try
            {
                StringBuilder stringBuilder = new StringBuilder(256);
                int           localeInfo    = Clientinfo.GetLocaleInfo(1024u, 4098u, stringBuilder, stringBuilder.Capacity);
                if (localeInfo > 0)
                {
                    result = stringBuilder.ToString().Substring(0, localeInfo - 1);
                }
                else
                {
                    result = string.Empty;
                }
            }
            catch
            {
                result = "";
            }
            return(result);
        }
Esempio n. 2
0
        // Token: 0x06000004 RID: 4 RVA: 0x00002108 File Offset: 0x00000308
        public static string FriendlyName()
        {
            string result;

            try
            {
                string registryString  = Clientinfo.GetRegistryString("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "ProductName");
                string registryString2 = Clientinfo.GetRegistryString("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "CSDVersion");
                if (registryString != "")
                {
                    result = (registryString.StartsWith("Microsoft") ? "" : "Microsoft ") + registryString + ((registryString2 != "") ? (" " + registryString2) : "");
                }
                else
                {
                    result = "";
                }
            }
            catch
            {
                result = "";
            }
            return(result);
        }