Diablo 3 Cipher

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

  1. Homura

    Homura Creator of Avalon XPG Developer Lifetime Gold
    0/47

    857
    793
    85
    Mar 8, 2011
    Wouldn't you like to know.
    Console:
    Xbox
    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

    6,833
    14,943
    205
    Dec 6, 2010
    France Kernal XDK
    Console:
    Xbox
    awesome job ;) homura
     
  3. Homura

    Homura Creator of Avalon XPG Developer Lifetime Gold
    85/94

    857
    793
    85
    Mar 8, 2011
    Wouldn't you like to know.
    Console:
    Xbox
    Nah, this games cipher was simple ;)
    But yeah the way I reversed it is nice and clean ;)
     
  4. sensi420

    sensi420 Contributor TeamXPG
    205/282

    2,530
    5,157
    205
    May 20, 2012
    In your kitchen drinking your MILK!!!
    Console:
    Xbox
    Looks good, great share
     
  5. Homura

    Homura Creator of Avalon XPG Developer Lifetime Gold
    85/94

    857
    793
    85
    Mar 8, 2011
    Wouldn't you like to know.
    Console:
    Xbox
    Thanks :) It was an easy Cipher to Reverse :) just found it in IDA and reversed it.
     
  6. Ac

    AceeZ Newbie
    0/47

    3
    0
    0
    Sep 7, 2013
    Console:
    Xbox
    How to use it? :D
     
  7. Homura

    Homura Creator of Avalon XPG Developer Lifetime Gold
    85/94

    857
    793
    85
    Mar 8, 2011
    Wouldn't you like to know.
    Console:
    Xbox
    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