Packet Decrypter/Encrypter

12/26/2007 05:35 clearscreen#1
I started working on this shit before I bothered checking if there were any other hacks for the game. I don't know if there's already code for packet decryption out there but if there's not, have fun :)

Code:
Dim rTable() As String

Private Sub Form_Load()

    Dim sTable As String
    sTable = "1F CA 29 AC 03 1E 2D A0 27 B2 71 D4 8B 86 F5 48 "
    sTable = sTable & "2F 9A B9 FC 13 EE BD F0 37 82 01 24 9B 56 85 98 "
    sTable = sTable & "3F 6A 49 4C 23 BE 4D 40 47 52 91 74 AB 26 15 E8 "
    sTable = sTable & "4F 3A D9 9C 33 8E DD 90 57 22 21 C4 BB F6 A5 38 "
    sTable = sTable & "5F 0A 69 EC 43 5E 6D E0 67 F2 B1 14 CB C6 35 88 "
    sTable = sTable & "6F DA F9 3C 53 2E FD 30 77 C2 41 64 DB 96 C5 D8 "
    sTable = sTable & "7F AA 89 8C 63 FE 8D 80 87 92 D1 B4 EB 66 55 28 "
    sTable = sTable & "8F 7A 19 DC 73 CE 1D D0 97 62 61 04 FB 36 E5 78 "
    sTable = sTable & "9F 4A A9 2C 83 9E AD 20 A7 32 F1 54 0B 06 75 C8 "
    sTable = sTable & "AF 1A 39 7C 93 6E 3D 70 B7 02 81 A4 1B D6 05 18 "
    sTable = sTable & "BF EA C9 CC A3 3E CD C0 C7 D2 11 F4 2B A6 95 68 "
    sTable = sTable & "CF BA 59 1C B3 0E 5D 10 D7 A2 A1 44 3B 76 25 B8 "
    sTable = sTable & "DF 8A E9 6C C3 DE ED 60 E7 72 31 94 4B 46 B5 08 "
    sTable = sTable & "EF 5A 79 BC D3 AE 7D B0 F7 42 C1 E4 5B 16 45 58 "
    sTable = sTable & "FF 2A 09 0C E3 7E 0D 00 07 12 51 34 6B E6 D5 A8 "
    sTable = sTable & "0F FA 99 5C F3 4E 9D 50 17 E2 E1 84 7B B6 65 F8"
    
    rTable = Split(sTable, " ")
    
    If UBound(rTable) <> 255 Then
        Debug.Print "Error parsing table, size is: "; UBound(rTable)
    End If
    
End Sub

Private Function CryptData(sData As String) As String
    
    Dim iCount As Integer
    Dim BL As Integer
    Dim DL As Integer
    
    iCount = 0
    
    For i = 0 To Len(sData) - 2
    
        BL = "&H" & Mid(sData, i + 1, 2)
        DL = "&H" & rTable(iCount)
        
        DL = BL Xor DL
        
        BL = &H3F
        BL = BL Xor DL
        
        If Len(Hex(BL)) = 1 Then
            CryptData = CryptData & "0" & Hex(BL)
        Else
            CryptData = CryptData & Hex(BL)
        End If
        
        i = i + 1
        iCount = iCount + 1
        
    Next i
    
End Function
This is as far as I'll go with this game because I like clean and untouched targets ;)

Greetings and a merry x-mas from clearscreen (also known from the SREmu project)
12/26/2007 06:01 LordDeems#2
WOO !!!

I've been looking for this all my life, thank you for my Christmas gift !!
01/14/2008 22:22 clearscreen#3
Updated
01/15/2008 13:27 veryhard00#4
What does it do?
01/16/2008 08:18 clearscreen#5
Quote:
Originally Posted by veryhard00 View Post
What does it do?
It decrypts packets that are normally encrypted (duh).
01/18/2008 13:39 woodcuttern#6
Erm newbie question but how do we use this?

Do we compile it?

Use it as an assembly code?

i'm confused :X

/EDIT; Will WPE work with this?
02/10/2008 11:58 dan5252593#7
For C++ or Visual Basic?(I think Visual Basic)
02/22/2008 06:27 clearscreen#8
bump
02/23/2008 18:38 darksonic#9
its VB but can be ported to any language.