Scan binary files in search for known formats or files that fits some assumptions

25 views
Skip to first unread message

rch...@gmail.com

unread,
Oct 23, 2013, 8:48:51 PM10/23/13
to ti...@googlegroups.com
Is ther a possibility (or sesne) to add a feature to scan binary files for headers (like LS77, RLE) and present results as files that could be exported or viewed with selected assumption (for e.g software will try to open file as image if user want to).

I am thinking directly about data.bin in Ace Attorney series, while most of images could be found there with CT2, some other are hard to track down (choice buttons during cases, speech balloons, cross-examination message for e.g.) or may be compressed.

There is possibility to search for lz77 headers in CT2 and some results appears as possible files (4096 or 8192 filesize), but i don't even know what to do with this next, like how to try to view it as graphics data.

beni P.S.

unread,
Oct 24, 2013, 5:52:27 PM10/24/13
to ti...@googlegroups.com
There is no LZ77 (that compression does not exists, it's name is LZ10, not LZ77), Huffman, RLE... header. The "header" is just 4 bytes. The first one indicates the type of compression (0x10, 0x11, 0x30, 0x24 or 0x28) and the other three bytes indicates the decompressed size. So, detecting compression just searching for a byte value (ie: searching 0x10 byte in a file) is not a very good idea... So many fake matching cases. The only way to know if a file is compressed is trying to decompress it. This method, with big files, with a lot of matching cases, is so time expensive (imagine a file of 2 MB of size filled with 0x10 byte... how many times Tinke will try to decode it?).

What Tinke can do is to unpack a file once you know its format (and if it's enough simply to use the automatic tool, else you will need to write a plug-in in .NET language). To do it, select the file and then click at "Open as -> Pack". Configure the parameters in that new window to match the pack format.
If you were right, and the file is unpacked (uncompressed) correctly, it will detect the subfiles as encoded (if they are) with LZ10 or whether compression have. Then you can decompress each of them, and if it's a supported image, open it.

Anyway, tell me exactly what game is (if possible GameCode too) and I will check the format and give you more info ;)


2013/10/24 <rch...@gmail.com>
Is ther a possibility (or sesne) to add a feature to scan binary files for headers (like LS77, RLE) and present results as files that could be exported or viewed with selected assumption (for e.g software will try to open file as image if user want to).

I am thinking directly about data.bin in Ace Attorney series, while most of images could be found there with CT2, some other are hard to track down (choice buttons during cases, speech balloons, cross-examination message for e.g.) or may be compressed.

There is possibility to search for lz77 headers in CT2 and some results appears as possible files (4096 or 8192 filesize), but i don't even know what to do with this next, like how to try to view it as graphics data.

--
Has recibido este mensaje porque estás suscrito al grupo "Tinke" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a tinke+un...@googlegroups.com.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages