Dark Souls 1 (xbox360) BND

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Dark Souls 1 (xbox360) BND

Post by michalss »

Hi all,

Looking for help with this files. They extract OK but some of the filenames are cripled, can you please help ? Strange thing is that in HEX it looks the same :(

Image


Using this script..

Code: Select all

endian big
idstring "BND307D7R6"
goto 0x10
get files long
get start long
goto 0x20
savepos tbl
log MEMORY_FILE 0 0
for i = 0 < files
goto tbl
get unk01 long
get zsize long
get offset long
get unk02 long
get nameoff long
get size long
savepos tbl
math nameoff + 3
goto nameoff
get name string
if zsize == size
log name offset zsize
else
clog name offset zsize size
endif
putct name string -1 MEMORY_FILE
put 0x0a0d short MEMORY_FILE
next i
get size asize MEMORY_FILE
log "names.txt" 0 size MEMORY_FILE


Samples :

Code: Select all

https://dl.dropboxusercontent.com/u/38234344/dvdbnd1.bdt_unpacked.rar
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Dark Souls 1 (xbox360) BND

Post by MerlinSVK »

File names are OK. Just written in japanese :lol:

Image
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dark Souls 1 (xbox360) BND

Post by michalss »

to me fakt nenapadlo :D Dik
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Dark Souls 1 (xbox360) BND

Post by aluigi »

Do you know if quickbms has dumped the filenames correctly?
I guess that some chars are corrupted due to the cleaning of the filenames (probably I will add an option to disable it).
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dark Souls 1 (xbox360) BND

Post by michalss »

aluigi wrote:Do you know if quickbms has dumped the filenames correctly?
I guess that some chars are corrupted due to the cleaning of the filenames (probably I will add an option to disable it).



To be hones it is same if i hex it. SO i guess merlin is right, but exprot you can see on screen it is not correct or my Wind cannot display JP chars :(
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Dark Souls 1 (xbox360) BND

Post by MerlinSVK »

They are dumped exactly like in files are, but saved in ASCII and not in SHIFT-JIS (or UTF? don't know). But manually I can rename that files to have japanese characters in name, so I don't know if it's matter of QBMS or operating system.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Dark Souls 1 (xbox360) BND

Post by aluigi »

*edit*
I thought that ",ccs=UTF-8" in fopen was for the filename, instead it's for the content so it's useless.

I don't know why the filenames are saved as ASCII, probably a limitation of fopen.
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dark Souls 1 (xbox360) BND

Post by michalss »

I was really impresed byt this and i had to write my own repacker : Here is result :) And it works prefectly had to use codepage 932

Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Dark Souls 1 (xbox360) BND

Post by aluigi »

Did you used WideCharToMultiByte with that codepage to convert the utf8 string to utf16 for CreateFileW?
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dark Souls 1 (xbox360) BND

Post by michalss »

aluigi wrote:Did you used WideCharToMultiByte with that codepage to convert the utf8 string to utf16 for CreateFileW?


It is written in .NEt so i use this :

Code: Select all

Encoding.GetEncoding(pageCode).GetString(this.ReadBytes(Length, Endian.Little));
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dark Souls 1 (xbox360) BND

Post by michalss »

BTW : i found the very powerfull way to handle binaries in .NET :) really super easy method at least for extraction for now