|
|
@ -17,13 +17,16 @@ namespace apphost_extract_v2.Models
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Header = new AppHostFileHeader();
|
|
|
|
Header = new AppHostFileHeader();
|
|
|
|
var headerAddress = BitConverter.ToInt32(fs.ReadBuffer(HEADER_OFFSET_PTR, 4));
|
|
|
|
var headerAddress = BitConverter.ToInt32(fs.ReadBuffer(HEADER_OFFSET_PTR, 4));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (headerAddress == 0)
|
|
|
|
|
|
|
|
Log.Fatal("The address of the Bundle header is 0 :/");
|
|
|
|
|
|
|
|
|
|
|
|
var headerBuffer = fs.ReadBuffer(headerAddress, HEADER_SIZE);
|
|
|
|
var headerBuffer = fs.ReadBuffer(headerAddress, HEADER_SIZE);
|
|
|
|
Log.Info($"Reading header at 0x{HEADER_OFFSET_PTR:X8}...");
|
|
|
|
Log.Info($"Reading header at 0x{HEADER_OFFSET_PTR:X8}...");
|
|
|
|
Header.Raw = headerBuffer;
|
|
|
|
Header.Raw = headerBuffer;
|
|
|
|
Header.Path = Encoding.UTF8.GetString(fs.ReadBuffer(headerAddress + HEADER_SIZE, 0xC));
|
|
|
|
Header.Path = Encoding.UTF8.GetString(fs.ReadBuffer(headerAddress + HEADER_SIZE, 0xC));
|
|
|
|
|
|
|
|
|
|
|
|
Header.Manifest = ParseManifest();
|
|
|
|
Header.Manifest = ParseManifest();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private AppHostManifest ParseManifest()
|
|
|
|
private AppHostManifest ParseManifest()
|
|
|
|