Just Cause 4 *.arc

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Just Cause 4 *.arc

Post by h3x3r »

Hi all, Luigi could you please take a look at this arc archive? Script throws unknown error to me.

Code: Select all

  offset   filesize   filename
--------------------------------------
- enter in folder E:\DOWNLOAD\quickbms
  coverage file 0     0%   0          1076       . offset 00000000
- open input file E:\DOWNLOAD\quickbms\game0.tab
- enter in folder E:\DOWNLOAD\quickbms
- open input file E:\DOWNLOAD\quickbms\game0.arc
  00000000 27         dlc/cp_digitaldeluxe/cp_digitaldeluxe.dlcinstallinfo
  00001000 6117340    dlc/cp_digitaldeluxe/editor/entities/vehicles/02_air/v403_plane_microjet/v403_plane_microjet_preorder_01.ee
  001fe000 60112      dlc/cp_digitaldeluxe/editor/entities/vehicles/02_air/v403_plane_microjet/v403_plane_microjet_preorder_01.epe
  00203000 15690      dlc/cp_digitaldeluxe/editor/entities/vehicles/02_air/v403_plane_microjet/v403_plane_microjet_preorder_01.epe_adf
  00204000 72629      dlc/cp_digitaldeluxe/editor/entities/vehicles/02_air/v403_plane_microjet/v403_plane_microjet_preorder_01.resourcebundle
  00208000 112        dlc/cp_digitaldeluxe/global/authored_content_digitaldeluxe.bl
  00209000 3044       dlc/cp_digitaldeluxe/global/authored_content_digitaldeluxe.blo
  0020a000 791940     dlc/cp_digitaldeluxe/locations/event_loaded/dlc_skystriker.bl
  0025a000 3436       dlc/cp_digitaldeluxe/locations/event_loaded/dlc_skystriker.blo
  0025b000 906        dlc/cp_digitaldeluxe/locations/event_loaded/dlc_skystriker.blo_adf
  0025c000 5570560    dlc/cp_digitaldeluxe/models/objects/weaponized_pack/textures/weaponized_pack_alpha_mpm.atx1

-------------------
*EXCEPTION HANDLER*
-------------------
An error or crash occurred:

*EH* ExceptionCode      c0000005 access violation
*EH* ExceptionFlags     00000000
*EH* ExceptionAddress   10065ED6
*EH* NumberParameters   00000002
*EH*                    00000000
*EH*                    BBDFEAD0

Last script line before the error or that produced the error:
  33  clog NAME OFFSET ZSIZE SIZE 1

Press ENTER or close the window to quit

Here is archive

Code: Select all

https://www117.zippyshare.com/v/EX3cuzHX/file.html

I also attached script + file with filenames since filenames are hashed.

Thank you as always! And happy new year!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Just Cause 4 *.arc

Post by aluigi »

The problem is the COMPTYPE field which is not handled.
All the files before the error are COMPTYPE 0 while the one with the crash if COMPTYPE 1.
I'm not sure what algorithm it should be.
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: Just Cause 4 *.arc

Post by h3x3r »

That's strange because some of files which are compressed with oodle are decompressed properly but some of them can't be decompressed and throw error.
Files which starts with 8C 06 are decompressed but files starts with 8C 0A and CC 0A are not.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Just Cause 4 *.arc

Post by aluigi »

Since the failing decompressions are those related to COMPTYPE 1, I guess that field means that some oodle option is used, for example a dictionary.
I don't know what's the version of oodle used in the game.
quickbms uses version 2.6.3, the 2.7.x branch doesn't seem to have new algorithm or new versions of the existent ones (in decompression), but still that different field means something not related to the library.
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: Just Cause 4 *.arc

Post by h3x3r »

There is file called oo2core_7_win64.dll Do you know a way how to bind it to the script? Thanks!
If you will need a game i can grant you access to my account with game.
BTW it's not important "since there is already unpacker" but i would like to see how that code looks in BMS. For future games like RAGE 2 and all new APEX engine games.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Just Cause 4 *.arc

Post by aluigi »

It can't be used in quickbms with the calldll command because OodleLZ_Decompress requires 14 arguments while calldll supports max 12.
Anyway I guess there is also some bug in comtype calldll since the function is not found.

Ah, you can't use 64bit dll with quickbms, luckily there is a 32bit version too.