xref: /freebsd/contrib/file/magic/Magdir/windows (revision d4eeb02986980bf33dd56c41ceb9fc5f180c0d47)
1
2#------------------------------------------------------------------------------
3# $File: windows,v 1.44 2022/05/31 17:39:08 christos Exp $
4# windows:  file(1) magic for Microsoft Windows
5#
6# This file is mainly reserved for files where programs
7# using them are run almost always on MS Windows 3.x or
8# above, or files only used exclusively in Windows OS,
9# where there is no better category to allocate for.
10# For example, even though WinZIP almost run on Windows
11# only, it is better to treat them as "archive" instead.
12# For format usable in DOS, such as generic executable
13# format, please specify under "msdos" file.
14#
15
16
17# Summary: Outlook Express DBX file
18# Extension: .dbx
19# Created by: Christophe Monniez
200	string	\xCF\xAD\x12\xFE	MS Outlook Express DBX file
21>4	byte	=0xC5			\b, message database
22>4	byte	=0xC6			\b, folder database
23>4	byte	=0xC7			\b, account information
24>4	byte	=0x30			\b, offline database
25
26
27# Summary: Windows crash dump
28# Extension: .dmp
29# Created by: Andreas Schuster (https://computer.forensikblog.de/)
30# Reference (1): https://computer.forensikblog.de/en/2008/02/64bit_magic.html
31# Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
320	string		PAGE
33>4	string		DUMP		MS Windows 32bit crash dump
34>>0x05c	byte            0		\b, no PAE
35>>0x05c	byte            1		\b, PAE
36>>0xf88	lelong		1		\b, full dump
37>>0xf88	lelong		2		\b, kernel dump
38>>0xf88	lelong		3		\b, small dump
39>>0x068	lelong		x		\b, %d pages
40>4	string		DU64		MS Windows 64bit crash dump
41>>0xf98	lelong		1		\b, full dump
42>>0xf98	lelong		2		\b, kernel dump
43>>0xf98	lelong		3		\b, small dump
44>>0x090	lequad		x		\b, %lld pages
45
46
47# Summary: Vista Event Log
48# Extension: .evtx
49# Created by: Andreas Schuster (https://computer.forensikblog.de/)
50# Reference (1): https://computer.forensikblog.de/en/2007/05/some_magic.html
510	string		ElfFile\0	MS Windows Vista Event Log
52>0x2a	leshort		x		\b, %d chunks
53>>0x10	lelong		x		\b (no. %d in use)
54>0x18	lelong		>1		\b, next record no. %d
55>0x18	lelong		=1		\b, empty
56>0x78	lelong		&1		\b, DIRTY
57>0x78	lelong		&2		\b, FULL
58
59# Summary: Windows System Deployment Image
60# Created by: Joerg Jenderek
61# URL: http://en.wikipedia.org/wiki/System_Deployment_Image
62# Reference: http://skolk.livejournal.com/1320.html
630	string			$SDI
64>4	string			0001		System Deployment Image
65!:mime	application/x-ms-sdi
66#!:mime	application/octet-stream
67# \Boot\boot.sdi
68!:ext	sdi
69# MDBtype: 0~Unspecified 1~RAM 2~ROM
70>>8	ulequad			!0		\b, MDBtype %#llx
71# BootCodeOffset
72>>16	ulequad			!0		\b, BootCodeOffset %#llx
73# BootCodeSize
74>>24	ulequad			!0		\b, BootCodeSize %#llx
75# VendorID
76>>32	ulequad			!0		\b, VendorID %#llx
77# DeviceID
78>>40	ulequad			!0		\b, DeviceID %#llx
79# DeviceModel
80>>48	ulequad			!0		\b, DeviceModel %#llx
81>>>56	ulequad			!0		\b%llx
82# DeviceRole
83>>64	ulequad			!0		\b, DeviceRole %#llx
84# Reserved1; reserved fields and gaps between BLOBs are padded with \0
85#>>72	ulequad			!0		\b, Reserved1 %#llx
86# RuntimeGUID
87>>80	ulequad			!0		\b, RuntimeGUID %#llx
88>>>88	ulequad			!0		\b%llx
89# RuntimeOEMrev
90>>96	ulequad			!0		\b, RuntimeOEMrev %#llx
91# Reserved2
92#>>104	ulequad			!0		\b, Reserved2 %#llx
93# BLOB alignment value in pages, as specified in sdimgr /pack: 1~4K 2~8k
94>>112	ulequad			!0		\b, PageAlignment %llu
95# Reserved3[48]
96#>>120	ulequad			!0		\b, Reserved3 %#llx
97# SDI checksum 39h
98>>0x1f8	ulequad			x		\b, checksum %#llx
99# BLOBtype[8] \0-padded: PART, WIM , BOOT, LOAD, DISK
100>>0x400	string			>\0		\b, type %-3.8s
101# 0~non-filesystem 7~NTFS 6~BIGFAT
102>>>0x420	ulequad		!0		(%#llx)
103# ATTRibutes
104>>>0x408	ulequad		!0		%#llx attributes
105# Offset
106>>>0x410	ulequad		x		at %#llx
107# print 1 space after size and then handles NTFS boot sector by ./filesystems
108>>>0x418	ulequad		>0		%llu bytes
109>>>>(0x410.l)	indirect	x
110# 2nd BLOB: WIM
111>>0x440		string		>\0		\b, type %-3.8s
112>>>0x428	ulequad		!0		(%#llx)
113# ATTRibutes
114>>>0x448	ulequad		!0		%#llx attributes
115# Offset
116>>>0x450	ulequad		x		at %#llx
117>>>0x458	ulequad		>0		%llu bytes
118>>>>(0x450.l)	indirect	x
119# 3rd BLOB
120>>0x480		string		>\0		\b, type %-3.8s
121
122# Summary:	Windows boot status log BOOTSTAT.DAT
123# From:		Joerg Jenderek
124# Reference:	https://www.geoffchappell.com/notes/windows/boot/bsd.htm
125# Note:		mainly refers to older Windows Vista, sometimes
126#		BOOTSTAT.DAT only contains nulls or invalid data
127# checking for valid version below 5
1280		ulelong		<5
129# skip many ISO images by checking for valid 64 KiB file size
130>8		ulelong		=0x00010000
131>>0		use		bootstat-dat
132# display information of BOOTSTAT.DAT
1330	name		bootstat-dat
134>0		ulelong		x		Windows boot log
135#!:mime	application/octet-stream
136!:mime	application/x-ms-dat
137# BOOTSTAT.DAT in BOOT subdirectory
138!:ext	dat
139# apparently a version number: 2 for older like Vista, 3, 4 Windows 10
140>0		ulelong		>2		\b, version %u
141# apparently the size of the header: often 10h in older Windows, 14h, 18h
142>4		ulelong		!0x10		\b, header size %#x
143#>4		ulelong		!0x10		\b, header size %u
144# apparently the size of the file: always 0x00010000~64KiB
145# the file is acceptable to BOOTMGR only if it is exactly 64 KiB
146>8		ulelong		!0x00010000	\b, file size %#x
147# size of valid data, in bytes: C8h 50h 172h 5D5Ch
148>0xc		ulelong		x		\b, %#x valid bytes
149# skip header and jump to first bootstat entry and display information
150>(0x4.l-1)	ubyte		x
151>>&0		use		bootstat-entry
152# jump to first entry again because pointer are bad after "use"
153>(0x4.l-1)	ubyte		x
154# by 1st entry size jump to 2nd entry and display information
155>>&(&0x18.l-1)	ubyte		x
156>>>&0		use		bootstat-entry
157# jump to possible 3rd boot entry and display information
158# >(0x4.l-1)	ubyte		x
159# >>&(&0x18.l-1)	ubyte		x
160# >>>&(&0x18.l-1)	ubyte		x
161# >>>>&0		use		bootstat-entry
162#	display BOOTSTAT.DAT entry
1630	name		bootstat-entry
164#>0x00		ubequad		x		\b, ENTRY %16.16llx
165# size of entry, in bytes: 40h(init) 78h(launced) 9Ch
166#>0x18		ulelong		x		\b; entry size %u
167>0x18		ulelong		x		\b; entry size %#x
168# time stamp, in seconds
169>0x00		ulelong		x		\b, %#x seconds
170# always zero, significance unknown
171>0x04		ulelong		!0		\b, not null %u
172# GUID of event source; but empty if event source is BOOTMGR
173>0x08		ubequad		!0		\b, GUID %#16.16llx
174>>0x10		ubequad		x		\b%16.16llx
175# severity code: 1~informational 3~errors
176>0x1C		ulelong		!1		\b, severity %#x
177# apparently a version number: 2
178>0x20		ulelong		!2		\b, version %u
179# event identifier 1~log file initialised 11h~boot application launched
180#>0x24		ulelong		x		\b, event %#x
181>0x24		ulelong		!1
182>>0x24		ulelong		!0x11		\b, event %#x
183# entry data; size depends on event identifier
184#>0x28		ubequad		x		\b, data %#16.16llx
185>0x24		ulelong		=0x1		\b, Init
186# always 0, significance unknown
187>>0x34		uleshort	!0		\b, not null %u
188# always 7, significance unknown
189>>0x36		uleshort	!7		\b, not seven %u
190# year
191>>0x28		uleshort	x		%u
192# month
193>>0x2A		uleshort	x		\b-%u
194# day
195>>0x2C		uleshort	x		\b-%u
196# hour
197>>0x2E		uleshort	x		%u
198# minute
199>>0x30		uleshort	x		\b:%u
200# second
201>>0x32		uleshort	x		\b:%u
202# boot application launched
203>0x24		ulelong		=0x11		\b, launched
204# type of start: 0 normally, 1 or 2 maybe in a recovery sequence
205>>0x38		uleshort	!0		\b, type %u
206# pathname of boot application, as null-terminated Unicode string; typically
207# \Windows\system32\winload.exe \Windows\system32\winload.efi
208>>0x3C		lestring16	x		%s
209
210# Summary:	Windows Error Report text files
211# URL:		https://en.wikipedia.org/wiki/Windows_Error_Reporting
212# Reference:	https://www.nirsoft.net/utils/app_crash_view.html
213# Created by:	Joerg Jenderek
214# Note:		in directories	%ProgramData%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
215#				%LOCALAPPDATA%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
2160	lestring16	Version=
217>22	lestring16	EventType	Windows Error Report
218!:mime	text/plain
219# Report.wer
220!:ext	wer
221
222# Summary: Windows 3.1 group files
223# Extension: .grp
224# Created by: unknown
2250	string		\120\115\103\103	MS Windows 3.1 group files
226
227
228# Summary: Old format help files
229# URL: https://en.wikipedia.org/wiki/WinHelp
230# Reference: https://www.oocities.org/mwinterhoff/helpfile.htm
231# Update: Joerg Jenderek
232# Created by: Dirk Jagdmann <doj@cubic.org>
233#
234# check and then display version and date inside MS Windows HeLP file fragment
2350	name				help-ver-date
236# look for Magic of SYSTEMHEADER
237>0	leshort		0x036C
238# version Major		1 for right file fragment
239>>4	leshort		1		Windows
240# print non empty string above to avoid error message
241# Warning: Current entry does not yet have a description for adding a MIME type
242!:mime	application/winhelp
243!:ext	hlp
244# version Minor of help file format is hint for windows version
245>>>2	leshort		0x0F		3.x
246>>>2	leshort		0x15		3.0
247>>>2	leshort		0x21		3.1
248>>>2	leshort		0x27		x.y
249>>>2	leshort		0x33		95
250>>>2	default		x		y.z
251>>>>2	leshort		x		%#x
252# to complete message string like "MS Windows 3.x help file"
253>>>2	leshort		x		help
254# GenDate often older than file creation date
255>>>6	ldate		x		\b, %s
256#
257# Magic for HeLP files
2580	lelong		0x00035f3f
259# ./windows (version 5.25) labeled the entry as "MS Windows 3.x help file"
260# file header magic 0x293B at DirectoryStart+9
261>(4.l+9)	uleshort	0x293B		MS
262# look for @VERSION	bmf.. like IBMAVW.ANN
263>>0xD4		string	=\x62\x6D\x66\x01\x00	Windows help annotation
264!:mime	application/x-winhelp
265!:ext	ann
266>>0xD4		string	!\x62\x6D\x66\x01\x00
267# "GID Help index" by TrID
268>>>(4.l+0x65)	string	=|Pete			Windows help Global Index
269!:mime	application/x-winhelp
270!:ext	gid
271# HeLP Bookmark or
272# "Windows HELP File" by TrID
273>>>(4.l+0x65)		string		!|Pete
274# maybe there exist a cleaner way to detect HeLP fragments
275# brute search for Magic 0x036C with matching Major maximal 7 iterations
276# discapp.hlp
277>>>>16			search/0x49AF/s	\x6c\x03
278>>>>>&0			use 		help-ver-date
279>>>>>&4			leshort		!1
280# putty.hlp
281>>>>>>&0		search/0x69AF/s	\x6c\x03
282>>>>>>>&0		use 		help-ver-date
283>>>>>>>&4		leshort		!1
284>>>>>>>>&0		search/0x49AF/s	\x6c\x03
285>>>>>>>>>&0		use 		help-ver-date
286>>>>>>>>>&4		leshort		!1
287>>>>>>>>>>&0		search/0x49AF/s	\x6c\x03
288>>>>>>>>>>>&0		use 		help-ver-date
289>>>>>>>>>>>&4		leshort		!1
290>>>>>>>>>>>>&0		search/0x49AF/s	\x6c\x03
291>>>>>>>>>>>>>&0		use 		help-ver-date
292>>>>>>>>>>>>>&4		leshort		!1
293>>>>>>>>>>>>>>&0	search/0x49AF/s	\x6c\x03
294>>>>>>>>>>>>>>>&0	use 		help-ver-date
295>>>>>>>>>>>>>>>&4	leshort		!1
296>>>>>>>>>>>>>>>>&0	search/0x49AF/s	\x6c\x03
297# GCC.HLP is detected after 7 iterations
298>>>>>>>>>>>>>>>>>&0	use 		help-ver-date
299# this only happens if bigger hlp file is detected after used search iterations
300>>>>>>>>>>>>>>>>>&4	leshort		!1		Windows y.z help
301!:mime	application/winhelp
302!:ext	hlp
303# repeat search again or following default line does not work
304>>>>16			search/0x49AF/s	\x6c\x03
305# remaining files should be HeLP Bookmark WinHlp32.BMK (XP 32-bit) or WinHlp32 (Windows 8.1 64-bit)
306>>>>16	default				x	Windows help Bookmark
307!:mime	application/x-winhelp
308!:ext	bmk
309## FirstFreeBlock normally FFFFFFFFh 10h for *ANN
310##>>8	lelong			x		\b, FirstFreeBlock %#8.8x
311# EntireFileSize
312>>12	lelong			x		\b, %d bytes
313## ReservedSpace normally 042Fh AFh for *.ANN
314#>>(4.l)	lelong		x		\b, ReservedSpace %#8.8x
315## UsedSpace normally 0426h A6h for *.ANN
316#>>(4.l+4)	lelong		x		\b, UsedSpace %#8.8x
317## FileFlags normally 04...
318#>>(4.l+5)	lelong		x		\b, FileFlags %#8.8x
319## file header magic 0x293B
320#>>(4.l+9)	uleshort	x		\b, file header magic %#4.4x
321## file header Flags		0x0402
322#>>(4.l+11)	uleshort	x		\b, file header Flags %#4.4x
323## file header PageSize	0400h 80h for *.ANN
324#>>(4.l+13)	uleshort	x		\b, PageSize %#4.4x
325## Structure[16]		z4
326#>>(4.l+15)	string		>\0		\b, Structure_"%-.16s"
327## MustBeZero			0
328#>>(4.l+31)	uleshort	x		\b, MustBeZero %#4.4x
329## PageSplits
330#>>(4.l+33)	uleshort	x		\b, PageSplits %#4.4x
331## RootPage
332#>>(4.l+35)	uleshort	x		\b, RootPage %#4.4x
333## MustBeNegOne			0xffff
334#>>(4.l+37)	uleshort	x		\b, MustBeNegOne %#4.4x
335## TotalPages			1
336#>>(4.l+39)	uleshort	x		\b, TotalPages %#4.4x
337## NLevels			0x0001
338#>>(4.l+41)	uleshort	x		\b, NLevels %#4.4x
339## TotalBtreeEntries
340#>>(4.l+43)	ulelong		x		\b, TotalBtreeEntries %#8.8x
341## pages of the B+ tree
342#>>(4.l+47)	ubequad		x		\b, PageStart %#16.16llx
343
344# start with colon or semicolon for comment line like Back2Life.cnt
3450		regex		\^(:|;)
346# look for first keyword Base
347>0		search/45	:Base
348>>&0				use 		cnt-name
349# only solution to search again from beginning , because relative offsets changes when use is called
350>0		search/45	:Base
351>0		default		x
352# look for other keyword Title like in putty.cnt
353>>0		search/45	:Title
354>>>&0				use 		cnt-name
355#
356# display mime type and name of Windows help Content source
3570	name				cnt-name
358# skip space at beginning
359>0     string		\040
360# name without extension and greater character or name with hlp extension
361>>1	regex/c		\^([^\xd>]*|.*\\.hlp)	MS Windows help file Content, based "%s"
362!:mime	text/plain
363!:apple	????TEXT
364!:ext	cnt
365#
366# Windows creates a full text search from hlp file, if the user clicks the "Find" tab and enables keyword indexing
3670	string		tfMR			MS Windows help Full Text Search index
368!:mime application/x-winhelp-fts
369!:ext	fts
370>16	string		>\0			for "%s"
371
372# Summary: Hyper terminal
373# Extension: .ht
374# Created by: unknown
3750	string		HyperTerminal\040
376>15	string		1.0\ --\ HyperTerminal\ data\ file	MS Windows HyperTerminal profile
377
378# https://ithreats.files.wordpress.com/2009/05/\040
379# lnk_the_windows_shortcut_file_format.pdf
380# Summary: Windows shortcut
381# Extension: .lnk
382# Created by: unknown
383# 'L' + GUUID
3840	string		\114\0\0\0\001\024\002\0\0\0\0\0\300\0\0\0\0\0\0\106	MS Windows shortcut
385!:mime	application/x-ms-shortcut
386!:ext	lnk
387>20	lelong&1	1	\b, Item id list present
388>20	lelong&2	2	\b, Points to a file or directory
389>20	lelong&4	4	\b, Has Description string
390>20	lelong&8	8	\b, Has Relative path
391>20	lelong&16	16	\b, Has Working directory
392>20	lelong&32	32	\b, Has command line arguments
393>20	lelong&64	64	\b, Icon
394>>56	lelong		x	\b number=%d
395>24	lelong&1	1	\b, Read-Only
396>24	lelong&2	2	\b, Hidden
397>24	lelong&4	4	\b, System
398>24	lelong&8	8	\b, Volume Label
399>24	lelong&16	16	\b, Directory
400>24	lelong&32	32	\b, Archive
401>24	lelong&64	64	\b, Encrypted
402>24	lelong&128	128	\b, Normal
403>24	lelong&256	256	\b, Temporary
404>24	lelong&512	512	\b, Sparse
405>24	lelong&1024	1024	\b, Reparse point
406>24	lelong&2048	2048	\b, Compressed
407>24	lelong&4096	4096	\b, Offline
408>28	leqwdate	x	\b, ctime=%s
409>36	leqwdate	x	\b, mtime=%s
410>44	leqwdate	x	\b, atime=%s
411>52	lelong		x	\b, length=%u, window=
412>60	lelong&1	1	\bhide
413>60	lelong&2	2	\bnormal
414>60	lelong&4	4	\bshowminimized
415>60	lelong&8	8	\bshowmaximized
416>60	lelong&16	16	\bshownoactivate
417>60	lelong&32	32	\bminimize
418>60	lelong&64	64	\bshowminnoactive
419>60	lelong&128	128	\bshowna
420>60	lelong&256	256	\brestore
421>60	lelong&512	512	\bshowdefault
422#>20	lelong&1	0
423#>>20	lelong&2	2
424#>>>(72.l-64)	pstring/h	x	\b [%s]
425#>20	lelong&1	1
426#>>20	lelong&2	2
427#>>>(72.s)	leshort	x
428#>>>&75	pstring/h	x	\b [%s]
429
430# Summary: Outlook Personal Folders
431# Created by: unknown
4320	lelong		0x4E444221	Microsoft Outlook email folder
433>10	leshort		0x0e		(<=2002)
434>10	leshort		0x17		(>=2003)
435
436
437# Summary: Windows help cache
438# Created by: unknown
4390	string		\164\146\115\122\012\000\000\000\001\000\000\000	MS Windows help cache
440
441
442# Summary: IE cache file
443# Created by: Christophe Monniez
4440	string	Client\ UrlCache\ MMF 	Internet Explorer cache file
445>20	string	>\0			version %s
446
447
448# Summary: Registry files
449# Created by: unknown
450# Modified by (1): Joerg Jenderek
4510	string		regf		MS Windows registry file, NT/2000 or above
4520	string		CREG		MS Windows 95/98/ME registry file
4530	string		SHCC3		MS Windows 3.1 registry file
454
455
456# Summary: Windows Registry text
457# URL: https://en.wikipedia.org/wiki/Windows_Registry#.REG_files
458# Reference: http://fileformats.archiveteam.org/wiki/Windows_Registry
459# Submitted by: Abel Cheung <abelcheung@gmail.com>
460# Update: Joerg Jenderek
461#		Windows 3-9X variant
4620	string		REGEDIT
463# skip ASCII text like "REGEDITor.txt" but match
464# L1WMAP.REG with only 1 CRNL or org.gnome.gnumeric.reg with 2 NL
465>7	search/3	\n			Windows Registry text
466!:mime	text/x-ms-regedit
467!:ext	reg
468#		Windows 9X variant
469>>0	string		REGEDIT4		(Win95 or above)
470#		Windows 2K ANSI variant
4710	string		Windows\ Registry\ Editor\
472>&0	string		Version\ 5.00\r\n\r\n	Windows Registry text (Win2K or above)
473!:mime	text/x-ms-regedit
474!:ext	reg
475#		Windows 2K UTF-16 variant
4762	lestring16	Windows\ Registry\ Editor\
477>0x32	lestring16	Version\ 5.00\r\n\r\n	Windows Registry little-endian text (Win2K or above)
478# relative offset not working
479#>&0	lestring16	Version\ 5.00\r\n\r\n	Windows Registry little-endian text (Win2K or above)
480!:mime	text/x-ms-regedit
481!:ext	reg
482#		WINE variant
483# URL: https://en.wikipedia.org/wiki/Wine_(software)
484# Reference: https://www.winehq.org/pipermail/wine-cvs/2005-October/018763.html
485# Note:	WINE use text based registry (system.reg,user.reg,userdef.reg)
486#	instead binary hiv structure like Windows
4870	string	WINE\ REGISTRY\ Version\ 	WINE registry text
488# version 2
489>&0	string	x				\b, version %s
490!:mime	text/x-wine-extension-reg
491!:ext	reg
492
493# Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013, Feb 2018
494# empty ,comment , section
495# PR/383: remove unicode BOM because it is not portable across regex impls
496#0	regex/s		\\`(\\r\\n|;|[[])
497# empty line CRLF
4980	ubeshort	0x0D0A
499>0	use		ini-file
500# comment line starting with semicolon
5010	string		;
502# look for phrase of Windows policy ADMinistrative template (with starting remark)
503# like: WINDOW_95_CD/TOOLS/RESKIT/netadmin/poledit/conf.adm
504>1	search/3548	END\040CATEGORY
505# ADM with remark (by adm-rem.trid.xml) already done by generic ASCII variant
506# if no Windows policy ADMinistrative template then Windows INItialization
507>1	default		x
508>>0	use		ini-file
509# section line starting with left bracket
5100	string		[
511>0	use		ini-file
512# check and then display Windows INItialization configuration
5130	name		ini-file
514# look for left bracket in section line
515>0	search/8192	[
516# https://en.wikipedia.org/wiki/Autorun.inf
517# https://msdn.microsoft.com/en-us/library/windows/desktop/cc144200.aspx
518# space after right bracket
519# or AutoRun.Amd64 for 64 bit systems
520# or only NL separator
521>>&0	regex/c		\^autorun
522# but sometimes total commander directory tree file "treeinfo.wc" with lines like
523# [AUTORUN]
524# [boot]
525>>>&0	string		=]\r\n[					Total commander directory treeinfo.wc
526!:mime text/plain
527!:ext	wc
528# From: Pal Tamas <folti@balabit.hu>
529# Autorun File
530>>>&0	string		!]\r\n[					Microsoft Windows Autorun file
531!:mime application/x-setupscript
532!:ext	inf
533# https://msdn.microsoft.com/en-us/library/windows/hardware/ff549520(v=vs.85).aspx
534# version strings ASCII coded case-independent for Windows setup information script file
535>>&0	regex/c		\^(version|strings)]				Windows setup INFormation
536!:mime	application/x-setupscript
537#!:mime application/x-wine-extension-inf
538!:ext	inf
539# NETCRC.INF OEMCPL.INF
540>>&0	regex/c		\^(WinsockCRCList|OEMCPL)]			Windows setup INFormation
541!:mime	application/x-setupscript
542!:ext	inf
543# http://www.winfaq.de/faq_html/Content/tip2500/onlinefaq.php?h=tip2653.htm
544# https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102.aspx
545# .ShellClassInfo DeleteOnCopy LocalizedFileNames ASCII coded case-independent
546>>&0	regex/1024c	\^(\\.ShellClassInfo|DeleteOnCopy|LocalizedFileNames)]	Windows desktop.ini
547!:mime application/x-wine-extension-ini
548#!:mime text/plain
549# https://support.microsoft.com/kb/84709/
550>>&0	regex/c		\^don't\ load]					Windows CONTROL.INI
551!:mime application/x-wine-extension-ini
552!:ext	ini
553>>&0	regex/c		\^(ndishlp\\$|protman\\$|NETBEUI\\$)]		Windows PROTOCOL.INI
554!:mime application/x-wine-extension-ini
555!:ext	ini
556# https://technet.microsoft.com/en-us/library/cc722567.aspx
557# http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0137.htm
558>>&0	regex/c		\^(windows|Compatibility|embedding)]		Windows WIN.INI
559!:mime application/x-wine-extension-ini
560!:ext	ini
561# https://en.wikipedia.org/wiki/SYSTEM.INI
562>>&0	regex/c		\^(boot|386enh|drivers)]			Windows SYSTEM.INI
563!:mime application/x-wine-extension-ini
564!:ext	ini
565# http://www.mdgx.com/newtip6.htm
566>>&0	regex/c		\^SafeList]					Windows IOS.INI
567!:mime application/x-wine-extension-ini
568!:ext	ini
569# https://en.wikipedia.org/wiki/NTLDR	Windows Boot Loader information
570>>&0	regex/c		\^boot\x20loader]				Windows boot.ini
571!:mime application/x-wine-extension-ini
572!:ext	ini
573# https://en.wikipedia.org/wiki/CONFIG.SYS
574>>&0	regex/c		\^menu]						MS-DOS CONFIG.SYS
575# @CONFIG.UI configuration file of previous DOS version saved by Caldera OPENDOS INSTALL.EXE
576# CONFIG.PSS saved version of file CONFIG.SYS created by %WINDIR%\SYSTEM\MSCONFIG.EXE
577# CONFIG.TSH renamed file CONFIG.SYS.BAT by %WINDIR%\SYSTEM\MSCONFIG.EXE
578# dos and w40 used in dual booting scene
579!:ext	sys/dos/w40
580# https://support.microsoft.com/kb/118579/
581>>&0	regex/c		\^Paths]\r\n					MS-DOS MSDOS.SYS
582!:ext	sys/dos
583# http://chmspec.nongnu.org/latest/INI.html#HHP
584>>&0	regex/c		\^options]\r\n					Microsoft HTML Help Project
585!:mime text/plain
586!:ext	hhp
587# From:		Joerg Jenderek
588# URL:		https://documentation.basis.com/BASISHelp/WebHelp/b3odbc/ODBC_Driver/obdcdriv_character_translation.htm
589# Reference:	https://www.garykessler.net/library/file_sigs.html
590#		http://mark0.net/download/triddefs_xml.7z/defs/c/cpx.trid.xml
591# Note:		stored in directory %WINDIR%\SysWOW64 or %WINDIR%\system
592#		second word often Latin but sometimes Cyrillic like in 12510866.CPX
593>>&0	regex/c		\^Windows\ (Latin|Cyrillic)			Windows codepage translator
594#!:mime	text/plain
595!:mime	text/x-ms-cpx
596# like: 12510866.CPX
597!:ext	cpx
598# From:		Joerg Jenderek
599# URL:		https://en.wikipedia.org/wiki/InstallShield
600# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/l/lid-is.trid.xml
601# Note:		contain also 3 keywords like: count Default key0
602>>&0	regex/c		\^Languages]					InstallShield Language Identifier
603#!:mime	text/plain
604!:mime	text/x-installshield-lid
605# like: SETUP.LID
606!:ext	lid
607# From:		Joerg Jenderek
608# URL:		https://www.file-extensions.org/tag-file-extension
609# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/t/taginfo.trid.xml
610# Note:		contain also keywords like: Application Category Company Misc Version
611>>&0	regex/c		\^TagInfo]					TagInfo
612#!:mime	text/plain
613#!:mime	text/prs.lines.tag
614!:mime	text/x-ms-tag
615# like: DATA.TAG
616!:ext	tag
617# unknown keyword after opening bracket
618>>&0	default				x
619#>>>&0	string/c			x	UNKNOWN [%s
620# look for left bracket of second section
621>>>&0	search/8192			[
622# version Strings FileIdentification
623>>>>&0	string/c			version				Windows setup INFormation
624!:mime application/x-setupscript
625!:ext	inf
626# https://en.wikipedia.org/wiki/Initialization_file	Windows Initialization File or other
627>>>>&0	default				x
628>>>>>&0	ubyte				x
629# characters, digits, underscore and white space followed by right bracket
630# terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT
631>>>>>>&-1	regex/T			\^([A-Za-z0-9_\(\)\ ]+)\]\r	Generic INItialization configuration [%-.40s
632# NETDEF.INF multiarc.ini
633#!:mime	application/x-setupscript
634!:mime	application/x-wine-extension-ini
635#!:mime	text/plain
636!:ext	ini/inf
637# UTF-16 BOM
6380	ubeshort		=0xFFFE
639# look for phrase of Windows policy ADMinistrative template (UTF-16 by adm-uni.trid.xml)
640# like: wuau.adm
641>2	search/0x384A	E\0N\0D\0\040\0C\0A\0T\0E\0G\0O\0R\0Y\0
642>>0	use		windows-adm
643# if no Windows policy ADMinistrative template then Windows INFormation
644>2	default		x
645# UTF-16 BOM followed by CR~0D00 , comment~semicolon~3B00 , section~bracket~5B00
646>>0	ubelong&0xFFff89FF	=0xFFFE0900
647# look for left bracket in section line
648>>>2	search/8192		[
649# keyword without 1st letter which is maybe up-/down-case
650>>>>&3	lestring16		ersion]			Windows setup INFormation
651!:mime	application/x-setupscript
652# like: hdaudio.inf iscsi.inf spaceport.inf tpm.inf usbhub3.inf UVncVirtualDisplay.inf
653!:ext	inf
654>>>>&3	lestring16		trings]			Windows setup INFormation
655!:mime	application/x-setupscript
656# like: arduino_gemma.inf iis.inf MSM8960.inf
657!:ext	inf
658>>>>&3	lestring16		ourceDisksNames]	Windows setup INFormation
659!:mime	application/x-setupscript
660# like: atiixpag.inf mdmnokia.inf netefe32.inf rdpbus.inf
661!:ext	inf
662# netnwcli.inf start with ;---[ NetNWCli.INX ]
663>>>>&3	default			x
664# look for NL followed by left bracket
665>>>>>&0	search/8192		\x0A\x00\x5b
666# like: defltwk.inf netvwifibus.inf WSDPrint.inf
667>>>>>>&3 lestring16		ersion]			Windows setup INFormation
668!:mime	application/x-setupscript
669!:ext	inf
670
671# Summary:	Windows Policy ADMinistrative template
672# From:		Joerg Jenderek
673# URL:		https://en.wikipedia.org/wiki/Administrative_Template
674# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/a/adm.trid.xml
675# Note:		typically stored in directory like: %WINDIR%\system32\GroupPolicy\ADM
676# worst case ASCII variant starting with remark line like: inetset.adm
6770	search/0x4E	CLASS\040
678>&0	string		MACHINE
679>>0	use		windows-adm
680>&0	string		USER
681>>0	use		windows-adm
682# display information about Windows policy ADMinistrative template
6830	name		windows-adm	Windows Policy Administrative Template
684!:mime	text/x-ms-adm
685!:ext	adm
686# UTF-16 BOM implies UTF-16 encoded ADM (by adm-uni.trid.xml)
687>0	ubeshort		=0xFFFE
688>>2	lestring16		x		\b, 1st line "%s"
689# look for UTF-16 encoded CarriageReturn LineFeed
690>>>2	search/0x3A		\r\0\n\0
691>>>>&0	lestring16		x		\b, 2nd line "%s"
692# no UTF-16 BOM implies "ASCII" encoded ADM (by adm.trid.xml)
693>0	ubeshort		!0xFFFE
694>>0		string		x		\b, 1st line "%s"
695#>>>&0		ubequad		x		\b, 2ND %16.16llx
696# 2nd line empty
697>>>&2		beshort		=0x0D0A
698>>>>&0		beshort		!0x0D0A		\b, 3th line
699>>>>>&-2	string		x		"%s"
700# 2nd line with content
701>>>&2		beshort		!0x0D0A		\b, 2nd line
702>>>>&-2		string		x		"%s"
703
704# Windows Precompiled INF files *.PNF added by Joerg Jenderek at Mar 2013 of _PNF_HEADER inf.h
705# http://read.pudn.com/downloads3/sourcecode/windows/248345/win2k/private/windows/setup/setupapi/inf.h__.htm
706# URL:		http://fileformats.archiveteam.org/wiki/INF_(Windows)
707# Reference:	http://en.verysource.com/code/10350344_1/inf.h.html
708# Note:		stored in %Windir%\Inf %Windir%\System32\DriverStore\FileRepository
709# check for valid major and minor versions: 101h - 303h
7100		leshort&0xFcFc	=0x0000
711# GRR: line above (strength 50) is too general as it catches also "PDP-11 UNIX/RT ldp" ./pdp
712>0		leshort&0x0303	!0x0000
713# test for valid InfStyles: 1 2
714>>2		uleshort	>0
715>>>2		uleshort	<3
716# look for colon in WinDirPath after PNF header
717#>>>>0x59	search/18	:
718>>>>0	use	PreCompiledInf
7190	name	PreCompiledInf
720>0		uleshort	x	Windows Precompiled iNF
721!:mime	application/x-pnf
722!:ext	pnf
723# major version 1 for older Windows like XP and 3 since about Windows Vista
724# 101h~98-XP; 301h~Windows Vista-7 ; 302h~Windows 10 14393; 303h~Windows 10 18362
725>1		ubyte		x		\b, version %u
726>0		ubyte		x		\b.%u
727>0		uleshort	=0x0101		(Windows
728>>4	ulelong&0x00000001	!0x00000001	98)
729>>4	ulelong&0x00000001	=0x00000001	XP)
730>0		uleshort	=0x0301		(Windows Vista-8.1)
731>0		uleshort	=0x0302		(Windows 10 older)
732>0		uleshort	=0x0303		(Windows 10)
733# 1 ,2 (windows 98 SE)
734>2		uleshort	!2		\b, InfStyle %u
735#	PNF_FLAG_IS_UNICODE		0x00000001
736#	PNF_FLAG_HAS_STRINGS		0x00000002
737#	PNF_FLAG_SRCPATH_IS_URL		0x00000004
738#	PNF_FLAG_HAS_VOLATILE_DIRIDS	0x00000008
739#	PNF_FLAG_INF_VERIFIED		0x00000010
740#	PNF_FLAG_INF_DIGITALLY_SIGNED	0x00000020
741#	UNKNOWN8			0x00000080
742#	UNKNOWN				0x00000100
743#	UNKNOWN1			0x01000000
744#	UNKNOWN2			0x02000000
745>4	ulelong&0x03000180	>0		\b, flags
746>>4	ulelong			x		%#x
747>4	ulelong&0x00000001	0x00000001	\b, unicoded
748>4	ulelong&0x00000002	0x00000002	\b, has strings
749>4	ulelong&0x00000004	0x00000004	\b, src URL
750>4	ulelong&0x00000008	0x00000008	\b, volatile dir ids
751>4	ulelong&0x00000010	0x00000010	\b, verified
752>4	ulelong&0x00000020	0x00000020	\b, digitally signed
753# >4	ulelong&0x00000080	0x00000080	\b, UNKNOWN8
754# >4	ulelong&0x00000100	0x00000100	\b, UNKNOWN
755# >4	ulelong&0x01000000	0x01000000	\b, UNKNOWN1
756# >4	ulelong&0x02000000	0x02000000	\b, UNKNOWN2
757#>8		ulelong		x		\b, InfSubstValueListOffset %#x
758# many 0, 1 lmouusb.PNF, 2 linkfx10.PNF , f webfdr16.PNF
759# , 6 bth.PNF, 9 usbport.PNF, d netnwifi.PNF, 10h nettcpip.PNF
760#>12		uleshort	x		\b, InfSubstValueCount %#x
761# only < 9 found: 8 hcw85b64.PNF
762#>14		uleshort	x		\b, InfVersionDatumCount %#x
763# only found values lower 0x0000ffff ??
764#>16		ulelong		x		\b, InfVersionDataSize %#x
765# only found positive values lower 0x00ffFFff for InfVersionDataOffset
766>20		ulelong		x		\b, at %#x
767>4	ulelong&0x00000001	=0x00000001
768# case independent: CatalogFile Class DriverVer layoutfile LayoutFile SetupClass signature Signature
769>>(20.l)	lestring16	x		"%s"
770>4	ulelong&0x00000001	!0x00000001
771>>(20.l)	string		x		"%s"
772# FILETIME is number of 100-nanosecond intervals since 1 January 1601
773#>24		ulequad		x		\b, InfVersionLastWriteTime %16.16llx
774#>24		foodate-0xbar	x		\b, InfVersionLastWriteTime %s
775# for Windows 98, XP
776>0		uleshort	<0x0102
777# only found values lower 0x00ffFFff
778# often 70 but also 78h for corelist.PNF
779# >>32		ulelong		x		\b, StringTableBlockOffset %#x
780# >>36		ulelong		x		\b, StringTableBlockSize %#x
781# >>40		ulelong		x		\b, InfSectionCount %#x
782# >>44		ulelong		x		\b, InfSectionBlockOffset %#x
783# >>48		ulelong		x		\b, InfSectionBlockSize %#x
784# >>52		ulelong		x		\b, InfLineBlockOffset %#x
785# >>56		ulelong		x		\b, InfLineBlockSize %#x
786# >>60		ulelong		x		\b, InfValueBlockOffset %#x
787# >>64		ulelong		x		\b, InfValueBlockSize %#x
788# WinDirPathOffset
789# like 58h, which means direct after PNF header
790#>>68		ulelong		x		\b, at %#x
791>>68		ulelong		x
792>>>4	ulelong&0x00000001	=0x00000001
793#>>>>(68.l)	ubequad		=0x43003a005c005700
794# normally unicoded C:\Windows
795#>>>>>(68.l)	lestring16	x		\b, WinDirPath "%s"
796>>>>(68.l)	ubequad		!0x43003a005c005700
797>>>>>(68.l)	lestring16	x		\b, WinDirPath "%s"
798>>>4	ulelong&0x00000001	!0x00000001
799# normally ASCII C:\WINDOWS
800#>>>>(68.l)	string		=C:\\WINDOWS	\b, WinDirPath "%s"
801>>>>(68.l)	string		!C:\\WINDOWS
802>>>>>(68.l)	string		x		\b, WinDirPath "%s"
803# found OsLoaderPathOffset values often 0 , once 70h corelist.PNF, once 68h ASCII machine.PNF
804>>>72		ulelong		>0		\b,
805>>>>4	ulelong&0x00000001	=0x00000001
806>>>>>(72.l)	lestring16	x		OsLoaderPath "%s"
807>>>>4	ulelong&0x00000001	!0x00000001
808# seldom C:\ instead empty
809>>>>>(72.l)	string		x		OsLoaderPath "%s"
810# 1fdh
811#>>>76		uleshort	x		\b, StringTableHashBucketCount %#x
812# only 407h found
813>>>78		uleshort	!0x409		\b, LanguageID %x
814#>>>78		uleshort	=0x409		\b, LanguageID %x
815# InfSourcePathOffset often 0
816>>>80		ulelong		>0		\b, at %#x
817>>>>4	ulelong&0x00000001	=0x00000001
818>>>>>(80.l)	lestring16	x		SourcePath "%s"
819>>>>4	ulelong&0x00000001	!0x00000001
820>>>>>(80.l)	string		>\0		SourcePath "%s"
821# OriginalInfNameOffset often 0
822>>>84		ulelong		>0		\b, at %#x
823>>>>4	ulelong&0x00000001	=0x00000001
824>>>>>(84.l)	lestring16	x		InfName "%s"
825>>>>4	ulelong&0x00000001	!0x00000001
826>>>>>(84.l)	string		>\0		InfName "%s"
827
828# for newer Windows like Vista, 7 , 8.1 , 10
829>0		uleshort	>0x0101
830>>80	ulelong			x		\b, at %#x WinDirPath
831>>>4	ulelong&0x00000001	0x00000001
832# normally unicoded C:\Windows
833#>>>>(80.l)	ubequad		=0x43003a005c005700
834#>>>>>(80.l)	lestring16	x		"%s"
835>>>>(80.l)	ubequad		!0x43003a005c005700
836>>>>>(80.l)	lestring16	x		"%s"
837# language id: 0 407h~german 409h~English_US
838>>90		uleshort	!0x409		\b, LanguageID %x
839#>>90		uleshort	=0x409		\b, LanguageID %x
840>>92	ulelong			>0		\b, at %#x
841>>>4	ulelong&0x00000001	0x00000001
842# language string like: de-DE en-US
843>>>>(92.l)	lestring16	x		language %s
844
845# Summary: backup file created with utility like NTBACKUP.EXE shipped with Windows NT/2K/XP/2003
846# Extension: .bkf
847# Created by: Joerg Jenderek
848# URL: https://en.wikipedia.org/wiki/NTBackup
849# Reference: http://laytongraphics.com/mtf/MTF_100a.PDF
850# Descriptor BloCK name of Microsoft Tape Format
8510	string			TAPE
852# Format Logical Address is zero
853>20	ulequad			0
854# Reserved for MBC is zero
855>>28	uleshort		0
856# Control Block ID is zero
857>>>36	ulelong			0
858# BIT4-BIT15, BIT18-BIT31 of block attributes are unused
859>>>>4	ulelong&0xFFfcFFe0	0		Windows NTbackup archive
860#!:mime application/x-ntbackup
861!:ext bkf
862# OS ID
863>>>>>10	ubyte			1		\b NetWare
864>>>>>10	ubyte			13		\b NetWare SMS
865>>>>>10	ubyte			14		\b NT
866>>>>>10	ubyte			24		\b 3
867>>>>>10	ubyte			25		\b OS/2
868>>>>>10	ubyte			26		\b 95
869>>>>>10	ubyte			27		\b Macintosh
870>>>>>10	ubyte			28		\b UNIX
871# OS Version (2)
872#>>>>>11	ubyte			x		OS V=%x
873# MTF_CONTINUATION	Media Sequence Number > 1
874#>>>>>4	ulelong&0x00000001	!0		\b, continued
875# MTF_COMPRESSION
876>>>>>4	ulelong&0x00000004	!0		\b, compressed
877# MTF_EOS_AT_EOM	End Of Medium was hit during end of set processing
878>>>>>4	ulelong&0x00000008	!0		\b, End Of Medium hit
879>>>>>4	ulelong&0x00020000	0
880# MTF_SET_MAP_EXISTS	A Media Based Catalog Set Map may exist on tape
881>>>>>>4	ulelong&0x00010000	!0		\b, with catalog
882# MTF_FDD_ALLOWED	However File/Directory Detail can only exist if a Set Map is also present
883>>>>>4	ulelong&0x00020000	!0		\b, with file catalog
884# Offset To First Event 238h,240h,28Ch
885#>>>>>8	uleshort		x		\b, event offset %4.4x
886# Displayable Size (20e0230h 20e024ch 20e0224h)
887#>>>>>8	ulequad			x		dis. size %16.16llx
888# Media Family ID (455288C4h 4570BD1Ah 45708F2Fh 4570BBF5h)
889#>>>>>52	ulelong			x		family ID %8.8x
890# TAPE Attributes (3)
891#>>>>>56	ulelong			x		TAPE %8.8x
892# Media Sequence Number
893>>>>>60	uleshort		>1		\b, sequence %u
894# Password Encryption Algorithm (3)
895>>>>>62	uleshort		>0		\b, %#x encrypted
896# Soft Filemark Block Size * 512 (2)
897#>>>>>64	uleshort		=2		\b, soft size %u*512
898>>>>>64	uleshort		!2		\b, soft size %u*512
899# Media Based Catalog Type (1,2)
900#>>>>>66	uleshort		x		\b, catalog type %4.4x
901# size of Media Name (66,68,6Eh)
902>>>>>68	uleshort		>0
903# offset of Media Name (5Eh)
904>>>>>>70	uleshort	>0
905# 0~, 1~ANSI, 2~UNICODE
906>>>>>>>48	ubyte		1
907# size terminated ansi coded string normally followed by "MTF Media Label"
908>>>>>>>>(70.s)	string		>\0		\b, name: %s
909>>>>>>>48	ubyte		2
910# Not null, but size terminated unicoded string
911>>>>>>>>(70.s)	lestring16	x		\b, name: %s
912# size of Media Label (104h)
913>>>>>72	uleshort		>0
914# offset of Media Label (C4h,C6h,CCh)
915>>>>>74		uleshort	>0
916>>>>>>48	ubyte		1
917#Tag|Version|Vendor|Vendor ID|Creation Time Stamp|Cartridge Label|Side|Media ID|Media Domain ID|Vendor Specific fields
918>>>>>>>(74.s)	string		>\0		\b, label: %s
919>>>>>>48	ubyte		2
920>>>>>>>(74.s)	lestring16	x		\b, label: %s
921# size of password name (0,1Ch)
922#>>>>>76	uleshort		>0		\b, password size %4.4x
923# Software Vendor ID (CBEh)
924>>>>>86	uleshort		x		\b, software (%#x)
925# size of Software Name (6Eh)
926>>>>>80	uleshort		>0
927# offset of Software Name (1C8h,1CAh,1D0h)
928>>>>>>82	uleshort	>0
929# 1~ANSI, 2~UNICODE
930>>>>>>>48	ubyte		1
931>>>>>>>>(82.s)	string		>\0		\b: %s
932>>>>>>>48	ubyte		2
933# size terminated unicoded coded string normally followed by "SPAD"
934>>>>>>>>(82.s)	lestring16	x		\b: %s
935# Format Logical Block Size (512,1024)
936#>>>>>84	uleshort		=1024		\b, block size %u
937>>>>>84	uleshort		!1024		\b, block size %u
938# Media Date of MTF_DATE_TIME type with 5 bytes
939#>>>>>>88	ubequad			x		DATE %16.16llx
940# MTF Major Version (1)
941#>>>>>>93	ubyte		x		\b, MFT version %x
942#
943
944# URL: https://en.wikipedia.org/wiki/PaintShop_Pro
945# Reference: https://www.cryer.co.uk/file-types/p/pal.htm
946# Created by: Joerg Jenderek
947# Note: there exist other color palette formats also with .pal extension
9480	string	JASC-PAL\r\n	PaintShop Pro color palette
949#!:mime	text/plain
950# PspPalette extension is used by newer (probably 8) PaintShopPro versions
951!:ext	pal/PspPalette
952# 2nd line contains palette file version. For example "0100"
953>10	string	!0100		\b, version %.4s
954# third line contains the number of colours: 16 256 ...
955>16	string	x		\b, %.3s colors
956
957# URL: https://en.wikipedia.org/wiki/Innosetup
958# Reference: https://github.com/jrsoftware/issrc/blob/master/Projects/Undo.pas
959# Created by: Joerg Jenderek
960# Note:	created by like "InnoSetup self-extracting archive" inside ./msdos
961# TrID labeles the entry as "Inno Setup Uninstall Log"
962#	TUninstallLogID
9630	string	Inno\ Setup\ Uninstall\ Log\ (b)	InnoSetup Log
964!:mime	application/x-innosetup
965# unins000.dat, unins001.dat, ...
966!:ext	dat
967# " 64-bit" variant
968>0x1c	string		>\0				\b%.7s
969# AppName[0x80] like "Minimal SYStem", ClamWin Free Antivirus , ...
970>0xc0	string		x				%s
971# AppId[0x80] is similar to AppName or
972# GUID like {4BB0DCDC-BC24-49EC-8937-72956C33A470} start with left brace
973>0x40	ubyte		0x7b
974>>0x40	string		x				%-.38s
975# do not know how this log version correlates to program version
976>0x140	ulelong		x				\b, version %#x
977# NumRecs
978#>0x144	ulelong		x				\b, %#4.4x records
979# EndOffset means files size
980>0x148	ulelong		x				\b, %u bytes
981# Flags 5 25h 35h
982#>0x14c	ulelong		x				\b, flags %8.8x
983# Reserved: array[0..26] of Longint
984# the non Unicode HighestSupportedVersion may never become greater than or equal to 1000
985>0x140	ulelong		<1000
986# hostname
987>>0x1d6	pstring		x				\b, %s
988# user name
989>>>&0	pstring		x				\b\%s
990# directory like C:\Program Files (x86)\GnuWin32
991>>>>&0	pstring		x				\b, "%s"
992# version 1000 or higher implies unicode
993>0x140	ulelong		>999
994# hostname
995>>0x1db	lestring16	x				\b, %-.9s
996# utf string variant with prepending fe??ffFFff
997>>0x1db	search/43	\xFF\xFF\xFF
998# user name
999>>>&0	lestring16	x				\b\%-.9s
1000>>>&0	search/43	\xFF\xFF\xFF
1001# directory like C:\Program Files\GIMP 2
1002>>>>&0	lestring16	x				\b, %-.42s
1003
1004# URL:      https://jrsoftware.org/ishelp/index.php?topic=setup_signeduninstaller
1005# Reference:https://github.com/jrsoftware/issrc/blob/main/Projects/Struct.pas
1006# From:     Joerg Jenderek
10070	string	Inno\ Setup\ Messages\ (
1008# null padded til 0x40 boundary
1009>0x38	quad		0				InnoSetup messages
1010!:mime	application/x-innosetup-msg
1011# unins000.msg, unins001.msg, ...
1012!:ext	msg
1013# version like 5.1.1 5.1.11 5.5.0 5.5.3 6.0.0
1014>>0x15	string		x				\b, version %.5s
1015# look for 6th char of version string or terminating right parentheses
1016>>>0x1a	ubyte		!0x29				\b%c
1017# NumMessages
1018>>0x40	ulelong		x				\b, %u messages
1019# TotalSize: Cardinal;
1020#>>0x44	ulelong		x				\b, TotalSize %u
1021# NotTotalSize: Cardinal;
1022#>>0x48	ulelong		x				\b, NotTotalSize %u
1023# CRCMessages: Longint;
1024#>>0x4C	ulelong		x				\b, CRC %#x
1025>>0x40	ulelong		x
1026# (u) after version means unicoded messages
1027>>>0x1c	search/2	(u)				(UTF-16),
1028>>>>0x50 lestring16	x				%s
1029# ASCII coded message
1030>>>0x1c	default		x				(ASCII),
1031>>>>0x50 string		x				%s
1032
1033# Windows Imaging (WIM) Image
1034# Update: Joerg Jenderek at Mar 2019, 2021
1035# URL: https://en.wikipedia.org/wiki/Windows_Imaging_Format
1036#      http://fileformats.archiveteam.org/wiki/Windows_Imaging_Format
1037# Reference: https://download.microsoft.com/download/f/e/f/
1038# fefdc36e-392d-4678-9e4e-771ffa2692ab/Windows%20Imaging%20File%20Format.rtf
1039# Note: verified by like `7z t boot.wim` `wiminfo install.esd --header`
10400	string		MSWIM\000\000\000
1041>0	use		wim-archive
1042# https://wimlib.net/man1/wimoptimize.html
10430	string		WLPWM\000\000\000
1044>0	use		wim-archive
10450	name		wim-archive
1046# _WIMHEADER_V1_PACKED ImageTag[8]
1047>0	string		x			Windows imaging
1048!:mime	application/x-ms-wim
1049# TO avoid in file version 5.36 error like
1050# Magdir/windows, 760: Warning: Current entry does not yet have a description
1051# file: could not find any valid magic files! (No error)
1052# split WIM
1053>16	ulelong		&0x00000008		(SWM
1054!:ext	swm
1055# usPartNumber; 1, unless the file was split into multiple parts
1056>>40	uleshort	x			\b %u
1057# usTotalParts; The total number of WIM file parts in a spanned set
1058>>42	uleshort	x			\b of %u) image
1059# non split WIM
1060>16	ulelong		^0x00000008
1061# https://wimlib.net/man1/wimmount.html
1062# solid WIMs; version 3584; usually contain LZMS-compressed and the .esd extension
1063>>12	ulelong		3584			(ESD) image
1064!:ext	esd
1065>>12	ulelong		!3584			(
1066# look for archive member RunTime.xml like in Microsoft.Windows.Cosa.Desktop.Client.ppkg
1067>>>156	search/68233/s		RunTime.xml	\bWindows provisioning package)
1068!:ext	ppkg
1069# if is is not a Windows provisioning package, then it is a WIM
1070>>>156	default			x		\bWIM) image
1071# second disk image part created by Microsoft's RecoveryDrive.exe has name Reconstruct.WIM2
1072!:ext	wim/wim2
1073>0	string/b	WLPWM\000\000\000	\b, wimlib pipable format
1074# cbSize size of the WIM header in bytes like 208
1075#>8	ulelong		x			\b, headersize %u
1076# dwVersion version of the WIM file 00010d00h~1.13 00000e00h~0.14
1077>14	uleshort	x			v%u
1078>13	ubyte		x			\b.%u
1079# dwImageCount; The number of images contained in the WIM file
1080>44	ulelong		>1			\b, %u images
1081# dwBootIndex
1082# 1-based index of the bootable image of the WIM, or 0 if no image is bootable
1083>0x78	ulelong		>0			\b, bootable no. %u
1084# dwFlags
1085#>16	ulelong		x			\b, flags %#8.8x
1086#define FLAG_HEADER_COMPRESSION		0x00000002
1087#define FLAG_HEADER_READONLY            0x00000004
1088#define FLAG_HEADER_SPANNED		0x00000008
1089#define FLAG_HEADER_RESOURCE_ONLY       0x00000010
1090#define FLAG_HEADER_METADATA_ONLY       0x00000020
1091#define FLAG_HEADER_WRITE_IN_PROGRESS   0x00000040
1092#define FLAG_HEADER_RP_FIX		0x00000080 reparse point fixup
1093#define FLAG_HEADER_COMPRESS_RESERVED   0x00010000
1094#define FLAG_HEADER_COMPRESS_XPRESS     0x00020000
1095#define FLAG_HEADER_COMPRESS_LZX	0x00040000
1096#define FLAG_HEADER_COMPRESS_LZMS	0x00080000
1097#define FLAG_HEADER_COMPRESS_XPRESS2    0x00100000 wimlib-1.13.0\include\wimlib\header.h
1098# XPRESS, with small chunk size
1099>16	ulelong		&0x00100000		\b, XPRESS2
1100>16	ulelong		&0x00080000		\b, LZMS
1101>16	ulelong		&0x00040000		\b, LZX
1102>16	ulelong		&0x00020000		\b, XPRESS
1103>16	ulelong		&0x00000002		compressed
1104>16	ulelong		&0x00000004		\b, read only
1105>16	ulelong		&0x00000010		\b, resource only
1106>16	ulelong		&0x00000020		\b, metadata only
1107>16	ulelong		&0x00000080		\b, reparse point fixup
1108#>16	ulelong		&0x00010000		\b, RESERVED
1109# dwCompressionSize; Uncompressed chunk size for resources or 0 if uncompressed
1110#>20	ulelong		>0			\b, chunk size %u bytes
1111# gWIMGuid
1112#>24	ubequad		x			\b, GUID %#16.16llx
1113#>>32	ubequad		x			\b%16.16llx
1114# rhOffsetTable; the location of the resource lookup table
1115# wim_reshdr_disk[24]= u8 size_in_wim[7] + u8 flags + le64 offset_in_wim + le64 uncompressed_size
1116#>48	ubequad		x			\b, rhOffsetTable %#16.16llx
1117# rhXmlData; the location of the XML data
1118#>0x50	ulelong		x			\b, at %#8.8x
1119# NOT WORKING \xff\xfe<\0W\0I\0M\0
1120#>(0x50.l)	ubequad	x			\b, xml=%16.16llx
1121# rhBootMetadata; the location of the metadata resource
1122#>0x60	ubequad		x			\b, rhBootMetadata %#16.16llx
1123# rhIntegrity; the location of integrity table used to verify files
1124#>0x7c	ubequad		x			\b, rhIntegrity %#16.16llx
1125# Unused[60]
1126#>148	ubequad		!0			\b,unused %#16.16llx
1127#
1128
1129# From:		Joerg Jenderek
1130# URL:		https://en.wikipedia.org/wiki/Windows_Easy_Transfer
1131# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/m/mig.trid.xml
1132# Note:		called "Windows Easy Transfer migration data" by TrID,
1133#		"Migration Store" or "EasyTransfer file" by Microsoft
11340		string		1giM	Windows Easy Transfer migration data
1135#!:mime		application/octet-stream
1136!:mime		application/x-ms-mig
1137!:ext		mig
1138>0x18		string		=MRTS	without password
1139# data offset with 1 space at end
1140>>0x1c		ulelong+0x38	x	\b, at %#x
1141# look for zlib compressed data by ./compress
1142>>(0x1c.l+0x38)	ubyte		x
1143>>>&-1	indirect	x
1144# in password protected examples MRTS comes some bytes further
1145>0x18		string		!MRTS	with password
1146# look for first MRTS tag
1147>0x18		search/29/b	MRTS
1148# probably first file name length like 178, ...
1149#>>&0		ulelong		x	\b, 1st length %u
1150# URL like File\C:\Users\nutzer\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\desktop.ini
1151>>&20		lestring16	x	\b, 1st %-s
1152
1153# Microsoft SYLK
1154# https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK)
1155# https://outflank.nl/upload/sylksum.txt
11560	string	ID;P	Microsoft SYLK program
1157>4	string	>0	\b, created by %s
1158!:ext	slk/sylk
1159
1160# Summary:	Windows Performance Monitor Alert
1161# From:		Joerg Jenderek
1162# URL:		https://en.wikipedia.org/wiki/Performance_Monitor
1163# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/p/pma.trid.xml
1164# Note:		called "Windows Performance Monitor Alert" by TrID
11650	ubelong			=0xDC058340
1166>4	ubyte			=0		Windows Performance Monitor Alert
1167#!:mime		application/octet-stream
1168# https://www.thoughtco.com/mime-types-by-content-type-3469108
1169# https://filext.com/file-extension/PAM
1170!:mime		application/x-perfmon
1171#!:mime		application/x-ms-pma
1172!:ext		pma
1173# metric type like: "BrowserMetrics" "CrashpadMetrics" "SetupMetrics"
1174>>80	string			x		\b, "%s"
1175
1176# From:		Joerg Jenderek
1177# URL:		https://en.wikipedia.org/wiki/InstallShield
1178# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/i/ins.trid.xml
1179# Note:		contain also keywords like: BATCH_INSTALL ISVERSION LOGHANDLE SRCDIR SRCDISK WINDIR WINSYSDISK
11800	ubelong	0xB8C90C00	InstallShield Script
1181#!:mime	application/octet-stream
1182!:mime	application/x-installshield-ins
1183# like test.ins Setup.ins
1184!:ext	ins
1185# UNKNOWN like: 160034121de07e00 1600341260befe00 16003412e0783700
1186# 5000010021083f00 50000100b0335600 50000100cbfdf800 50000100dfbc4700
1187#>4	ubequad		x		\b, at 4 %#16.16llx
1188# copyright text like:	"Stirling Technologies, Inc.  (c) 1990-1994"
1189#			"InstallSHIELD Software Coporation  (c) 1990-1997"
1190>13	pstring/h	x		"%s"
1191# look for specific ASCII variable names
1192>1	search/0x121/s	SRCDIR	\b, variable names:
1193# 1st like: SRCDIR
1194>>&-4		leshort		x	#%u
1195>>&-2		pstring/h	x	%s
1196# 2nd like: SRCDISK
1197>>>&0		leshort		x	#%u
1198>>>&2		pstring/h	x	%s
1199# 3rd like: TARGETDISK
1200>>>>&0		leshort		x	#%u
1201>>>>&2		pstring/h	x	%s
1202# 4th like: TARGETDIR
1203#>>>>>&0		leshort		x	#%u
1204#>>>>>&2		pstring/h	x	%s
1205# 5th like: WINDIR
1206#>>>>>>&0	leshort		x	#%u
1207#>>>>>>&2	pstring/h	x	%s
1208# 6th like: WINDISK
1209#>>>>>>>&0	leshort		x	#%u
1210#>>>>>>>&2	pstring/h	x	%s
1211# 7th like: WINSYSDIR
1212#>>>>>>>>&0	leshort		x	#%u
1213#>>>>>>>>&2	pstring/h	x	%s
1214# ... LOGHANDLE
1215>0		ubelong		x	...
1216#
1217