Diablo 3 Cipher

Discussion in 'C#' started by Homura, Sep 5, 2013.

  1. Homura

    Homura Creator of Avalon XPG Developer Lifetime Gold
    0/47

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace AvalonIO.Algorithms
    {
    class Diablo3Cipher
    {
    private int Cipher(byte[] buffer, uint length)
    {
    ulong iv = 0x2EC9A01B305F92D8;

    if (buffer == null)
    return -1;

    for (int i = 0; i < length; i++)
    {
    ulong temp = buffer ^ (iv & 0xFF);
    buffer = Convert.ToByte(temp & 0xFF);

    iv = ((iv ^ buffer) << 56) | (iv >> 8);
    }

    // success
    return 0;
    }
    }
    }

    Enjoy and give credit to me if you use.
     
  2. gold972

    gold972 团队XPG影响 Effect XPG Developer TeamXPG
    205/282

    awesome job ;) homura
     
  3. Homura

    Homura Creator of Avalon XPG Developer Lifetime Gold
    85/94

    Nah, this games cipher was simple ;)
    But yeah the way I reversed it is nice and clean ;)
     
  4. sensi420

    sensi420 Contributor TeamXPG
    205/282

    Looks good, great share
     
  5. Homura

    Homura Creator of Avalon XPG Developer Lifetime Gold
    85/94

    Thanks :) It was an easy Cipher to Reverse :) just found it in IDA and reversed it.
     
  6. Ac

    AceeZ Newbie
    0/47

    How to use it? :D
     
  7. Homura

    Homura Creator of Avalon XPG Developer Lifetime Gold
    85/94

    well first learn C# or secondly just paste it in a .cs class and compile as a .dll and use in what ever language you do, but I didn't give out the encryption, it only decrypts, to encrypt it is same exact code but you need to make it save the byte to use with the IV.
     

Share This Page