VitaSmith / gust_tools

A set of utilities for dealing with Gust (Koei Tecmo) PC games files
Other
215 stars 24 forks source link

Please add Shallie values to gust_enc.json #9

Closed CatClawed closed 4 years ago

CatClawed commented 4 years ago

I can only get as far as finding the first literal value; I can't really follow the rest of the instructions as I don't know nearly enough about IDA.

VitaSmith commented 4 years ago

I'll look into it when I get a chance.

From what I can see, Shallie is the only game from the recent Dusk PC port that uses encrypted XML files, right?

CatClawed commented 4 years ago

Correct. E&L does not encrypt, and Ayesha does cursed things inside the executable instead.

VitaSmith commented 4 years ago

Here are the seeds you are after:

        {
            "id": "A16",
            "name": "Atelier Shallie",
            "main": [
                0x6df7,
                0xc953,
                0x72ef
            ],
            "table": [
                0xaa83,
                0xac8b,
                0x89cf
            ],
            "length": [
                0x1d,
                0x13,
                0x0b
            ],
            "fence": 0x13fa
        },

If you add the above to gust_enc.json and use -A16 as parameter when calling gust_enc.exe (e.g. gust_enc.exe -A16 GrowData.xml.e), you'll be able to decode the encoded files.

I actually lost quite a bit of time looking for these seeds in the wrong place, because Shallie also encrypts the .pcsave files from C:\Users\<user_name>\Documents\KoeiTecmo\Atelier Shallie DX\SAVEDATA\ with a similar, but not quite the same, algorithm and that one is listed first in the Shallie disassembly. So I found myself pointlessly trying to figure out why the seeds I found wouldn't work against the .xml.e files, before realizing there was a whole bunch of different seeds in the function that followed.

Maybe if I ever find myself with nothing better to do, I'll add pcsave decryption to gust_tools, but I don't think that will happen anytime soon.

Oh, and of course, I'll produce a new release of gust_tools with the updated seeds when I get a chance.