PS2 Kuon .BND within .BND help with opening

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
whombrell
Posts: 8
Joined: Tue Apr 05, 2022 9:15 pm

PS2 Kuon .BND within .BND help with opening

Post by whombrell »

I'm trying to extract models from Kuon and have got as far as extracting ALL.BND, which shows all files for the game. A lot of those are also BND files, but they seem to be different? I tried using the same BMS script on c001.bnd but after checking it in a hex editor on the resulting files (a c001.dss file that's bigger than the bnd, as well as 2 1kb files) it doesn't seem to have extracted correctly.

When opening c001.bnd in a hex editor I can see the names of files like c001.mdl (and starting at line 00003350 when opened in a hex editor there seems to be bone names, so the model is in there) but I'm not sure how to extract them.

c001.bnd: https://drive.google.com/file/d/1mXwiVO ... mM8G3/view

Here's the script I used. It probably needs a minor change in order to extract these smaller files but I don't know what.

Code: Select all

#Kuon all.bnd extractor
#by chrrox
#quickbms script
goto 0xC
get FILES long
savepos TMP
for i = 0 < FILES
goto TMP
get ID long
get OFFSET long
get SIZE long
get NOFF long
savepos TMP
goto NOFF
get NAME string
log NAME OFFSET SIZE
next i


Thanks for any help.

Edit:

VendorX on xentax provided this code which seems to work:

Code: Select all

#quickbms script
goto 0xC
get FILES long

get ID long
get OFFSET long

do
  goto OFFSET

  get TOFFSET long

  if TOFFSET != 32
    break
  endif

  get Unk00 long
  get Unk01 long
  get NOFFSET long
  get DOFFSET long

  get DSIZE long
  get BSIZE long
  get Unk02 long
  getdstring FileType 16
  getdstring FileName 16

  savepos DOFFSET
  log FileName DOFFSET DSIZE
  xmath OFFSET "DOFFSET + DSIZE"

while TOFFSET == 32