Starting with file SAMPLE.unity3d, I run
Code: Select all
./quickbms unity_old.bms SAMPLE.unity3d
Where unity_old.bms is http://aluigi.altervista.org/papers/bms ... player.bms. This produces one file, since it seems to just be a wrapper: SAMPLE.unity3d_unpacked/CAB-SAMPLE.
I inspected that file, which is the *actual* unity bundle, and it is perfectly fine header-wise. There is no issue there. The problem comes in the next step, where I try to get the actual file:
Code: Select all
quickbms -Y -o -f "{}EXAMPLE_OGG_FILE{}" unity_norm.bms SAMPLE.unity3d_unpacked/CAB-SAMPLE
Where unity_norm.bs is the file located here: http://aluigi.altervista.org/papers/bms/unity.bms. This gives me the proper file like this: TYPE_83/EXAMPLE_OGG_FILE
This is all fine and dandy, but that file is just *slightly* off from what I know it should be. Extracting that exact file with a different program (Disunity), the headers are almost, but not quite, the same:
QuickBMS File:
Code: Select all
00000000 02 00 00 00 0E 00 00 00 01 00 00 00 01 00 00 00 ................
00000010 A5 3B 01 00 4F 67 67 53 00 02 00 00 00 00 00 00 ¥;..OggS........
00000020 00 00 17 0F 00 00 00 00 00 00 BF BA 80 C2 01 1E ..........¿º€Â..
00000030 01 76 6F 72 62 69 73 00 00 00 00 01 80 BB 00 00 .vorbis.....€»..
00000040 FF FF FF FF 00 F4 01 00 FF FF FF FF B8 01 4F 67 ÿÿÿÿ.ô..ÿÿÿÿ¸.Og
00000050 67 53 00 00 00 00 00 00 00 00 00 00 17 0F 00 00 gS..............
00000060 01 00 00 00 EB FB 80 09 0F 4E FF FF FF FF FF FF ....ëû€..Nÿÿÿÿÿÿ
00000070 FF FF FF FF FF FF FF E8 03 76 6F 72 62 69 73 2D ÿÿÿÿÿÿÿè.vorbis-
00000080 00 00 00 58 69 70 68 2E 4F 72 67 20 6C 69 62 56 ...Xiph.Org libV
...
Correct File:
Code: Select all
00000000 4F 67 67 53 00 02 00 00 00 00 00 00 00 00 30 7E OggS..........0~
00000010 00 00 00 00 00 00 18 AD EF 14 01 1E 01 76 6F 72 ........ï....vor
00000020 62 69 73 00 00 00 00 01 80 BB 00 00 FF FF FF FF bis.....€»..ÿÿÿÿ
00000030 00 F4 01 00 FF FF FF FF B8 01 4F 67 67 53 00 00 .ô..ÿÿÿÿ¸.OggS..
00000040 00 00 00 00 00 00 00 00 30 7E 00 00 01 00 00 00 ........0~......
00000050 D3 DC 03 10 0F 4E FF FF FF FF FF FF FF FF FF FF ÓÜ...Nÿÿÿÿÿÿÿÿÿÿ
00000060 FF FF FF E8 03 76 6F 72 62 69 73 2D 00 00 00 58 ÿÿÿè.vorbis-...X
00000070 69 70 68 2E 4F 72 67 20 6C 69 62 56 6F 72 62 69 iph.Org libV
...
Everything after that point is exactly the same. The difference is literally just those initial bytes: 02 00 00 00 0E 00 00 00 01 00 00 00 01 00 00 00 A5 3B 01 00. If I delete them, the OGG file works perfectly fine.
Other types of files have similar issues. Here is an example of a DDS file I attempted to extract:
QuickBMS:
Code: Select all
00000000 00 04 00 00 00 04 00 00 00 00 10 00 0C 00 00 00 ................
00000010 00 00 01 00 01 00 00 00 02 00 00 00 01 00 00 00 ................
00000020 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000030 01 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 ................
00000040 46 21 25 21 FF FF FF FF 00 00 00 00 00 00 00 00 F!%!ÿÿÿÿ........
00000050 46 21 25 21 FF FF FF FF 00 00 00 00 00 00 00 00 F!%!ÿÿÿÿ........
...
Correct:
Code: Select all
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000 44 44 53 20 7C 00 00 00 07 10 08 00 00 04 00 00 DDS |...........
00000010 00 04 00 00 00 00 10 00 00 00 00 00 00 00 00 00 ................
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 ............ ...
00000050 04 00 00 00 44 58 54 35 00 00 00 00 00 00 00 00 ....DXT5........
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 ................
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000080 00 00 00 00 00 00 00 00 46 21 25 21 FF FF FF FF ........F!%!ÿÿÿÿ
00000090 00 00 00 00 00 00 00 00 46 21 25 21 FF FF FF FF ........F!%!ÿÿÿÿ
000000A0 00 00 00 00 00 00 00 00 46 21 25 21 FF FF FF FF .......
...
This time, it's actually missing the correct header (rather than including more bits as in example 1). When I add the DDS/DXT5 portion, it works fine.
Any ideas here? Thanks so much. It's really annoying to have to edit every single file manually before I can use them, and then convert them back before I can reimport.