2 InstallShield Z file format
3 Copyright 2015 <hacker@iam.tj>
4 Licenced on the terms of then GNU General Public Licence version 3
6 Data structures used in InstallShield .Z archive files
13 const unsigned int file_magic = 0x8C655D12;
14 const ssize_t Z_FILE_HEADER_BYTES = 0x100;
16 /* __prefixed field purpose is not confirmed */
17 struct __attribute__((packed)) archive_header {
18 uint32_t magic; // 0x00
19 uint16_t __version; // 0x04
20 uint16_t __flags; // 0x06
21 uint32_t __unknown08; // 0x08
22 uint16_t files_entries; // 0x0C
23 uint16_t datestamp; // 0x0E
24 uint16_t timestamp; // 0x10
25 uint32_t file_bytes; // 0x12
26 uint32_t payload_bytes; // 0x16
27 uint8_t __known1A; // 0x1A
28 uint16_t __unknown1B; // 0x1B
29 uint32_t __unknown1D; // 0x1D
30 uint32_t __unknown21; // 0x21
31 uint32_t __unknown25; // 0x25
32 uint32_t directories_offset; // 0x29
33 uint32_t directories_bytes; // 0x2D
34 uint16_t directories_entries; // 0x31
35 uint32_t files_offset; // 0x33
36 uint32_t files_bytes; // 0x37
37 unsigned char unknown3B[0x100 - 0x3B]; // 0x3B to 0xFF
40 struct __attribute__((packed)) dirent_prefix {
41 uint16_t __flags; // 0x00
42 uint16_t entry_bytes; // 0x02
43 uint16_t name_bytes; // 0x04
47 struct __attribute__((packed)) dirent_suffix {
48 unsigned char __eos; // end of string NUL
49 uint32_t __unknown00; // 0x01 after end of directory_entry_prefix
52 struct __attribute__((packed)) fileent_prefix {
56 uint32_t payload_bytes;
57 uint32_t payload_offset;
67 struct __attribute__((packed)) fileent_suffix {
74 struct dirent_prefix *entry;
79 struct fileent_prefix *entry;
80 struct ll_fileents *next;