Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Cyberpunk 2077 archive-files [RDAR]

Featured Replies

  • Author
  • Localization

tbmq008, posted Tue Dec 08, 2020 3:01 pm (60980)


Code:
get radr long
if radr != 0x52414452
   cleanexit
endif
get num1 long
if num1 != 0xc
   cleanexit
endif
get io1 longlong
get is1 longlong
get is2 longlong
get full_size longlong
if is2 == 0
   log MEMORY_FILE io1 is1
   math tn1 = -1
   callfunction read_toc 1
else
   cleanexit
endif

startfunction read_toc
   goto 0 tn1
   get toc1 long tn1
   get toc2 long tn1
   get toc3 longlong tn1
   get toc4 long tn1
   get toc5 long tn1
   get toc6 long tn1
   # first TOC (file checksum info)
   for i1 = 0 < toc4
      get entinf1 longlong tn1
      get entinf2 time64 tn1
      getdstring entinf3 0x14 tn1
      getdstring entinf4 0x14 tn1
   next i1
   # second TOC (file offset file size info)
   for i2 = 0 < toc5
      get entinf5 longlong tn1
      get entinf6 long tn1
      get entinf7 long tn1
      log "" entinf5 entinf6 0
   next i2
   # third TOC (present in voice archives)
   for i3 = 0 < toc6
      get entinf8 longlong tn1
   next i3
endfunction
KARK files are not covered.
  • Author
  • Localization

tbmq008, posted Tue Dec 08, 2020 4:14 pm (60983)


actually i changed my mind about the third TOC, i just wanted to cover it 'cuz it makes no sense to just ignore it at this point.
with this in mind, i updated the script i just wrote that can be found above this post.
  • Author
  • Localization

aluigi, posted Wed Dec 09, 2020 11:13 am (61001)


Everything works perfectly here:
Code:
- 4376 files found in 54 seconds
  coverage file 0    95%   180544507  189554688  . offset 000000000b4c5edc
  • Author
  • Localization

PlanK69, posted Wed Dec 09, 2020 1:21 pm (61006)


nevermind, seems I was using a version of BMS from 2015. i just downloaded the new one from your website and now it's working with that specific file. thanks
  • Author
  • Localization

PlanK69, posted Wed Dec 09, 2020 1:44 pm (61007)


are you guys able to get usable audio files out of the file I linked? i'm able to extract it but i just get tiny 50kb-150kb files out of it that won't play even after I tried to convert them to .ogg or .wav
  • Author
  • Localization

cad5150, posted Thu Dec 10, 2020 2:12 am (61020)


I managed to extract audio files with quickbms but I cant play the .wav files. Any help?
  • Author
  • Localization

DJ Normality, posted Thu Dec 10, 2020 4:42 am (61023)


Any chance in finding the models ?
  • Author
  • Localization

tbmq008, posted Thu Dec 10, 2020 2:14 pm (61036)


here is a new version of the script i just posted just days ago
Code:
get radr long
if radr != 0x52414452 # "RDAR"/"RADR"
   cleanexit
endif
get num1 long
if num1 != 0xc
   cleanexit
endif
get io1 longlong
get is1 longlong
get is2 longlong
get full_size longlong
if is2 == 0
   log MEMORY_FILE io1 is1
   math tn1 = -1
   callfunction read_toc 1
else
   cleanexit
endif

startfunction read_toc
   goto 0 tn1
   get toc1 long tn1
   get toc2 long tn1
   get toc3 longlong tn1
   get toc4 long tn1
   get toc5 long tn1
   get toc6 long tn1
   math toc4_io = 0x1c
   xmath toc5_io "toc4_io (toc4 * 0x38)"
   xmath toc6_io "toc5_io (toc5 * 0x10)"
   math toc4_sz = 0x38
   math toc5_sz = 0x10
   math toc6_sz = 8
      goto toc4_io tn1
      get hash1 longlong tn1
      get date time64 tn1
      get chunks_per_file long tn1
      get init_en1 long tn1
      get last_en1 long tn1
      get init_en2 long tn1
      get last_en2 long tn1
      getdstring entinf4 0x14 tn1
      math toc4_io toc4_sz
      xmath h1_1 "hash1 & 0xffffffff"
      xmath h1_2 "(hash1 >> 32) & 0xffffffff"
      string en1_fn p "xx" h1_2 h1_1
      append
      for j1 = init_en1 < last_en1
         goto toc5_io tn1
         get en1_ofst longlong tn1
         get en1_sz1 long tn1
         get en1_sz2 long tn1
         math toc5_io toc5_sz
         if en1_sz1 == en1_sz2
            log en1_fn en1_ofst en1_sz1 0
         else
            goto en1_ofst 0
            get comp_id long 0
            get original_size long 0
            math comp_algo_is_found = 0
            if comp_id == 0x4b52414b # "KARK"/"KRAK"
               comtype oodle
               math comp_algo_is_found = 1
            else
               string comp_id_2 = comp_id
               print " unknown ID for compressed file - %comp_id_2% "
               cleanexit
            endif
            if comp_algo_is_found = 1
               xmath en1_comp_ofst "en1_ofst 8"
               xmath en1_sz3 "en1_sz1 - 8"
               clog en1_fn en1_comp_ofst en1_sz3 en1_sz2 0
            else
               log en1_fn en1_ofst en1_sz1 0
            endif
         endif
      next j1
      append
      for j1 = init_en2 < last_en2
         goto toc6_io tn1
         get entinf8 longlong tn1
         math toc6_io toc6_sz
      next j1
   next i1
endfunction
downloadable version is in the attachment as seen below.
of course, it doesn't solve the problem of bogus extensions and most of the files being extracted into dozens of folders every single time a file is being extracted (sometimes a folder can have 12 files!).
on the other hand, it parses the whole structure much more... "accurately", so to speak. i'll explain why once i feel the time is right to make another post here since right now the game is going through an brutal post-hype period where people have actually lost their grip on reality over this game, as well as a lot of disappointment in some circles over all the issues related to performance, code stability (the actual game exe is over 60MB for a reason), graphics, and of course the game's so-called "maturity". welcome to the dark future.

---

as for the script itself i rewrote it all the way so the focus here is on parsing the first TOC, the second and third TOCs are parsed through the one that precedes both of them. the second TOC is the "file" part, and the third TOC is there because i wanted to cover it. support for "KARK" decompression is now possible.

radr.bms

  • Author
  • Localization

tbmq008, posted Fri Dec 11, 2020 3:04 pm (61060)


the script has been updated with a massive difference in how the structure is handled.
in other words you won't get a folder with dozens of files anymore.
instead you'll get THE one file as the file structure was chunk-based and so there was no need to make up a separate folder with dozens of files inside.
  • Author
  • Localization

h3x3r, posted Sat Dec 12, 2020 10:19 am (61077)


I tried that script but it gives me infinite loop of unpacking into a single file which never ends. So here is my script which unpacks files with extension. Not a complete solution and i also skiped TOC tables since they are more less hashes.
Also there is a problem with ZSIZE and SIZE. Some entry has same ZSIZE as SIZE but files seems to be compressed. But they are few. I will check for solution. There should be some flag for that.
Code:
####################################
comtype OODLE

get FNAME basename
idstring "RDAR"
get Version long
get TableOffset longlong
get ArchiveID longlong
get DUMMY longlong
get TotalFileSize longlong

GoTo TableOffset

get SIGN long
get HashTableSize long
get HashTableID longlong
get HashTableCount long
get ItemCount long
get DUMMY long

for i = 0    GetDString HASHES 0x38
next i

for i = 0
get OFFSET longlong
get ZSIZE long
get SIZE long

if ZSIZE == SIZE

   if SIZE u> 16
      log MEMORY_FILE OFFSET SIZE
callfunction GETEX 1
   endif
   string NAME p "%s/%u.%s" FNAME OFFSET EXT
   log NAME OFFSET SIZE   
else
   math OFFSET 8
   math ZSIZE - 8
   
   if SIZE u> 16
      clog MEMORY_FILE OFFSET ZSIZE SIZE
callfunction GETEX 1
   endif
   string NAME p "%s/%u.%s" FNAME OFFSET EXT
   clog NAME OFFSET ZSIZE SIZE
endif
next i

startfunction GETEX
      goto 0 MEMORY_FILE
      get SIGN1 byte MEMORY_FILE
      goto 0 MEMORY_FILE
      getdstring SIGN3 3 MEMORY_FILE
      goto 0 MEMORY_FILE
      getdstring SIGN4 4 MEMORY_FILE
      goto 4 MEMORY_FILE
      getdstring SIGN8 4 MEMORY_FILE
      goto 12 MEMORY_FILE
      getdstring SIGN12 4 MEMORY_FILE
   
      if SIGN4 == "KB2j" || SIGN4 == "BIKi"
            set EXT string "bik"
         elif SIGN4  == "CR2W"
            set EXT string "cr2w"            
         elif SIGN4 == "DDS "
            set EXT string "dds"
         elif SIGN4 == "RIFF"
            set EXT string "riff"      
         elif SIGN3 == "CFX" || SIGN3 == "GFX"
            set EXT string "swf"
         elif SIGN12  == "GDEF"
            set EXT string "ttf"
         elif SIGN3  == "NXS"
            set EXT string "mesh"
         elif SIGN4  == "KARK"
            set EXT string "kraken"
         elif SIGN4  == "BKHD"
            set EXT string "bnk"
         elif SIGN3  == "SND"
            set EXT string "snd"
         else
            string EXT f= dat
      endif
endfunction


Just to be clear. That is the thing i was talked about. As you can see the decompressed size in table doesn't match decompresed size in header of file.
Image
  • Author
  • Localization

Puterboy1, posted Sat Dec 12, 2020 10:46 pm (61083)


Here I am using CP77 tools and all I get it this: "A fatal error occurred. The required library hostfxr.dll could not be found."

Help me please obtain this.
  • Author
  • Localization

DJ Normality, posted Sat Dec 12, 2020 11:01 pm (61084)


Did you put your game .dll in the folder as instructed ?
  • Author
  • Localization

aluigi, posted Sun Dec 13, 2020 3:12 pm (61087)


tbmq008 wrote:
the script has been updated with a massive difference in how the structure is handled.
in other words you won't get a folder with dozens of files anymore.
instead you'll get THE one file as the file structure was chunk-based and so there was no need to make up a separate folder with dozens of files inside.

I agree that the "folders" are just files but I'm not sure they are chunks because their decompressed size is ever different, example:
Code:
000000000007e02f 12         fb664fe9b43f1a5f\000000000000015d.dat
000000000007e03b 12         fb664fe9b43f1a5f\000000000000015e.dat
000000000007e047 240        fb664fe9b43f1a5f\000000000000015f.dat
000000000007e13f 420        fb664fe9b43f1a5f\0000000000000160.dat
000000000007e1df 24         fb664fe9b43f1a5f\0000000000000161.dat
000000000007e1f7 48         fb664fe9b43f1a5f\0000000000000162.dat
000000000007e227 240        fb664fe9b43f1a5f\0000000000000163.dat

So should these chunks being just concatenated to each other?
Or do they have a fixed decompressed size (like 0xc0000) that must be filled with zeroes?
There is not even a full file size for checking if it's concatenation or concatenation padding.
  • Author
  • Localization

tbmq008, posted Sun Dec 13, 2020 4:10 pm (61089)


aluigi
the chunks need to be concatenated to each other.
data is not padded to some crazy size between the chunks so don't worry about that.
RDAR archive is just depressing to look at.
  • Author
  • Localization

00702, posted Tue Dec 15, 2020 9:37 am (61122)


Hello people.
I tried quickbms to get localization files (lang_en_text.archive). but unfortunately it is not usable without IDs for words/phrases. has anyone been able to solve this?

Image
  • Author
  • Localization

miamisuicide, posted Tue Dec 15, 2020 8:48 pm (61130)


00702 wrote:
Hello people.
I tried quickbms to get localization files (lang_en_text.archive). but unfortunately it is not usable without IDs for words/phrases. has anyone been able to solve this?

Image


Image
The first line is the key, the second line is the localized string. You should also take a look at WolvenKit/CP77Tools and WolvenKit/Wolven-kit.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.