• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Tibia 1231 server game packet decompression

QuaS

Cykotitan Pwned =/
Joined
Sep 11, 2008
Messages
838
Reaction score
28
Location
Poland/ Wroclaw
Hey folks.

Do any of you have the idea how to decompress deflated XTEA decoded server packet?
The packet structure is:
Code:
2 byte packet length (standard)
2 byte sequence number (each packet has this number incremented)
2 byte (or two 1 byte) indicator about compression - 0x00 and 0x00 for uncompressed and 0x00 0xC0 for compressed packet
(packet length - 6) bytes - rest of packet XTEA encrypted.

As I am able to decrypt XTEA payload it get me:
Code:
2 byte decrypted payload length
payload length bytes - decrypted xtea packet
some padding XTEA related bytes (up to 7, as XTEA encryption requires % 8 == 0)

Now I am stuck on decrypted XTEA payload which has compression byte indicating compression.
It seems to be compressed with deflate huffman compression, yet no matter how hard I try to mangle payload I can't inflate it back.

I looked up all the things I were able to find, including:

There must be something more here. I am kind of stuck.
Deflate algorithm screams that the compressed data header is invalid.

Any ideas?
 
Back
Top