Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!

Forum rules: Click here

Resident Evil 7 demo PAK file

The Original Forum. Game archives, full of resources. How to open them? Get help here.
zzz
beginner
Posts: 21
Joined: Wed May 21, 2014 2:36 pm
Has thanked: 2 times
Been thanked: 5 times

Resident Evil 7 demo PAK file

Post by zzz » Mon Dec 19, 2016 1:33 pm

The free RE7 demo has been released for PC.

Code: Select all

http://store.steampowered.com/app/530620/
Its data is contained in a single 3 gig PAK file. It runs on a new in-house engine. For the hell of it I tried Street Fighter's UE4 pak file unpacker but as expected it failed.

Kein
advanced
Posts: 45
Joined: Fri Nov 06, 2009 12:57 pm

Re: Resident Evil 7 demo PAK file

Post by Kein » Mon Dec 19, 2016 2:09 pm

What format RE6 used?

emoose
beginner
Posts: 26
Joined: Thu Sep 10, 2015 9:06 pm
Has thanked: 3 times
Been thanked: 24 times

Re: Resident Evil 7 demo PAK file

Post by emoose » Mon Dec 19, 2016 2:34 pm

Furthest I've got so far:

Code: Select all

struct REPak_Header // 0x10 bytes
{
	uint32_t magic;
	uint32_t version; // ?
	uint32_t num_entries;
	uint32_t unk; // checksum?
};

struct REPak_Entry // 0x30 bytes
{
	uint64_t unk0; // data hash / filename hash / crypto key?
	uint64_t offset; // offset into the pak file
	uint64_t size;
	uint64_t unk18; // flags? 0x1EA0 for most files
	uint64_t unk20; // more flags? 0x1 for most files
	uint64_t unk28; // data hash / filename hash / crypto key?
};
Not very far I know, seems they're protecting the demo with Denuvo to make RE even harder :( Maybe that could mean there's some goodies in here somewhere though.

Looks like file data is compressed/encrypted too, also can't see any filenames in there, could be using a filename-hash system like Fox Engine does?

EDIT: Saw some strings mentioning the saves using blowfish encryption, perhaps the package does too.

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1645
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 68 times
Been thanked: 825 times

Re: Resident Evil 7 demo PAK file

Post by Ekey » Mon Dec 19, 2016 3:46 pm

Code: Select all

struct PAKheader
{
   uint32_t dwID; // KPKA
   uint32_t dwVersion; // 4
   uint32_t dwTotalFiles;
   uint32_t dwUnknown0; //???
};

struct PAKEntry
{
   uint32_t dwLowerHash; // Hash of filename in Lowercase
   uint32_t dwUpperHash; // Hash of filename in Uppercase
   uint64_t dwOffset;
   uint64_t dwZSize; // Compressed size
   uint64_t dwSize; // Uncompressed size
   uint64_t dwFlag; // 1 - if compressed / 0 - uncompressed
   uint32_t dwUnknown2; //???
   uint32_t dwUnknown3; //???
};
Compression is Zlib (Deflate)
Last edited by Ekey on Fri Dec 30, 2016 12:48 am, edited 5 times in total.

zzz
beginner
Posts: 21
Joined: Wed May 21, 2014 2:36 pm
Has thanked: 2 times
Been thanked: 5 times

Re: Resident Evil 7 demo PAK file

Post by zzz » Mon Dec 19, 2016 4:17 pm

Kein wrote:What format RE6 used?
It used ARC files for the MT-Framework engine.

Gh0stBlade
Moderator
Posts: 683
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 328 times

Re: Resident Evil 7 demo PAK file

Post by Gh0stBlade » Mon Dec 19, 2016 4:35 pm

zzz wrote:
Kein wrote:What format RE6 used?
It used ARC files for the MT-Framework engine.
For most of the game assets, yes. Except this archive format for RE7 is an altered version of the PAK format used for shaders (in RE5/6) I believe. Though encrypted and/or compressed for RE7.

Cheers.
Click the thanks button if I helped!

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1645
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 68 times
Been thanked: 825 times

Re: Resident Evil 7 demo PAK file

Post by Ekey » Mon Dec 19, 2016 10:28 pm

Simpe script for unpack

Edited: See below
Last edited by Ekey on Fri Dec 30, 2016 3:27 am, edited 5 times in total.

blizdi
ultra-n00b
Posts: 3
Joined: Tue Dec 20, 2016 12:50 am
Has thanked: 1 time

Re: Resident Evil 7 demo PAK file

Post by blizdi » Tue Dec 20, 2016 1:03 am

Do we know how long it will take before the unpacked files are going to be usable/viewable? I assume they don't work like RE6's files lol

Kein
advanced
Posts: 45
Joined: Fri Nov 06, 2009 12:57 pm

Re: Resident Evil 7 demo PAK file

Post by Kein » Wed Dec 21, 2016 9:06 am

Aren't they encrypted?

Gh0stBlade
Moderator
Posts: 683
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 328 times

Re: Resident Evil 7 demo PAK file

Post by Gh0stBlade » Wed Dec 21, 2016 2:08 pm

Kein wrote:Aren't they encrypted?
No.
Click the thanks button if I helped!

Kein
advanced
Posts: 45
Joined: Fri Nov 06, 2009 12:57 pm

Re: Resident Evil 7 demo PAK file

Post by Kein » Wed Dec 21, 2016 2:15 pm

Okay, so I suppose some people will tweak existing tools for RE6 to be able to process RE7 data.

Gh0stBlade
Moderator
Posts: 683
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 328 times

Re: Resident Evil 7 demo PAK file

Post by Gh0stBlade » Wed Dec 21, 2016 2:30 pm

Kein wrote:Okay, so I suppose some people will tweak existing tools for RE6 to be able to process RE7 data.
No, all formats I've seen so far, except the texture format has been altered.
Click the thanks button if I helped!

Kein
advanced
Posts: 45
Joined: Fri Nov 06, 2009 12:57 pm

Re: Resident Evil 7 demo PAK file

Post by Kein » Wed Dec 21, 2016 3:24 pm

Gh0stBlade wrote:
Kein wrote:Okay, so I suppose some people will tweak existing tools for RE6 to be able to process RE7 data.
No, all formats I've seen so far, except the texture format has been altered.
Texture format was altered too at least ARCtool does not work anymore with it

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1645
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 68 times
Been thanked: 825 times

Re: Resident Evil 7 demo PAK file

Post by Ekey » Thu Dec 29, 2016 11:37 pm

Well, i'm found algorithm. First and second fileds in entry this is hash'es of file name in lowercase and uppercase. To be continue :)

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1645
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 68 times
Been thanked: 825 times

Re: Resident Evil 7 demo PAK file

Post by Ekey » Fri Dec 30, 2016 3:26 am

Here we go. Script updated, names included (~2000 unknown names at this moment). Have fun :)
You do not have the required permissions to view the files attached to this post.

Post Reply