ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Oct 28, 2021 7:21 am

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Aug 01, 2021 9:02 am 

Joined: Sat Jul 31, 2021 9:48 am
Posts: 4
Does anybody know the compression method used in savegame.dat files (after extracted from STFS)? There is a tool that can extract but I would like to know more than that. Nothing else on this website or anywhere really. Aluigi was credited in the original tool for his quickBMS tool.


Top
   
PostPosted: Wed Aug 04, 2021 6:09 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12549
A sample savegame.dat may be useful for who wants to analyze it.


Top
   
PostPosted: Wed Aug 04, 2021 4:56 pm 

Joined: Sat Jul 31, 2021 9:48 am
Posts: 4
savegame.dat
Attachment:
The attachment savegame.dat is no longer available

Decompressed savegame was too big, let me figure out something.
Edit: here it is https://github.com/h55ia/savegame.dat

The first 4 bytes is the compressed size: 0x0029051A (2,688,282)

skipping 4 null bytes???, the next 4 is the decompressed size: 0x0053A960 (5,482,848)

now the actual file starting at 12 bytes (0x0C)

compressed:
0x0000 38 2C 20 20 F5 63 71 14 00 C0 00 00 10 02 00 00: 8, ⌡cq .└.. ..
0x0010 00 00 EE 2E EE EE EE EE 77 17 BB 70 5D B8 DD DD: ..ε.εεεεw ╗p]╕▌▌
0x0020 CB DD BB BB 8B BB BB BB 5D B8 DD DD 80 8B 11 4D: ╦▌╗╗ ╗╗╗]╕▌▌ M
0x0030 9C 15 00 1C 00 00 03 0C FE F7 FF D1 83 7A A8 B7: . .. ■≈ ╤ z¿╖

decompressed:
0x0000 00 53 A2 10 00 00 00 0D 00 05 00 05 00 00 00 00 .Só ... . . ....
0x0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0040 00 00 00 00 00 00 00 00 00 00 07 01 00 00 1D 01 .......... ..
0x0050 00 00 36 01 00 00 51 01 00 00 68 01 00 00 80 01 ..6 ..Q ..h ..
0x0060 00 00 9A 01 00 00 B1 01 00 00 C8 01 00 00 E2 01 .. ..▒ ..╚ ..Γ
0x0070 00 00 F9 01 00 01 10 01 00 01 29 01 00 01 41 01 ..∙ . . ) . A


Attachments:
File comment: Compressed savegame file
savegame.dat [2.56 MiB]
Downloaded 54 times
Top
   
PostPosted: Thu Aug 05, 2021 7:37 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12549
Since it's an Xbox game I tried to use the good old XMemDecompress compression and... it did the magic :D
Code:
comtype xmemdecompress
endian big
get ZSIZE long
get ZERO long
get SIZE long
savepos OFFSET
math ZSIZE - OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE


Top
   
PostPosted: Thu Aug 05, 2021 9:57 am 

Joined: Sat Jul 31, 2021 9:48 am
Posts: 4
aluigi wrote:
Since it's an Xbox game I tried to use the good old XMemDecompress compression and... it did the magic :D
Code:
comtype xmemdecompress
endian big
get ZSIZE long
get ZERO long
get SIZE long
savepos OFFSET
math ZSIZE - OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE

Thank you! Funny thing is I had suspicions it was xmemdecompress but it never worked. Please upload this script to database so people can decompress their own save games!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited