ARC file containing BMPs

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
aftershave
Posts: 9
Joined: Mon Apr 20, 2015 3:04 am

ARC file containing BMPs

Post by aftershave »

Hi. this old file was made in 1998.

then I used quickbms to scan the type of this file and I have found that there are many BMPs shown in 32.dmp.
Last edited by aftershave on Wed Apr 22, 2015 8:44 am, edited 3 times in total.
aftershave
Posts: 9
Joined: Mon Apr 20, 2015 3:04 am

Re: ARC file containing BMPs

Post by aftershave »

I don't know what is wrong. oh my god.
Last edited by aftershave on Wed Apr 22, 2015 8:35 am, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: ARC file containing BMPs

Post by aluigi »

That entrypoint error means that you must create the rest of the program using main().
de_lzah.c is like a library that allows you to use the de_lzah function.
Why don't you just use quickbms to do the work?

Note that the files you linked cannot be downloaded, use mediafire/sendspace/mega
aftershave
Posts: 9
Joined: Mon Apr 20, 2015 3:04 am

Re: ARC file containing BMPs

Post by aftershave »

aluigi wrote:That entrypoint error means that you must create the rest of the program using main().
de_lzah.c is like a library that allows you to use the de_lzah function.
Why don't you just use quickbms to do the work?

Note that the files you linked cannot be downloaded, use mediafire/sendspace/mega


OK. I'll look for another hosting site.

I googled about LZAH but there are nothing except de_lzah.c.
Last edited by aftershave on Tue Apr 21, 2015 4:44 am, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: ARC file containing BMPs

Post by aluigi »

As far as I remember LZAH is a bit confusing and there are different implementations.
I noticed this just recently when I added new compression algorithms and noticed that many of them in quickbms are similar.
Anyway I will personally check the files to be sure about what algorithm they use and I hope that it's one of those embedded in quickbms.
aftershave
Posts: 9
Joined: Mon Apr 20, 2015 3:04 am

Re: ARC file containing BMPs

Post by aftershave »

Thank you very much!
Last edited by aftershave on Wed Apr 22, 2015 8:45 am, edited 3 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: ARC file containing BMPs

Post by aluigi »

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

Re: ARC file containing BMPs

Post by aluigi »

Just a little note, I have noticed that the first 3 images are ever missing something at the beginning... is that normal?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: ARC file containing BMPs

Post by aluigi »

In the meantime I have fixed the script because the sound archive wants the lzss compression.

Still remain the doubt about those images, I don't see errors in the code.
aftershave
Posts: 9
Joined: Mon Apr 20, 2015 3:04 am

Re: ARC file containing BMPs

Post by aftershave »

aluigi wrote:In the meantime I have fixed the script because the sound archive wants the lzss compression.

Still remain the doubt about those images, I don't see errors in the code.


I checked it works! Thank you very much!
Last edited by aftershave on Wed Apr 22, 2015 8:46 am, edited 3 times in total.
aftershave
Posts: 9
Joined: Mon Apr 20, 2015 3:04 am

Re: ARC file containing BMPs

Post by aftershave »

aluigi wrote:Just a little note, I have noticed that the first 3 images are ever missing something at the beginning... is that normal?


It seems that every first three pictures of folder are missing!

I'll find another version of this game and look into it!
aftershave
Posts: 9
Joined: Mon Apr 20, 2015 3:04 am

Re: ARC file containing BMPs

Post by aftershave »

aluigi wrote:In the meantime I have fixed the script because the sound archive wants the lzss compression.

Still remain the doubt about those images, I don't see errors in the code.


Thanks to your script, we could achieve so many things. It makes us really happy.

But we failed to correct the problem.

Exactly the same files are obtained to be corrupted even in cases of other versions of this game.

We can see their clear images in game but we can't extract them.

Sorry for inconvenience, would you donate a little more time to us?

My friends and me tried everything we can do these days, but it seems to be far beyond our ability.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: ARC file containing BMPs

Post by aluigi »

I can try to check it better but I can't spend too much time on it.
Maybe the algorithm is slightly different and those rare differences are visible only with some files... just guessing.
AGKeiz
Posts: 2
Joined: Thu Apr 23, 2015 4:14 pm

Re: ARC file containing BMPs

Post by AGKeiz »

aluigi wrote:I can try to check it better but I can't spend too much time on it.
Maybe the algorithm is slightly different and those rare differences are visible only with some files... just guessing.


Hello~! aluigi.

I'm AGKeiz who is one of aftershave's team member.

First, Thanks for the script for our project!

Thanks to your help, We could do many things.

As you know, The first 3 decompressed files are broken(Furthermore, All decompressed files' size are more and more increasing!).

We tried everything that we can do in a whole days, but we failed to correct the problem.

My friend found A NEW Huffman table in exe file through IDA 6.1.

Here are below.

static unsigned short HuffCode[] = {
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010,
0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010,
0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020,
0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020,
0x030, 0x030, 0x030, 0x030, 0x030, 0x030, 0x030, 0x030,
0x030, 0x030, 0x030, 0x030, 0x030, 0x030, 0x030, 0x030,
0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040,
0x050, 0x050, 0x050, 0x050, 0x050, 0x050, 0x050, 0x050,
0x060, 0x060, 0x060, 0x060, 0x060, 0x060, 0x060, 0x060,
0x070, 0x070, 0x070, 0x070, 0x070, 0x070, 0x070, 0x070,
0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080,
0x090, 0x090, 0x090, 0x090, 0x090, 0x090, 0x090, 0x090,
0x0A0, 0x0A0, 0x0A0, 0x0A0, 0x0A0, 0x0A0, 0x0A0, 0x0A0,
0x0B0, 0x0B0, 0x0B0, 0x0B0, 0x0B0, 0x0B0, 0x0B0, 0x0B0,
0x0C0, 0x0C0, 0x0C0, 0x0C0, 0x0D0, 0x0D0, 0x0D0, 0x0D0,
0x0E0, 0x0E0, 0x0E0, 0x0E0, 0x0F0, 0x0F0, 0x0F0, 0x0F0,
0x100, 0x100, 0x100, 0x100, 0x110, 0x110, 0x110, 0x110,
0x120, 0x120, 0x120, 0x120, 0x130, 0x130, 0x130, 0x130,
0x140, 0x140, 0x140, 0x140, 0x150, 0x150, 0x150, 0x150,
0x160, 0x160, 0x160, 0x160, 0x170, 0x170, 0x170, 0x170,
0x180, 0x180, 0x190, 0x190, 0x1A0, 0x1A0, 0x1B0, 0x1B0,
0x1C0, 0x1C0, 0x1D0, 0x1D0, 0x1E0, 0x1E0, 0x1F0, 0x1F0,
0x200, 0x200, 0x210, 0x210, 0x220, 0x220, 0x230, 0x230,
0x240, 0x240, 0x250, 0x250, 0x260, 0x260, 0x270, 0x270,
0x280, 0x280, 0x290, 0x290, 0x2A0, 0x2A0, 0x2B0, 0x2B0,
0x2C0, 0x2C0, 0x2D0, 0x2D0, 0x2E0, 0x2E0, 0x2F0, 0x2F0,
0x300, 0x310, 0x320, 0x330, 0x340, 0x350, 0x360, 0x370,
0x380, 0x390, 0x3A0, 0x3B0, 0x3C0, 0x3D0, 0x3E0, 0x3F0};

So, We need to fix the source of 'de_lzah.c'.

Would you help a little more for us?

Thank you.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: ARC file containing BMPs

Post by aluigi »

The HuffCode and HuffLength tables are correct because what you have seen must be shifted by 6 and not by 4.
AGKeiz
Posts: 2
Joined: Thu Apr 23, 2015 4:14 pm

Re: ARC file containing BMPs

Post by AGKeiz »

aluigi wrote:The HuffCode and HuffLength tables are correct because what you have seen must be shifted by 6 and not by 4.


If so, can we fix the problem with just modifying the scripts?

P.S. Is the first 3 files' broken problem related to increasing all decompressed files' size?
It is broken more as it goes on.
Last edited by AGKeiz on Thu Apr 23, 2015 5:16 pm, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: ARC file containing BMPs

Post by aluigi »

Currently I don't know the reason, as I said the tables of de_lzah.c and compress.dll are identical.
WinterSSI
Posts: 6
Joined: Fri Apr 24, 2015 3:36 am

Re: ARC file containing BMPs

Post by WinterSSI »

aluigi wrote:Currently I don't know the reason, as I said the tables of de_lzah.c and compress.dll are identical.


Hi aluigi

http://pastebin.com/u8zfW9Bb

This is our Compress.dll analyze TXT so..

plz help us cant do anything b4 FIX this issue (Some file crash and TXT crash)

P.S : TXT Can see but below~ below~ we can see UNICODE(CRASH!)
WinterSSI
Posts: 6
Joined: Fri Apr 24, 2015 3:36 am

Re: ARC file containing BMPs

Post by WinterSSI »

aluigi wrote:Currently I don't know the reason, as I said the tables of de_lzah.c and compress.dll are identical.


[Compress]
LZSS32
LZRW1KH
LZRW1
lzh
Unit1

5type comress in use
LZ** compress is almost same right.?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: ARC file containing BMPs

Post by aluigi »

I have added LZRW1KH in my beta just yesterday and was the first thing I tried, and doesn't work.
All the others are already implemented.
Anyway in the weekend I have some free time and I will check it, so stay tuned for updates.