• 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!

How to extract spr from ROTS (SOLVED)

alkurius

Advanced OT User
Joined
May 13, 2014
Messages
122
Reaction score
224
First of all, this post is only educational on how to extract the images.
It is a method that I found and I would like to share for the community

First of all, what is a spirit? is the set of images with which the animations of the game are made. usually in a spr file.. (Ex. tibia.spr)

You can investigate how these images are stored within the file, but the concept is that it is encoded in hexadecimal form and a set of 3 to 4 bytes form a pixel (RGB). in 32 x 32 pixels

Each server decides how to store this information, and how to compress this information.


Step1.
draw each pixel find and look for a pattern.
hopefully we find something but the safest thing is that we draw things without meaning.
Ex. 1642625815832.png


Taking the ROTS file as an example, we find that reading the entire file and drawing each pixel will not obtain anything...
why? because the file is encrypted and it would be impossible to decrypt it or it would take a long time.


Step2.
The question is how to decrypt the information?...
to trial and error identify that when loading the application decrypts the information and saves it in memory...
for which the most logical thing would be to repeat (Step1) but looking for some pattern on the memory.

for which the easiest thing is to go to the task manager, right click on the application, and generate a memory dump file. and creates a file with the memory that the application has at that moment.
1642626259840.png

Step3.
we repeat step 1 of drawing the information and hopefully we will find this.
1642626397226.png

visually identify a spirit,
what remains is to interpret how to draw it correctly.

attached a generic code to make extractions can be used as a basis. it is in c#


Step4.

once the pattern is identified we can create a routine to download each SPR.

1642626639737.png


what do you think about this method? it's cool?
 

Attachments

  • Generic ExtractSPR.txt
    1.9 KB · Views: 145 · VirusTotal
This legit works and its amazing to learn deep more about encrypt thank you a lot :D !!
 
how i can test this code, what i need put and where, for testing extract images?
for not only get random pixels?
1674966546066.png
 
Back
Top