Wanted a help in research JustCause 1 CRC or Hash algo.
JustCause 2 using jenkins_hashlittle, but seems like JustCause 1 are not. CRC_scan can't help figure out the algo. Hashes only filename in lower case.
In attach I provide a test script for compare values in the pc.tab file with quickbms generated. Pc.list file it's a sorted by hash pclist.txt from JustCause Demo.
JustCause 1 CRC/Hashing
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: JustCause 1 CRC/Hashing
It's SHA1, first 4 bytes it's hash
Example:
if you interested here my repo https://github.com/Ekey/JC.ARC.Tool/ with code
Example:
Code: Select all
0A 90 34 90 DB 9A 1F 36 9D 46 34 15 BC 23 1A 7E 45 90 C4 C4 - keymap_pc_default.bin
0x9034900A -> keymap_pc_default.bin
if you interested here my repo https://github.com/Ekey/JC.ARC.Tool/ with code
-
- Posts: 42
- Joined: Mon Jun 07, 2021 8:20 pm
Re: JustCause 1 CRC/Hashing
I didn't even think what can be used only first bytes of SHA1 or other long hashes )
Thanks.
Remains parse all files of retail version of game to get filename strings.
Thanks.
Remains parse all files of retail version of game to get filename strings.
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: JustCause 1 CRC/Hashing
You can check my small list with names > https://github.com/Ekey/JC.ARC.Tool/tre ... r/Projects
-
- Posts: 42
- Joined: Mon Jun 07, 2021 8:20 pm
Re: JustCause 1 CRC/Hashing
JustCause Demo contain pclist.txt with all 3650 filename strings stored in demo *.arc file. In retail version part of files should be same. Some names of other part can be digged from Small Archives, which have "SARC" in header. These archives sometimes contain a debug path string of source file.
Here uses non-standard SHA1? All checksum generators gives another result:
Here uses non-standard SHA1? All checksum generators gives another result:
Code: Select all
fd c9 27 2e 21 88 01 09 3c 91 88 2d a1 3f ee ba 62 86 04 bc - keymap_pc_default.bin
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: JustCause 1 CRC/Hashing
grandshot wrote:Here uses non-standard SHA1? All checksum generators gives another result:Code: Select all
fd c9 27 2e 21 88 01 09 3c 91 88 2d a1 3f ee ba 62 86 04 bc - keymap_pc_default.bin
They using SHA1 (Steve Reid version) with big-endian byte order and you need allocate 128 bytes for each string. Anyway you can check this part of hashing code