xref: /freebsd/contrib/file/magic/Magdir/windows (revision 2726a7014867ad7224d09b66836c5d385f0350f4)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*2726a701SXin LI# $File: windows,v 1.31 2020/03/15 16:44:37 christos Exp $
4b6cee71dSXin LI# windows:  file(1) magic for Microsoft Windows
5b6cee71dSXin LI#
6b6cee71dSXin LI# This file is mainly reserved for files where programs
7b6cee71dSXin LI# using them are run almost always on MS Windows 3.x or
8b6cee71dSXin LI# above, or files only used exclusively in Windows OS,
9b6cee71dSXin LI# where there is no better category to allocate for.
10b6cee71dSXin LI# For example, even though WinZIP almost run on Windows
11b6cee71dSXin LI# only, it is better to treat them as "archive" instead.
12b6cee71dSXin LI# For format usable in DOS, such as generic executable
13b6cee71dSXin LI# format, please specify under "msdos" file.
14b6cee71dSXin LI#
15b6cee71dSXin LI
16b6cee71dSXin LI
17b6cee71dSXin LI# Summary: Outlook Express DBX file
18b6cee71dSXin LI# Extension: .dbx
19b6cee71dSXin LI# Created by: Christophe Monniez
20b6cee71dSXin LI0	string	\xCF\xAD\x12\xFE	MS Outlook Express DBX file
21b6cee71dSXin LI>4	byte	=0xC5			\b, message database
22b6cee71dSXin LI>4	byte	=0xC6			\b, folder database
23b6cee71dSXin LI>4	byte	=0xC7			\b, account information
24b6cee71dSXin LI>4	byte	=0x30			\b, offline database
25b6cee71dSXin LI
26b6cee71dSXin LI
27b6cee71dSXin LI# Summary: Windows crash dump
28b6cee71dSXin LI# Extension: .dmp
2948c779cdSXin LI# Created by: Andreas Schuster (https://computer.forensikblog.de/)
3048c779cdSXin LI# Reference (1): https://computer.forensikblog.de/en/2008/02/64bit_magic.html
31b6cee71dSXin LI# Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
32b6cee71dSXin LI0	string		PAGE
33b6cee71dSXin LI>4	string		DUMP		MS Windows 32bit crash dump
34b6cee71dSXin LI>>0x05c	byte            0		\b, no PAE
35b6cee71dSXin LI>>0x05c	byte            1		\b, PAE
36b6cee71dSXin LI>>0xf88	lelong		1		\b, full dump
37b6cee71dSXin LI>>0xf88	lelong		2		\b, kernel dump
38b6cee71dSXin LI>>0xf88	lelong		3		\b, small dump
39b6cee71dSXin LI>>0x068	lelong		x		\b, %d pages
40b6cee71dSXin LI>4	string		DU64		MS Windows 64bit crash dump
41b6cee71dSXin LI>>0xf98	lelong		1		\b, full dump
42b6cee71dSXin LI>>0xf98	lelong		2		\b, kernel dump
43b6cee71dSXin LI>>0xf98	lelong		3		\b, small dump
44b6cee71dSXin LI>>0x090	lequad		x		\b, %lld pages
45b6cee71dSXin LI
46b6cee71dSXin LI
47b6cee71dSXin LI# Summary: Vista Event Log
48b6cee71dSXin LI# Extension: .evtx
4948c779cdSXin LI# Created by: Andreas Schuster (https://computer.forensikblog.de/)
5048c779cdSXin LI# Reference (1): https://computer.forensikblog.de/en/2007/05/some_magic.html
51b6cee71dSXin LI0	string		ElfFile\0	MS Windows Vista Event Log
52b6cee71dSXin LI>0x2a	leshort		x		\b, %d chunks
53b6cee71dSXin LI>>0x10	lelong		x		\b (no. %d in use)
54b6cee71dSXin LI>0x18	lelong		>1		\b, next record no. %d
55b6cee71dSXin LI>0x18	lelong		=1		\b, empty
56b6cee71dSXin LI>0x78	lelong		&1		\b, DIRTY
57b6cee71dSXin LI>0x78	lelong		&2		\b, FULL
58b6cee71dSXin LI
5948c779cdSXin LI# Summary: Windows System Deployment Image
6048c779cdSXin LI# Created by: Joerg Jenderek
6148c779cdSXin LI# URL: http://en.wikipedia.org/wiki/System_Deployment_Image
6248c779cdSXin LI# Reference: http://skolk.livejournal.com/1320.html
6348c779cdSXin LI0	string			$SDI
6448c779cdSXin LI>4	string			0001		System Deployment Image
6548c779cdSXin LI!:mime	application/x-ms-sdi
6648c779cdSXin LI#!:mime	application/octet-stream
6748c779cdSXin LI# \Boot\boot.sdi
6848c779cdSXin LI!:ext	sdi
6948c779cdSXin LI# MDBtype: 0~Unspecified 1~RAM 2~ROM
7048c779cdSXin LI>>8	ulequad			!0		\b, MDBtype 0x%llx
7148c779cdSXin LI# BootCodeOffset
7248c779cdSXin LI>>16	ulequad			!0		\b, BootCodeOffset 0x%llx
7348c779cdSXin LI# BootCodeSize
7448c779cdSXin LI>>24	ulequad			!0		\b, BootCodeSize 0x%llx
7548c779cdSXin LI# VendorID
7648c779cdSXin LI>>32	ulequad			!0		\b, VendorID 0x%llx
7748c779cdSXin LI# DeviceID
7848c779cdSXin LI>>40	ulequad			!0		\b, DeviceID 0x%llx
7948c779cdSXin LI# DeviceModel
8048c779cdSXin LI>>48	ulequad			!0		\b, DeviceModel 0x%llx
8148c779cdSXin LI>>>56	ulequad			!0		\b%llx
8248c779cdSXin LI# DeviceRole
8348c779cdSXin LI>>64	ulequad			!0		\b, DeviceRole 0x%llx
8448c779cdSXin LI# Reserved1; reserved fields and gaps between BLOBs are padded with \0
8548c779cdSXin LI#>>72	ulequad			!0		\b, Reserved1 0x%llx
8648c779cdSXin LI# RuntimeGUID
8748c779cdSXin LI>>80	ulequad			!0		\b, RuntimeGUID 0x%llx
8848c779cdSXin LI>>>88	ulequad			!0		\b%llx
8948c779cdSXin LI# RuntimeOEMrev
9048c779cdSXin LI>>96	ulequad			!0		\b, RuntimeOEMrev 0x%llx
9148c779cdSXin LI# Reserved2
9248c779cdSXin LI#>>104	ulequad			!0		\b, Reserved2 0x%llx
9348c779cdSXin LI# BLOB alignment value in pages, as specified in sdimgr /pack: 1~4K 2~8k
9448c779cdSXin LI>>112	ulequad			!0		\b, PageAlignment %llu
9548c779cdSXin LI# Reserved3[48]
9648c779cdSXin LI#>>120	ulequad			!0		\b, Reserved3 0x%llx
9748c779cdSXin LI# SDI checksum 39h
9848c779cdSXin LI>>0x1f8	ulequad			x		\b, checksum 0x%llx
9948c779cdSXin LI# BLOBtype[8] \0-padded: PART, WIM , BOOT, LOAD, DISK
10048c779cdSXin LI>>0x400	string			>\0		\b, type %-3.8s
10148c779cdSXin LI# 0~non-filesystem 7~NTFS 6~BIGFAT
10248c779cdSXin LI>>>0x420	ulequad		!0		(0x%llx)
10348c779cdSXin LI# ATTRibutes
10448c779cdSXin LI>>>0x408	ulequad		!0		0x%llx attributes
10548c779cdSXin LI# Offset
10648c779cdSXin LI>>>0x410	ulequad		x		at 0x%llx
10748c779cdSXin LI# print 1 space after size and then handles NTFS boot sector by ./filesystems
10848c779cdSXin LI>>>0x418	ulequad		>0		%llu bytes
10948c779cdSXin LI>>>>(0x410.l)	indirect	x
11048c779cdSXin LI# 2nd BLOB: WIM
11148c779cdSXin LI>>0x440		string		>\0		\b, type %-3.8s
11248c779cdSXin LI>>>0x428	ulequad		!0		(0x%llx)
11348c779cdSXin LI# ATTRibutes
11448c779cdSXin LI>>>0x448	ulequad		!0		0x%llx attributes
11548c779cdSXin LI# Offset
11648c779cdSXin LI>>>0x450	ulequad		x		at 0x%llx
11748c779cdSXin LI>>>0x458	ulequad		>0		%llu bytes
11848c779cdSXin LI>>>>(0x450.l)	indirect	x
11948c779cdSXin LI# 3rd BLOB
12048c779cdSXin LI>>0x480		string		>\0		\b, type %-3.8s
12148c779cdSXin LI
122d38c30c0SXin LI# Summary:	Windows boot status log BOOTSTAT.DAT
123d38c30c0SXin LI# From:		Joerg Jenderek
124d38c30c0SXin LI# Reference:	https://www.geoffchappell.com/notes/windows/boot/bsd.htm
125d38c30c0SXin LI# Note:		mainly refers to older Windows Vista, sometimes
126d38c30c0SXin LI#		BOOTSTAT.DAT only contains nulls or invalid data
127d38c30c0SXin LI# checking for valid version below 5
128d38c30c0SXin LI0		ulelong		<5
129d38c30c0SXin LI# skip many ISO images by checking for valid 64 KiB file size
130d38c30c0SXin LI>8		ulelong		=0x00010000
131d38c30c0SXin LI>>0		use		bootstat-dat
132d38c30c0SXin LI# display information of BOOTSTAT.DAT
133d38c30c0SXin LI0	name		bootstat-dat
134d38c30c0SXin LI>0		ulelong		x		Windows boot log
135d38c30c0SXin LI#!:mime	application/octet-stream
136d38c30c0SXin LI!:mime	application/x-ms-dat
137d38c30c0SXin LI# BOOTSTAT.DAT in BOOT subdirectory
138d38c30c0SXin LI!:ext	dat
139d38c30c0SXin LI# apparently a version number: 2 for older like Vista, 3, 4 Windows 10
140d38c30c0SXin LI>0		ulelong		>2		\b, version %u
141d38c30c0SXin LI# apparently the size of the header: often 10h in older Windows, 14h, 18h
142d38c30c0SXin LI>4		ulelong		!0x10		\b, header size 0x%x
143d38c30c0SXin LI#>4		ulelong		!0x10		\b, header size %u
144d38c30c0SXin LI# apparently the size of the file: always 0x00010000~64KiB
145d38c30c0SXin LI# the file is acceptable to BOOTMGR only if it is exactly 64 KiB
146d38c30c0SXin LI>8		ulelong		!0x00010000	\b, file size 0x%x
147d38c30c0SXin LI# size of valid data, in bytes: C8h 50h 172h 5D5Ch
148d38c30c0SXin LI>0xc		ulelong		x		\b, 0x%x valid bytes
149d38c30c0SXin LI# skip header and jump to first bootstat entry and display information
150d38c30c0SXin LI>(0x4.l-1)	ubyte		x
151d38c30c0SXin LI>>&0		use		bootstat-entry
152d38c30c0SXin LI# jump to first entry again because pointer are bad after "use"
153d38c30c0SXin LI>(0x4.l-1)	ubyte		x
154d38c30c0SXin LI# by 1st entry size jump to 2nd entry and display information
155d38c30c0SXin LI>>&(&0x18.l-1)	ubyte		x
156d38c30c0SXin LI>>>&0		use		bootstat-entry
157d38c30c0SXin LI# jump to possible 3rd boot entry and display information
158d38c30c0SXin LI# >(0x4.l-1)	ubyte		x
159d38c30c0SXin LI# >>&(&0x18.l-1)	ubyte		x
160d38c30c0SXin LI# >>>&(&0x18.l-1)	ubyte		x
161d38c30c0SXin LI# >>>>&0		use		bootstat-entry
162d38c30c0SXin LI#	display BOOTSTAT.DAT entry
163d38c30c0SXin LI0	name		bootstat-entry
164d38c30c0SXin LI#>0x00		ubequad		x		\b, ENTRY %16.16llx
165d38c30c0SXin LI# size of entry, in bytes: 40h(init) 78h(launced) 9Ch
166d38c30c0SXin LI#>0x18		ulelong		x		\b; entry size %u
167d38c30c0SXin LI>0x18		ulelong		x		\b; entry size 0x%x
168d38c30c0SXin LI# time stamp, in seconds
169d38c30c0SXin LI>0x00		ulelong		x		\b, 0x%x seconds
170d38c30c0SXin LI# always zero, significance unknown
171d38c30c0SXin LI>0x04		ulelong		!0		\b, not null %u
172d38c30c0SXin LI# GUID of event source; but empty if event source is BOOTMGR
173d38c30c0SXin LI>0x08		ubequad		!0		\b, GUID 0x%16.16llx
174d38c30c0SXin LI>>0x10		ubequad		x		\b%16.16llx
175d38c30c0SXin LI# severity code: 1~informational 3~errors
176d38c30c0SXin LI>0x1C		ulelong		!1		\b, severity 0x%x
177d38c30c0SXin LI# apparently a version number: 2
178d38c30c0SXin LI>0x20		ulelong		!2		\b, version %u
179d38c30c0SXin LI# event identifier 1~log file initialised 11h~boot application launched
180d38c30c0SXin LI#>0x24		ulelong		x		\b, event 0x%x
181d38c30c0SXin LI>0x24		ulelong		!1
182d38c30c0SXin LI>>0x24		ulelong		!0x11		\b, event 0x%x
183d38c30c0SXin LI# entry data; size depends on event identifier
184d38c30c0SXin LI#>0x28		ubequad		x		\b, data 0x%16.16llx
185d38c30c0SXin LI>0x24		ulelong		=0x1		\b, Init
186d38c30c0SXin LI# always 0, significance unknown
187d38c30c0SXin LI>>0x34		uleshort	!0		\b, not null %u
188d38c30c0SXin LI# always 7, significance unknown
189d38c30c0SXin LI>>0x36		uleshort	!7		\b, not seven %u
190d38c30c0SXin LI# year
191d38c30c0SXin LI>>0x28		uleshort	x		%u
192d38c30c0SXin LI# month
193d38c30c0SXin LI>>0x2A		uleshort	x		\b-%u
194d38c30c0SXin LI# day
195d38c30c0SXin LI>>0x2C		uleshort	x		\b-%u
196d38c30c0SXin LI# hour
197d38c30c0SXin LI>>0x2E		uleshort	x		%u
198d38c30c0SXin LI# minute
199d38c30c0SXin LI>>0x30		uleshort	x		\b:%u
200d38c30c0SXin LI# second
201d38c30c0SXin LI>>0x32		uleshort	x		\b:%u
202d38c30c0SXin LI# boot application launched
203d38c30c0SXin LI>0x24		ulelong		=0x11		\b, launched
204d38c30c0SXin LI# type of start: 0 normally, 1 or 2 maybe in a recovery sequence
205d38c30c0SXin LI>>0x38		uleshort	!0		\b, type %u
206d38c30c0SXin LI# pathname of boot application, as null-terminated Unicode string; typically
207d38c30c0SXin LI# \Windows\system32\winload.exe \Windows\system32\winload.efi
208d38c30c0SXin LI>>0x3C		lestring16	x		%s
209d38c30c0SXin LI
21048c779cdSXin LI# Summary:	Windows Error Report text files
21148c779cdSXin LI# URL:		https://en.wikipedia.org/wiki/Windows_Error_Reporting
21248c779cdSXin LI# Reference:	https://www.nirsoft.net/utils/app_crash_view.html
21348c779cdSXin LI# Created by:	Joerg Jenderek
21448c779cdSXin LI# Note:		in directories	%ProgramData%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
21548c779cdSXin LI#				%LOCALAPPDATA%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
21648c779cdSXin LI0	lestring16	Version=
21748c779cdSXin LI>22	lestring16	EventType	Windows Error Report
21848c779cdSXin LI!:mime	text/plain
21948c779cdSXin LI# Report.wer
22048c779cdSXin LI!:ext	wer
221b6cee71dSXin LI
222b6cee71dSXin LI# Summary: Windows 3.1 group files
223b6cee71dSXin LI# Extension: .grp
224b6cee71dSXin LI# Created by: unknown
225b6cee71dSXin LI0	string		\120\115\103\103	MS Windows 3.1 group files
226b6cee71dSXin LI
227b6cee71dSXin LI
228b6cee71dSXin LI# Summary: Old format help files
2293e41d09dSXin LI# URL: https://en.wikipedia.org/wiki/WinHelp
23048c779cdSXin LI# Reference: https://www.oocities.org/mwinterhoff/helpfile.htm
2313e41d09dSXin LI# Update: Joerg Jenderek
232b6cee71dSXin LI# Created by: Dirk Jagdmann <doj@cubic.org>
2333e41d09dSXin LI#
2343e41d09dSXin LI# check and then display version and date inside MS Windows HeLP file fragment
2353e41d09dSXin LI0	name				help-ver-date
2363e41d09dSXin LI# look for Magic of SYSTEMHEADER
2373e41d09dSXin LI>0	leshort		0x036C
2383e41d09dSXin LI# version Major		1 for right file fragment
2393e41d09dSXin LI>>4	leshort		1		Windows
2403e41d09dSXin LI# print non empty string above to avoid error message
2413e41d09dSXin LI# Warning: Current entry does not yet have a description for adding a MIME type
2423e41d09dSXin LI!:mime	application/winhelp
2433e41d09dSXin LI!:ext	hlp
2443e41d09dSXin LI# version Minor of help file format is hint for windows version
2453e41d09dSXin LI>>>2	leshort		0x0F		3.x
2463e41d09dSXin LI>>>2	leshort		0x15		3.0
2473e41d09dSXin LI>>>2	leshort		0x21		3.1
2483e41d09dSXin LI>>>2	leshort		0x27		x.y
2493e41d09dSXin LI>>>2	leshort		0x33		95
2503e41d09dSXin LI>>>2	default		x		y.z
2513e41d09dSXin LI>>>>2	leshort		x		0x%x
2523e41d09dSXin LI# to complete message string like "MS Windows 3.x help file"
2533e41d09dSXin LI>>>2	leshort		x		help
2543e41d09dSXin LI# GenDate often older than file creation date
2553e41d09dSXin LI>>>6	ldate		x		\b, %s
2563e41d09dSXin LI#
2573e41d09dSXin LI# Magic for HeLP files
2583e41d09dSXin LI0	lelong		0x00035f3f
2593e41d09dSXin LI# ./windows (version 5.25) labeled the entry as "MS Windows 3.x help file"
2603e41d09dSXin LI# file header magic 0x293B at DirectoryStart+9
2613e41d09dSXin LI>(4.l+9)	uleshort	0x293B		MS
2623e41d09dSXin LI# look for @VERSION	bmf.. like IBMAVW.ANN
2633e41d09dSXin LI>>0xD4		string	=\x62\x6D\x66\x01\x00	Windows help annotation
2643e41d09dSXin LI!:mime	application/x-winhelp
2653e41d09dSXin LI!:ext	ann
2663e41d09dSXin LI>>0xD4		string	!\x62\x6D\x66\x01\x00
2673e41d09dSXin LI# "GID Help index" by TrID
2683e41d09dSXin LI>>>(4.l+0x65)	string	=|Pete			Windows help Global Index
2693e41d09dSXin LI!:mime	application/x-winhelp
2703e41d09dSXin LI!:ext	gid
2713e41d09dSXin LI# HeLP Bookmark or
2723e41d09dSXin LI# "Windows HELP File" by TrID
2733e41d09dSXin LI>>>(4.l+0x65)		string		!|Pete
2743e41d09dSXin LI# maybe there exist a cleaner way to detect HeLP fragments
2753e41d09dSXin LI# brute search for Magic 0x036C with matching Major maximal 7 iterations
2763e41d09dSXin LI# discapp.hlp
2773e41d09dSXin LI>>>>16			search/0x49AF/s	\x6c\x03
2783e41d09dSXin LI>>>>>&0			use 		help-ver-date
2793e41d09dSXin LI>>>>>&4			leshort		!1
2803e41d09dSXin LI# putty.hlp
2813e41d09dSXin LI>>>>>>&0		search/0x69AF/s	\x6c\x03
2823e41d09dSXin LI>>>>>>>&0		use 		help-ver-date
2833e41d09dSXin LI>>>>>>>&4		leshort		!1
2843e41d09dSXin LI>>>>>>>>&0		search/0x49AF/s	\x6c\x03
2853e41d09dSXin LI>>>>>>>>>&0		use 		help-ver-date
2863e41d09dSXin LI>>>>>>>>>&4		leshort		!1
2873e41d09dSXin LI>>>>>>>>>>&0		search/0x49AF/s	\x6c\x03
2883e41d09dSXin LI>>>>>>>>>>>&0		use 		help-ver-date
2893e41d09dSXin LI>>>>>>>>>>>&4		leshort		!1
2903e41d09dSXin LI>>>>>>>>>>>>&0		search/0x49AF/s	\x6c\x03
2913e41d09dSXin LI>>>>>>>>>>>>>&0		use 		help-ver-date
2923e41d09dSXin LI>>>>>>>>>>>>>&4		leshort		!1
2933e41d09dSXin LI>>>>>>>>>>>>>>&0	search/0x49AF/s	\x6c\x03
2943e41d09dSXin LI>>>>>>>>>>>>>>>&0	use 		help-ver-date
2953e41d09dSXin LI>>>>>>>>>>>>>>>&4	leshort		!1
2963e41d09dSXin LI>>>>>>>>>>>>>>>>&0	search/0x49AF/s	\x6c\x03
2973e41d09dSXin LI# GCC.HLP is detected after 7 iterations
2983e41d09dSXin LI>>>>>>>>>>>>>>>>>&0	use 		help-ver-date
2993e41d09dSXin LI# this only happens if bigger hlp file is detected after used search iterations
3003e41d09dSXin LI>>>>>>>>>>>>>>>>>&4	leshort		!1		Windows y.z help
3013e41d09dSXin LI!:mime	application/winhelp
3023e41d09dSXin LI!:ext	hlp
3033e41d09dSXin LI# repeat search again or following default line does not work
3043e41d09dSXin LI>>>>16			search/0x49AF/s	\x6c\x03
3053e41d09dSXin LI# remaining files should be HeLP Bookmark WinHlp32.BMK (XP 32-bit) or WinHlp32 (Windows 8.1 64-bit)
3063e41d09dSXin LI>>>>16	default				x	Windows help Bookmark
3073e41d09dSXin LI!:mime	application/x-winhelp
30858a0f0d0SEitan Adler!:ext	bmk
3093e41d09dSXin LI## FirstFreeBlock normally FFFFFFFFh 10h for *ANN
3103e41d09dSXin LI##>>8	lelong			x		\b, FirstFreeBlock 0x%8.8x
3113e41d09dSXin LI# EntireFileSize
3123e41d09dSXin LI>>12	lelong			x		\b, %d bytes
3133e41d09dSXin LI## ReservedSpace normally 042Fh AFh for *.ANN
3143e41d09dSXin LI#>>(4.l)	lelong		x		\b, ReservedSpace 0x%8.8x
3153e41d09dSXin LI## UsedSpace normally 0426h A6h for *.ANN
3163e41d09dSXin LI#>>(4.l+4)	lelong		x		\b, UsedSpace 0x%8.8x
3173e41d09dSXin LI## FileFlags normally 04...
3183e41d09dSXin LI#>>(4.l+5)	lelong		x		\b, FileFlags 0x%8.8x
3193e41d09dSXin LI## file header magic 0x293B
3203e41d09dSXin LI#>>(4.l+9)	uleshort	x		\b, file header magic 0x%4.4x
3213e41d09dSXin LI## file header Flags		0x0402
3223e41d09dSXin LI#>>(4.l+11)	uleshort	x		\b, file header Flags 0x%4.4x
3233e41d09dSXin LI## file header PageSize	0400h 80h for *.ANN
3243e41d09dSXin LI#>>(4.l+13)	uleshort	x		\b, PageSize 0x%4.4x
3253e41d09dSXin LI## Structure[16]		z4
3263e41d09dSXin LI#>>(4.l+15)	string		>\0		\b, Structure_"%-.16s"
3273e41d09dSXin LI## MustBeZero			0
3283e41d09dSXin LI#>>(4.l+31)	uleshort	x		\b, MustBeZero 0x%4.4x
3293e41d09dSXin LI## PageSplits
3303e41d09dSXin LI#>>(4.l+33)	uleshort	x		\b, PageSplits 0x%4.4x
3313e41d09dSXin LI## RootPage
3323e41d09dSXin LI#>>(4.l+35)	uleshort	x		\b, RootPage 0x%4.4x
3333e41d09dSXin LI## MustBeNegOne			0xffff
3343e41d09dSXin LI#>>(4.l+37)	uleshort	x		\b, MustBeNegOne 0x%4.4x
3353e41d09dSXin LI## TotalPages			1
3363e41d09dSXin LI#>>(4.l+39)	uleshort	x		\b, TotalPages 0x%4.4x
3373e41d09dSXin LI## NLevels			0x0001
3383e41d09dSXin LI#>>(4.l+41)	uleshort	x		\b, NLevels 0x%4.4x
3393e41d09dSXin LI## TotalBtreeEntries
3403e41d09dSXin LI#>>(4.l+43)	ulelong		x		\b, TotalBtreeEntries 0x%8.8x
3413e41d09dSXin LI## pages of the B+ tree
3423e41d09dSXin LI#>>(4.l+47)	ubequad		x		\b, PageStart 0x%16.16llx
343b6cee71dSXin LI
3443e41d09dSXin LI# start with colon or semicolon for comment line like Back2Life.cnt
3453e41d09dSXin LI0		regex		\^(:|;)
3463e41d09dSXin LI# look for first keyword Base
3473e41d09dSXin LI>0		search/45	:Base
3483e41d09dSXin LI>>&0				use 		cnt-name
3493e41d09dSXin LI# only solution to search again from beginning , because relative offsets changes when use is called
3503e41d09dSXin LI>0		search/45	:Base
3513e41d09dSXin LI>0		default		x
3523e41d09dSXin LI# look for other keyword Title like in putty.cnt
3533e41d09dSXin LI>>0		search/45	:Title
3543e41d09dSXin LI>>>&0				use 		cnt-name
3553e41d09dSXin LI#
3563e41d09dSXin LI# display mime type and name of Windows help Content source
3573e41d09dSXin LI0	name				cnt-name
3583e41d09dSXin LI# skip space at beginning
35940427ccaSGordon Tetlow>0     string		\040
3603e41d09dSXin LI# name without extension and greater character or name with hlp extension
3613e41d09dSXin LI>>1	regex/c		\^([^\xd>]*|.*\.hlp)	MS Windows help file Content, based "%s"
3623e41d09dSXin LI!:mime	text/plain
3633e41d09dSXin LI!:apple	????TEXT
3643e41d09dSXin LI!:ext	cnt
3653e41d09dSXin LI#
366d38c30c0SXin LI# Windows creates a full text search from hlp file, if the user clicks the "Find" tab and enables keyword indexing
3673e41d09dSXin LI0	string		tfMR			MS Windows help Full Text Search index
3683e41d09dSXin LI!:mime application/x-winhelp-fts
3693e41d09dSXin LI!:ext	fts
3703e41d09dSXin LI>16	string		>\0			for "%s"
371b6cee71dSXin LI
372b6cee71dSXin LI# Summary: Hyper terminal
373b6cee71dSXin LI# Extension: .ht
374b6cee71dSXin LI# Created by: unknown
37540427ccaSGordon Tetlow0	string		HyperTerminal\040
376b6cee71dSXin LI>15	string		1.0\ --\ HyperTerminal\ data\ file	MS Windows HyperTerminal profile
377b6cee71dSXin LI
37848c779cdSXin LI# https://ithreats.files.wordpress.com/2009/05/\040
379b6cee71dSXin LI# lnk_the_windows_shortcut_file_format.pdf
380b6cee71dSXin LI# Summary: Windows shortcut
381b6cee71dSXin LI# Extension: .lnk
382b6cee71dSXin LI# Created by: unknown
383b6cee71dSXin LI# 'L' + GUUID
384b6cee71dSXin LI0	string		\114\0\0\0\001\024\002\0\0\0\0\0\300\0\0\0\0\0\0\106	MS Windows shortcut
385b6cee71dSXin LI>20	lelong&1	1	\b, Item id list present
386b6cee71dSXin LI>20	lelong&2	2	\b, Points to a file or directory
387b6cee71dSXin LI>20	lelong&4	4	\b, Has Description string
388b6cee71dSXin LI>20	lelong&8	8	\b, Has Relative path
389b6cee71dSXin LI>20	lelong&16	16	\b, Has Working directory
390b6cee71dSXin LI>20	lelong&32	32	\b, Has command line arguments
391b6cee71dSXin LI>20	lelong&64	64	\b, Icon
3929ce06829SXin LI>>56	lelong		x	\b number=%d
393b6cee71dSXin LI>24	lelong&1	1	\b, Read-Only
394b6cee71dSXin LI>24	lelong&2	2	\b, Hidden
395b6cee71dSXin LI>24	lelong&4	4	\b, System
396b6cee71dSXin LI>24	lelong&8	8	\b, Volume Label
397b6cee71dSXin LI>24	lelong&16	16	\b, Directory
398b6cee71dSXin LI>24	lelong&32	32	\b, Archive
399b6cee71dSXin LI>24	lelong&64	64	\b, Encrypted
400b6cee71dSXin LI>24	lelong&128	128	\b, Normal
401b6cee71dSXin LI>24	lelong&256	256	\b, Temporary
402b6cee71dSXin LI>24	lelong&512	512	\b, Sparse
403b6cee71dSXin LI>24	lelong&1024	1024	\b, Reparse point
404b6cee71dSXin LI>24	lelong&2048	2048	\b, Compressed
405b6cee71dSXin LI>24	lelong&4096	4096	\b, Offline
406b6cee71dSXin LI>28	leqwdate	x	\b, ctime=%s
407b6cee71dSXin LI>36	leqwdate	x	\b, mtime=%s
408b6cee71dSXin LI>44	leqwdate	x	\b, atime=%s
409b6cee71dSXin LI>52	lelong		x	\b, length=%u, window=
410b6cee71dSXin LI>60	lelong&1	1	\bhide
411b6cee71dSXin LI>60	lelong&2	2	\bnormal
412b6cee71dSXin LI>60	lelong&4	4	\bshowminimized
413b6cee71dSXin LI>60	lelong&8	8	\bshowmaximized
414b6cee71dSXin LI>60	lelong&16	16	\bshownoactivate
415b6cee71dSXin LI>60	lelong&32	32	\bminimize
416b6cee71dSXin LI>60	lelong&64	64	\bshowminnoactive
417b6cee71dSXin LI>60	lelong&128	128	\bshowna
418b6cee71dSXin LI>60	lelong&256	256	\brestore
419b6cee71dSXin LI>60	lelong&512	512	\bshowdefault
420b6cee71dSXin LI#>20	lelong&1	0
421b6cee71dSXin LI#>>20	lelong&2	2
422b6cee71dSXin LI#>>>(72.l-64)	pstring/h	x	\b [%s]
423b6cee71dSXin LI#>20	lelong&1	1
424b6cee71dSXin LI#>>20	lelong&2	2
425b6cee71dSXin LI#>>>(72.s)	leshort	x
426b6cee71dSXin LI#>>>&75	pstring/h	x	\b [%s]
427b6cee71dSXin LI
428b6cee71dSXin LI# Summary: Outlook Personal Folders
429b6cee71dSXin LI# Created by: unknown
430b6cee71dSXin LI0	lelong		0x4E444221	Microsoft Outlook email folder
431b6cee71dSXin LI>10	leshort		0x0e		(<=2002)
432b6cee71dSXin LI>10	leshort		0x17		(>=2003)
433b6cee71dSXin LI
434b6cee71dSXin LI
435b6cee71dSXin LI# Summary: Windows help cache
436b6cee71dSXin LI# Created by: unknown
437b6cee71dSXin LI0	string		\164\146\115\122\012\000\000\000\001\000\000\000	MS Windows help cache
438b6cee71dSXin LI
439b6cee71dSXin LI
440b6cee71dSXin LI# Summary: IE cache file
441b6cee71dSXin LI# Created by: Christophe Monniez
442b6cee71dSXin LI0	string	Client\ UrlCache\ MMF 	Internet Explorer cache file
443b6cee71dSXin LI>20	string	>\0			version %s
444b6cee71dSXin LI
445b6cee71dSXin LI
446b6cee71dSXin LI# Summary: Registry files
447b6cee71dSXin LI# Created by: unknown
448b6cee71dSXin LI# Modified by (1): Joerg Jenderek
449b6cee71dSXin LI0	string		regf		MS Windows registry file, NT/2000 or above
450b6cee71dSXin LI0	string		CREG		MS Windows 95/98/ME registry file
451b6cee71dSXin LI0	string		SHCC3		MS Windows 3.1 registry file
452b6cee71dSXin LI
453b6cee71dSXin LI
454b6cee71dSXin LI# Summary: Windows Registry text
45558a0f0d0SEitan Adler# URL: https://en.wikipedia.org/wiki/Windows_Registry#.REG_files
45658a0f0d0SEitan Adler# Reference: http://fileformats.archiveteam.org/wiki/Windows_Registry
457b6cee71dSXin LI# Submitted by: Abel Cheung <abelcheung@gmail.com>
45858a0f0d0SEitan Adler# Update: Joerg Jenderek
45958a0f0d0SEitan Adler#		Windows 3-9X variant
46058a0f0d0SEitan Adler0	string		REGEDIT
46158a0f0d0SEitan Adler# skip ASCII text like "REGEDITor.txt" but match
46258a0f0d0SEitan Adler# L1WMAP.REG with only 1 CRNL or org.gnome.gnumeric.reg with 2 NL
46358a0f0d0SEitan Adler>7	search/3	\n			Windows Registry text
46458a0f0d0SEitan Adler!:mime	text/x-ms-regedit
46558a0f0d0SEitan Adler!:ext	reg
46658a0f0d0SEitan Adler#		Windows 9X variant
46758a0f0d0SEitan Adler>>0	string		REGEDIT4		(Win95 or above)
46858a0f0d0SEitan Adler#		Windows 2K ANSI variant
46958a0f0d0SEitan Adler0	string		Windows\ Registry\ Editor\
470b6cee71dSXin LI>&0	string		Version\ 5.00\r\n\r\n	Windows Registry text (Win2K or above)
47158a0f0d0SEitan Adler!:mime	text/x-ms-regedit
47258a0f0d0SEitan Adler!:ext	reg
47358a0f0d0SEitan Adler#		Windows 2K UTF-16 variant
47458a0f0d0SEitan Adler2	lestring16	Windows\ Registry\ Editor\
47558a0f0d0SEitan Adler>0x32	lestring16	Version\ 5.00\r\n\r\n	Windows Registry little-endian text (Win2K or above)
47658a0f0d0SEitan Adler# relative offset not working
47758a0f0d0SEitan Adler#>&0	lestring16	Version\ 5.00\r\n\r\n	Windows Registry little-endian text (Win2K or above)
47858a0f0d0SEitan Adler!:mime	text/x-ms-regedit
47958a0f0d0SEitan Adler!:ext	reg
48058a0f0d0SEitan Adler#		WINE variant
48158a0f0d0SEitan Adler# URL: https://en.wikipedia.org/wiki/Wine_(software)
48258a0f0d0SEitan Adler# Reference: https://www.winehq.org/pipermail/wine-cvs/2005-October/018763.html
48358a0f0d0SEitan Adler# Note:	WINE use text based registry (system.reg,user.reg,userdef.reg)
48458a0f0d0SEitan Adler#	instead binary hiv structure like Windows
48558a0f0d0SEitan Adler0	string	WINE\ REGISTRY\ Version\ 	WINE registry text
48658a0f0d0SEitan Adler# version 2
48758a0f0d0SEitan Adler>&0	string	x				\b, version %s
48858a0f0d0SEitan Adler!:mime	text/x-wine-extension-reg
48958a0f0d0SEitan Adler!:ext	reg
490b6cee71dSXin LI
49158a0f0d0SEitan Adler# Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013, Feb 2018
492c2931133SXin LI# empty ,comment , section
493c2931133SXin LI# PR/383: remove unicode BOM because it is not portable across regex impls
49458a0f0d0SEitan Adler#0	regex/s		\\`(\\r\\n|;|[[])
49558a0f0d0SEitan Adler# empty line CRLF
49658a0f0d0SEitan Adler0	ubeshort	0x0D0A
49758a0f0d0SEitan Adler>0	use		ini-file
49858a0f0d0SEitan Adler# comment line
49958a0f0d0SEitan Adler0	string		;
50058a0f0d0SEitan Adler>0	use		ini-file
50158a0f0d0SEitan Adler# section line
50258a0f0d0SEitan Adler0	string		[
50358a0f0d0SEitan Adler>0	use		ini-file
50458a0f0d0SEitan Adler# check and then display Windows INItialization configuration
50558a0f0d0SEitan Adler0	name		ini-file
50658a0f0d0SEitan Adler# look for left bracket in section line
50758a0f0d0SEitan Adler>0	search/8192	[
50848c779cdSXin LI# https://en.wikipedia.org/wiki/Autorun.inf
50948c779cdSXin LI# https://msdn.microsoft.com/en-us/library/windows/desktop/cc144200.aspx
51058a0f0d0SEitan Adler# space after right bracket
51158a0f0d0SEitan Adler# or AutoRun.Amd64 for 64 bit systems
51258a0f0d0SEitan Adler# or only NL separator
51358a0f0d0SEitan Adler>>&0	regex/c		\^(autorun)
51458a0f0d0SEitan Adler# but sometimes total commander directory tree file "treeinfo.wc" with lines like
51558a0f0d0SEitan Adler# [AUTORUN]
51658a0f0d0SEitan Adler# [boot]
51758a0f0d0SEitan Adler>>>&0	string		=]\r\n[					Total commander directory treeinfo.wc
51858a0f0d0SEitan Adler!:mime text/plain
51958a0f0d0SEitan Adler!:ext	wc
520b6cee71dSXin LI# From: Pal Tamas <folti@balabit.hu>
521b6cee71dSXin LI# Autorun File
52258a0f0d0SEitan Adler>>>&0	string		!]\r\n[					Microsoft Windows Autorun file
523b6cee71dSXin LI!:mime application/x-setupscript
52458a0f0d0SEitan Adler!:ext	inf
52548c779cdSXin LI# https://msdn.microsoft.com/en-us/library/windows/hardware/ff549520(v=vs.85).aspx
526b6cee71dSXin LI# version strings ASCII coded case-independent for Windows setup information script file
527b6cee71dSXin LI>>&0	regex/c		\^(version|strings)]				Windows setup INFormation
528b6cee71dSXin LI!:mime	application/x-setupscript
529b6cee71dSXin LI#!:mime application/x-wine-extension-inf
53058a0f0d0SEitan Adler!:ext	inf
53158a0f0d0SEitan Adler# NETCRC.INF OEMCPL.INF
532b6cee71dSXin LI>>&0	regex/c		\^(WinsockCRCList|OEMCPL)]			Windows setup INFormation
53358a0f0d0SEitan Adler!:mime	application/x-setupscript
53458a0f0d0SEitan Adler!:ext	inf
535b6cee71dSXin LI# http://www.winfaq.de/faq_html/Content/tip2500/onlinefaq.php?h=tip2653.htm
53648c779cdSXin LI# https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102.aspx
537b6cee71dSXin LI# .ShellClassInfo DeleteOnCopy LocalizedFileNames ASCII coded case-independent
538b6cee71dSXin LI>>&0	regex/c	\^(\.ShellClassInfo|DeleteOnCopy|LocalizedFileNames)]	Windows desktop.ini
539b6cee71dSXin LI!:mime application/x-wine-extension-ini
540b6cee71dSXin LI#!:mime text/plain
54148c779cdSXin LI# https://support.microsoft.com/kb/84709/
542b6cee71dSXin LI>>&0	regex/c		\^(don't\ load)]				Windows CONTROL.INI
543b6cee71dSXin LI!:mime application/x-wine-extension-ini
54458a0f0d0SEitan Adler!:ext	ini
545b6cee71dSXin LI>>&0	regex/c		\^(ndishlp\\$|protman\\$|NETBEUI\\$)]		Windows PROTOCOL.INI
546b6cee71dSXin LI!:mime application/x-wine-extension-ini
54758a0f0d0SEitan Adler!:ext	ini
54848c779cdSXin LI# https://technet.microsoft.com/en-us/library/cc722567.aspx
549b6cee71dSXin LI# http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0137.htm
550b6cee71dSXin LI>>&0	regex/c		\^(windows|Compatibility|embedding)]		Windows WIN.INI
551b6cee71dSXin LI!:mime application/x-wine-extension-ini
55258a0f0d0SEitan Adler!:ext	ini
55348c779cdSXin LI# https://en.wikipedia.org/wiki/SYSTEM.INI
554b6cee71dSXin LI>>&0	regex/c		\^(boot|386enh|drivers)]			Windows SYSTEM.INI
555b6cee71dSXin LI!:mime application/x-wine-extension-ini
55658a0f0d0SEitan Adler!:ext	ini
557b6cee71dSXin LI# http://www.mdgx.com/newtip6.htm
558b6cee71dSXin LI>>&0	regex/c		\^(SafeList)]					Windows IOS.INI
559b6cee71dSXin LI!:mime application/x-wine-extension-ini
56058a0f0d0SEitan Adler!:ext	ini
56148c779cdSXin LI# https://en.wikipedia.org/wiki/NTLDR	Windows Boot Loader information
562b6cee71dSXin LI>>&0	regex/c		\^(boot\x20loader)]				Windows boot.ini
563b6cee71dSXin LI!:mime application/x-wine-extension-ini
56458a0f0d0SEitan Adler!:ext	ini
56548c779cdSXin LI# https://en.wikipedia.org/wiki/CONFIG.SYS
56658a0f0d0SEitan Adler>>&0	regex/c		\^(menu)]					MS-DOS CONFIG.SYS
56758a0f0d0SEitan Adler# @CONFIG.UI configuration file of previous DOS version saved by Caldera OPENDOS INSTALL.EXE
568d38c30c0SXin LI# CONFIG.PSS saved version of file CONFIG.SYS created by %WINDIR%\SYSTEM\MSCONFIG.EXE
569d38c30c0SXin LI# CONFIG.TSH renamed file CONFIG.SYS.BAT by %WINDIR%\SYSTEM\MSCONFIG.EXE
57058a0f0d0SEitan Adler# dos and w40 used in dual booting scene
57158a0f0d0SEitan Adler!:ext	sys/dos/w40
57248c779cdSXin LI# https://support.microsoft.com/kb/118579/
573b6cee71dSXin LI>>&0	regex/c		\^(Paths)]\r\n					MS-DOS MSDOS.SYS
57458a0f0d0SEitan Adler!:ext	sys/dos
57558a0f0d0SEitan Adler# http://chmspec.nongnu.org/latest/INI.html#HHP
57658a0f0d0SEitan Adler>>&0	regex/c		\^(options)]\r\n				Microsoft HTML Help Project
57758a0f0d0SEitan Adler!:mime text/plain
57858a0f0d0SEitan Adler!:ext	hhp
579b6cee71dSXin LI# unknown keyword after opening bracket
580b6cee71dSXin LI>>&0	default				x
58158a0f0d0SEitan Adler#>>>&0	string/c			x	UNKNOWN [%s
58258a0f0d0SEitan Adler# look for left bracket of second section
583b6cee71dSXin LI>>>&0	search/8192			[
584b6cee71dSXin LI# version Strings FileIdentification
585b6cee71dSXin LI>>>>&0	string/c			version				Windows setup INFormation
586b6cee71dSXin LI!:mime application/x-setupscript
58758a0f0d0SEitan Adler!:ext	inf
58848c779cdSXin LI# https://en.wikipedia.org/wiki/Initialization_file	Windows Initialization File or other
58958a0f0d0SEitan Adler>>>>&0	default				x
59058a0f0d0SEitan Adler>>>>>&0	ubyte				x
59158a0f0d0SEitan Adler# characters, digits, underscore and white space followed by right bracket
59258a0f0d0SEitan Adler# terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT
59358a0f0d0SEitan Adler>>>>>>&-1	regex			\^([A-Za-z0-9_\(\)\ ]+)\]\r	Generic INItialization configuration [%-.40s
59458a0f0d0SEitan Adler# NETDEF.INF multiarc.ini
59558a0f0d0SEitan Adler#!:mime	application/x-setupscript
59658a0f0d0SEitan Adler!:mime	application/x-wine-extension-ini
59758a0f0d0SEitan Adler#!:mime	text/plain
59858a0f0d0SEitan Adler!:ext	ini/inf
59958a0f0d0SEitan Adler# UTF-16 BOM followed by CR~0D00 , comment~semicolon~3B00 , section~bracket~5B00
60058a0f0d0SEitan Adler0	ubelong&0xFFff89FF	=0xFFFE0900
60158a0f0d0SEitan Adler# look for left bracket in section line
60258a0f0d0SEitan Adler>2	search/8192		[
60358a0f0d0SEitan Adler# keyword without 1st letter which is maybe up-/down-case
60458a0f0d0SEitan Adler>>&3	lestring16		ersion]			Windows setup INFormation
60558a0f0d0SEitan Adler!:mime	application/x-setupscript
60658a0f0d0SEitan Adler!:ext	inf
60758a0f0d0SEitan Adler>>&3	lestring16		trings]			Windows setup INFormation
60858a0f0d0SEitan Adler!:mime	application/x-setupscript
60958a0f0d0SEitan Adler!:ext	inf
61058a0f0d0SEitan Adler>>&3	lestring16		ourceDisksNames]	Windows setup INFormation
61158a0f0d0SEitan Adler!:mime	application/x-setupscript
61258a0f0d0SEitan Adler!:ext	inf
61358a0f0d0SEitan Adler# netnwcli.inf start with ;---[ NetNWCli.INX ]
61458a0f0d0SEitan Adler>>&3	default			x
61558a0f0d0SEitan Adler# look for NL followed by left bracket
61658a0f0d0SEitan Adler>>>&0	search/8192		\x0A\x00\x5b
61758a0f0d0SEitan Adler>>>>&3	lestring16		ersion]			Windows setup INFormation
61858a0f0d0SEitan Adler!:mime	application/x-setupscript
61958a0f0d0SEitan Adler!:ext	inf
620b6cee71dSXin LI
621b6cee71dSXin LI# Windows Precompiled INF files *.PNF added by Joerg Jenderek at Mar 2013 of _PNF_HEADER inf.h
622b6cee71dSXin LI# http://read.pudn.com/downloads3/sourcecode/windows/248345/win2k/private/windows/setup/setupapi/inf.h__.htm
623*2726a701SXin LI# URL:		http://fileformats.archiveteam.org/wiki/INF_(Windows)
624*2726a701SXin LI# Reference:	http://en.verysource.com/code/10350344_1/inf.h.html
625*2726a701SXin LI# Note:		stored in %Windir%\Inf %Windir%\System32\DriverStore\FileRepository
626*2726a701SXin LI# check for valid major and minor versions: 101h - 303h
627*2726a701SXin LI0		leshort&0xFcFc	=0x0000
628*2726a701SXin LI# GRR: line above (strength 50) is too general as it catches also "PDP-11 UNIX/RT ldp" ./pdp
629*2726a701SXin LI>0		leshort&0x0303	!0x0000
630*2726a701SXin LI# test for valid InfStyles: 1 2
631*2726a701SXin LI>>2		uleshort	>0
632*2726a701SXin LI>>>2		uleshort	<3
633*2726a701SXin LI# look for colon in WinDirPath after PNF header
634*2726a701SXin LI#>>>>0x59	search/18	:
635*2726a701SXin LI>>>>0	use	PreCompiledInf
636*2726a701SXin LI0	name	PreCompiledInf
637*2726a701SXin LI>0		uleshort	x	Windows Precompiled iNF
638b6cee71dSXin LI!:mime	application/x-pnf
639*2726a701SXin LI!:ext	pnf
640*2726a701SXin LI# major version 1 for older Windows like XP and 3 since about Windows Vista
641*2726a701SXin LI# 101h~98-XP; 301h~Windows Vista-7 ; 302h~Windows 10 14393; 303h~Windows 10 18362
642*2726a701SXin LI>1		ubyte		x		\b, version %u
643*2726a701SXin LI>0		ubyte		x		\b.%u
644*2726a701SXin LI>0		uleshort	=0x0101		(Windows
645*2726a701SXin LI>>4	ulelong&0x00000001	!0x00000001	98)
646*2726a701SXin LI>>4	ulelong&0x00000001	=0x00000001	XP)
647*2726a701SXin LI>0		uleshort	=0x0301		(Windows Vista-8.1)
648*2726a701SXin LI>0		uleshort	=0x0302		(Windows 10 older)
649*2726a701SXin LI>0		uleshort	=0x0303		(Windows 10)
650b6cee71dSXin LI# 1 ,2 (windows 98 SE)
651*2726a701SXin LI>2		uleshort	!2		\b, InfStyle %u
652b6cee71dSXin LI#	PNF_FLAG_IS_UNICODE		0x00000001
653b6cee71dSXin LI#	PNF_FLAG_HAS_STRINGS		0x00000002
654b6cee71dSXin LI#	PNF_FLAG_SRCPATH_IS_URL		0x00000004
655b6cee71dSXin LI#	PNF_FLAG_HAS_VOLATILE_DIRIDS	0x00000008
656b6cee71dSXin LI#	PNF_FLAG_INF_VERIFIED		0x00000010
657b6cee71dSXin LI#	PNF_FLAG_INF_DIGITALLY_SIGNED	0x00000020
658*2726a701SXin LI#	UNKNOWN8			0x00000080
659*2726a701SXin LI#	UNKNOWN				0x00000100
660*2726a701SXin LI#	UNKNOWN1			0x01000000
661*2726a701SXin LI#	UNKNOWN2			0x02000000
662*2726a701SXin LI>4	ulelong&0x03000180	>0		\b, flags
663*2726a701SXin LI>>4	ulelong			x		0x%x
664*2726a701SXin LI>4	ulelong&0x00000001	0x00000001	\b, unicoded
665*2726a701SXin LI>4	ulelong&0x00000002	0x00000002	\b, has strings
666*2726a701SXin LI>4	ulelong&0x00000004	0x00000004	\b, src URL
667*2726a701SXin LI>4	ulelong&0x00000008	0x00000008	\b, volatile dir ids
668*2726a701SXin LI>4	ulelong&0x00000010	0x00000010	\b, verified
669*2726a701SXin LI>4	ulelong&0x00000020	0x00000020	\b, digitally signed
670*2726a701SXin LI# >4	ulelong&0x00000080	0x00000080	\b, UNKNOWN8
671*2726a701SXin LI# >4	ulelong&0x00000100	0x00000100	\b, UNKNOWN
672*2726a701SXin LI# >4	ulelong&0x01000000	0x01000000	\b, UNKNOWN1
673*2726a701SXin LI# >4	ulelong&0x02000000	0x02000000	\b, UNKNOWN2
674*2726a701SXin LI#>8		ulelong		x		\b, InfSubstValueListOffset 0x%x
675b6cee71dSXin LI# many 0, 1 lmouusb.PNF, 2 linkfx10.PNF , f webfdr16.PNF
676*2726a701SXin LI# , 6 bth.PNF, 9 usbport.PNF, d netnwifi.PNF, 10h nettcpip.PNF
677*2726a701SXin LI#>12		uleshort	x		\b, InfSubstValueCount 0x%x
678*2726a701SXin LI# only < 9 found: 8 hcw85b64.PNF
679*2726a701SXin LI#>14		uleshort	x		\b, InfVersionDatumCount 0x%x
680*2726a701SXin LI# only found values lower 0x0000ffff ??
681*2726a701SXin LI#>16		ulelong		x		\b, InfVersionDataSize 0x%x
682b6cee71dSXin LI# only found positive values lower 0x00ffFFff for InfVersionDataOffset
683*2726a701SXin LI>20		ulelong		x		\b, at 0x%x
684*2726a701SXin LI>4	ulelong&0x00000001	=0x00000001
685b6cee71dSXin LI# case independent: CatalogFile Class DriverVer layoutfile LayoutFile SetupClass signature Signature
686*2726a701SXin LI>>(20.l)	lestring16	x		"%s"
687*2726a701SXin LI>4	ulelong&0x00000001	!0x00000001
688*2726a701SXin LI>>(20.l)	string		x		"%s"
689b6cee71dSXin LI# FILETIME is number of 100-nanosecond intervals since 1 January 1601
690*2726a701SXin LI#>24		ulequad		x		\b, InfVersionLastWriteTime %16.16llx
691*2726a701SXin LI#>24		foodate-0xbar	x		\b, InfVersionLastWriteTime %s
692*2726a701SXin LI# for Windows 98, XP
693*2726a701SXin LI>0		uleshort	<0x0102
694b6cee71dSXin LI# only found values lower 0x00ffFFff
695*2726a701SXin LI# often 70 but also 78h for corelist.PNF
696*2726a701SXin LI# >>32		ulelong		x		\b, StringTableBlockOffset 0x%x
697*2726a701SXin LI# >>36		ulelong		x		\b, StringTableBlockSize 0x%x
698*2726a701SXin LI# >>40		ulelong		x		\b, InfSectionCount 0x%x
699*2726a701SXin LI# >>44		ulelong		x		\b, InfSectionBlockOffset 0x%x
700*2726a701SXin LI# >>48		ulelong		x		\b, InfSectionBlockSize 0x%x
701*2726a701SXin LI# >>52		ulelong		x		\b, InfLineBlockOffset 0x%x
702*2726a701SXin LI# >>56		ulelong		x		\b, InfLineBlockSize 0x%x
703*2726a701SXin LI# >>60		ulelong		x		\b, InfValueBlockOffset 0x%x
704*2726a701SXin LI# >>64		ulelong		x		\b, InfValueBlockSize 0x%x
705b6cee71dSXin LI# WinDirPathOffset
706*2726a701SXin LI# like 58h, which means direct after PNF header
707*2726a701SXin LI#>>68		ulelong		x		\b, at 0x%x
708*2726a701SXin LI>>68		ulelong		x
709*2726a701SXin LI>>>4	ulelong&0x00000001	=0x00000001
710*2726a701SXin LI#>>>>(68.l)	ubequad		=0x43003a005c005700
711b6cee71dSXin LI# normally unicoded C:\Windows
712*2726a701SXin LI#>>>>>(68.l)	lestring16	x		\b, WinDirPath "%s"
713*2726a701SXin LI>>>>(68.l)	ubequad		!0x43003a005c005700
714*2726a701SXin LI>>>>>(68.l)	lestring16	x		\b, WinDirPath "%s"
715*2726a701SXin LI>>>4	ulelong&0x00000001	!0x00000001
716b6cee71dSXin LI# normally ASCII C:\WINDOWS
717*2726a701SXin LI#>>>>(68.l)	string		=C:\\WINDOWS	\b, WinDirPath "%s"
718*2726a701SXin LI>>>>(68.l)	string		!C:\\WINDOWS
719*2726a701SXin LI>>>>>(68.l)	string		x		\b, WinDirPath "%s"
720b6cee71dSXin LI# found OsLoaderPathOffset values often 0 , once 70h corelist.PNF, once 68h ASCII machine.PNF
721*2726a701SXin LI>>>72		ulelong		>0		\b,
722*2726a701SXin LI>>>>4	ulelong&0x00000001	=0x00000001
723*2726a701SXin LI>>>>>(72.l)	lestring16	x		OsLoaderPath "%s"
724*2726a701SXin LI>>>>4	ulelong&0x00000001	!0x00000001
725b6cee71dSXin LI# seldom C:\ instead empty
726*2726a701SXin LI>>>>>(72.l)	string		x		OsLoaderPath "%s"
727b6cee71dSXin LI# 1fdh
728*2726a701SXin LI#>>>76		uleshort	x		\b, StringTableHashBucketCount 0x%x
729b6cee71dSXin LI# only 407h found
730*2726a701SXin LI>>>78		uleshort	!0x409		\b, LanguageID %x
731*2726a701SXin LI#>>>78		uleshort	=0x409		\b, LanguageID %x
732b6cee71dSXin LI# InfSourcePathOffset often 0
733*2726a701SXin LI>>>80		ulelong		>0		\b, at 0x%x
734*2726a701SXin LI>>>>4	ulelong&0x00000001	=0x00000001
735*2726a701SXin LI>>>>>(80.l)	lestring16	x		SourcePath "%s"
736*2726a701SXin LI>>>>4	ulelong&0x00000001	!0x00000001
737*2726a701SXin LI>>>>>(80.l)	string		>\0		SourcePath "%s"
738b6cee71dSXin LI# OriginalInfNameOffset often 0
739*2726a701SXin LI>>>84		ulelong		>0		\b, at 0x%x
740*2726a701SXin LI>>>>4	ulelong&0x00000001	=0x00000001
741*2726a701SXin LI>>>>>(84.l)	lestring16	x		InfName "%s"
742*2726a701SXin LI>>>>4	ulelong&0x00000001	!0x00000001
743*2726a701SXin LI>>>>>(84.l)	string		>\0		InfName "%s"
744*2726a701SXin LI
745*2726a701SXin LI# for newer Windows like Vista, 7 , 8.1 , 10
746*2726a701SXin LI>0		uleshort	>0x0101
747*2726a701SXin LI>>80	ulelong			x		\b, at 0x%x WinDirPath
748*2726a701SXin LI>>>4	ulelong&0x00000001	0x00000001
749*2726a701SXin LI# normally unicoded C:\Windows
750*2726a701SXin LI#>>>>(80.l)	ubequad		=0x43003a005c005700
751*2726a701SXin LI#>>>>>(80.l)	lestring16	x		"%s"
752*2726a701SXin LI>>>>(80.l)	ubequad		!0x43003a005c005700
753*2726a701SXin LI>>>>>(80.l)	lestring16	x		"%s"
754*2726a701SXin LI# language id: 0 407h~german 409h~English_US
755*2726a701SXin LI>>90		uleshort	!0x409		\b, LanguageID %x
756*2726a701SXin LI#>>90		uleshort	=0x409		\b, LanguageID %x
757*2726a701SXin LI>>92	ulelong			>0		\b, at 0x%x
758*2726a701SXin LI>>>4	ulelong&0x00000001	0x00000001
759*2726a701SXin LI# language string like: de-DE en-US
760*2726a701SXin LI>>>>(92.l)	lestring16	x		language %s
761b6cee71dSXin LI
7623e41d09dSXin LI# Summary: backup file created with utility like NTBACKUP.EXE shipped with Windows NT/2K/XP/2003
7633e41d09dSXin LI# Extension: .bkf
7643e41d09dSXin LI# Created by: Joerg Jenderek
76548c779cdSXin LI# URL: https://en.wikipedia.org/wiki/NTBackup
7663e41d09dSXin LI# Reference: http://laytongraphics.com/mtf/MTF_100a.PDF
7673e41d09dSXin LI# Descriptor BloCK name of Microsoft Tape Format
7683e41d09dSXin LI0	string			TAPE
7693e41d09dSXin LI# Format Logical Address is zero
7703e41d09dSXin LI>20	ulequad			0
7713e41d09dSXin LI# Reserved for MBC is zero
7723e41d09dSXin LI>>28	uleshort		0
7733e41d09dSXin LI# Control Block ID is zero
7743e41d09dSXin LI>>>36	ulelong			0
7753e41d09dSXin LI# BIT4-BIT15, BIT18-BIT31 of block attributes are unused
7763e41d09dSXin LI>>>>4	ulelong&0xFFfcFFe0	0		Windows NTbackup archive
7773e41d09dSXin LI#!:mime application/x-ntbackup
7783e41d09dSXin LI!:ext bkf
7793e41d09dSXin LI# OS ID
7803e41d09dSXin LI>>>>>10	ubyte			1		\b NetWare
7813e41d09dSXin LI>>>>>10	ubyte			13		\b NetWare SMS
7823e41d09dSXin LI>>>>>10	ubyte			14		\b NT
7833e41d09dSXin LI>>>>>10	ubyte			24		\b 3
7843e41d09dSXin LI>>>>>10	ubyte			25		\b OS/2
7853e41d09dSXin LI>>>>>10	ubyte			26		\b 95
7863e41d09dSXin LI>>>>>10	ubyte			27		\b Macintosh
7873e41d09dSXin LI>>>>>10	ubyte			28		\b UNIX
7883e41d09dSXin LI# OS Version (2)
7893e41d09dSXin LI#>>>>>11	ubyte			x		OS V=%x
7903e41d09dSXin LI# MTF_CONTINUATION	Media Sequence Number > 1
7913e41d09dSXin LI#>>>>>4	ulelong&0x00000001	!0		\b, continued
7923e41d09dSXin LI# MTF_COMPRESSION
7933e41d09dSXin LI>>>>>4	ulelong&0x00000004	!0		\b, compressed
7943e41d09dSXin LI# MTF_EOS_AT_EOM	End Of Medium was hit during end of set processing
7953e41d09dSXin LI>>>>>4	ulelong&0x00000008	!0		\b, End Of Medium hit
7963e41d09dSXin LI>>>>>4	ulelong&0x00020000	0
7973e41d09dSXin LI# MTF_SET_MAP_EXISTS	A Media Based Catalog Set Map may exist on tape
7983e41d09dSXin LI>>>>>>4	ulelong&0x00010000	!0		\b, with catalog
7993e41d09dSXin LI# MTF_FDD_ALLOWED	However File/Directory Detail can only exist if a Set Map is also present
8003e41d09dSXin LI>>>>>4	ulelong&0x00020000	!0		\b, with file catalog
8013e41d09dSXin LI# Offset To First Event 238h,240h,28Ch
8023e41d09dSXin LI#>>>>>8	uleshort		x		\b, event offset %4.4x
8033e41d09dSXin LI# Displayable Size (20e0230h 20e024ch 20e0224h)
8043e41d09dSXin LI#>>>>>8	ulequad			x		dis. size %16.16llx
8053e41d09dSXin LI# Media Family ID (455288C4h 4570BD1Ah 45708F2Fh 4570BBF5h)
8063e41d09dSXin LI#>>>>>52	ulelong			x		family ID %8.8x
8073e41d09dSXin LI# TAPE Attributes (3)
8083e41d09dSXin LI#>>>>>56	ulelong			x		TAPE %8.8x
8093e41d09dSXin LI# Media Sequence Number
8103e41d09dSXin LI>>>>>60	uleshort		>1		\b, sequence %u
8113e41d09dSXin LI# Password Encryption Algorithm (3)
8123e41d09dSXin LI>>>>>62	uleshort		>0		\b, 0x%x encrypted
8133e41d09dSXin LI# Soft Filemark Block Size * 512 (2)
8143e41d09dSXin LI#>>>>>64	uleshort		=2		\b, soft size %u*512
8153e41d09dSXin LI>>>>>64	uleshort		!2		\b, soft size %u*512
8163e41d09dSXin LI# Media Based Catalog Type (1,2)
8173e41d09dSXin LI#>>>>>66	uleshort		x		\b, catalog type %4.4x
8183e41d09dSXin LI# size of Media Name (66,68,6Eh)
8193e41d09dSXin LI>>>>>68	uleshort		>0
8203e41d09dSXin LI# offset of Media Name (5Eh)
8213e41d09dSXin LI>>>>>>70	uleshort	>0
8223e41d09dSXin LI# 0~, 1~ANSI, 2~UNICODE
8233e41d09dSXin LI>>>>>>>48	ubyte		1
8243e41d09dSXin LI# size terminated ansi coded string normally followed by "MTF Media Label"
8253e41d09dSXin LI>>>>>>>>(70.s)	string		>\0		\b, name: %s
8263e41d09dSXin LI>>>>>>>48	ubyte		2
8273e41d09dSXin LI# Not null, but size terminated unicoded string
8283e41d09dSXin LI>>>>>>>>(70.s)	lestring16	x		\b, name: %s
8293e41d09dSXin LI# size of Media Label (104h)
8303e41d09dSXin LI>>>>>72	uleshort		>0
8313e41d09dSXin LI# offset of Media Label (C4h,C6h,CCh)
8323e41d09dSXin LI>>>>>74		uleshort	>0
8333e41d09dSXin LI>>>>>>48	ubyte		1
8343e41d09dSXin LI#Tag|Version|Vendor|Vendor ID|Creation Time Stamp|Cartridge Label|Side|Media ID|Media Domain ID|Vendor Specific fields
8353e41d09dSXin LI>>>>>>>(74.s)	string		>\0		\b, label: %s
8363e41d09dSXin LI>>>>>>48	ubyte		2
8373e41d09dSXin LI>>>>>>>(74.s)	lestring16	x		\b, label: %s
8383e41d09dSXin LI# size of password name (0,1Ch)
8393e41d09dSXin LI#>>>>>76	uleshort		>0		\b, password size %4.4x
8403e41d09dSXin LI# Software Vendor ID (CBEh)
8413e41d09dSXin LI>>>>>86	uleshort		x		\b, software (0x%x)
8423e41d09dSXin LI# size of Software Name (6Eh)
8433e41d09dSXin LI>>>>>80	uleshort		>0
8443e41d09dSXin LI# offset of Software Name (1C8h,1CAh,1D0h)
8453e41d09dSXin LI>>>>>>82	uleshort	>0
8463e41d09dSXin LI# 1~ANSI, 2~UNICODE
8473e41d09dSXin LI>>>>>>>48	ubyte		1
8483e41d09dSXin LI>>>>>>>>(82.s)	string		>\0		\b: %s
8493e41d09dSXin LI>>>>>>>48	ubyte		2
8503e41d09dSXin LI# size terminated unicoded coded string normally followed by "SPAD"
8513e41d09dSXin LI>>>>>>>>(82.s)	lestring16	x		\b: %s
8523e41d09dSXin LI# Format Logical Block Size (512,1024)
8533e41d09dSXin LI#>>>>>84	uleshort		=1024		\b, block size %u
8543e41d09dSXin LI>>>>>84	uleshort		!1024		\b, block size %u
8553e41d09dSXin LI# Media Date of MTF_DATE_TIME type with 5 bytes
8563e41d09dSXin LI#>>>>>>88	ubequad			x		DATE %16.16llx
8573e41d09dSXin LI# MTF Major Version (1)
8583e41d09dSXin LI#>>>>>>93	ubyte		x		\b, MFT version %x
8593e41d09dSXin LI#
8603e41d09dSXin LI
86158a0f0d0SEitan Adler# URL: https://en.wikipedia.org/wiki/PaintShop_Pro
86248c779cdSXin LI# Reference: https://www.cryer.co.uk/file-types/p/pal.htm
86358a0f0d0SEitan Adler# Created by: Joerg Jenderek
86458a0f0d0SEitan Adler# Note: there exist other color palette formats also with .pal extension
86558a0f0d0SEitan Adler0	string	JASC-PAL\r\n	PaintShop Pro color palette
86658a0f0d0SEitan Adler#!:mime	text/plain
86758a0f0d0SEitan Adler# PspPalette extension is used by newer (probably 8) PaintShopPro versions
86858a0f0d0SEitan Adler!:ext	pal/PspPalette
86958a0f0d0SEitan Adler# 2nd line contains palette file version. For example "0100"
87058a0f0d0SEitan Adler>10	string	!0100		\b, version %.4s
87158a0f0d0SEitan Adler# third line contains the number of colours: 16 256 ...
87258a0f0d0SEitan Adler>16	string	x		\b, %.3s colors
87358a0f0d0SEitan Adler
87448c779cdSXin LI# URL: https://en.wikipedia.org/wiki/Innosetup
87558a0f0d0SEitan Adler# Reference: https://github.com/jrsoftware/issrc/blob/master/Projects/Undo.pas
87658a0f0d0SEitan Adler# Created by: Joerg Jenderek
87758a0f0d0SEitan Adler# Note:	created by like "InnoSetup self-extracting archive" inside ./msdos
87858a0f0d0SEitan Adler# TrID labeles the entry as "Inno Setup Uninstall Log"
87958a0f0d0SEitan Adler#	TUninstallLogID
88058a0f0d0SEitan Adler0	string	Inno\ Setup\ Uninstall\ Log\ (b)	InnoSetup Log
88158a0f0d0SEitan Adler!:mime	application/x-innosetup
88258a0f0d0SEitan Adler# unins000.dat, unins001.dat, ...
88358a0f0d0SEitan Adler!:ext	dat
88458a0f0d0SEitan Adler# " 64-bit" variant
88558a0f0d0SEitan Adler>0x1c	string		>\0				\b%.7s
88658a0f0d0SEitan Adler# AppName[0x80] like "Minimal SYStem", ClamWin Free Antivirus , ...
88758a0f0d0SEitan Adler>0xc0	string		x				%s
888d38c30c0SXin LI# AppId[0x80] is similar to AppName or
88958a0f0d0SEitan Adler# GUID like {4BB0DCDC-BC24-49EC-8937-72956C33A470} start with left brace
89058a0f0d0SEitan Adler>0x40	ubyte		0x7b
89158a0f0d0SEitan Adler>>0x40	string		x				%-.38s
89258a0f0d0SEitan Adler# do not know how this log version correlates to program version
89358a0f0d0SEitan Adler>0x140	ulelong		x				\b, version 0x%x
89458a0f0d0SEitan Adler# NumRecs
89558a0f0d0SEitan Adler#>0x144	ulelong		x				\b, 0x%4.4x records
89658a0f0d0SEitan Adler# EndOffset means files size
89758a0f0d0SEitan Adler>0x148	ulelong		x				\b, %u bytes
89858a0f0d0SEitan Adler# Flags 5 25h 35h
89958a0f0d0SEitan Adler#>0x14c	ulelong		x				\b, flags %8.8x
90058a0f0d0SEitan Adler# Reserved: array[0..26] of Longint
90158a0f0d0SEitan Adler# the non Unicode HighestSupportedVersion may never become greater than or equal to 1000
90258a0f0d0SEitan Adler>0x140	ulelong		<1000
90358a0f0d0SEitan Adler# hostname
90458a0f0d0SEitan Adler>>0x1d6	pstring		x				\b, %s
90558a0f0d0SEitan Adler# user name
90658a0f0d0SEitan Adler>>>&0	pstring		x				\b\%s
90758a0f0d0SEitan Adler# directory like C:\Program Files (x86)\GnuWin32
90858a0f0d0SEitan Adler>>>>&0	pstring		x				\b, "%s"
90958a0f0d0SEitan Adler# version 1000 or higher implies unicode
91058a0f0d0SEitan Adler>0x140	ulelong		>999
91158a0f0d0SEitan Adler# hostname
91258a0f0d0SEitan Adler>>0x1db	lestring16	x				\b, %-.9s
91358a0f0d0SEitan Adler# utf string variant with prepending fe??ffFFff
91458a0f0d0SEitan Adler>>0x1db	search/43	\xFF\xFF\xFF
91558a0f0d0SEitan Adler# user name
91658a0f0d0SEitan Adler>>>&0	lestring16	x				\b\%-.9s
91758a0f0d0SEitan Adler>>>&0	search/43	\xFF\xFF\xFF
91858a0f0d0SEitan Adler# directory like C:\Program Files\GIMP 2
91958a0f0d0SEitan Adler>>>>&0	lestring16	x				\b, %-.42s
92058a0f0d0SEitan Adler
92148c779cdSXin LI# Windows Imaging (WIM) Image
92248c779cdSXin LI# Update: Joerg Jenderek at Mar 2019
92348c779cdSXin LI# URL: https://en.wikipedia.org/wiki/Windows_Imaging_Format
92448c779cdSXin LI# Reference: https://download.microsoft.com/download/f/e/f/
92548c779cdSXin LI# fefdc36e-392d-4678-9e4e-771ffa2692ab/Windows%20Imaging%20File%20Format.rtf
92648c779cdSXin LI# Note: verified by like `7z t boot.wim` `wiminfo install.esd --header`
92748c779cdSXin LI0	string		MSWIM\000\000\000
92848c779cdSXin LI>0	use		wim-archive
92948c779cdSXin LI# https://wimlib.net/man1/wimoptimize.html
93048c779cdSXin LI0	string		WLPWM\000\000\000
93148c779cdSXin LI>0	use		wim-archive
93248c779cdSXin LI0	name		wim-archive
93348c779cdSXin LI# _WIMHEADER_V1_PACKED ImageTag[8]
93448c779cdSXin LI>0	string		x			Windows imaging
93548c779cdSXin LI!:mime	application/x-ms-wim
93648c779cdSXin LI# TO avoid in file version 5.36 error like
93748c779cdSXin LI# Magdir/windows, 760: Warning: Current entry does not yet have a description
93848c779cdSXin LI# file: could not find any valid magic files! (No error)
93948c779cdSXin LI# splitted WIM
94048c779cdSXin LI>16	ulelong		&0x00000008		(SWM
94148c779cdSXin LI!:ext	swm
94248c779cdSXin LI# usPartNumber; 1, unless the file was split into multiple parts
94348c779cdSXin LI>>40	uleshort	x			\b %u
94448c779cdSXin LI# usTotalParts; The total number of WIM file parts in a spanned set
94548c779cdSXin LI>>42	uleshort	x			\b of %u) image
94648c779cdSXin LI# non splitted WIM
94748c779cdSXin LI>16	ulelong		^0x00000008
94848c779cdSXin LI# https://wimlib.net/man1/wimmount.html
94948c779cdSXin LI# solid WIMs; version 3584; usually contain LZMS-compressed and the .esd extension
95048c779cdSXin LI>>12	ulelong		3584			(ESD) image
95148c779cdSXin LI!:ext	esd
95248c779cdSXin LI>>12	ulelong		!3584			(WIM) image
95348c779cdSXin LI!:ext	wim
95448c779cdSXin LI>0	string/b	WLPWM\000\000\000	\b, wimlib pipable format
95548c779cdSXin LI# cbSize size of the WIM header in bytes like 208
95648c779cdSXin LI#>8	ulelong		x			\b, headersize %u
95748c779cdSXin LI# dwVersion version of the WIM file 00010d00h~1.13 00000e00h~0.14
95848c779cdSXin LI>14	uleshort	x			v%u
95948c779cdSXin LI>13	ubyte		x			\b.%u
96048c779cdSXin LI# dwImageCount; The number of images contained in the WIM file
96148c779cdSXin LI>44	ulelong		>1			\b, %u images
96248c779cdSXin LI# dwBootIndex
96348c779cdSXin LI# 1-based index of the bootable image of the WIM, or 0 if no image is bootable
96448c779cdSXin LI>0x78	ulelong		>0			\b, bootable no. %u
96548c779cdSXin LI# dwFlags
96648c779cdSXin LI#>16	ulelong		x			\b, flags 0x%8.8x
96748c779cdSXin LI#define FLAG_HEADER_COMPRESSION		0x00000002
96848c779cdSXin LI#define FLAG_HEADER_READONLY            0x00000004
96948c779cdSXin LI#define FLAG_HEADER_SPANNED		0x00000008
97048c779cdSXin LI#define FLAG_HEADER_RESOURCE_ONLY       0x00000010
97148c779cdSXin LI#define FLAG_HEADER_METADATA_ONLY       0x00000020
97248c779cdSXin LI#define FLAG_HEADER_WRITE_IN_PROGRESS   0x00000040
97348c779cdSXin LI#define FLAG_HEADER_RP_FIX		0x00000080 reparse point fixup
97448c779cdSXin LI#define FLAG_HEADER_COMPRESS_RESERVED   0x00010000
97548c779cdSXin LI#define FLAG_HEADER_COMPRESS_XPRESS     0x00020000
97648c779cdSXin LI#define FLAG_HEADER_COMPRESS_LZX	0x00040000
97748c779cdSXin LI#define FLAG_HEADER_COMPRESS_LZMS	0x00080000
97848c779cdSXin LI#define FLAG_HEADER_COMPRESS_XPRESS2    0x00100000 wimlib-1.13.0\include\wimlib\header.h
97948c779cdSXin LI# XPRESS, with small chunk size
98048c779cdSXin LI>16	ulelong		&0x00100000		\b, XPRESS2
98148c779cdSXin LI>16	ulelong		&0x00080000		\b, LZMS
98248c779cdSXin LI>16	ulelong		&0x00040000		\b, LZX
98348c779cdSXin LI>16	ulelong		&0x00020000		\b, XPRESS
98448c779cdSXin LI>16	ulelong		&0x00000002		compressed
98548c779cdSXin LI>16	ulelong		&0x00000004		\b, read only
98648c779cdSXin LI>16	ulelong		&0x00000010		\b, resource only
98748c779cdSXin LI>16	ulelong		&0x00000020		\b, metadata only
98848c779cdSXin LI>16	ulelong		&0x00000080		\b, reparse point fixup
98948c779cdSXin LI#>16	ulelong		&0x00010000		\b, RESERVED
99048c779cdSXin LI# dwCompressionSize; Uncompressed chunk size for resources or 0 if uncompressed
99148c779cdSXin LI#>20	ulelong		>0			\b, chunk size %u bytes
99248c779cdSXin LI# gWIMGuid
99348c779cdSXin LI#>24	ubequad		x			\b, GUID 0x%16.16llx
99448c779cdSXin LI#>>32	ubequad		x			\b%16.16llx
99548c779cdSXin LI# rhOffsetTable; the location of the resource lookup table
99648c779cdSXin LI# wim_reshdr_disk[24]= u8 size_in_wim[7] + u8 flags + le64 offset_in_wim + le64 uncompressed_size
99748c779cdSXin LI#>48	ubequad		x			\b, rhOffsetTable 0x%16.16llx
99848c779cdSXin LI# rhXmlData; the location of the XML data
99948c779cdSXin LI#>0x50	ulelong		x			\b, at 0x%8.8x
100048c779cdSXin LI# NOT WORKING \xff\xfe<\0W\0I\0M\0
100148c779cdSXin LI#>(0x50.l)	ubequad	x			\b, xml=%16.16llx
100248c779cdSXin LI# rhBootMetadata; the location of the metadata resource
100348c779cdSXin LI#>0x60	ubequad		x			\b, rhBootMetadata 0x%16.16llx
100448c779cdSXin LI# rhIntegrity; the location of integrity table used to verify files
100548c779cdSXin LI#>0x7c	ubequad		x			\b, rhIntegrity 0x%16.16llx
100648c779cdSXin LI# Unused[60]
100748c779cdSXin LI#>148	ubequad		!0			\b,unused 0x%16.16llx
100848c779cdSXin LI#
100948c779cdSXin LI
1010d38c30c0SXin LI# From:		Joerg Jenderek
1011d38c30c0SXin LI# URL:		https://en.wikipedia.org/wiki/Windows_Easy_Transfer
1012d38c30c0SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/m/mig.trid.xml
1013d38c30c0SXin LI# Note:		called "Windows Easy Transfer migration data" by TrID,
1014d38c30c0SXin LI#		"Migration Store" or "EasyTransfer file" by Microsoft
1015d38c30c0SXin LI0		string		1giM	Windows Easy Transfer migration data
1016d38c30c0SXin LI#!:mime		application/octet-stream
1017d38c30c0SXin LI!:mime		application/x-ms-mig
1018d38c30c0SXin LI!:ext		mig
1019d38c30c0SXin LI>0x18		string		=MRTS	without password
1020d38c30c0SXin LI# data offset with 1 space at end
1021d38c30c0SXin LI>>0x1c		ulelong+0x38	x	\b, at 0x%x
1022d38c30c0SXin LI# look for zlib compressed data by ./compress
1023d38c30c0SXin LI>>(0x1c.l+0x38)	ubyte		x
1024d38c30c0SXin LI>>>&-1	indirect	x
1025d38c30c0SXin LI# in password protected examples MRTS comes some bytes further
1026d38c30c0SXin LI>0x18		string		!MRTS	with password
1027d38c30c0SXin LI# look for first MRTS tag
1028d38c30c0SXin LI>0x18		search/29/b	MRTS
1029d38c30c0SXin LI# probably first file name length like 178, ...
1030d38c30c0SXin LI#>>&0		ulelong		x	\b, 1st length %u
1031d38c30c0SXin LI# URL like File\C:\Users\nutzer\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\desktop.ini
1032d38c30c0SXin LI>>&20		lestring16	x	\b, 1st %-s
1033d38c30c0SXin LI
1034*2726a701SXin LI# Microsoft SYLK
1035*2726a701SXin LI# https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK)
1036*2726a701SXin LI# https://outflank.nl/upload/sylksum.txt
1037*2726a701SXin LI0	string	ID;P	Microsoft SYLK program
1038*2726a701SXin LI>4	string	>0	\b, created by %s
1039*2726a701SXin LI!:ext	slk/sylk
1040