- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
// Decompress section data
if (ERR_SUCCESS != LzmaDecompress(data, dataSize, decompressed)) {
    // Intel modified LZMA workaround
    EFI_COMMON_SECTION_HEADER* shittySectionHeader;
    UINT32 shittySectionSize;
    // Shitty compressed section with a section header between COMPRESSED_SECTION_HEADER and LZMA_HEADER
    // We must determine section header size by checking it's type before we can unpack that non-standard compressed section
    shittySectionHeader = (EFI_COMMON_SECTION_HEADER*) data;
    shittySectionSize = sizeOfSectionHeaderOfType(shittySectionHeader->Type);
    // ...