Moonkis / CoTLMindReader

A save-file encryptor/decryptor for Cult of the Lamb
MIT License
6 stars 0 forks source link

Nintendo switch support? #1

Open fennectech opened 1 year ago

fennectech commented 1 year ago

https://transfer.sh/ddJfIe/slot_0 https://transfer.sh/Rf2at0/settings https://transfer.sh/DVt7Ta/meta_0

Would you consider adding support for switch saves? they seem to use a differnet method of encrypting

RayPS commented 2 months ago

I've been attempting to transfer my Nintendo Switch save file to other platforms such as Mac/PC to achieve a 60fps gaming experience.

I extracted the save file using JKSV.

To determine the format of the save file, I examined it in a hex editor and found that the first 4 bytes were 5A 42 1F 8B.

Upon consulting the magic bytes table on Wikipedia, I discovered that the GZIP (.gz/.tar.gz) format with magic bytes 1F 8B seemed plausible.

Consequently, I removed the first 2 bytes and saved the file as slot_0.gz, and my assumption proved correct as it decompressed into a plain json file.

I relocated the uncompressed json file to the appropriate directories:

The game seamlessly recognized the plain json save file without requiring any additional re-encryption.

Conclusion

dd if=slot_0 bs=1 skip=2 | gunzip > slot_0.json
dd if=meta_0 bs=1 skip=2 | gunzip > meta_0.json