The Forum is up for sale: XeNTaX Forum looking for new owner

decrypt pak file

Post questions about game models here, or help out others!
Post Reply
masrawy2
beginner
Posts: 33
Joined: Thu Jan 07, 2016 1:15 am
Has thanked: 12 times
Been thanked: 1 time

decrypt pak file

Post by masrawy2 »

Hello guys,
I have an android game with pak file
I need to decrypt it, I have tried to use many QuickBMS scripts but doesn't work
could anyone help me please to decrypt it
Last edited by masrawy2 on Sat Mar 04, 2023 2:22 pm, edited 2 times in total.
Rabatini
veteran
Posts: 96
Joined: Tue Nov 22, 2016 1:13 pm
Has thanked: 1 time
Been thanked: 33 times

Re: decrypt pak file

Post by Rabatini »

try this.

The file pak is a container with a lot of files compressed with zlib

If you want to unpack without decompress use the sript below, but if you want unpack decompressed uses the second script

Unpack files compressed

Code: Select all

# Script by Rabatini (Luke)
# Dragonborn knight (.PAK)
# Version 0.1b

get unk long
get entries long
do
get zeros long
savepos temp
while zeros == 0
xmath temp "(temp -4)"
goto temp
xmath entries "(entries - 10)"
for rip = 1 to entries
getdstring name 0x40
get offset long
get unk long
get size long
get oneone long

log name offset size
next rip
Unpack files decompressed

Code: Select all

# Script by Rabatini (Luke)
# Dragonborn knight (.PAK)
# Version 0.1b 
# zlib decompressed

get unk long
get entries long
do
get zeros long
savepos temp
while zeros == 0
xmath temp "(temp -4)"
goto temp
xmath entries "(entries - 10)"

for rip = 1 to entries

getdstring name 0x40
get offset long
get unk long
get size long
get oneone long
get ZSIZE asize
math ZSIZE -= OFFSET

clog name offset size zsize
next rip
masrawy2
beginner
Posts: 33
Joined: Thu Jan 07, 2016 1:15 am
Has thanked: 12 times
Been thanked: 1 time

Re: decrypt pak file

Post by masrawy2 »

Thank you mate for help
do you know how to import these files from same game
(.skin,.skel ,mesh,anim)
3d.rar
You do not have the required permissions to view the files attached to this post.
Rabatini
veteran
Posts: 96
Joined: Tue Nov 22, 2016 1:13 pm
Has thanked: 1 time
Been thanked: 33 times

Re: decrypt pak file

Post by Rabatini »

Do you want to import theses specific files?
You can compress them, and uses reimport function from quickbms.
masrawy2
beginner
Posts: 33
Joined: Thu Jan 07, 2016 1:15 am
Has thanked: 12 times
Been thanked: 1 time

Re: decrypt pak file

Post by masrawy2 »

Rabatini wrote: Fri Mar 03, 2023 4:02 pm Do you want to import theses specific files?
You can compress them, and uses reimport function from quickbms.
they should be 3d models and animation files
do you know script could import them in noesis or something like it
masrawy2
beginner
Posts: 33
Joined: Thu Jan 07, 2016 1:15 am
Has thanked: 12 times
Been thanked: 1 time

Re: decrypt pak file

Post by masrawy2 »

Rabatini wrote: Fri Mar 03, 2023 5:02 am try this.

The file pak is a container with a lot of files compressed with zlib

If you want to unpack without decompress use the sript below, but if you want unpack decompressed uses the second script

Unpack files compressed

Code: Select all

# Script by Rabatini (Luke)
# Dragonborn knight (.PAK)
# Version 0.1b

get unk long
get entries long
do
get zeros long
savepos temp
while zeros == 0
xmath temp "(temp -4)"
goto temp
xmath entries "(entries - 10)"
for rip = 1 to entries
getdstring name 0x40
get offset long
get unk long
get size long
get oneone long

log name offset size
next rip
Unpack files decompressed

Code: Select all

# Script by Rabatini (Luke)
# Dragonborn knight (.PAK)
# Version 0.1b 
# zlib decompressed

get unk long
get entries long
do
get zeros long
savepos temp
while zeros == 0
xmath temp "(temp -4)"
goto temp
xmath entries "(entries - 10)"

for rip = 1 to entries

getdstring name 0x40
get offset long
get unk long
get size long
get oneone long
get ZSIZE asize
math ZSIZE -= OFFSET

clog name offset size zsize
next rip
i have used the decompressed script with zlib but i think there a problem with the texture file(.tga)
it's doesn't working
tex.rar
You do not have the required permissions to view the files attached to this post.
Rabatini
veteran
Posts: 96
Joined: Tue Nov 22, 2016 1:13 pm
Has thanked: 1 time
Been thanked: 33 times

Re: decrypt pak file

Post by Rabatini »

masrawy2 wrote: Sat Mar 04, 2023 12:17 pm
Rabatini wrote: Fri Mar 03, 2023 5:02 am try this.

The file pak is a container with a lot of files compressed with zlib

If you want to unpack without decompress use the sript below, but if you want unpack decompressed uses the second script

Unpack files compressed

Code: Select all

# Script by Rabatini (Luke)
# Dragonborn knight (.PAK)
# Version 0.1b

get unk long
get entries long
do
get zeros long
savepos temp
while zeros == 0
xmath temp "(temp -4)"
goto temp
xmath entries "(entries - 10)"
for rip = 1 to entries
getdstring name 0x40
get offset long
get unk long
get size long
get oneone long

log name offset size
next rip
Unpack files decompressed

Code: Select all

# Script by Rabatini (Luke)
# Dragonborn knight (.PAK)
# Version 0.1b 
# zlib decompressed

get unk long
get entries long
do
get zeros long
savepos temp
while zeros == 0
xmath temp "(temp -4)"
goto temp
xmath entries "(entries - 10)"

for rip = 1 to entries

getdstring name 0x40
get offset long
get unk long
get size long
get oneone long
get ZSIZE asize
math ZSIZE -= OFFSET

clog name offset size zsize
next rip
i have used the decompressed script with zlib but i think there a problem with the texture file(.tga)
it's doesn't working
tex.rar
the texture is pvr.

is not the script, is the format of these tga, you will need help with someone is expert in graphics stuffs
Post Reply