GTAV By Team Avalon

Discussion in 'C#' started by Homura, Sep 24, 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
    byte[] Key = new byte[] { 0x66,0xC0,0xD6,0x9E,0xCE,0x49,0xCA,0x45,0x76,0x22,0xB5,0x85,0x8F,0x29,0xAC,0xB0,0x3C,0xBF,0xFB,0x0B,0x76,0x14,0x37,0x23,0xA1,0xC2,0x63,0xA6,0x2A,0xE9,0x68,0xEC };

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

    namespace GTA5Hash
    {
    public class GTAV
    {
    public long Fix(byte[] r3)
    {
    uint num2;
    long num3;
    long num4 = 0x3FAC7125;
    long length = r3.Length;
    for (num2 = 0; num2 < length; num2++)
    {
    num3 = (sbyte)r3[num2];
    num3 += num4;
    uint num = ((uint)num3) << 10;
    num3 = num + num3;
    num = ((uint)num3) >> 6;
    num4 = num ^ num3;
    }
    num2 = (uint)(num4 << 3);
    num2 = ((uint)num4) + num2;
    num3 = num2 >> 11;
    num2 = ((uint)num3) ^ num2;
    num3 = num2 << 15;
    return (num3 + num2);
    }
    }
    }


    PPC:

    _XOR:
    li %r11, 0 # Load Immediate
    cmplwi cr6, %r4, 0 # Compare Logical Word Immediate
    beq cr6, $$$$ # Branch if equal

    mtctr %r4 # Move to count register

    [Loop]
    $loop: # Load Byte and Zero Indexed
    lbzx %r10, %r11, %r3
    addi %r11, %r11, 1 # Add Immediate
    extsb %r10, %r10 # Extend Sign Byte
    add %r10, %r10, %r5 # Add
    slwi %r9, %r10, 10 # Shift Left Immediate
    add %r10, %r9, %r10 # Add
    srwi %r9, %r10, 6 # Shift Right Immediate
    xor %r5, %r9, %r10 # XOR
    bdnz $loop # CTR--; branch if CTR non-zero

    [End]
    $$$$: # Shift Left Immediate
    slwi %r11, %r5, 3
    add %r11, %r5, %r11 # Add
    srwi %r10, %r11, 11 # Shift Right Immediate
    xor %r11, %r10, %r11 # XOR
    slwi %r10, %r11, 15 # Shift Left Immediate
    add %r3, %r10, %r11 # Add
    blr # Branch unconditionally
    # End of function _XOR

    Credit to Team Avalon
    PPC Analysis: Homura
    Reversed by Team Avalon
    Members include: Chaos/Homura, XPGOBYTO/Raiden x, Dippidip/Vanquish.

    Unlike others I don't see the point in keeping it to myself, I have little interest in this game as I don't have it, I found ppc a week ago but was lazy, the keys were simple to find, if anyone wants me to show them how to find the functions I am willing to do that, I am lazy when it comes to reversing (busy with reversing game engines right now and translating them)

    Credits for Kill_Seth For The power pc
     
  2. gold972

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

    6,833
    14,943
    205
    Dec 6, 2010
    France Kernal XDK
    Console:
    Xbox
    good job guys enjoie ;)
     
  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
    yeah didn't see any point in keeping to ourselves.
     
  4. xIIJazza

    xIIJazza Gods divine one
    0/47

    547
    149
    0
    Jun 7, 2011
    Console:
    Xbox
    May wanna move it to gold, I think posting the key is illegal. From what i've seen :O
     
  5. RedHulk

    RedHulk I Can't Die XPG Developer Lifetime Gold
    0/47

    574
    444
    0
    Feb 6, 2012
    Your moms bedroom
    Console:
    Playstation 4
  6. 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
    Why would it be illegal? I mean if that was the case the editors would be illegal lol.

    Thanks, finding the functions in ida are simple just converting ppc to C or C# is a pain. but can be done with a little time >.>
     
  7. xIIJazza

    xIIJazza Gods divine one
    0/47

    547
    149
    0
    Jun 7, 2011
    Console:
    Xbox
    "An encryption key is required to run this program. It is illegal to distribute the key, but you can find programs that extract it."
     
  8. RedHulk

    RedHulk I Can't Die XPG Developer Lifetime Gold
    0/47

    574
    444
    0
    Feb 6, 2012
    Your moms bedroom
    Console:
    Playstation 4
    Yea i never tried to learn c# which i should be i lost the motavation awhile ago. Maybe i'll learn by the end of this year if i get a reason too, lol
     
  9. 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
    ? where is that from ? and hmm well no point in it anyway >.> I mean once a tool is made it kinda defeats the purpose of the key being a secret, I mean if Rock star wanted to protect it they should of masked it or used external calls or something more annoying, but they didn't.

    just knowing C or C++ is enough, I mean they are pretty much same thing lol, I just paste my C code in C# class and fix up the errors >.> well only small differences. C or C++ are pretty much exactly the same, when I got into reversing game engines I learned that C and C++ are a bit different... well reversing game engines helped me a lot, taught me how to find everything in a few minutes and getting comfortable with IDA shortcut keys helps a lot.. especially debugging the games executables as that allows me to see everything that it does, I also figure out how to remove anti-debugger protections ;) they only really target ollydbg and not ida lol.
     
  10. xIIJazza

    xIIJazza Gods divine one
    0/47

    547
    149
    0
    Jun 7, 2011
    Console:
    Xbox
    The creator of LibertyV stated that, but I'd say they don't care anymore(Rockstar) as it takes a google search xD
     
  11. 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
    don't know who that is and they can bite me if they have a problem with it, I am just being nice and giving out the key to help others, Rockstar doesn't give a Fecal Leaking, if they did they would of properly protected it in the first place, everything was simple to find in the default.xex, they just made it so no noobs could reverse it.
     
  12. Renegade

    Renegade Super Special Awesome XPG Developer
    105/188

    1,212
    894
    105
    Nov 19, 2009
    United Kingdom
    Console:
    Xbox
  13. xI

    xIcHOcOLaTe Newbie BANNED
    0/47

    3
    3
    0
    Oct 5, 2011
    Console:
    Xbox
    You're lazy when it comes to reversing, because you're busy with reversing.

    #Logic
     
  14. Renegade

    Renegade Super Special Awesome XPG Developer
    105/188

    1,212
    894
    105
    Nov 19, 2009
    United Kingdom
    Console:
    Xbox
    So..uh where do we start with your "extreme reversing skills"

    One: Why do you have your comments on if you understand PPC

    Two: Stop thinking you're high and mighty with censoring functions, it's not hard to locate it:

    [​IMG]

    Three: The key is located at 0x837C6CB0. Everyone go nuts.

    Four: That _XOR thing? Isn't even used in the savegames, which is what that 'key you found' is used for.

    So what did you even accomplish with this?

    Five: Why post the savegame key that was found 2 weeks ago, when you're not even going to incorporate it in the code? A cry for attention probably.

    I don't understand your logic here...

    [​IMG]


    This is how a savegame's cryptography is supposed to work

    [​IMG]

    Want my advice? Why not leave the "Reverse Engineering" to Vulnavia or whatever his name was. You clearly do not understand what you are trying to accomplish here.

    I don't mean to undermine you or insult you in any way. What you have posted is utter nonsense and has nothing to do with the the actual processing of the save.

    Leave Reverse Engineering to the big boys.

    Lots of love, Team Akatsuki
     
  15. Sh

    Sharp_Shot123 Epic XPG Gamer Gold Subscriber
    0/47

    868
    166
    0
    Dec 4, 2010
    Sacramento, CA.
    Console:
    Xbox
    [​IMG]
    Anyway though, thanks for the contribution Homura!
     
  16. ki

    kill_seth Newbie
    0/47

    28
    6
    0
    Jan 19, 2011
    Console:
    Xbox

Share This Page