Page 1 of 2
S.T.A.L.K.E.R.: Shadow of Chernobyl (Russian)
Posted: Mon Mar 19, 2007 1:45 pm
by SupHamster
The contents of this post was deleted because of possible forum rules violation.
Posted: Thu Mar 22, 2007 3:04 am
by Savage
Please attach a file more big, like 5-10 mb's of zip
Hi!
Posted: Thu Mar 22, 2007 7:55 am
by Strobe
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.
Posted: Thu Mar 22, 2007 9:35 am
by SupHamster
The contents of this post was deleted because of possible forum rules violation.
Posted: Thu Mar 22, 2007 11:21 am
by Savage
The contents of this post was deleted because of possible forum rules violation.
Posted: Thu Mar 22, 2007 3:05 pm
by SupHamster
The contents of this post was deleted because of possible forum rules violation.
Posted: Thu Mar 22, 2007 8:16 pm
by Rick
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).
Posted: Fri Mar 23, 2007 8:31 am
by john_doe
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.
Posted: Fri Mar 23, 2007 10:28 am
by Rick
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).
Posted: Fri Mar 23, 2007 11:02 am
by john_doe
No, I'm not that fast

Maybe over the weekend.
Posted: Sat Mar 24, 2007 6:56 pm
by Espio
The contents of this post was deleted because of possible forum rules violation.
Posted: Sun Mar 25, 2007 4:27 am
by Wildwing
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...
Posted: Sun Mar 25, 2007 6:59 am
by Rick
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.
Posted: Sun Mar 25, 2007 10:37 am
by Rick
I see the people from GSC forums
found us.

Posted: Sun Mar 25, 2007 11:51 am
by Savage
Thanks, but what encryption/compression whas used?