Resident Evil 3 .dat file unpacking

All questions and discussions about file format analysis are welcome in this forum.

Moderators: Alhexx, mirex

Resident Evil 3 .dat file unpacking

Postby Questioning » Fri Oct 26, 2007 14:29

I installed Resident Evil 3 Demo, and there are many .dat files in the folder.

One of them is here. (1.90 MB)

If you open it with notepad, you will see the following codes at the beginning. After that are a lot of strange codes.

Code: Select all
               DATA_A    ?  VOICE

      rj  M101A010.WAV    z€  M101A020.WAV  "  z€  M101A030.WAV  3  z  M101A040.WAV  P  ? M101A050.WAV  r  z€  M101A060.WAV    ?


How do we get the .wav files?
Last edited by Questioning on Sat Nov 03, 2007 9:39, edited 6 times in total.
Posts: 3
Joined: Fri Oct 26, 2007 14:10

Postby Alhexx » Sat Oct 27, 2007 15:20

I have been working on the Resident Evil 3 .dat format a few years ago, however, I did not manage to decode it back then.

Here's the description I have set up back then:
Resident Evil 3 DAT Archive Format Description

The Resident Evil 3 DAT format is, as much of the PSX-based
formats, quite simple, but unfriendly and a waste of space.
I'm just gonna start with the fomrat itself.

At Offset 4096 (0x1000), there is a kind of 'TOC'. Is simply
starts with a 32Bit Integer telling you how much files there are
in this DAT file. After that, the TOC Entries begin:

They are variable-sized, b'cause they use Null-terminated Strings
for their filenames. Before the name, there are 2 32Bit Longs,
telling you the Offset and the File Length of the File in the DAT
Archive. But the Offset is not a 'simple' Offset. You will have
to multiply this offset by 8.

That should be all you'll need to read out a DAT File. However,
you'll soon see that you've got another problem:
the extracted files...

They aren't in their 'real' format, they're encrypted / compressed

So let's take a look at those files, too...

These Files have two 'chunks':

1. some kind of Header
2. The main Data itself

The first 2 Bytes are a 16Bit Integer specifying the length of the
'header'. After this follows another 32Bit Integer telling
you the length of the main Data. That means:

length of header + length of data = length of file

But now let's try to take a look at that Header...

Offset Length Value
------ ------ -----
00 2 Length of Header
02 2 Number of HeaderEntries
04 4 Length of RAW Data
08 8 Unknown2, see below

Unknown2: I really have no idea, what this part is, but it seems to
the same in a lot of files ... sometimes 'DeSOca|.' and
things like that... I'll just ignore it...

Okay, see that Number of HeaderEntries thingy? This is what tells you,
how many entries there are inside of the header:
Every Entry consists of 8 Bytes:
Directly after that Unknown2 Entry, there are the first 4 Bytes of every
Entry. I have no idea what these Values are. They don't seem to be floats,
longs or anything else... I just have no idea :(

However, after these values, there are another 4Byte Values, Integers this
time. They seem to divide the RAW data into several pieces. If you take all
these values and add them, then you will have the length of the RAW Data...
But this doesn't make any sense after all...

There's a theory I have:
The whole file is stored in the 'RAW' pool. And it's encrypted...
That's what I think:
The file has been divided into several pieces: That are those
blocks, whose length is specified by those 4Byte Integers. And the other
4Byte Values work as an key for the encryption...
Probably that's just trash, but I've got the feelin' that this could be
the way it goes here...
oh, and every block may not be greater than 32.768 Bytes...

However, I have done some testing witht these files, and the result is:
This encryption is very sensible. CAPCOM did a good work on creating it...

-= to be continued =-

Home :
Forum :
Mail :

- Alhexx
21:04 18.03.2002

As for now, I cannot continue decoding it as I don't have any free time right now...

- Alhexx
User avatar
Posts: 59
Joined: Tue Jun 28, 2005 19:04
Location: Dortmund, Germany

Postby Questioning » Sat Oct 27, 2007 15:51

Oh, really? Here is a man called "PmData". He has decrypted Resident Evil 3's files, and he showed background image and skin texture he got. You can register at that forum and login to view the attachments.

I will probably ask him how he did it.
Posts: 3
Joined: Fri Oct 26, 2007 14:10

Postby Questioning » Sun Oct 28, 2007 8:37

The guy offered a solution here. I got many Resident Evil 3 files by using the extractor.
Posts: 3
Joined: Fri Oct 26, 2007 14:10

Return to File Format Analysis

Who is online

Users browsing this forum: No registered users and 2 guests