Constantine IMAGE.BIN file (PC version)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Bambuch0
Posts: 5
Joined: Mon Oct 29, 2018 12:34 pm

Constantine IMAGE.BIN file (PC version)

Post by Bambuch0 »

Hi.
Can anybody help me to extract a sound files from this archive. Archive from a russian PC version of "Constantine". I want to move sounds to PS2 version of game.
https://www.mediafire.com/file/pticvyj480x4mcr/image.bin/file

Thanks.
YAGAMI55
Posts: 55
Joined: Sun May 24, 2020 9:16 pm

Re: Constantine IMAGE.BIN file (PC version)

Post by YAGAMI55 »

Ok
I find what is a lzo compression
but how reimport back
Can anyone help with this?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Constantine IMAGE.BIN file (PC version)

Post by aluigi »

Why do you say it's lzo?
Have you extracted it? script?
YAGAMI55
Posts: 55
Joined: Sun May 24, 2020 9:16 pm

Re: Constantine IMAGE.BIN file (PC version)

Post by YAGAMI55 »

aluigi wrote:Why do you say it's lzo?
Have you extracted it? script?

yes. its lzo1x


get FN FILENAME
get FILE_SIZE asize
set OFFSET 0
log FN 0 0
comtype lzo1x
append

for
Xmath POS "FILE_SIZE - OFFSET"
if POS > 16384
get SIZE SHORT
math OFFSET + 2
Clog FN OFFSET SIZE 10000000
math OFFSET + SIZE
GoTo OFFSET
else
log FN OFFSET 16384 // ?!
break
endif
next i

append
YAGAMI55
Posts: 55
Joined: Sun May 24, 2020 9:16 pm

Re: Constantine IMAGE.BIN file (PC version)

Post by YAGAMI55 »

PS2 version has similar compression
but sounds not compress. this makes easy

but text source is compress(((
all textures, txt labels all compressed
i dont know what tools use. because all tool for game need a header
in this image.bin dont have header

needs like most zlib tool.
just compress without adding header in file and bingo
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Constantine IMAGE.BIN file (PC version)

Post by aluigi »

Interesting, if you have other samples with these different formats/compressions feel free to provide them.
YAGAMI55
Posts: 55
Joined: Sun May 24, 2020 9:16 pm

Re: Constantine IMAGE.BIN file (PC version)

Post by YAGAMI55 »

aluigi wrote:Interesting, if you have other samples with these different formats/compressions feel free to provide them.

aluigi, ps2 and pc have identical type of archive.

the problem is that the toc table is also under lzo compression

simple structure:

information about archive (size) - lzo
toc table (each file offset and size) - lzo
files (texture,mesh etc) - lzo

I ask about write simple compress/decompress utility for this game
but no one want do this because its old game))))
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Constantine IMAGE.BIN file (PC version)

Post by aluigi »

The format doesn't look simple at all to me:

Code: Select all

01 00 00 80 46 90 1e 00 01 00 00 80 3e 90 1e 00   ....F.......>...
01 00 00 00 04 00 00 00 bd 15 00 00 01 00 00 80   ................
17 01 00 00 01 00 00 00 07 00 00 00 44 45 4d 4f   ............DEMO
4e 30 31 08 00 00 00 07 00 00 00 0c 00 00 00 04   N01.............
00 00 00 b1 ec 14 67 0b 00 00 00 07 00 00 00 0f   ......g.........
00 00 00 04 00 00 00 b1 ec 14 67 09 00 00 00 07   ..........g.....
00 00 00 0d 00 00 00 04 00 00 00 b1 ec 14 67 10   ..............g.
00 00 00 07 00 00 00 11 00 00 00 04 00 00 00 b1   ................
ec 14 67 0a 00 00 00 07 00 00 00 0e 00 00 00 04   ..g.............
00 00 00 b1 ec 14 67 02 00 00 00 0b 00 00 00 03   ......g.........
00 00 00 04 00 00 00 06 00 00 00 21 00 00 00 07   ...........!....
00 00 00 25 00 00 00 04 00 00 00 04 00 00 00 00   ...%............
40 00 00 01 00 00 80 2b 01 00 00 01 00 00 00 0b   @......+........
00 00 00 53 4d 41 4c 4c 5f 44 45 4d 4f 4e 08 00   ...SMALL_DEMON..
00 00 0b 00 00 00 0c 00 00 00 04 00 00 00 5b 3e   ..............[>
50 c7 0b 00 00 00 0b 00 00 00 0f 00 00 00 04 00   P...............
00 00 5b 3e 50 c7 09 00 00 00 0b 00 00 00 0d 00   ..[>P...........
00 00 04 00 00 00 5b 3e 50 c7 10 00 00 00 0b 00   ......[>P.......
00 00 11 00 00 00 04 00 00 00 5b 3e 50 c7 0a 00   ..........[>P...
00 00 0b 00 00 00 0e 00 00 00 04 00 00 00 5b 3e   ..............[>
50 c7 02 00 00 00 0f 00 00 00 03 00 00 00 04 00   P...............
00 00 06 00 00 00 1b 00 00 00 07 00 00 00 23 00   ..............#.
00 00 04 00 00 00 04 00 00 00 00 20 00 00 01 00   ........... ....
00 80 1b 01 00 00 01 00 00 00 09 00 00 00 34 4d   ..............4M
44 45 4d 4f 4e 30 31 08 00 00 00 09 00 00 00 0c   DEMON01.........
00 00 00 04 00 00 00 f9 3d 6d 5b 0b 00 00 00 09   ........=m[.....
00 00 00 0f 00 00 00 04 00 00 00 f9 3d 6d 5b 09   ............=m[.
00 00 00 09 00 00 00 0d 00 00 00 04 00 00 00 f9   ................
3d 6d 5b 10 00 00 00 09 00 00 00 11 00 00 00 04   =m[.............
00 00 00 f9 3d 6d 5b 0a 00 00 00 09 00 00 00 0e   ....=m[.........
00 00 00 04 00 00 00 f9 3d 6d 5b 02 00 00 00 0d   ........=m[.....
00 00 00 03 00 00 00 04 00 00 00 06 00 00 00 1b   ................
00 00 00 07 00 00 00 21 00 00 00 04 00 00 00 04   .......!........
00 00 00 00 20 00 00 01 00 00 80 1f 01 00 00 01   .... ...........
00 00 00 0b 00 00 00 43 53 54 5f 42 52 49 43 4b   .......CST_BRICK
32 54 08 00 00 00 0b 00 00 00 0c 00 00 00 04 00   2T..............
00 00 e7 77 f1 0c 0b 00 00 00 0b 00 00 00 0f 00   ...w............
00 00 04 00 00 00 e7 77 f1 0c 09 00 00 00 0b 00   .......w........
00 00 0d 00 00 00 04 00 00 00 e7 77 f1 0c 10 00   ...........w....
00 00 0b 00 00 00 11 00 00 00 04 00 00 00 e7 77   ...............w
f1 0c 0a 00 00 00 0b 00 00 00 0e 00 00 00 04 00   ................
00 00 e7 77 f1 0c 02 00 00 00 0f 00 00 00 03 00   ...w............
00 00 04 00 00 00 06 00 00 00 15 00 00 00 07 00   ................
00 00 1d 00 00 00 04 00 00 00 04 00 00 00 04 00   ................
00 00 01 00 00 80 1f 01 00 00 01 00 00 00 0b 00   ................
00 00 43 53 54 5f 42 52 49 43 4b 33 54 08 00 00   ..CST_BRICK3T...

I can see that it's a sort of sequences of 32bit fields containing the type of information that follow but it doesn't look at toc at all.
YAGAMI55
Posts: 55
Joined: Sun May 24, 2020 9:16 pm

Re: Constantine IMAGE.BIN file (PC version)

Post by YAGAMI55 »

aluigi wrote:The format doesn't look simple at all to me:

Code: Select all

01 00 00 80 46 90 1e 00 01 00 00 80 3e 90 1e 00   ....F.......>...
01 00 00 00 04 00 00 00 bd 15 00 00 01 00 00 80   ................
17 01 00 00 01 00 00 00 07 00 00 00 44 45 4d 4f   ............DEMO
4e 30 31 08 00 00 00 07 00 00 00 0c 00 00 00 04   N01.............
00 00 00 b1 ec 14 67 0b 00 00 00 07 00 00 00 0f   ......g.........
00 00 00 04 00 00 00 b1 ec 14 67 09 00 00 00 07   ..........g.....
00 00 00 0d 00 00 00 04 00 00 00 b1 ec 14 67 10   ..............g.
00 00 00 07 00 00 00 11 00 00 00 04 00 00 00 b1   ................
ec 14 67 0a 00 00 00 07 00 00 00 0e 00 00 00 04   ..g.............
00 00 00 b1 ec 14 67 02 00 00 00 0b 00 00 00 03   ......g.........
00 00 00 04 00 00 00 06 00 00 00 21 00 00 00 07   ...........!....
00 00 00 25 00 00 00 04 00 00 00 04 00 00 00 00   ...%............
40 00 00 01 00 00 80 2b 01 00 00 01 00 00 00 0b   @......+........
00 00 00 53 4d 41 4c 4c 5f 44 45 4d 4f 4e 08 00   ...SMALL_DEMON..
00 00 0b 00 00 00 0c 00 00 00 04 00 00 00 5b 3e   ..............[>
50 c7 0b 00 00 00 0b 00 00 00 0f 00 00 00 04 00   P...............
00 00 5b 3e 50 c7 09 00 00 00 0b 00 00 00 0d 00   ..[>P...........
00 00 04 00 00 00 5b 3e 50 c7 10 00 00 00 0b 00   ......[>P.......
00 00 11 00 00 00 04 00 00 00 5b 3e 50 c7 0a 00   ..........[>P...
00 00 0b 00 00 00 0e 00 00 00 04 00 00 00 5b 3e   ..............[>
50 c7 02 00 00 00 0f 00 00 00 03 00 00 00 04 00   P...............
00 00 06 00 00 00 1b 00 00 00 07 00 00 00 23 00   ..............#.
00 00 04 00 00 00 04 00 00 00 00 20 00 00 01 00   ........... ....
00 80 1b 01 00 00 01 00 00 00 09 00 00 00 34 4d   ..............4M
44 45 4d 4f 4e 30 31 08 00 00 00 09 00 00 00 0c   DEMON01.........
00 00 00 04 00 00 00 f9 3d 6d 5b 0b 00 00 00 09   ........=m[.....
00 00 00 0f 00 00 00 04 00 00 00 f9 3d 6d 5b 09   ............=m[.
00 00 00 09 00 00 00 0d 00 00 00 04 00 00 00 f9   ................
3d 6d 5b 10 00 00 00 09 00 00 00 11 00 00 00 04   =m[.............
00 00 00 f9 3d 6d 5b 0a 00 00 00 09 00 00 00 0e   ....=m[.........
00 00 00 04 00 00 00 f9 3d 6d 5b 02 00 00 00 0d   ........=m[.....
00 00 00 03 00 00 00 04 00 00 00 06 00 00 00 1b   ................
00 00 00 07 00 00 00 21 00 00 00 04 00 00 00 04   .......!........
00 00 00 00 20 00 00 01 00 00 80 1f 01 00 00 01   .... ...........
00 00 00 0b 00 00 00 43 53 54 5f 42 52 49 43 4b   .......CST_BRICK
32 54 08 00 00 00 0b 00 00 00 0c 00 00 00 04 00   2T..............
00 00 e7 77 f1 0c 0b 00 00 00 0b 00 00 00 0f 00   ...w............
00 00 04 00 00 00 e7 77 f1 0c 09 00 00 00 0b 00   .......w........
00 00 0d 00 00 00 04 00 00 00 e7 77 f1 0c 10 00   ...........w....
00 00 0b 00 00 00 11 00 00 00 04 00 00 00 e7 77   ...............w
f1 0c 0a 00 00 00 0b 00 00 00 0e 00 00 00 04 00   ................
00 00 e7 77 f1 0c 02 00 00 00 0f 00 00 00 03 00   ...w............
00 00 04 00 00 00 06 00 00 00 15 00 00 00 07 00   ................
00 00 1d 00 00 00 04 00 00 00 04 00 00 00 04 00   ................
00 00 01 00 00 80 1f 01 00 00 01 00 00 00 0b 00   ................
00 00 43 53 54 5f 42 52 49 43 4b 33 54 08 00 00   ..CST_BRICK3T...

I can see that it's a sort of sequences of 32bit fields containing the type of information that follow but it doesn't look at toc at all.

Its to hard toc. I stuck with this too

I find compress/decompress file size. but i not understand where is offset table for each file