ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Oct 19, 2019 9:50 pm

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jul 08, 2019 11:09 pm 
User avatar

Joined: Fri Apr 20, 2018 12:41 am
Posts: 326
Given by the name, these files are compressed with ZLib and yes I can decompress these with typical ZLib decompression but can I get the actual filenames of the extracted file(s) or is that impossible?

filedropper.com/fgafmgzlib


Top
   
PostPosted: Tue Jul 09, 2019 12:37 pm 

Joined: Fri Aug 26, 2016 3:11 pm
Posts: 61
LolHacksRule wrote:
Given by the name, these files are compressed with ZLib and yes I can decompress these with typical ZLib decompression but can I get the actual filenames of the extracted file(s) or is that impossible?

filedropper.com/fgafmgzlib


the files appear to be archives and in most cases has names and paths (depending for path if there is one)

the structure itself doesn't appear to be overly complicated but the math is weird to guess.
each file appears to be broken into 3 sections

Section 1
Data types / extension

Section 2
Names

Section 3
Data

The Sound data appears to only specify mp3 for the first one and then the rest are blank, maybe a ditto type of thing.
The file names are straight forward and ascii from what I saw, as for the math piece of it, it appears to be (value - 1) / 2 for what it says is the length
the Data section is the same thing but the length is even more obscured by some logic (may apply to prior if data was longer, it seems the number of bytes for length is variable as part of that logic)

Edit:
I was correct in the assumption even the smaller values probably followed the similar logic however it just wasn't as apparent.
The values for the length use a simple bit shift style logic using the high bit to flag if that byte is the last for the length

Basically put:
byte value = Read.Byte();
bool continue = (bool)(value >> 7) & 1;

the last byte only contains 6 bits of the original number, the high bit will be 0 and the low bit will be 1
all bytes proceed this will contain 7 bits of the original value shifted up (2 from the previous byte or more depending on position) and the 8th bit used for the flag (this is why the math looked so odd)

I'll see if I can write something that can do the math correctly to be able to extract all of the archives.


Top
   
PostPosted: Sat Jul 13, 2019 11:46 am 

Joined: Fri Aug 26, 2016 3:11 pm
Posts: 61
LolHacksRule wrote:
Given by the name, these files are compressed with ZLib and yes I can decompress these with typical ZLib decompression but can I get the actual filenames of the extracted file(s) or is that impossible?

filedropper.com/fgafmgzlib


Here you go, I attached a program to extract the files and the source too. It seems if there were a couple more rules in there but I got it all working 100% I believe.


Attachments:
FamilyGuy_Source.zip [12.54 KiB]
Downloaded 18 times
FamilyGuy_Extractor.zip [282.05 KiB]
Downloaded 14 times
Top
   
PostPosted: Sun Jul 14, 2019 3:58 pm 
User avatar

Joined: Fri Apr 20, 2018 12:41 am
Posts: 326
Thanks so much.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 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