Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by AnonBaiter »

So, I tried to write a script about this format:

Code: Select all

endian big
get DUMMY long
get AST_SIZE asize

goto 0x80
get DUMMY01 short
get DUMMY02 short
get DUMMY03 short
get DUMMY04 short
get DUMMY05 short
get DUMMY06 short
get DUMMY07 short
get DUMMY08 short
get DUMMY09 short
get DUMMY10 short
get DUMMY11 short
get DUMMY12 short
get DUMMY13 short
get DUMMY14 short
get DUMMY15 short
get DUMMY16 short
get DUMMY17 short
get DUMMY18 short
get DUMMY19 short
get DUMMY20 short
get DUMMY21 short
get DUMMY22 short
get DUMMY23 short
get DUMMY24 short
get DUMMY25 short
get DUMMY26 short
get DUMMY27 short
get DUMMY28 short
get DUMMY29 short
get DUMMY30 short
get DUMMY31 short
get DUMMY32 short
get DUMMY33 short
get DUMMY34 short
get DUMMY35 short
get DUMMY36 short
get DUMMY37 short
get DUMMY38 short
get DUMMY39 short
get DUMMY40 short
get DUMMY41 short
get DUMMY42 short
get DUMMY43 short
get DUMMY44 short
get DUMMY45 short
get DUMMY46 short
get DUMMY47 short
get DUMMY48 short
get DUMMY49 short

math OFFSET = DUMMY12

do
   goto OFFSET
   get DUMMY0 short
   get SIZE short
   get DUMMY1 long
   get DUMMY2 long
   append
   log MEMORY_FILE OFFSET SIZE
   append
   
   if OFFSET != 0
      math OFFSET += SIZE
   endif
   putarray 0 i OFFSET
while OFFSET < AST_SIZE
However it seems I fear I won`t have any idea what I`m doing after that, so if anyone here wants to help me, here`s a sample.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by aluigi »

It smells of chunks and missing index file.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by aluigi »

Ok, as far as I can see from some online resources there is no index file for the AST files.
This is the script to dump all the files correctly:
http://aluigi.org/bms/tiger_woods_ast.bms
Now you have only to understand how to handle these chunks of compressed audio
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by AnonBaiter »

Got it.

EDIT: Wait a second, since when the header of each chunk was 20 bytes? I thought it was 12 since DUMMY4 and DUMMY5 aren`t really part of the header considering a mono XMA audio can start with the \x08\x00\x00\x00 value, not to mention it gets glitchy if you add a GENH/RIFF header into it. I`ll see what I can do.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by aluigi »

I didn't parse the header, the script is just a demonstration of how to read and locate the chunks in the correct way
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by AnonBaiter »

I`m not saying you parsed the header. I just find it strange that the first 8 bytes(which are DUMMY3 and DUMMY4) that are essential to playing the XMA audio are cut out with this script if you set CONCAT to 0.

I did manage to edit the script so that only the first 12 bytes are ommited(meaning that DUMMY3 and DUMMY4 had to be removed), and then I had to parse the extracted file in question. Turns out only the first few samples are correct.
Last edited by AnonBaiter on Thu Mar 16, 2017 12:27 pm, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by aluigi »

ok, removed
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by AnonBaiter »

Umm, thanks for the update I guess?
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by AnonBaiter »

I found another one!

This sample came from the Xbox version of Tiger Woods PGA Tour 07.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by aluigi »

That sample you provided a clear confirmation that there is an index file or a TOC somewhere else.
In fact at offset 0x80 we have a SCHl file and no information.
Without these information you can only scan the file for the SCHl magic and calculating the size of the file with the difference between the next and the current file.
Script 0.2 (now it dumps each xma chunk separately in a folder with CONCAT 0)
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by AnonBaiter »

That`s all I need right now. Thanks!

EDIT: Well, I just got this after extracting.

Code: Select all

  10933800 1876318992 00002118.dat

Error: incomplete input file 0: F:\ELECTRONIC_ARTS\GC\TIGER_WOODS_PGA_TOUR_06\Da
ta\Misc\audiostm.ast
       Can't read 1035904 bytes from offset 10936980.
       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   212%   591513996  278096256  . offset 10936980
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by aluigi »

Fixed. forgot to convert the endianess of AST_SIZE
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by AnonBaiter »

Thanks for the update!
Warthog1336
Posts: 140
Joined: Mon Feb 05, 2018 5:45 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by Warthog1336 »

Hello aluigi, sorry but your script actually output corrupted files.

Could you please fix it?

Here are samples:
https://mega.nz/#!a5lFSSBY!HzK8t8TS9HJ7 ... FHErVr5yo8

Thanks in advance.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by aluigi »

I don't think I can do anything. Without TOC I can only guess the extraction.
Anyway the extraction is correct on that sample. I don't know if compression is used.
Warthog1336
Posts: 140
Joined: Mon Feb 05, 2018 5:45 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by Warthog1336 »

Then I don't understand what's wrong...
Last edited by Warthog1336 on Mon Mar 30, 2020 5:19 pm, edited 1 time in total.
Warthog1336
Posts: 140
Joined: Mon Feb 05, 2018 5:45 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by Warthog1336 »

By the way thank you for replying to all these threads, I'm glad you're with us again ^^
Warthog1336
Posts: 140
Joined: Mon Feb 05, 2018 5:45 pm

Re: Tiger Woods PGA Tour 06 (Xbox 360) - audiostm.ast

Post by Warthog1336 »

I tested the script again with CONCAT = 1 and it worked, please forgive me about the fact I didn't know how to correctly use the script.

It extracted a lot of EAXMA headerless files, and I think I know where those headers might be located, along with information on audiostm.ast.

There's a "data" directory with a "stmfiles" folder inside the game files, and here are three files from it: https://mega.nz/#!S5cyCQyC!jDstCK9mhe1C ... KjcCUSDuDk

It appears festrm.xen is zlib compressed (recognized with 78 DA bytes at offset 0x6c), but i don't know about the two others...