Rayman Raving Rabbids (Wii) - encrypted archive header(.bf)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
ponaromixxx
Posts: 176
Joined: Tue Sep 30, 2014 5:59 pm

Re: Rayman Raving Rabbids (Wii) - encrypted archive header(.bf)

Post by ponaromixxx »

AnonBaiter wrote:
ponaromixxx wrote:Sorry, but I do not understand scripts very well, and I can not fix it myself, could you help me !?
Help you through what exactly?
Also I just updated the script for you.


And you already made changes to the script! Sorry did not notice. Thanks a lot for your help!
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Rayman Raving Rabbids (Wii) - encrypted archive header(.bf)

Post by AnonBaiter »

So, I decided to do this thing...

Code: Select all

   if BF_EXT == "001"
      sortarray 0 1
      math BF_NUM = 1
      math BF_OFF = 0
      get BF_SIZE asize
      for f2 = 0 < FILES
         getarray OFFSET 5 f2
         getarray SIZE 6 f2
         getarray NAME 10 f2
         math OFFSET + 4
         math TMP_OFF = OFFSET
         math OFFSET - BF_OFF
         if OFFSET >= BF_SIZE
            math BF_NUM + 1
            string BF_EXT p "%03d" BF_NUM
            open FDDE BF_EXT
            math BF_OFF + OFFSET
            get BF_SIZE asize
            math OFFSET = 0
         endif
         string FNAME p= "%08x." DUMMY1
         if BF_SIGN == "BUG"
            log MEMORY_FILE OFFSET SIZE
            get SIGN1 long MEMORY_FILE
            log NAME 0 SIZE MEMORY_FILE
         else
            log NAME OFFSET SIZE
         endif
      next f2
   endif
Basically, I want to load the splitted archive based on the offset field. Although it works only with sequential offsets, in the case of the archive I'm trying to handle with there are offset fields that bounce back-and-forth from one file to the next, like this one right here:

Code: Select all

.
. 00000000000000c6
. 00000000 getarr  OFFSET     0x000000002bc09800 5:198
. 00000000 getarr  SIZE       0x00000000000037fc 6:198
. 00000000 getarr  NAME       "de_ha_05a_trex_05.wad" 10:198
. 0000000000000000 get     BF_SIZE    0x0000000018c07000 -2   # .002
. 0000000000000000 get     SIGN1      0x00000000fba13169 4
  0000000000000000 14332      de_ha_05a_trex_05.wad
.
. 00000000000000c7
. 00000000 getarr  OFFSET     0x000000002bc3a800 5:199
. 00000000 getarr  SIZE       0x000000000000affc 6:199
. 00000000 getarr  NAME       "de_ha_05a_trex_17.wad" 10:199
. 0000000000000000 get     SIGN1      0x00000000280aba90 4
  0000000000000000 45052      de_ha_05a_trex_17.wad
.
. 00000000000000c8
. 00000000 getarr  OFFSET     0x000000000e8c6000 5:200   <-- .001
. 00000000 getarr  SIZE       0x00000000000007fc 6:200
. 00000000 getarr  NAME       "fe21468a.bin" 10:200
Regardless, when executed, the script will still stick to the latest loaded extension when it reaches to this point, therefore it's guaranteed to throw out an error when the script is faced with an offset from another splitted part of the archive that it can't reach.

Any ideas as to how I can actually handle this?
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Rayman Raving Rabbids (Wii) - encrypted archive header(.bf)

Post by AnonBaiter »

Ahh, nevermind I seem to have found a solution.
All I had to do was to replace this:

Code: Select all

sortarray 0 1
With this:

Code: Select all

sortarray 5 6

Now if only I could edit my previous post right now... aluigi what did you do with this message board!?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman Raving Rabbids (Wii) - encrypted archive header(.bf)

Post by aluigi »

AnonBaiter wrote:Now if only I could edit my previous post right now... aluigi what did you do with this message board!?

Eh unfortunately I had to limit the editing time due to some users abusing it to delete their posts after they got help and to avoid/limit a possible spamming technique already seen in the past.
I know, I hate it but there are no alternatives.
Sorry.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Rayman Raving Rabbids (Wii) - encrypted archive header(.bf)

Post by AnonBaiter »

I guess it's some spammers trying to ruin the board.. :<
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman Raving Rabbids (Wii) - encrypted archive header(.bf)

Post by aluigi »

That happens everywhere nowadays, even on small forums like this one.
Xentax has many spammers using this technique and the signature one (another thing I may limit in future) and their posts don't even get deleted
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Rayman Raving Rabbids (Wii) - encrypted archive header(.bf)

Post by AnonBaiter »

aluigi wrote:Xentax has many spammers using this technique and the signature one (another thing I may limit in future) and their posts don't even get deleted
>xentax
lol

Honestly I don't know how did that board even managed to survive with these spammers on board.