Agarest: Generations of War 2 (PC, 2015) - *.bra

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Agarest: Generations of War 2 (PC, 2015) - *.bra

Post by AlphaTwentyThree »

Hi!

Just wrote a little script for the game's archives that I want to share with you. :)

Code: Select all

# extracts the *.bra archives from "Agarest: Generations of War 2 (PC, 2015)"
# (c) 2015-03-02 by AlphaTwentyThree of ZenHax
# script for QuickBMS http://quickbms.aluigi.org

comtype deflate
idstring "PDA"
goto 0x8
get INFO long
get SIZE asize
math SIZE -= INFO
   putVarChr MEMORY_FILE SIZE 0
   log MEMORY_FILE 0 0
   append
   log MEMORY_FILE INFO SIZE
   append
   get FOLDER basename
   get FSIZE asize MEMORY_FILE
goto 0 MEMORY_FILE
do
   get UNK longlong MEMORY_FILE # crc/md5?
   get CSIZE long MEMORY_FILE
   get SIZE long MEMORY_FILE
   get NAMEL short MEMORY_FILE
   get UNK short MEMORY_FILE
   get OFFSET long MEMORY_FILE
   getDstring NAME NAMEL MEMORY_FILE
   math CSIZE -= 0x10
   math OFFSET += 0x10
   savepos MYOFF MEMORY_FILE
   math MYOFF x= 4
   goto MYOFF MEMORY_FILE
   string NAME p= "%s/%s" FOLDER NAME
   if   SIZE == CSIZE
      log NAME OFFSET CSIZE
   else
      clog NAME OFFSET CSIZE SIZE
   endif
while MYOFF < FSIZE
Ponkoz
Posts: 2
Joined: Thu Mar 24, 2016 7:25 am

Re: Agarest: Generations of War 2 (PC, 2015) - *.bra

Post by Ponkoz »

Thx to AlphaTwentyThree
I can extract .bra files of the way of samurai 3 published Ghostlight:)
But I need repack files to Bra container. if have any idea, it`ll help us :oops:
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Re: Agarest: Generations of War 2 (PC, 2015) - *.bra

Post by Savage »

For me the .bra are a ofuscated zips, what we need is a zip2bra, the main .exe checks the files .bra and the crc of the .bra, i tried a simple method creating a zip and renamed to .bra of course didn't worked.

If you try to modify the main exe (to bypass the .bra check) it crashes, well, it crashed to me.

The bms doesn't worked for me to reimport data
Ponkoz
Posts: 2
Joined: Thu Mar 24, 2016 7:25 am

Re: Agarest: Generations of War 2 (PC, 2015) - *.bra

Post by Ponkoz »

Thank for giving advise Savege.

Just as you say, I rewrite the main .exe binary even a little, it crash.
So I'm trying replacing the contents of the file .bra.
In my opinion, the main .exe doesn't check the crc of the .bra, only existence of the files.

The bms written by AlphaTwentyThree work definitely the .bra files of the way of samurai 3.
& extract enormously many files about 5500. :oops:

It's difficult to re-compression the .bra `cause "ofuscated" compression.