![]() ![]() We also notice the 01 that is repeating after each ID. We see here that we have a value getting incremented same principle as an ID this would make sense since those files are data storage for the game. If we look closer we see a pattern emerge: The first 4 bytes group is such a perfect set: 00000001 If we go back to the end of our first string listing we notice a pattern in the hex data. Yes now we are going to the boring or interesting stuff. If we look at the next 4 bytes as an int they make: 1957787 (001DDF9B) This leads us to the beginning of another listing of string So the first 4 bytes of a d2i file are representative of the size of the string data. If we select all the bytes until we arrive the end of all the string listing we get the same number. If we look at the first 4 bytes as an int we have the number: 26343905 (0191F9E1) Looking further we can see that every string starts with a 2 bytes integer that specifies the length of the string. The first string in the file is written twice (red) and we notice in the group of 4 bytes that make the beginning of the string they both have the first 2 unreadable bytes (blue)Ġ022 converted to int gives us 34 which coincidentally is the length of the string. While still looking at the beginning of the file I noticed something else that was interesting. The number seems very "lucky" as this could easily be 3, 2 bytes integer or 1, 4 byte integer and one 2 byte integer. So I first decided to look at the beginning of the file and noticed that the beginning of the first string was after a group of 4 bytes and 2 bytes. We can clearly see some repetition on the right panel and if we look at the Hex data we can see a lot of the 2 bytes groups ending in 00 or 00001. There was a pattern at least a visible one! I did not know what it represented nor how to interpret it but at least there was hope. Upon opening the file into a Hex Editor something caught my eye straightaway! My next step was opening it into a Hex editor since the jumbled text meant it wasn't meant to be a readable text format. However some of the lines were completely not readable. Lucky us that meant that there was no encryption on the data. And it turns out part of the file was readable. ![]() My first approach was to open the file in atom, maybe with a bit of luck it would be something readable like JSON. After all the principle of local game resources is to speedup loading times. Knowing we are working with a video game, the data must be stored in an easy way to read otherwise there would be no point having them locally. ![]() You can follow this tutorial with the same file I used which can be found here: i18n_fr.d2i I knew that d2i files were the files responsible for the npc dialogues, thus I decided to try to understand them. Having done some work in the emulation of the game Dofus as well as the bot side of it I knew that information such as weapon names, dialogues, maps, musics etc were stored in local files. This is the thought process behind this previous article: I thought this could interest a few people. In the previous article talking about d2i I had not mentioned the thought process on how I reversed the file and understood its structure. Looking at reverse engineering game files from the french mmorpg Dofus ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |