DEV Community

Cover image for Reverse Engineering Game Files

Reverse Engineering Game Files

Médéric Burlet on July 03, 2019

Introduction Looking at reverse engineering game files from the french mmorpg Dofus In the previous article talking about d2i I had not...
Collapse
 
artoodeeto profile image
aRtoo

yo dude this is so dope. been trying to this since I was a kid. you know the game diablo the first one. we have disket so we can move to other pc. I knew theres a way to get rare items by copy paste some parts of the code. damn! teach me your ways

Collapse
 
crimsonmed profile image
Médéric Burlet • Edited

Hey man, call me senpai! (joking).

I'm glad that you enjoyed the post took me quite a while to retake all the screenshots since I had lost the previous ones hahaha. I have never looked at Diablo but that could be a fun challenge to do!

I noticed the #security tag isn't very active so I'm gonna post more and try to present more articles like this.

Collapse
 
artoodeeto profile image
aRtoo

Senpai!! tried doing the same thing. I was young and had no experience. I was like 16 at that time. I notice the owner of the computer shops character is so vamp. That's what he does. He copies and pastes some code into his game file. that's why he wants to keep the disket for "safe keeping".

btw opened the github account you used visual basic right? Thought ur doing it with c or c++.

thanks senpai!

Thread Thread
 
crimsonmed profile image
Médéric Burlet

Haha yeah I remember being shocked and lost by code when I was younger 😂

Yes for the reader I used VB.net since the reader can be incorporated with emulator and bots. Most emulator and bots for Dofus use .Net so it would easily be ingegrated.

Collapse
 
aezore profile image
Jose Rodriguez

Nice! I liked it, very informative. Let me suggest to “rewrite” the lucky header paragraph as it seemed to me a bit confusing and misleading. Maybe “three 2 bytes” to make it clear you’re referring to a group of 2 bytes pattern? Also it’s just a bit confusing when you refer to the lucky header pattern using an image showing a dword column grid (for anyone else reading, a “word” is a group of two bytes together and the picture shows a dOUBLEword grid. Two “nibbles” together form a byte and each nibble is every single number from 0-9 and letters from A-F which is an 8bit representation. Which means this progression: 1 bit -> 4bits(nibble or half a byte) -> 8 bits (1 byte, from 0 to F) -> 2 bytes (from 00 to FF..) -> 4 bytes (a “word”) -> 8 bytes (dword or double word) -> bigger words are usually named after its bit count, like 64bit word or 256 bit word but are not that common... After all a binary file is a stream of bytes and this is only a way for us to make sense of it. The column organization can be changed at anytime by any hex editor as it is only visual and it is not hard coded or anything. Just convenient depending on what type of data structure your are looking at, like for example this d2i file where there is no fixed size data but depends on strings length. A smaller grid division would make it a bit harder to spot the pattern. Sometimes your prefer a single byte grid when working with embedded electronics as data size is shorter. Congrats 👍🏻

Collapse
 
crimsonmed profile image
Médéric Burlet

Hey man thanks for the input I will defo make an edit during the day I totally agree that that part is a little hazy. It's my first time writing a lengthy article and got a little lost in the midst of it a little I will try my best to make clearer and interesting articles.

Collapse
 
raphael0011 profile image
Raphael M

Thanks to your job ! We waiting d2o file :p

Collapse
 
yovanoc profile image
Christopher Yovanovitch

I agree with you ;)

Collapse
 
brujua profile image
Bruno Crisafulli

Nice Job!

Collapse
 
crimsonmed profile image
Médéric Burlet

Thank you! It was a lot of fun!