Need help for decrypting account file.

SaintBurak Sep 30, 2013

  1. Sa

    SaintBurak Newbie
    0/47

    Joined:
    Apr 10, 2011
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    0
    Console:
    Xbox
    Ok.I've been working on this so long but ive never been successful.Here is the code i use:


    Code:
     byte[] buffer;
            private void Form1_Load(object sender, EventArgs e)
            {
                OpenFileDialog ofd = new OpenFileDialog();
                if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    Array.Resize(ref buffer, 16);
                    byte[] firstbytes = new byte[16];
                    System.IO.BinaryReader breader = new System.IO.BinaryReader(new System.IO.FileStream(ofd.FileName, System.IO.FileMode.Open));
                    firstbytes = buffer = breader.ReadBytes(16);
                    byte[] hmackey = { 0xE1, 0xBC, 0x15, 0x9C, 0x73, 0xB1, 0xEA, 0xE9, 0xAB, 0x31, 0x70, 0xF3, 0xAD, 0x47, 0xEB, 0xF3 };
                    System.Security.Cryptography.HMACSHA1 h = new System.Security.Cryptography.HMACSHA1(hmackey);
                    byte[] rckey = h.ComputeHash(buffer);
                    Array.Resize(ref rckey, 0x10);
                    Array.Resize(ref buffer, 8);
                    buffer = breader.ReadBytes(8);
                    RC4(ref buffer, rckey);
                    byte[] confounder = new byte[8];
                    Array.Copy(buffer, confounder, 8);
                    byte[] decrypteddata = new byte[380];
                    Array.Resize(ref buffer, 380);
                    buffer = breader.ReadBytes(380);
                    RC4(ref buffer, rckey);
                    Array.Copy(buffer, decrypteddata, 380);
                    breader.Close();
                    breader.Dispose();
                    SaveFileDialog sfd = new SaveFileDialog();
                    if (sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        FileStream fileStream = new FileStream(sfd.FileName, FileMode.Create, FileAccess.ReadWrite);
                        fileStream.Write(decrypteddata, 0, decrypteddata.Length);
                        fileStream.Close();
                    }
     
                }
            }
            public void RC4(ref Byte[] bytes, Byte[] key)
            {
                Byte[] s = new Byte[256];
                Byte[] k = new Byte[256];
                Byte temp;
                int i, j;
     
                for (i = 0; i < 256; i++)
                {
                    s = (Byte)i;
                    k = key[i % key.GetLength(0)];
                }
     
                j = 0;
                for (i = 0; i < 256; i++)
                {
                    j = (j + s + k) % 256;
                    temp = s;
                    s = s[j];
                    s[j] = temp;
                }
     
                i = j = 0;
                for (int x = 0; x < bytes.GetLength(0); x++)
                {
                    i = (i + 1) % 256;
                    j = (j + s) % 256;
                    temp = s;
                    s = s[j];
                    s[j] = temp;
                    int t = (s + s[j]) % 256;
                    bytes[x] ^= s[t];
                }
            }



    I need help.I dont understand why it does not decrypt.

    http://www.free60.org/Profile:Account
     

Share This Page

Close