Pandora's Tower: trying to extract models from .aar files

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Crucius
Posts: 7
Joined: Fri Mar 04, 2022 11:12 pm

Pandora's Tower: trying to extract models from .aar files

Post by Crucius »

I've been trying to extract models from an old Wii game (Pandora's Tower) which has gone under the radar for far too long.

So far no one has extracted models from it so I wanted to give it a try. Supposedly the .aar files containing the models are related to ALAR archives.

I did try using a bms script which was shared few years ago for another game from the same developer but it doesn't seem to function for Pandora's Tower.

Error: incomplete input file 0: [...]\event\model\seres.aar

Can't read 32 bytes from offset a408ffde.
Anyway don't worry, it's possible that the BMS script has been written
to exit in this way if it's reached the end of the archive so check it
or contact its author or verify that all the files have been extracted.
Please check the following coverage information to know if it's ok.

coverage file 0 0% 36 447328 . offset a408ffde

Last script line before the error or that produced the error:
39 getdstring NAME 0x20
coverage file 0 0% 36 447328 . offset a408ffde


I've added a zip of the .aar file which I was trying to extract as well as the quickbms script itself. Is there something I might have overlooked? I'd be extremely grateful for any help on this matter.
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Pandora's Tower: trying to extract models from .aar files

Post by rabatini »

hello,
i dont knw about the compression file.
But i made a script to unpack the file.

Code: Select all

idstring "ALAR"
goto 0x06
endian big
get entries short
goto 0x10
for rip = 1 to entries
get mistery long
get offset long
savepos temp
xmath name "(offset - 0x22)"
goto name
getdstring name 0x20
goto temp
get size long
get null long

log name offset size
next rip
Crucius
Posts: 7
Joined: Fri Mar 04, 2022 11:12 pm

Re: Pandora's Tower: trying to extract models from .aar files

Post by Crucius »

@Rabatini
Incredible, it works! This is a big step towards progress. Now I need to do some research on these other file formats contained within.

It seems as if the bigger files (the ones containing boss data, possibly models?) still encounter errors, though. Here's what I get:
Error: incomplete input file 0: [...]\event\boss_fia_100.aar
Can't read 32 bytes from offset 04200422.
Anyway don't worry, it's possible that the BMS script has been written
to exit in this way if it's reached the end of the archive so check it
or contact its author or verify that all the files have been extracted.
Please check the following coverage information to know if it's ok.

coverage file 0 0% 14 2836872 . offset 04200422

Last script line before the error or that produced the error:
12 getdstring name 0x20
coverage file 0 0% 14 2836872 . offset 04200422

I've attached the affected file to this post. Could this be related to the structure of the archive itself?
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Pandora's Tower: trying to extract models from .aar files

Post by rabatini »

Crucius wrote:@Rabatini
Incredible, it works! This is a big step towards progress. Now I need to do some research on these other file formats contained within.

It seems as if the bigger files (the ones containing boss data, possibly models?) still encounter errors, though. Here's what I get:
Error: incomplete input file 0: [...]\event\boss_fia_100.aar
Can't read 32 bytes from offset 04200422.
Anyway don't worry, it's possible that the BMS script has been written
to exit in this way if it's reached the end of the archive so check it
or contact its author or verify that all the files have been extracted.
Please check the following coverage information to know if it's ok.

coverage file 0 0% 14 2836872 . offset 04200422

Last script line before the error or that produced the error:
12 getdstring name 0x20
coverage file 0 0% 14 2836872 . offset 04200422

I've attached the affected file to this post. Could this be related to the structure of the archive itself?


This is other type.

try this
will work with both types.
Some files have the same name, so just choice r to rename all files.;)

Code: Select all

idstring "ALAR"
get TYPE byte
if TYPE == 2
goto 0x06
endian big
get entries short
goto 0x10
for rip = 1 to entries
get mistery long

get offset long
savepos temp
xmath name "(offset - 0x22)"
goto name
getdstring name 0x20
goto temp
get size long
get null long

log name offset size
next rip

elif TYPE == 3
goto 0x06
endian big
get entries short
goto 0x12


for A = 1 to entries
savepos temp
get pos short

goto pos
get id long
get offset long
get size long
getdstring lixo 0x06
get name string

log name offset size
goto temp
get pos short
next A
endif


Crucius
Posts: 7
Joined: Fri Mar 04, 2022 11:12 pm

Re: Pandora's Tower: trying to extract models from .aar files

Post by Crucius »

@Rabatini
Once again, you've been a big help with taking apart these archives. Thank you.

I've been doing some research regarding the filetypes within these things and they mostly consist of these:
ALIG/.aig = texture file
ALMT/.amt = contains data about nodes/hitboxes & movement
ALMS/.ams = no idea but there's a lot of these, could be another imageformat?
ALOD/.aod = contains references to nodes, might contain model data - check image below!

Image

I tried experimenting with the program "Model Researcher" but I can't seem to get anything functional out of it. I assume these files still need further decryption? Or am I missing something here?

This might be the final step to finally getting these elusive models which the community has been waiting for since a decade.
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Pandora's Tower: trying to extract models from .aar files

Post by rabatini »

Crucius wrote:@Rabatini


I tried experimenting with the program "Model Researcher" but I can't seem to get anything functional out of it. I assume these files still need further decryption? Or am I missing something here?


Some files .arr like pac_d00_field.aar have a compression called Aqua lzss

Code: Select all

"ALLZ" MAGIC WORD
fortunately i guy called brolijah, give source code to decompress and Alluigi implemented in quickbms.
I have implement in the script, it will decompress and unpack i think you should extract every .arr files now.
Last edited by rabatini on Sat Mar 05, 2022 8:04 pm, edited 1 time in total.
Crucius
Posts: 7
Joined: Fri Mar 04, 2022 11:12 pm

Re: Pandora's Tower: trying to extract models from .aar files

Post by Crucius »

rabatini wrote:I have implement in the script, it will decompress and unpack i think you should extract every .arr files now.

Much appreciated! I'm still struggling with figuring out what to do next however.
The files within these packages are definitely part of the ALAR/ALLZ format but they can't be decrypted via the bms script. I keep getting this notification instead:

- 0 files found in 0 seconds
coverage file 0 0% 4 4160 . offset 00000004


I need some way to convert these other files (.aig/.amt/.ams/.aod/etc) into something usable for these 3D programs. This is my greatest hurdle.
It's a pity that most of these filenames aren't very conclusive so this'll be a ton of experimenting until I find the right stuff.
Last edited by Crucius on Sat Mar 05, 2022 7:44 pm, edited 1 time in total.
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Pandora's Tower: trying to extract models from .aar files

Post by rabatini »

Crucius wrote:
rabatini wrote:I have implement in the script, it will decompress and unpack i think you should extract every .arr files now.

Much appreciated! I'm still struggling with figuring out what to do next however.
The files within these packages are definitely part of the ALAR/ALLZ format but they can't be decrypted via the bms script. I keep getting this notification instead:

- 0 files found in 0 seconds
coverage file 0 0% 4 4160 . offset 00000004


I need some way to convert these other files (.aig/.amt/.ams/.aod/etc) into something usable for these 3D programs. This is my greatest hurdle.
It's a pity that most of these filenames aren't very conclusive so this'll be a ton of experimenting until I find the right stuff.


Wich file did that?
allz ?
Crucius
Posts: 7
Joined: Fri Mar 04, 2022 11:12 pm

Re: Pandora's Tower: trying to extract models from .aar files

Post by Crucius »

rabatini wrote:Wich file did that?
allz ?

I tried using your updated bms script on any of the file formats I've mentioned earlier and it didn't seem to recognize them. The output folder remained empty.

It still can open the archives but the files within them remain a mystery. Right now there's no way to convert them.
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Pandora's Tower: trying to extract models from .aar files

Post by rabatini »

Crucius wrote:
rabatini wrote:Wich file did that?
allz ?

I tried using your updated bms script on any of the file formats I've mentioned earlier and it didn't seem to recognize them. The output folder remained empty.

It still can open the archives but the files within them remain a mystery. Right now there's no way to convert them.


send one.
wich is not extracting
Crucius
Posts: 7
Joined: Fri Mar 04, 2022 11:12 pm

Re: Pandora's Tower: trying to extract models from .aar files

Post by Crucius »

rabatini wrote:send one.
wich is not extracting

Here you go, I've attached an unpackaged archive which features those file formats. I'd be real curious to hear how to crack their contents.
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Pandora's Tower: trying to extract models from .aar files

Post by rabatini »

Crucius wrote:
rabatini wrote:send one.
wich is not extracting

Here you go, I've attached an unpackaged archive which features those file formats. I'd be real curious to hear how to crack their contents.


i´ve update the script adding type 2 for compressed file.

well, this files it was extracted from de pac right?

i really don't how you open it.

maybe open a new topic asking form help for someone who is advanced in sound and models files.
i am not your guy for this.