RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
makc_ar
Posts: 1193
Joined: Sun Aug 17, 2014 7:27 pm

RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by makc_ar »

Free game: https://store.steampowered.com/app/9614 ... 1Shot_Demo
Image

Someone script or tool to re_chunk_000.pak file?
Image
Image
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Ekey »

Same format as in RE7, just added new compression flag for ZSTD. Filelist actually is empty for now.
makc_ar
Posts: 1193
Joined: Sun Aug 17, 2014 7:27 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by makc_ar »

Thanks a lot Ekey!
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Ekey »

Hook to get file names. Copy two DLL's in game folder and run the game, after check RE2Hook.log file :)

PS: Not tested on Win10
PS2: Just a look a next page
Last edited by Ekey on Sat Jan 26, 2019 10:37 pm, edited 2 times in total.
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by shadow_lonely »

Ekey wrote:Hook to get file names. Copy two DLL's in game folder and run the game, after check RE2Hook.log file :)

PS: Not tested on Win10

Thanks! My hook file here:
RE2Hook.rar
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Ekey »

Updated base with names

Edited: See below.
Last edited by Ekey on Mon Jan 14, 2019 12:17 am, edited 1 time in total.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Ekey »

They are encrypted. For decrypt fonts you can use my old tool for RE7 (RE7.Fonts.CryptTool). Here is a snipped of decryption code for msg's text blocks.

Code: Select all

        static byte[] m_Key = new byte[] {
            0xCF, 0xCE, 0xFB, 0xF8, 0xEC, 0x0A, 0x33, 0x66,
            0x93, 0xA9, 0x1D, 0x93, 0x50, 0x39, 0x5F, 0x09 };

        static byte[] iDecrypt(byte[] pBuffer, int dwSize)
        {
            byte m_Byte1;
            byte m_Byte2 = 0;

            int i = 0;
            int j = 0;
            int dwKeyIndex;

            do
            {
                m_Byte1 = m_Byte2;
                m_Byte2 = pBuffer[j];
                dwKeyIndex = i++ & 0xF;
                pBuffer[j] = (byte)(m_Byte1 ^ m_Byte2 ^ m_Key[dwKeyIndex]);
                j = i;
            } while (i < dwSize);

          return pBuffer;
        }
ISKA
Posts: 223
Joined: Mon Apr 09, 2018 11:09 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by ISKA »

Ekey wrote:They are encrypted. For decrypt fonts you can use my old tool for RE7 (RE7.Fonts.CryptTool). Here is a snipped of decryption code for msg's text blocks.

Code: Select all

        static byte[] m_Key = new byte[] {
            0xCF, 0xCE, 0xFB, 0xF8, 0xEC, 0x0A, 0x33, 0x66,
            0x93, 0xA9, 0x1D, 0x93, 0x50, 0x39, 0x5F, 0x09 };

        static byte[] iDecrypt(byte[] pBuffer, int dwSize)
        {
            byte m_Byte1;
            byte m_Byte2 = 0;

            int i = 0;
            int j = 0;
            int dwKeyIndex;

            do
            {
                m_Byte1 = m_Byte2;
                m_Byte2 = pBuffer[j];
                dwKeyIndex = i++ & 0xF;
                pBuffer[j] = (byte)(m_Byte1 ^ m_Byte2 ^ m_Key[dwKeyIndex]);
                j = i;
            } while (i < dwSize);

          return pBuffer;
        }

Unpack succesfly but i cant repack.
How can i repack msg and font files included .pak archvies?
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Ekey »

No tools for repack.

PS: Updated base with names
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Delutto »

Ekey wrote:PS: Not tested on Win10
Tested on W10 x64 and works. Thanks!
Hashs are Murmur3? I can't find a match...
Logs.7z
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Ekey »

Delutto wrote:
Ekey wrote:PS: Not tested on Win10
Tested on W10 x64 and works. Thanks!
Hashs are Murmur3?

Yep
Scobalula
Posts: 2
Joined: Mon Oct 08, 2018 1:44 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Scobalula »

For C# I made some small modification to the public MurMur3 implementation to return an unsigned integer, I tested it on the ones from the above logs and they matched the pak (keep they need to be unicode/UTF16 like RE7), feel free to use this in any shape or form:

https://pastebin.com/qVysA2Si
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Delutto »

Scobalula wrote:For C# I made some small modification to the public MurMur3 implementation to return an unsigned integer, I tested it on the ones from the above logs and they matched the pak (keep they need to be unicode/UTF16 like RE7), feel free to use this in any shape or form:
Thanks. I'm coding in Delphi, in fact I was using Unicode and my code was right, now I see my problem in your code: seed 0xFFFFFFFF. Thanks again, now everything is working properly.

Updated:
Names_13405_of_18159.7z
Sajjad_Rahim
Posts: 64
Joined: Sat Jan 10, 2015 10:03 am

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Sajjad_Rahim »

Ekey wrote:They are encrypted. For decrypt fonts you can use my old tool for RE7 (RE7.Fonts.CryptTool). Here is a snipped of decryption code for msg's text blocks.

Code: Select all

        static byte[] m_Key = new byte[] {
            0xCF, 0xCE, 0xFB, 0xF8, 0xEC, 0x0A, 0x33, 0x66,
            0x93, 0xA9, 0x1D, 0x93, 0x50, 0x39, 0x5F, 0x09 };

        static byte[] iDecrypt(byte[] pBuffer, int dwSize)
        {
            byte m_Byte1;
            byte m_Byte2 = 0;

            int i = 0;
            int j = 0;
            int dwKeyIndex;

            do
            {
                m_Byte1 = m_Byte2;
                m_Byte2 = pBuffer[j];
                dwKeyIndex = i++ & 0xF;
                pBuffer[j] = (byte)(m_Byte1 ^ m_Byte2 ^ m_Key[dwKeyIndex]);
                j = i;
            } while (i < dwSize);

          return pBuffer;
        }


how i can use this code?
Sajjad_Rahim
Posts: 64
Joined: Sat Jan 10, 2015 10:03 am

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Sajjad_Rahim »

Delutto wrote:
Scobalula wrote:For C# I made some small modification to the public MurMur3 implementation to return an unsigned integer, I tested it on the ones from the above logs and they matched the pak (keep they need to be unicode/UTF16 like RE7), feel free to use this in any shape or form:
Thanks. I'm coding in Delphi, in fact I was using Unicode and my code was right, now I see my problem in your code: seed 0xFFFFFFFF. Thanks again, now everything is working properly.

Updated:Names_13405_of_18159.7z


any plans to make tool for msg?
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by Delutto »

Sajjad_Rahim wrote:any plans to make tool for msg?
No. michalss will probably update his RE7 Complete Tools to support this game. In any case, will be better wait until game full release.
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by DJ Normality »

Deleted
Last edited by DJ Normality on Tue Jan 22, 2019 8:18 pm, edited 4 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by aluigi »

@DJ Normality
May I ask you to avoid posting big images like those and moreover avoiding to double-post the same content in other topics?

You have posted the same identical images in a topic about Assassin's Creed so are these images about RE2 or ACO???

And you do it often:
viewtopic.php?f=9&t=7424&p=42520#p42520 and viewtopic.php?f=9&t=9138&p=42519#p42519

*edit* let me know what are the 2 duplicates and I will delete them.

This is not the first time I warn you about posting big images of 3d models without any technical content.
The forum is NOT a portfolio or showcase.

Instead this is a good example of images from you, that's positive:
viewtopic.php?p=42520#p42520
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: RESIDENT EVIL 2 / BIOHAZARD RE:2 "1-Shot Demo" .pak

Post by DJ Normality »

I deleted the pictures sorry for double posting I just wanted to show the guys in that topic what I got since some of them are in this topic too. I just get so excited when I solve or extract something that is undiscovered I like sharing the content and the algorithms. Well.. and pictures lol. But I will try to keep all my post limited. I honestly just would like to make my own topic about extractions. I shrank this one down and put 4 in 1. Again sorry.
Last edited by DJ Normality on Thu Jan 24, 2019 11:39 am, edited 1 time in total.