Idle Huntress .pak

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
condemn
Posts: 17
Joined: Sat May 11, 2019 3:26 pm

Idle Huntress .pak

Post by condemn »

Hi guys !

The game is Idle Huntress, the game archive containing .unity3d files is inside a 1GB .pak file

I've attached two samples from filecutter.

Any idea to extract the files ? Thanks !
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Idle Huntress .pak

Post by Ekey »

Code: Select all

# Idle Huntress (PAK) format
# script for QuickBMS http://quickbms.aluigi.org

idstring "MFS"
get DUMMY long
get VERSION byte
get FILES long

for i = 0 < FILES
   get NSIZE byte
   getdstring NAME NSIZE
   get SIZE long
   get OFFSET longlong
   putarray 0 i NAME
   putarray 1 i SIZE
   putarray 2 i OFFSET
next i

savepos BASE_OFFSET

for i = 0 < FILES
   getarray NAME 0 i
   getarray SIZE 1 i
   getarray OFFSET 2 i
   math OFFSET += BASE_OFFSET
   log NAME OFFSET SIZE
next i
condemn
Posts: 17
Joined: Sat May 11, 2019 3:26 pm

Re: Idle Huntress .pak

Post by condemn »

Thank you so much !

It seems all the extracted .unity3d files have a double UnityFS header, which is fine because I just need to delete the first 14 bytes to get AssetStudio to read them.

But since there are 9000+ files, is there a way or script to delete the first UnityFS header ?
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Idle Huntress .pak

Post by rabatini »

condemn wrote:Thank you so much !

It seems all the extracted .unity3d files have a double UnityFS header, which is fine because I just need to delete the first 14 bytes to get AssetStudio to read them.

But since there are 9000+ files, is there a way or script to delete the first UnityFS header ?


put

Code: Select all

xmath offset "(offset + 0x0e)"
xmath size "(size - 0x0e)"


before

Code: Select all

log NAME OFFSET SIZE
condemn
Posts: 17
Joined: Sat May 11, 2019 3:26 pm

Re: Idle Huntress .pak

Post by condemn »

Thanks !

I haven't tested yet because I opened more files in Hex editor just to see some don't have double UnityFS header or some have it + the engine version which would not work with the script ?

here is a screenshot from 3 different files

Image

Checking each file for potential different header will take a long time..
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: Idle Huntress .pak

Post by spiritovod »

You need this instead of "log NAME OFFSET SIZE":

Code: Select all

log MEMORY_FILE OFFSET SIZE
get DUMMY byte MEMORY_FILE
findloc BEGIN string "UnityFS" MEMORY_FILE ""
math SIZE - BEGIN
log NAME BEGIN SIZE MEMORY_FILE
condemn
Posts: 17
Joined: Sat May 11, 2019 3:26 pm

Re: Idle Huntress .pak

Post by condemn »

It works perfectly, thanks to the three of you !

Again, thanks for your time.
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Idle Huntress .pak

Post by rabatini »

condemn wrote:It works perfectly, thanks to the three of you !

Again, thanks for your time.


Now you have 2 modification that do the same thing lol, pick one.

i am not expert in unity stuff, but i managed to open in assetstudio.

regards.