S.T.A.L.K.E.R.: Shadow of Chernobyl (Russian)

The Original Forum. Game archives, full of resources. How to open them? Get help here.
SupHamster
ultra-n00b
Posts: 6
Joined: Wed Oct 18, 2006 9:55 am

S.T.A.L.K.E.R.: Shadow of Chernobyl (Russian)

Post by SupHamster » Mon Mar 19, 2007 1:45 pm

The contents of this post was deleted because of possible forum rules violation.

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Thu Mar 22, 2007 3:04 am

Please attach a file more big, like 5-10 mb's of zip
Image

User avatar
Strobe
Moderator
Posts: 411
Joined: Mon Oct 24, 2005 8:52 am
Location: Sweden
Been thanked: 16 times
Contact:

Hi!

Post by Strobe » Thu Mar 22, 2007 7:55 am

if you are just out for unpacking and not modding then you can use
jaeder naub v2.0.3a for extracting of most of the files in those .db
archives. mostly DDS and OGM files.

however there are some filetypes in there which im not familiar
with yet.

SupHamster
ultra-n00b
Posts: 6
Joined: Wed Oct 18, 2006 9:55 am

Post by SupHamster » Thu Mar 22, 2007 9:35 am

The contents of this post was deleted because of possible forum rules violation.

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Thu Mar 22, 2007 11:21 am

The contents of this post was deleted because of possible forum rules violation.
Image

SupHamster
ultra-n00b
Posts: 6
Joined: Wed Oct 18, 2006 9:55 am

Post by SupHamster » Thu Mar 22, 2007 3:05 pm

The contents of this post was deleted because of possible forum rules violation.

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Post by Rick » Thu Mar 22, 2007 8:16 pm

Uses some sort of really annoying encryption for filenames.

file header is [dword b] [dword b]

seek to b's value, from current, so you end up with 8 + b

then there you have [dword c] [dword d]

dword d is size of following filename/file index block

which is encrypted with a runtime generated magic table, I havn't completely figured out the table stuff yet though.

I found an unpacker that functioned on the beta/'demo' of the game but no longer functions on the full release. No source though.

If anyone feels like diving into the encryption - 00410940 (generates encryption table) and 00410A10 (decrypts data) in XR_3DA.exe (US release though, not russian).

User avatar
john_doe
VIP member
VIP member
Posts: 80
Joined: Sat Oct 21, 2006 2:25 pm
Been thanked: 1 time

Post by john_doe » Fri Mar 23, 2007 8:31 am

Are you sure?
In xrCore.dll there's an exported funtion called CLocatorAPI::ProcessArchive that opens an archive. It also uses the structure you described with the two DWORDs. If the MSB in the second DWORD of the archive directory is set, it's compressed and a LZ-based decompression function is called with the compressed directory data. I'm currently trying to figure out the decompression, it seems to be "rather" simple.

Edit: Seems you're half right. The compressed data is indeed encrypted. In the decompression code a function pointer strangely called g_temporary_stuff is called before the data is decompressed. This function pointer is the decryption function from the Exe you mentioned.

Edit 2: Ok, I think I got the decompression done. The decrypted buffer looks more like a stream of bits than just random bytes now. Also, the first DWORD correctly shows the decompressed size now, as expected by the decompression code.

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Post by Rick » Fri Mar 23, 2007 10:28 am

john_doe wrote:Edit: Seems you're half right. The compressed data is indeed encrypted. In the decompression code a function pointer strangely called g_temporary_stuff is called before the data is decompressed. This function pointer is the decryption function from the Exe you mentioned.
Yup, yup. That's how I found it.
john_doe wrote:Edit 2: Ok, I think I got the decompression done. The decrypted buffer looks more like a stream of bits than just random bytes now. Also, the first DWORD correctly shows the decompressed size now, as expected by the decompression code.
:) I saw the data in memory but didn't bother to look at it much yet since I was wanting to do the encryption first.

Nice work - do you have a working unpacker tool now? I'd like to see (source or binary is fine).

User avatar
john_doe
VIP member
VIP member
Posts: 80
Joined: Sat Oct 21, 2006 2:25 pm
Been thanked: 1 time

Post by john_doe » Fri Mar 23, 2007 11:02 am

No, I'm not that fast :)
Maybe over the weekend.

Espio
n00b
Posts: 17
Joined: Mon Jan 08, 2007 12:47 am

Post by Espio » Sat Mar 24, 2007 6:56 pm

The contents of this post was deleted because of possible forum rules violation.

Wildwing
ultra-n00b
Posts: 3
Joined: Sat Mar 24, 2007 8:57 pm

Post by Wildwing » Sun Mar 25, 2007 4:27 am

hi ive just finished a realistic hud for the g36 rifle... but i need to compress the new file into a db file... tryed to pack it with a normal zip and renamed it but it dosnt work that way... got the following error massage:

Expression : assertion failed
Function : CLocatorAPI::ProcessArchive
File : D:\xray-svn\xrCore\LocatorAPI.cpp
Line : 331
Description : hdr

i think the game demands a original compressed file...
so if anyone has got an compression tool for that db files or could tell me a console or cmd line way, would be great... got to replace this ugly visor...

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Post by Rick » Sun Mar 25, 2007 6:59 am

Wildwing wrote:hi ive just finished a realistic hud for the g36 rifle... but i need to compress the new file into a db file... tryed to pack it with a normal zip and renamed it but it dosnt work that way... got the following error massage:

Expression : assertion failed
Function : CLocatorAPI::ProcessArchive
File : D:\xray-svn\xrCore\LocatorAPI.cpp
Line : 331
Description : hdr

i think the game demands a original compressed file...
so if anyone has got an compression tool for that db files or could tell me a console or cmd line way, would be great... got to replace this ugly visor...
Files in the archives take precedence over files on the filesystem. :\ So you can extract the archives then rename/delete/move the archives away so that the game loads from the harddrive rather than the archives.

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Post by Rick » Sun Mar 25, 2007 10:37 am

I see the people from GSC forums found us. :P

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Sun Mar 25, 2007 11:51 am

Thanks, but what encryption/compression whas used?
Image

Post Reply