Metal Gear Solid HD Collection(Xbox 360) - .xbarc

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

Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

Okay, so the .xbarc file seems to be the same thing as .psarc(similar structure, etc). I don't see archives like this very often in some games but anyway...
Here's a full file of it.

Again I've never seen anything like it on a Xbox 360 game, but I feel that kind of archive type is quite common.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

http://aluigi.org/bms/metal_gear_solid_xbarc.bms

There are more "compressed size" fields than files, it may be related to a mechanism for updating the archive and that would explain the 73% of coverage.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

No, it's related to chunked files so the script will be updated later.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

All right, I'll wait for it.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

Script 0.2
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

What a script. Say, do you see any differences between an .psarc file and a .xbarc file?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

If you mean brink.bms they are completely different.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

So you say their structure is different? Okay.

Anyway, these files don't work with the script:
mgs2_xbarc.rar

The first .xbarc file extracts that exact file to infinite quantities despite being empty(about 0KB, no less!) and the second one just triggers an error:

Code: Select all

E:\quickbms>quickbms_4gb_files.exe -V -0 E:\quickbms_scripts\metal_gear_solid_xbarc_1.bms E:\MGS_HDC\XBOX360\DVD1\complex-mgshdd1\mgs2\mgs2_1.xbarc cmd > E:\MGS_HDC\XBOX360\DVD1\complex-mgshdd1\mgs2\mgs2.txt

QuickBMS generic files extractor and reimporter 0.7.6a (64bit test)
by Luigi Auriemma
e-mail: me@aluigi.org
web:    aluigi.org
        (Aug 22 2016 - 18:02:49)

                   quickbms.aluigi.org  Homepage
                            zenhax.com  ZenHAX Forum
                               @zenhax  Twitter & Scripts

- current_folder: E:\quickbms
- bms_folder:     E:\quickbms_scripts
- exe_folder:     E:\quickbms
- file_folder:    E:\MGS_HDC\XBOX360\DVD1\complex-mgshdd1\mgs2
- output_folder:  E:\quickbms\cmd
- temp_folder:    C:\Users\TCA\AppData\Local\Temp\
- open input file E:\MGS_HDC\XBOX360\DVD1\complex-mgshdd1\mgs2\mgs2_1.xbarc
- open script E:\quickbms_scripts\metal_gear_solid_xbarc_1.bms
- set output folder cmd

  offset           filesize   filename
--------------------------------------

-------------------
*EXCEPTION HANDLER*
-------------------
An error or crash occurred:

*EH* ExceptionCode      c0000005 access violation
*EH* ExceptionFlags     00000000
*EH* ExceptionAddress   01081c19
                        00C60000 + 00421c19 quickbms_4gb_files.exe
*EH* NumberParameters   00000002
*EH*                    00000000
*EH*                    071beca2

Last script line before the error or that produced the error:
  36  clog MEMORY_FILE OFFSET CHUNK_ZSIZE CHUNK_SIZE
Oh yeah, and the files that were extracted as .wma had this header:

Code: Select all

00000000  30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C  0&²uŽfÏ.¦Ù.ª.bÎl
00000010  47 13 00 00 00 00 00 00 06 00 00 00 01 02 40 52  G.............@R
00000020  D1 86 1D 31 D0 11 A3 A4 00 A0 C9 03 48 F6 74 00  ц.1Ð.£¤. É.Höt.
00000030  00 00 00 00 00 00 41 52 D1 86 1D 31 D0 11 A3 A4  ......ARц.1Ð.£¤
00000040  00 A0 C9 03 48 F6 01 00 00 00 01 00 05 00 56 00  . É.Hö........V.
00000050  43 00 2D 00 31 00 00 00 19 00 56 00 43 00 2D 00  C.-.1.....V.C.-.
00000060  31 00 20 00 53 00 69 00 6D 00 70 00 6C 00 65 00  1. .S.i.m.p.l.e.
00000070  2F 00 4D 00 61 00 69 00 6E 00 20 00 50 00 72 00  /.M.a.i.n. .P.r.
00000080  6F 00 66 00 69 00 6C 00 65 00 00 00 04 00 57 4D  o.f.i.l.e.....WM
00000090  56 33 A1 DC AB 8C 47 A9 CF 11 8E E4 00 C0 0C 20  V3¡Ü«ŒG©Ï.Žä.À.
000000A0  53 65 68 00 00 00 00 00 00 00 3E 13 70 89 81 DA  Seh.......>.p‰.Ú
000000B0  70 40 AE 75 3A E6 82 6F 9D 6D 0F AF A2 00 00 00  p@®u:æ‚o.m.¯¢...
000000C0  00 00 90 F0 7E 9B B9 82 CC 01 34 05 00 00 00 00  ...ð~›¹‚Ì.4.....
000000D0  00 00 20 79 76 3B 00 00 00 00 80 4A A2 38 00 00  .. yv;....€J¢8..
000000E0  00 00 A0 0F 00 00 00 00 00 00 02 00 00 00 40 1F  .. ...........@.
000000F0  00 00 40 1F 00 00 A2 19 2E 00 B5 03 BF 5F 2E A9  ..@...¢...µ.¿_.©
00000100  CF 11 8E E3 00 C0 0C 20 53 65 FF 10 00 00 00 00  Ï.Žã.À. Seÿ.....
00000110  00 00 11 D2 D3 AB BA A9 CF 11 8E E6 00 C0 0C 20  ...ÒÓ«º©Ï.Žæ.À.
00000120  53 65 06 00 D1 10 00 00 A9 46 43 7C E0 EF FC 4B  Se..Ñ...©FC|àïüK
00000130  B2 29 39 3E DE 41 5C 85 27 00 00 00 00 00 00 00  ²)9>ÞA\…'.......
00000140  01 00 0C 65 00 6E 00 2D 00 75 00 73 00 00 00 5D  ...e.n.-.u.s...]
00000150  8B F1 26 84 45 EC 47 9F 5F 0E 65 1F 04 52 C9 1A  ‹ñ&„EìGŸ_.e..RÉ.
00000160  00 00 00 00 00 00 00 02 01 EA CB F8 C5 AF 5B 77  .........êËøů[w
00000170  48 84 67 AA 8C 44 FA 4C CA 80 00 00 00 00 00 00  H„gªŒDúLÊ€......
00000180  00 02 00 00 00 02 00 0C 00 02 00 02 00 00 00 49  ...............I
00000190  00 73 00 56 00 42 00 52 00 00 00 00 00 00 00 02  .s.V.B.R........
000001A0  00 34 00 00 00 0C 00 00 00 44 00 65 00 76 00 69  .4.......D.e.v.i
000001B0  00 63 00 65 00 43 00 6F 00 6E 00 66 00 6F 00 72  .c.e.C.o.n.f.o.r
000001C0  00 6D 00 61 00 6E 00 63 00 65 00 54 00 65 00 6D  .m.a.n.c.e.T.e.m
000001D0  00 70 00 6C 00 61 00 74 00 65 00 00 00 4D 00 50  .p.l.a.t.e...M.P
000001E0  00 40 00 48 00 4C 00 00 00 74 D4 06 18 DF CA 09  .@.H.L...tÔ..ßÊ.
000001F0  45 A4 BA 9A AB CB 96 AA E8 6A 0F 00 00 00 00 00  E¤ºš«Ë–ªèj......
So they should be .wmv files instead.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

wma and wmv have the same magic.

I don't know why but here the script works perfectly with mgs2_1.xbarc_0_2452338969 while you get the crash immediately at the first file.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

Which is why it bugs me that I'm the only one getting this error just now. I'm using the quickbms_4gb_files.exe app if you're curious.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

Are you sure the script you are using is the original 0.2 one?
The crash you have there is inside the xmemdecompress function while trying to read a byte from the input located outside the input buffer.

Here there is no problem with quickbms.exe or quickbms_4gb_files.exe or with the -9 option and so on.

Try the following script on mgs2_1.xbarc and let me know what you get:

Code: Select all

comtype xmemdecompress
clog "test.dat" 0x000458dc 0x0000021c 0x0000091f
That one is the first file on which you get that strange error.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

In the meantime I have fixed the script with version 0.2.1 for working with files that have a size of zero like those in mgs2.xbarc
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

It's happening to me again, even with a different file:

Code: Select all

  0000000000000000 4358       0000000000000d07.dat

-------------------
*EXCEPTION HANDLER*
-------------------
An error or crash occurred:

*EH* ExceptionCode      c0000005 access violation
*EH* ExceptionFlags     00000000
*EH* ExceptionAddress   01294549
                        00E70000 + 00424549 quickbms_4gb_files.exe
*EH* NumberParameters   00000002
*EH*                    00000000
*EH*                    00e4b2aa

Last script line before the error or that produced the error:
  39  clog MEMORY_FILE OFFSET CHUNK_ZSIZE CHUNK_SIZE
The file in question:
mgs3_common.rar
Yes, the script is updated with version 0.2.1. Maybe I'm doing something wrong?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

An error in the increase of the offset.
You MUST reuse the script on the other archives you extracted because the size/content of some extracted files is probably wrong.
Script 0.2.2
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

Huh. I didn't know there were filenames scattered around the archive. Do you?
(and yes, I edited your script to have the extracted files have these names assigned to the NAME_CRC variable. sorry)

Other than that, thanks for "fixing" the script.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

And thus mgs3.xbarc refused to work again:

Code: Select all

  0000000000000000 0          0000000000000c66.dat
- SCRIPT's MESSAGE:
  Error: MEM_SIZE (0) != SIZE (), contact me


- 3175 files found in 52 seconds
  coverage file 0     9%   68351195   693945522
mgs3_1.xbarc doesn't seem to be affected as much, but then again...

Here is the file in question:
mgs3_xbarc.rar

Oh yeah, and the filenames issue... this file along with the previous attachment, they all came from their respective archive files (mgs2_1.xbarc, mgs3_1.xbarc) while others (mgs2.xbarc and mgs3.xbarc) had their filenames scattered around the files for no good reason... or maybe it's just my edited script?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by aluigi »

Ok, no problem it's just a bug in quickbms (that I have to investigate) and that check was useless so I have removed it, script 0.2.2a.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Metal Gear Solid HD Collection(Xbox 360) - .xbarc

Post by AnonBaiter »

Ok, now it works. Thanks.