Dishonored2 (.index)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Dishonored2 (.index)

Post by sigroon365 »

It is very similar with id tech5/6 engine structure.
Here is the *.index file and filecutted sample from *.resources.
https://www.sendspace.com/file/orjsnk

Ok, it has simple structure. :)

Code: Select all

#Dishonored2
#Made by myself

endian big
comtype DEFLATE_NOERROR

open FDDE index 0
open FDDE resources 1

idstring "\x05\x53\x45\x52"
get datasize long

goto 0x20
get files long

for i = 0 < files
endian big
get ID long

endian little
get namelength0 long
getdstring name0 namelength0
get namelength1 long
getdstring name1 namelength1
get namelength2 long
getdstring name2 namelength2

endian big
get Null long
get OFFSET long
get SIZE long
get ZSIZE long
get Null2 long
get UNK long
get Null3 short

if SIZE == ZSIZE
log name2 OFFSET SIZE 1
else
clog name2 OFFSET ZSIZE SIZE 1
endif

next i
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

Some data were encrypted. Can someone decrypt it?
Sample https://drive.google.com/file/d/0B8JGJb-FRy_bSDN1SnVmSXhqSU0/view?usp=sharing

Image
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Dishonored2 (.index)

Post by Ekey »

They not encrypted - compressed (use > offzip -z -15 -a) or try to add

Code: Select all

math OFFSET += 2
before >

Code: Select all

clog name2 OFFSET ZSIZE SIZE 1
also

Code: Select all

get Null long
get OFFSET long
i guess offsets must be

Code: Select all

get OFFSET longlong
Last edited by Ekey on Thu Nov 10, 2016 1:22 am, edited 2 times in total.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

Ekey wrote:Try this script :)


Hi, Ekey! Thank you. However, it does not work yet.
Image
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

Ekey wrote:They not encrypted - compressed (use > offzip -z -15 -a)


The problem was comtype. :) I just delete comtype from my bms script and it works.
But it still cause error.

Image
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Dishonored2 (.index)

Post by Ekey »

sigroon365 wrote:The problem was comtype. :) I just delete comtype from my bms script and it works.
But it still cause error.


add >

Code: Select all

comtype deflate


change

Code: Select all

get Null long
get OFFSET long
to

Code: Select all

get OFFSET longlong


change

Code: Select all

clog name2 OFFSET ZSIZE SIZE 1
to

Code: Select all

math OFFSET += 2
clog NAME OFFSET ZSIZE SIZE 1
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

Thank you! :D
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

I wonder that why does quickbms try to read 2byte from the EOF on resources.
Should I add

Code: Select all

math OFFSET -= 2
for last one?
Image

Code: Select all

endian big
comtype deflate

open FDDE index 0
open FDDE resources 1

idstring "\x05\x53\x45\x52"
get datasize long

goto 0x20
get files long

for i = 0 < files
endian big
get ID long

endian little
get namelength0 long
getdstring name0 namelength0
get namelength1 long
getdstring name1 namelength1
get namelength2 long
getdstring NAME namelength2

endian big
get OFFSET longlong
get SIZE long
get ZSIZE long
get Null long
get UNK long
get Null2 short

if SIZE == ZSIZE
log NAME OFFSET SIZE 1
else
math OFFSET += 2
clog NAME OFFSET ZSIZE SIZE 1
endif

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

Re: Dishonored2 (.index)

Post by aluigi »

*.lang and *.bimage7 are simply compressed with zlib (just compressed data, no headers/info).
This is the script that works with all the provided formats:
http://aluigi.org/bms/dishonored2.bms
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

aluigi wrote:*.lang and *.bimage7 are simply compressed with zlib (just compressed data, no headers/info).
This is the script that works with all the provided formats:
http://aluigi.org/bms/dishonored2.bms


Thank you!! :)
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dishonored2 (.index)

Post by michalss »

i have try reimport but game has not started :(
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

michalss wrote:i have try reimport but game has not started :(


That doesn't work. Make repacking script or add new data at the end of *.resource and modify *.index.
The game reads uncompressed data when UNK becomes to 0x20 to 0x00.
Image
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dishonored2 (.index)

Post by michalss »

sigroon365 wrote:
michalss wrote:i have try reimport but game has not started :(


That doesn't work. Make repacking script or add new data at the end of *.resource and modify *.index.
The game reads uncompressed data when UNK becomes to 0x20 to 0x00.
Image



Yeah was my second guess. What you mean by becomes to 0x20 to 0x00?
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dishonored2 (.index)

Post by michalss »

i still did not found the correct header for fonts :( any idea pls ?
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

michalss wrote:i still did not found the correct header for fonts :( any idea pls ?


I'd upload it here. http://zenhax.com/viewtopic.php?f=9&t=3365
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dishonored2 (.index)

Post by michalss »

sigroon365 wrote:
michalss wrote:i still did not found the correct header for fonts :( any idea pls ?


I'd upload it here. http://zenhax.com/viewtopic.php?f=9&t=3365



No fonts are textures, no scaleform..
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

michalss wrote:No fonts are textures, no scaleform..


This is different from GFX. And there's no essential information about this.
On top of that developer said to me that they discontinued it. No one can use evaluation program for this format now.
The only one who are employed in company can handle it.

I just manually made a swf header but I still don't have idea on it.
Image

And Xenoverse 1,2 also use this UI system.
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dishonored2 (.index)

Post by michalss »

that is scramble dxt5 format for sure, we have figured out index file for fonts, however as i said dds is scramble somehow and he cannot identify correct header..
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Dishonored2 (.index)

Post by sigroon365 »

michalss wrote:that is scramble dxt5 format for sure, we have figured out index file for fonts, however as i said dds is scramble somehow and he cannot identify correct header..


I don't think that the game reads bimage for font. One have to modify iggy.
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Dishonored2 (.index)

Post by michalss »

Font is 100% texture as ussual, problem is that game wont read it uncompressed and aluigi compressor for zlib is not works because it has dictionary size setup for 32768, but gamefiles are ony 1024. Until alugi help us make zlib compresor where we can select compress dic size to 1024, we are back to 0.. :(

EDIT: compression is sorted, now testing time :)
Last edited by michalss on Fri Nov 11, 2016 7:12 am, edited 1 time in total.