xref: /freebsd/contrib/file/magic/Magdir/windows (revision ae316d1d1cffd71ab7751f94e10118777a88e027)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*ae316d1dSXin LI# $File: windows,v 1.67 2024/11/09 22:43:01 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# Created by: Christophe Monniez
19a2dfb722SXin LI# Update:	Joerg Jenderek
20a2dfb722SXin LI# URL:		http://fileformats.archiveteam.org/wiki/Outlook_Express_Database
21a2dfb722SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/d/dbx.trid.xml
22a2dfb722SXin LI#		https://sourceforge.net/projects/ol2mbox/files/LibDBX/
23a2dfb722SXin LI#		v1.0.4/libdbx_1.0.4.tar.gz/FILE-FORMAT
24a2dfb722SXin LI# Note:		called "Outlook Express Database" by TrID and DROID via PUID fmt/838 fmt/839
25a2dfb722SXin LI#		and partly verified by `undbx --verbosity 4 Posteingang.dbx`
26a2dfb722SXin LI0	string	\xCF\xAD\x12\xFE
27a2dfb722SXin LI# skip DROID fmt-838-signature-id-1193.dbx fmt-839-signature-id-1194.dbx by check for valid file size
28a2dfb722SXin LI>0x7C	ulelong	>0			MS Outlook Express DBX file
29a2dfb722SXin LI#!:mime		application/octet-stream
30a2dfb722SXin LI#!:mime		application/vnd.ms-outlook
31a2dfb722SXin LI!:mime		application/x-ms-dbx
32a2dfb722SXin LI!:ext	dbx
33a2dfb722SXin LI>>4	byte	=0xC5			\b, message database
34a2dfb722SXin LI>>4	byte	=0xC6			\b, folder database
35a2dfb722SXin LI>>4	byte	=0xC7			\b, account information
36a2dfb722SXin LI>>4	byte	=0x30			\b, offline database
37a2dfb722SXin LI# version like: 5.2 5.5 (typical)
38a2dfb722SXin LI>>20	ulequad	!0x0000000500000005	\b, version
39a2dfb722SXin LI# major version
40a2dfb722SXin LI>>>24	ulelong	x			%u
41a2dfb722SXin LI# minor version
42a2dfb722SXin LI>>>20	ulelong	x			\b.%u
43a2dfb722SXin LI# CLSID: 6F74FDC5-E366-11d1-9A4E-00C04FA309D4~Message 6F74FDC6-E366-11D1-9A4E-00C04FA309D4~Folder
44a2dfb722SXin LI# 26FE9D30-1A8F-11D2-AABF-006097D474C4~offline
45a2dfb722SXin LI#>>4	guid	x			\b, CLSID %s
46a2dfb722SXin LI# file size; total size of file; sometimes real size a little bit higher
47a2dfb722SXin LI>>0x7C	ulelong	x			\b, ~ %u bytes
48a2dfb722SXin LI# highest Email ID; the next email will have a number one higher than this
49a2dfb722SXin LI>>0x5c	ulelong	x			\b, highest ID %#x
50a2dfb722SXin LI# item count; number of items stored in this DBX file
51a2dfb722SXin LI>>0xC4	ulelong	x			\b, %u item
52a2dfb722SXin LI# plural s
53a2dfb722SXin LI>>0xC4	ulelong	!1			\bs
54a2dfb722SXin LI# index pointer; file offset pointing to a page of Data Indexes
55a2dfb722SXin LI>>0xE4	ulelong	>0			\b, index pointer %#x
56b6cee71dSXin LI
57a2dfb722SXin LI# From:		Joerg Jenderek
58a2dfb722SXin LI# URL:		http://fileformats.archiveteam.org/wiki/Nickfile
59a2dfb722SXin LI#		https://www.nirsoft.net/utils/outlook_nk2_edit.html
60a2dfb722SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/n/nk2.trid.xml
61a2dfb722SXin LI#		https://github.com/libyal/libnk2/blob/main/documentation
62a2dfb722SXin LI#		Nickfile%20(NK2)%20format.asciidoc
63a2dfb722SXin LI# Note:		called "Outlook Nickfile" by TrID & TestDisk and
64a2dfb722SXin LI#		"Outlook Nickname File" by Microsoft Outlook and
65a2dfb722SXin LI#		"Outlook AutoComplete File" by Nirsoft NK2Edit
66a2dfb722SXin LI#		partly verfied by NK2Edit Raw Text Edit Mode
67a2dfb722SXin LI0	ubelong		0x0DF0ADBA	MS Outlook Nickfile
68a2dfb722SXin LI#!:mime		application/octet-stream
69a2dfb722SXin LI#!:mime		application/vnd.ms-outlook
70a2dfb722SXin LI!:mime		application/x-ms-nickfile
71a2dfb722SXin LI!:ext	nk2/dat/bak
72a2dfb722SXin LI# nick is used by "older" Outlook; dat is used by "newer" Outlook (probably 2010 - 2016); bak is used for backup
73a2dfb722SXin LI#!:ext	nick/nk2/dat/bak
74a2dfb722SXin LI# Unknown; probably a version indicator like: 0000000Ah 0000000Ch
75a2dfb722SXin LI>4	ulelong		x		\b, probably version %u
76a2dfb722SXin LI# Unknown2; probably a version indicator like: 1 0
77a2dfb722SXin LI>8	ulelong		x		\b.%u
78a2dfb722SXin LI# number of rows (nickname or alias items) in file
79a2dfb722SXin LI>12	ulelong		x		\b, %u items
80a2dfb722SXin LI# number of item entries/columns/properties value like: 17h
81a2dfb722SXin LI>16	ulelong		x		\b, %u entries
82a2dfb722SXin LI# value type/property tag: 001Fh~4 bytes for data size of UTF-16 LE string
83a2dfb722SXin LI>20	uleshort	x		\b, value type %#4.4x
84a2dfb722SXin LI# entry type/property identifier: 6001h~PR_DOTSTUFF_STATE/PR_NICK_NAME_W
85a2dfb722SXin LI>22	uleshort	x		\b, entry type %#4.4x
86a2dfb722SXin LI# Reserved like: 0013FD90h
87a2dfb722SXin LI#>24	ulelong		x		\b, reserved %#8.8x
88a2dfb722SXin LI# value data array/Irrelevant Union like: 0000000004E31A80h
89a2dfb722SXin LI#>28	ulequad		x		\b, data %#16.16llx
90a2dfb722SXin LI# UTF-16
91a2dfb722SXin LI>20	uleshort	=0x001F
92a2dfb722SXin LI# unicode string bytes like: 2Ch
93a2dfb722SXin LI>>36	ulelong		x		\b, %u bytes
94a2dfb722SXin LI# unicode string value PT_UNICODE like: janesmith@contoso.org
95a2dfb722SXin LI>>40	lestring16	x		"%s"
96b6cee71dSXin LI
97b6cee71dSXin LI# Summary: Windows crash dump
9848c779cdSXin LI# Created by: Andreas Schuster (https://computer.forensikblog.de/)
99898496eeSXin LI#		https://web.archive.org/web/20101125060849/https://computer.forensikblog.de/en/2008/02/64bit_magic.html
100b6cee71dSXin LI# Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
101898496eeSXin LI# Modified by (2): Joerg Jenderek (addtional fields, extension, URL)
102898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/d/dmp.trid.xml
103898496eeSXin LI#		https://gitlab.com/qemu-project/qemu/-/blob/master/include/qemu/win_dump_defs.h
104898496eeSXin LI# Note:		called "Windows memory dump" by TrID
105898496eeSXin LI#		and verified by like Windows Kit `Dumpchk.exe 043022-18703-01.dmp`
106898496eeSXin LI#		and partly by NirSoft `BlueScreenView.exe 043022-18703-01.dmp`
107898496eeSXin LI# char Signature[4]
108b6cee71dSXin LI0	string		PAGE
109898496eeSXin LI# char ValidDump[4]
110b6cee71dSXin LI>4	string		DUMP		MS Windows 32bit crash dump
111898496eeSXin LI#!:mime	application/octet-stream
112898496eeSXin LI!:mime	application/x-ms-dmp
113898496eeSXin LI# like: Mini111013-01.dmp
114898496eeSXin LI!:ext	dmp
115898496eeSXin LI# major version like: 15
116898496eeSXin LI>>8	ulelong		x		\b, version %u
117898496eeSXin LI# minor version like: 2600
118898496eeSXin LI>>12	ulelong		x		\b.%u
119898496eeSXin LI# DirectoryTableBase like: 709000
120898496eeSXin LI#>>16	ulelong		x		\b, DirectoryTableBase %#x
121898496eeSXin LI# PfnDatabase like: 805620c8
122898496eeSXin LI#>>20	ulelong		x		\b, PfnDatabase %#x
123898496eeSXin LI# PsLoadedModuleList like: 8055d720
124898496eeSXin LI#>>24	ulelong		x		\b, PsLoadedModuleList %#x
125898496eeSXin LI# PsActiveProcessHead like:805638b8
126898496eeSXin LI#>>28	ulelong		x		\b, PsActiveProcessHead %#x
127898496eeSXin LI# MachineImageType like: 14c (intel x86)
128898496eeSXin LI>>32	ulelong		!0x14c		\b, MachineImageType %#x
129898496eeSXin LI# NumberProcessors like: 2
130898496eeSXin LI>>36	ulelong		x		\b, %u processors
131898496eeSXin LI# BugcheckCode like: e2
132898496eeSXin LI#>>40	ulelong		x		\b, BugcheckCode %#x
133898496eeSXin LI# BugcheckParameter1 like: 0
134898496eeSXin LI#>>44	ulelong		x		\b, BugcheckParameter1 %#x
135898496eeSXin LI# BugcheckParameter2 like: 0
136898496eeSXin LI#>>48	ulelong		x		\b, BugcheckParameter2 %#x
137898496eeSXin LI# BugcheckParameter3 like: 0
138898496eeSXin LI#>>52	ulelong		x		\b, BugcheckParameter3 %#x
139898496eeSXin LI# BugcheckParameter4 like: 0
140898496eeSXin LI#>>56	ulelong		x		\b, BugcheckParameter4 %#x
141898496eeSXin LI# VersionUser[32]; like  "PAGEPAGEPAGEPAGEPAGEPAGEPAGEPAGE" ""
142898496eeSXin LI#>>60	string		x		\b, VersionUser "%.32s"
143898496eeSXin LI# uint32_t reserved0 like: 45474101
144898496eeSXin LI#>>92	ulelong		x		\b, reserved0 %#x
145b6cee71dSXin LI>>0x05c	byte            0		\b, no PAE
146b6cee71dSXin LI>>0x05c	byte            1		\b, PAE
147898496eeSXin LI# KdDebuggerDataBlock like: 8054d2e0
148898496eeSXin LI#>>96	ulelong		x		\b, KdDebuggerDataBlock %#x
149898496eeSXin LI# uint8_t PhysicalMemoryBlockBuffer[700]
150898496eeSXin LI# WinDumpPhyMemDesc32 NumberOfRuns like: 45474150
151898496eeSXin LI#>>100	ulelong		x		\b, NumberOfRuns %#x
152898496eeSXin LI# WinDumpPhyMemDesc32 uint32_t NumberOfPages like: 1162297680
153898496eeSXin LI#>>104	ulelong		x		\b, NumberOfPages %#x
154898496eeSXin LI# WinDumpPhyMemRun32 Run[86]; 688 bytes
155898496eeSXin LI#>>108	ulelong		x		\b, BasePage %#x
156898496eeSXin LI#>>112	ulelong		x		\b, PageCount %#x
157898496eeSXin LI# uint8_t reserved1[3200]
158898496eeSXin LI#>>800	string		x		\b, reserved "%s"
159898496eeSXin LI#>>4000	ulelong		x		\b, RequiredDumpSpace %#x
160898496eeSXin LI# uint8_t reserved2[92];
161898496eeSXin LI#>>4004	string		x		\b, reserved2 "%s"
162b6cee71dSXin LI>>0xf88	lelong		1		\b, full dump
163b6cee71dSXin LI>>0xf88	lelong		2		\b, kernel dump
164b6cee71dSXin LI>>0xf88	lelong		3		\b, small dump
165898496eeSXin LI# like: 4
166898496eeSXin LI>>0xf88	lelong		>3		\b, dump type (%#x)
167898496eeSXin LI# WinDumpPhyMemDesc32 uint32_t NumberOfPages like: 1162297680
168898496eeSXin LI# GRR: IS THIS TRUE? VALUE IS SOMETIMES VERY HIGH!
169898496eeSXin LI#>>104	ulelong		x		\b, NumberOfPages %#x
170b6cee71dSXin LI>>0x068	lelong		x		\b, %d pages
171898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/d/dmp-64.trid.xml113o
172898496eeSXin LI# Note:		called "Windows 64bit Memory Dump" by TrID
173898496eeSXin LI# char ValidDump[4]
174b6cee71dSXin LI>4	string		DU64		MS Windows 64bit crash dump
175898496eeSXin LI#!:mime	application/octet-stream
176898496eeSXin LI!:mime	application/x-ms-dmp
177898496eeSXin LI# like: c:\Windows\Minidump\020322-18890-01.dmp c:\Windows\MEMORY.DMP
178898496eeSXin LI!:ext	dmp
179898496eeSXin LI# major version like: 15
180898496eeSXin LI>>8	ulelong		x		\b, version %u
181898496eeSXin LI# minor version like: 9600 19041 22621
182898496eeSXin LI>>12	ulelong		x		\b.%u
183898496eeSXin LI# DirectoryTableBase like: 001ab000
184898496eeSXin LI#>>16	ulequad		x		\b, DirectoryTableBase %#llx
185898496eeSXin LI# PfnDatabase like: fffffa8000000000
186898496eeSXin LI#>>24	ulequad		x		\b, PfnDatabase %#llx
187898496eeSXin LI# PsLoadedModuleList like: fffff800c553f650
188898496eeSXin LI#>>32	ulequad		x		\b, PsLoadedModuleList %#llx
189898496eeSXin LI# PsActiveProcessHead like: fffff800c5525400
190898496eeSXin LI#>>40	ulequad		x		\b, PsActiveProcessHead %#llx
191898496eeSXin LI# MachineImageType like: 00008664
192898496eeSXin LI>>48	ulelong		!0x8664		\b, MachineImageType %#x
193898496eeSXin LI# NumberProcessors like: 2 4
194898496eeSXin LI>>52	ulelong		x		\b, %u processors
195898496eeSXin LI# BugcheckCode like: 1000007e
196898496eeSXin LI#>>56	ulelong		x		\b, BugcheckCode %#x
197898496eeSXin LI# unused0
198898496eeSXin LI#>>60	ulelong		x		\b, unused0 %#x
199898496eeSXin LI# BugcheckParameter1 like: ffffffffc0000005
200898496eeSXin LI#>>64	ulequad		x		\b, BugcheckParameter1 %#llx
201898496eeSXin LI# BugcheckParameter2 like: fffff801abb2158f
202898496eeSXin LI#>>72	ulequad		x		\b, BugcheckParameter2 %#llx
203898496eeSXin LI# BugcheckParameter3 like: ffffd000290d4288
204898496eeSXin LI#>>80	ulequad		x		\b, BugcheckParameter3 %#llx
205898496eeSXin LI# BugcheckParameter4 like: ffffd000290d3aa0
206898496eeSXin LI#>>88	ulequad		x		\b, BugcheckParameter4 %#llx
207898496eeSXin LI# VersionUser[32]; like "" "PAGEPAGEPAGEPAGEPAGEPAGEPAGEPAGE" ""
208898496eeSXin LI#>>96	string		x		\b, VersionUser "%.32s"
209898496eeSXin LI# KdDebuggerDataBlock like: fffff800c550c530
210898496eeSXin LI#>>128	ulequad		x		\b, KdDebuggerDataBlock %#llx
211898496eeSXin LI# uint8_t PhysicalMemoryBlockBuffer[704]
212898496eeSXin LI# WinDumpPhyMemDesc64 NumberOfRuns like: 6 7 0x45474150
213898496eeSXin LI#>>136	ulelong		x		\b, NumberOfRuns %#x
214898496eeSXin LI# WinDumpPhyMemDesc64 unused like: 0 0x45474150
215898496eeSXin LI#>>140	ulelong		x		\b, unused %#x
216898496eeSXin LI# WinDumpPhyMemRun64 Run[43] BasePage like: 1
217898496eeSXin LI#>>152	ulequad		x		\b, BasePage %#llx
218898496eeSXin LI# WinDumpPhyMemRun64 Run[43] PageCount like: 57h
219898496eeSXin LI#>>160	ulequad		x		\b, PageCount %#llx
220898496eeSXin LI# uint8_t ContextBuffer[3000] like: "" "\001" "\0207J\266\001\340\377\377&8\007\312"
221898496eeSXin LI#>>840	string		x		\b, ContextBuffer "%s"
222898496eeSXin LI# WinDumpExceptionRecord ExceptionCode
223898496eeSXin LI#>>3840	ulelong		x		\b, ExceptionCode %#x
224898496eeSXin LI# WinDumpExceptionRecord ExceptionFlags
225898496eeSXin LI#>>3844	ulelong		x		\b, ExceptionFlags %#x
226898496eeSXin LI# WinDumpExceptionRecord ExceptionRecord
227898496eeSXin LI#>>3848	ulequad		x		\b, ExceptionRecord %#llx
228898496eeSXin LI# WinDumpExceptionRecord ExceptionAddress
229898496eeSXin LI#>>3856	ulequad		x		\b, ExceptionAddress %#llx
230898496eeSXin LI# WinDumpExceptionRecord NumberParameters
231898496eeSXin LI#>>3864	ulelong		x		\b, NumberParameters %#x
232898496eeSXin LI# WinDumpExceptionRecord unused
233898496eeSXin LI#>>3868	ulelong		x		\b, unsed %#x
234898496eeSXin LI# WinDumpExceptionRecord ExceptionInformation[15]
235898496eeSXin LI#>>3872	ulequad		x		\b, ExceptionInformation[0] %#llx
236898496eeSXin LI# https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/memory-dump-file-options
237898496eeSXin LI# but DumpType like: 4~small 5~full (MEMORY.DMP) 6~kernel (MEMORY.DMP)
238898496eeSXin LI>>0xf98 ulelong	x		\b,
239898496eeSXin LI>>>0xf98	lelong		5		full dump
240898496eeSXin LI>>>0xf98	lelong		6		kernel dump
241898496eeSXin LI>>>0xf98	lelong		4		small dump
242898496eeSXin LI# This probably never occur
243898496eeSXin LI>>>0xf98	default		x		DumpType
244898496eeSXin LI>>>>0xf98 	ulelong		x		(%#x)
245898496eeSXin LI# WinDumpPhyMemDesc64 uint64_t NumberOfPages like: 3142425 8341923 8366500 1162297680 4992030524978970960
246898496eeSXin LI# GRR: IS THIS TRUE? VALUE IS SOMETIMES VERY HIGH!
247b6cee71dSXin LI>>0x090	lequad		x		\b, %lld pages
248b6cee71dSXin LI
249b6cee71dSXin LI# Summary: Vista Event Log
25048c779cdSXin LI# Created by: Andreas Schuster (https://computer.forensikblog.de/)
251898496eeSXin LI# Update:	Joerg Jenderek
252898496eeSXin LI# URL:		https://github.com/libyal/libevtx/blob/main/documentation/Windows%20XML%20Event%20Log%20(EVTX).asciidoc
253898496eeSXin LI# Reference (1): https://web.archive.org/web/20110803085000/
254898496eeSXin LI#		https://computer.forensikblog.de/en/2007/05/some_magic.html
255898496eeSXin LI#		http://mark0.net/download/triddefs_xml.7z/defs/e/evtx.trid.xml
256898496eeSXin LI# Note:		called "Vista Event Log" by TrID and "Event Log" by Windows
257898496eeSXin LI# 		verified partly by `wevtutil.exe gli /lf:true dumpfile.evtx`
258898496eeSXin LI0	string		ElfFile\0	MS Windows
259898496eeSXin LI#!:mime		application/octet-stream
260898496eeSXin LI!:mime		application/x-ms-evtx
261898496eeSXin LI!:ext		evtx
262898496eeSXin LI# Major+Minor format version: 3.1~Vista and later 3.2~Windows 10 (2004) and later
263898496eeSXin LI>0x24	ulelong		=0x00030001	Vista-8.1 Event Log
264898496eeSXin LI>0x24	ulelong		!0x00030001	10-11 Event Log, version
265898496eeSXin LI>>0x26	uleshort	x		%u
266898496eeSXin LI>>0x24	uleshort	x		\b.%u
267b6cee71dSXin LI>0x2a	leshort		x		\b, %d chunks
268b6cee71dSXin LI>>0x10	lelong		x		\b (no. %d in use)
269b6cee71dSXin LI>0x18	lelong		>1		\b, next record no. %d
270b6cee71dSXin LI>0x18	lelong		=1		\b, empty
271b6cee71dSXin LI>0x78	lelong		&1		\b, DIRTY
272b6cee71dSXin LI>0x78	lelong		&2		\b, FULL
273b6cee71dSXin LI
274898496eeSXin LI# Summary:	Windows Event Trace Log
275898496eeSXin LI# From:		Joerg Jenderek
276898496eeSXin LI# URL:		http://fileformats.archiveteam.org/wiki/ETL
277898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/e/etl.trid.xml
278898496eeSXin LI#		https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/etw/tracelog/trace_logfile_header.htm
279898496eeSXin LI# Note:		called "Window tracing/diagnostic binary log" by TrID
280898496eeSXin LI# 		verified by `tracerpt.EXE Wifi.etl -of EVTX`
281898496eeSXin LI#		and by etl-parser `etl2xml --input AMSITrace.etl --output AMSITrace.xml`
282898496eeSXin LI# Every ETL file begins with a WMI_BUFFER_HEADER, a SYSTEM_TRACE_HEADER and a TRACE_LOGFILE_HEADER
283898496eeSXin LI0	ubyte			0
284898496eeSXin LI# look for corresponding encoded as UTF-16 file name extension like in: boot_BASE+CSWITCH_1.etl
285898496eeSXin LI>0	search/0x699087/b	.\0e\0t\0l\0\0\0
286898496eeSXin LI# GRR: line above only works if in ../../src/file.h FILE_BYTES_MAX is raised above 699086h (6,59 MiB)
287898496eeSXin LI>>0	use			trace-etl
288898496eeSXin LI# display information of Windows Performance Analyzer Trace File (file name)
289898496eeSXin LI0	name		trace-etl
290898496eeSXin LI>0	ubyte			x		Windows Event Trace Log
291898496eeSXin LI#!:mime		application/x-ms-etl
292898496eeSXin LI# http://extension.nirsoft.net/etl
293898496eeSXin LI!:mime		application/etl
294898496eeSXin LI!:ext		etl
295898496eeSXin LI# look for DOS drive letter part of log file name like: PhotosAppTracing_startedInBGMode.etl
296898496eeSXin LI>0	search/0x2b4/sb	:\0\x5c\0
297898496eeSXin LI# like: "c:\Windows\Logs\NetSetup\service.0.etl" "C:\Windows\System32\LogFiles\WMI\Wifi.etl"
298898496eeSXin LI>>&-2	lestring16		x		"%s"
299898496eeSXin LI
30048c779cdSXin LI# Summary: Windows System Deployment Image
30148c779cdSXin LI# Created by: Joerg Jenderek
30248c779cdSXin LI# URL: http://en.wikipedia.org/wiki/System_Deployment_Image
30348c779cdSXin LI# Reference: http://skolk.livejournal.com/1320.html
30448c779cdSXin LI0	string			$SDI
30548c779cdSXin LI>4	string			0001		System Deployment Image
30648c779cdSXin LI!:mime	application/x-ms-sdi
30748c779cdSXin LI#!:mime	application/octet-stream
30848c779cdSXin LI# \Boot\boot.sdi
30948c779cdSXin LI!:ext	sdi
31048c779cdSXin LI# MDBtype: 0~Unspecified 1~RAM 2~ROM
31143a5ec4eSXin LI>>8	ulequad			!0		\b, MDBtype %#llx
31248c779cdSXin LI# BootCodeOffset
31343a5ec4eSXin LI>>16	ulequad			!0		\b, BootCodeOffset %#llx
31448c779cdSXin LI# BootCodeSize
31543a5ec4eSXin LI>>24	ulequad			!0		\b, BootCodeSize %#llx
31648c779cdSXin LI# VendorID
31743a5ec4eSXin LI>>32	ulequad			!0		\b, VendorID %#llx
31848c779cdSXin LI# DeviceID
31943a5ec4eSXin LI>>40	ulequad			!0		\b, DeviceID %#llx
32048c779cdSXin LI# DeviceModel
32143a5ec4eSXin LI>>48	ulequad			!0		\b, DeviceModel %#llx
32248c779cdSXin LI>>>56	ulequad			!0		\b%llx
32348c779cdSXin LI# DeviceRole
32443a5ec4eSXin LI>>64	ulequad			!0		\b, DeviceRole %#llx
32548c779cdSXin LI# Reserved1; reserved fields and gaps between BLOBs are padded with \0
32643a5ec4eSXin LI#>>72	ulequad			!0		\b, Reserved1 %#llx
32748c779cdSXin LI# RuntimeGUID
32843a5ec4eSXin LI>>80	ulequad			!0		\b, RuntimeGUID %#llx
32948c779cdSXin LI>>>88	ulequad			!0		\b%llx
33048c779cdSXin LI# RuntimeOEMrev
33143a5ec4eSXin LI>>96	ulequad			!0		\b, RuntimeOEMrev %#llx
33248c779cdSXin LI# Reserved2
33343a5ec4eSXin LI#>>104	ulequad			!0		\b, Reserved2 %#llx
33448c779cdSXin LI# BLOB alignment value in pages, as specified in sdimgr /pack: 1~4K 2~8k
33548c779cdSXin LI>>112	ulequad			!0		\b, PageAlignment %llu
33648c779cdSXin LI# Reserved3[48]
33743a5ec4eSXin LI#>>120	ulequad			!0		\b, Reserved3 %#llx
33848c779cdSXin LI# SDI checksum 39h
33943a5ec4eSXin LI>>0x1f8	ulequad			x		\b, checksum %#llx
34048c779cdSXin LI# BLOBtype[8] \0-padded: PART, WIM , BOOT, LOAD, DISK
34148c779cdSXin LI>>0x400	string			>\0		\b, type %-3.8s
34248c779cdSXin LI# 0~non-filesystem 7~NTFS 6~BIGFAT
34343a5ec4eSXin LI>>>0x420	ulequad		!0		(%#llx)
34448c779cdSXin LI# ATTRibutes
34543a5ec4eSXin LI>>>0x408	ulequad		!0		%#llx attributes
34648c779cdSXin LI# Offset
34743a5ec4eSXin LI>>>0x410	ulequad		x		at %#llx
34848c779cdSXin LI# print 1 space after size and then handles NTFS boot sector by ./filesystems
34948c779cdSXin LI>>>0x418	ulequad		>0		%llu bytes
35048c779cdSXin LI>>>>(0x410.l)	indirect	x
35148c779cdSXin LI# 2nd BLOB: WIM
35248c779cdSXin LI>>0x440		string		>\0		\b, type %-3.8s
35343a5ec4eSXin LI>>>0x428	ulequad		!0		(%#llx)
35448c779cdSXin LI# ATTRibutes
35543a5ec4eSXin LI>>>0x448	ulequad		!0		%#llx attributes
35648c779cdSXin LI# Offset
35743a5ec4eSXin LI>>>0x450	ulequad		x		at %#llx
35848c779cdSXin LI>>>0x458	ulequad		>0		%llu bytes
35948c779cdSXin LI>>>>(0x450.l)	indirect	x
36048c779cdSXin LI# 3rd BLOB
36148c779cdSXin LI>>0x480		string		>\0		\b, type %-3.8s
36248c779cdSXin LI
363d38c30c0SXin LI# Summary:	Windows boot status log BOOTSTAT.DAT
364d38c30c0SXin LI# From:		Joerg Jenderek
365d38c30c0SXin LI# Reference:	https://www.geoffchappell.com/notes/windows/boot/bsd.htm
366d38c30c0SXin LI# Note:		mainly refers to older Windows Vista, sometimes
367d38c30c0SXin LI#		BOOTSTAT.DAT only contains nulls or invalid data
368d38c30c0SXin LI# checking for valid version below 5
369d38c30c0SXin LI0		ulelong		<5
370d38c30c0SXin LI# skip many ISO images by checking for valid 64 KiB file size
371d38c30c0SXin LI>8		ulelong		=0x00010000
372d38c30c0SXin LI>>0		use		bootstat-dat
373d38c30c0SXin LI# display information of BOOTSTAT.DAT
374d38c30c0SXin LI0	name		bootstat-dat
375d38c30c0SXin LI>0		ulelong		x		Windows boot log
376d38c30c0SXin LI#!:mime	application/octet-stream
377d38c30c0SXin LI!:mime	application/x-ms-dat
378d38c30c0SXin LI# BOOTSTAT.DAT in BOOT subdirectory
379d38c30c0SXin LI!:ext	dat
380d38c30c0SXin LI# apparently a version number: 2 for older like Vista, 3, 4 Windows 10
381d38c30c0SXin LI>0		ulelong		>2		\b, version %u
382d38c30c0SXin LI# apparently the size of the header: often 10h in older Windows, 14h, 18h
38343a5ec4eSXin LI>4		ulelong		!0x10		\b, header size %#x
384d38c30c0SXin LI#>4		ulelong		!0x10		\b, header size %u
385d38c30c0SXin LI# apparently the size of the file: always 0x00010000~64KiB
386d38c30c0SXin LI# the file is acceptable to BOOTMGR only if it is exactly 64 KiB
38743a5ec4eSXin LI>8		ulelong		!0x00010000	\b, file size %#x
388d38c30c0SXin LI# size of valid data, in bytes: C8h 50h 172h 5D5Ch
38943a5ec4eSXin LI>0xc		ulelong		x		\b, %#x valid bytes
390d38c30c0SXin LI# skip header and jump to first bootstat entry and display information
391d38c30c0SXin LI>(0x4.l-1)	ubyte		x
392d38c30c0SXin LI>>&0		use		bootstat-entry
393d38c30c0SXin LI# jump to first entry again because pointer are bad after "use"
394d38c30c0SXin LI>(0x4.l-1)	ubyte		x
395d38c30c0SXin LI# by 1st entry size jump to 2nd entry and display information
396d38c30c0SXin LI>>&(&0x18.l-1)	ubyte		x
397d38c30c0SXin LI>>>&0		use		bootstat-entry
398d38c30c0SXin LI# jump to possible 3rd boot entry and display information
399d38c30c0SXin LI# >(0x4.l-1)	ubyte		x
400d38c30c0SXin LI# >>&(&0x18.l-1)	ubyte		x
401d38c30c0SXin LI# >>>&(&0x18.l-1)	ubyte		x
402d38c30c0SXin LI# >>>>&0		use		bootstat-entry
403d38c30c0SXin LI#	display BOOTSTAT.DAT entry
404d38c30c0SXin LI0	name		bootstat-entry
405d38c30c0SXin LI#>0x00		ubequad		x		\b, ENTRY %16.16llx
406d38c30c0SXin LI# size of entry, in bytes: 40h(init) 78h(launced) 9Ch
407d38c30c0SXin LI#>0x18		ulelong		x		\b; entry size %u
40843a5ec4eSXin LI>0x18		ulelong		x		\b; entry size %#x
409d38c30c0SXin LI# time stamp, in seconds
41043a5ec4eSXin LI>0x00		ulelong		x		\b, %#x seconds
411d38c30c0SXin LI# always zero, significance unknown
412d38c30c0SXin LI>0x04		ulelong		!0		\b, not null %u
413d38c30c0SXin LI# GUID of event source; but empty if event source is BOOTMGR
41443a5ec4eSXin LI>0x08		ubequad		!0		\b, GUID %#16.16llx
415d38c30c0SXin LI>>0x10		ubequad		x		\b%16.16llx
416d38c30c0SXin LI# severity code: 1~informational 3~errors
41743a5ec4eSXin LI>0x1C		ulelong		!1		\b, severity %#x
418d38c30c0SXin LI# apparently a version number: 2
419d38c30c0SXin LI>0x20		ulelong		!2		\b, version %u
420d38c30c0SXin LI# event identifier 1~log file initialised 11h~boot application launched
42143a5ec4eSXin LI#>0x24		ulelong		x		\b, event %#x
422d38c30c0SXin LI>0x24		ulelong		!1
42343a5ec4eSXin LI>>0x24		ulelong		!0x11		\b, event %#x
424d38c30c0SXin LI# entry data; size depends on event identifier
42543a5ec4eSXin LI#>0x28		ubequad		x		\b, data %#16.16llx
426d38c30c0SXin LI>0x24		ulelong		=0x1		\b, Init
427d38c30c0SXin LI# always 0, significance unknown
428d38c30c0SXin LI>>0x34		uleshort	!0		\b, not null %u
429d38c30c0SXin LI# always 7, significance unknown
430d38c30c0SXin LI>>0x36		uleshort	!7		\b, not seven %u
431d38c30c0SXin LI# year
432d38c30c0SXin LI>>0x28		uleshort	x		%u
433d38c30c0SXin LI# month
434d38c30c0SXin LI>>0x2A		uleshort	x		\b-%u
435d38c30c0SXin LI# day
436d38c30c0SXin LI>>0x2C		uleshort	x		\b-%u
437d38c30c0SXin LI# hour
438d38c30c0SXin LI>>0x2E		uleshort	x		%u
439d38c30c0SXin LI# minute
440d38c30c0SXin LI>>0x30		uleshort	x		\b:%u
441d38c30c0SXin LI# second
442d38c30c0SXin LI>>0x32		uleshort	x		\b:%u
443d38c30c0SXin LI# boot application launched
444d38c30c0SXin LI>0x24		ulelong		=0x11		\b, launched
445d38c30c0SXin LI# type of start: 0 normally, 1 or 2 maybe in a recovery sequence
446d38c30c0SXin LI>>0x38		uleshort	!0		\b, type %u
447d38c30c0SXin LI# pathname of boot application, as null-terminated Unicode string; typically
448d38c30c0SXin LI# \Windows\system32\winload.exe \Windows\system32\winload.efi
449d38c30c0SXin LI>>0x3C		lestring16	x		%s
450d38c30c0SXin LI
45148c779cdSXin LI# Summary:	Windows Error Report text files
45248c779cdSXin LI# URL:		https://en.wikipedia.org/wiki/Windows_Error_Reporting
45348c779cdSXin LI# Reference:	https://www.nirsoft.net/utils/app_crash_view.html
45448c779cdSXin LI# Created by:	Joerg Jenderek
45548c779cdSXin LI# Note:		in directories	%ProgramData%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
45648c779cdSXin LI#				%LOCALAPPDATA%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
45748c779cdSXin LI0	lestring16	Version=
45848c779cdSXin LI>22	lestring16	EventType	Windows Error Report
45948c779cdSXin LI!:mime	text/plain
46048c779cdSXin LI# Report.wer
46148c779cdSXin LI!:ext	wer
462b6cee71dSXin LI
463b6cee71dSXin LI# Summary: Windows 3.1 group files
464b6cee71dSXin LI# Extension: .grp
465b6cee71dSXin LI# Created by: unknown
466b6cee71dSXin LI0	string		\120\115\103\103	MS Windows 3.1 group files
467b6cee71dSXin LI
468b6cee71dSXin LI
469b6cee71dSXin LI# Summary: Old format help files
4703e41d09dSXin LI# URL: https://en.wikipedia.org/wiki/WinHelp
47148c779cdSXin LI# Reference: https://www.oocities.org/mwinterhoff/helpfile.htm
4723e41d09dSXin LI# Update: Joerg Jenderek
473b6cee71dSXin LI# Created by: Dirk Jagdmann <doj@cubic.org>
4743e41d09dSXin LI#
4753e41d09dSXin LI# check and then display version and date inside MS Windows HeLP file fragment
4763e41d09dSXin LI0	name				help-ver-date
4773e41d09dSXin LI# look for Magic of SYSTEMHEADER
4783e41d09dSXin LI>0	leshort		0x036C
4793e41d09dSXin LI# version Major		1 for right file fragment
4803e41d09dSXin LI>>4	leshort		1		Windows
4813e41d09dSXin LI# print non empty string above to avoid error message
4823e41d09dSXin LI# Warning: Current entry does not yet have a description for adding a MIME type
483*ae316d1dSXin LI# not officially registered at IANA
484*ae316d1dSXin LI#!:mime	application/winhelp
485*ae316d1dSXin LI#!:mime	application/winhlp
486*ae316d1dSXin LI!:mime	application/x-winhelp
4873e41d09dSXin LI# version Minor of help file format is hint for windows version
488*ae316d1dSXin LI# HC30 Windows 3.0 help file
489*ae316d1dSXin LI>>>2	leshort		15		3.0
490*ae316d1dSXin LI# HC31 Windows 3.1 help file
491*ae316d1dSXin LI>>>2	leshort		21		3.1
492*ae316d1dSXin LI# WMVC/MMVC media view file
493*ae316d1dSXin LI>>>2	leshort		27
494*ae316d1dSXin LI# MVC or HCW 4.00 Windows 95
495*ae316d1dSXin LI>>>2	leshort		33		95
496*ae316d1dSXin LI# next line should not happen
4973e41d09dSXin LI>>>2	default		x		y.z
49843a5ec4eSXin LI>>>>2	leshort		x		%#x
4993e41d09dSXin LI# to complete message string like "MS Windows 3.x help file"
500*ae316d1dSXin LI>>>2	leshort		!27
501*ae316d1dSXin LI# HLP or few MVB like NOTEPLAY.MVB
502*ae316d1dSXin LI>>>>2	leshort		x		help
503*ae316d1dSXin LI!:ext	hlp
504*ae316d1dSXin LI# URL:		http://fileformats.archiveteam.org/wiki/Multimedia_Viewer_Book
505*ae316d1dSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/m/mvb.trid.xml
506*ae316d1dSXin LI# Note:		called "Multimedia Viewer Book" by TrID and by DROID via PUID fmt/1800
507*ae316d1dSXin LI>>>2	leshort		=27		Multimedia Viewer Book
508*ae316d1dSXin LI!:ext	mvb
5093e41d09dSXin LI# GenDate often older than file creation date
5103e41d09dSXin LI>>>6	ldate		x		\b, %s
511*ae316d1dSXin LI# flags determine the compression
512*ae316d1dSXin LI#>>>10	uleshort		x	\b, flags %#x
513*ae316d1dSXin LI>>>2	leshort		<17
514*ae316d1dSXin LI# HelpFileTitle
515*ae316d1dSXin LI>>>>12	string		x		\b, title "%s"
516*ae316d1dSXin LI>>>2	leshort		>16
517*ae316d1dSXin LI# SYSTEMREC[].RecordType type of data in record; 1~help file title 2~COPYRIGHT 3~TOPICOFFSET Contents 4~Macro 5~*.ICO 6~HPJ-structure
518*ae316d1dSXin LI#>>>>12	uleshort	x		\b, RecordType %u
519*ae316d1dSXin LI# DataSize size of data
520*ae316d1dSXin LI#>>>>14	uleshort	x		\b, DataSize %u
521*ae316d1dSXin LI>>>>12	uleshort	1
522*ae316d1dSXin LI>>>>>14	pstring/h	>\0		\b, title "%s"
5233e41d09dSXin LI# Magic for HeLP files
524*ae316d1dSXin LI# URL:		http://fileformats.archiveteam.org/wiki/HLP_(WinHelp)
525*ae316d1dSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/h/hlp.trid.xml
526*ae316d1dSXin LI# Note:		called "Windows HELP File" by TrID, "Windows Help File" by DROID via PUID fmt/474 and
527*ae316d1dSXin LI#		"WinHelp help file" by shared MIME-info database from freedesktop.org
5283e41d09dSXin LI0	lelong		0x00035f3f
5293e41d09dSXin LI# ./windows (version 5.25) labeled the entry as "MS Windows 3.x help file"
5303e41d09dSXin LI# file header magic 0x293B at DirectoryStart+9
5313e41d09dSXin LI>(4.l+9)	uleshort	0x293B		MS
532*ae316d1dSXin LI# URL:		http://fileformats.archiveteam.org/wiki/WinHelp_annotation
533*ae316d1dSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/a/ann.trid.xml
5343e41d09dSXin LI# look for @VERSION	bmf.. like IBMAVW.ANN
5353e41d09dSXin LI>>0xD4		string	=\x62\x6D\x66\x01\x00	Windows help annotation
5363e41d09dSXin LI!:mime	application/x-winhelp
5373e41d09dSXin LI!:ext	ann
5383e41d09dSXin LI>>0xD4		string	!\x62\x6D\x66\x01\x00
539*ae316d1dSXin LI# "GID Help index" by TrID by gid.trid.xml
540*ae316d1dSXin LI# sometimes at little higher offset like in corelap.GID
541*ae316d1dSXin LI>>>(4.l+0x65)	search/26	|Pete		Windows help Global Index
5423e41d09dSXin LI!:mime	application/x-winhelp
5433e41d09dSXin LI!:ext	gid
5443e41d09dSXin LI# HeLP Bookmark or
545*ae316d1dSXin LI# Multimedia_Viewer_Book or
546*ae316d1dSXin LI# "Windows HELP File" by TrID by hlp.trid.xml
547*ae316d1dSXin LI>>>(4.l+0x65)	default	x
5483e41d09dSXin LI# maybe there exist a cleaner way to detect HeLP fragments
549*ae316d1dSXin LI# brute search for Magic 0x036C with matching Major maximal 13 iterations
550*ae316d1dSXin LI# https://sembiance.com/fileFormatSamples/document/multimediaViewerBook/viewerht.mvb
551*ae316d1dSXin LI>>>>16			search/0x1bbc370/s \x6c\x03
5523e41d09dSXin LI>>>>>&0			use 		help-ver-date
5533e41d09dSXin LI>>>>>&4			leshort		!1
554*ae316d1dSXin LI# viewerht.mvb
555*ae316d1dSXin LI>>>>>>&-2		search/0x1c4b6f0/s \x6c\x03
5563e41d09dSXin LI>>>>>>>&0		use 		help-ver-date
5573e41d09dSXin LI>>>>>>>&4		leshort		!1
558*ae316d1dSXin LI# https://sembiance.com/fileFormatSamples/document/multimediaViewerBook/clarkhow.mvb
559*ae316d1dSXin LI>>>>>>>>&0		search/0x34ab80/s \x6c\x03
5603e41d09dSXin LI>>>>>>>>>&0		use 		help-ver-date
5613e41d09dSXin LI>>>>>>>>>&4		leshort		!1
562*ae316d1dSXin LI>>>>>>>>>>&0		search/0x473ab0/s \x6c\x03
5633e41d09dSXin LI>>>>>>>>>>>&0		use 		help-ver-date
5643e41d09dSXin LI>>>>>>>>>>>&4		leshort		!1
565*ae316d1dSXin LI>>>>>>>>>>>>&0		search/0x739680/s \x6c\x03
5663e41d09dSXin LI>>>>>>>>>>>>>&0		use 		help-ver-date
5673e41d09dSXin LI>>>>>>>>>>>>>&4		leshort		!1
568*ae316d1dSXin LI>>>>>>>>>>>>>>&0	search/0x76c030/s \x6c\x03
5693e41d09dSXin LI>>>>>>>>>>>>>>>&0	use 		help-ver-date
5703e41d09dSXin LI>>>>>>>>>>>>>>>&4	leshort		!1
571*ae316d1dSXin LI>>>>>>>>>>>>>>>>&0	search/0x805c80/s \x6c\x03
5723e41d09dSXin LI# GCC.HLP is detected after 7 iterations
5733e41d09dSXin LI>>>>>>>>>>>>>>>>>&0	use 		help-ver-date
574*ae316d1dSXin LI>>>>>>>>>>>>>>>>>&4	leshort		!1
575*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>&0	search/0x805c80/s \x6c\x03
576*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>&0		use 		help-ver-date
577*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>&4	leshort		!1
578*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>&0	search/0xb63480/s \x6c\x03
579*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>&0	use 		help-ver-date
580*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>&4	leshort		!1
581*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>&0	search/0xb7fe80/s \x6c\x03
582*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>&0	use 	help-ver-date
583*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>&4	leshort	!1
584*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>&0	search/0xb8ade0/s \x6c\x03
585*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>&0	use 		help-ver-date
586*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>&4	leshort	!1
587*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>>&0	search/0x371d4/s \x6c\x03
588*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>>>&0	use 	help-ver-date
589*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>>>&4	leshort	!1
590*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>>>>&0	search/0x371d4/s \x6c\x03
591*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>>>>>&0	use 	help-ver-date
592*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>>>>>&4	leshort	!1
593*ae316d1dSXin LI# https://sembiance.com/fileFormatSamples/document/multimediaViewerBook/arivideo.mvb
594*ae316d1dSXin LI>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>8	lelong	!0xFFffFFff		Windows Multimedia Viewer Book
595*ae316d1dSXin LI!:mime	application/x-winhelp
596*ae316d1dSXin LI!:ext	mvb
5973e41d09dSXin LI# repeat search again or following default line does not work
5983e41d09dSXin LI>>>>16			search/0x49AF/s	\x6c\x03
599*ae316d1dSXin LI# remaining files should be HeLP Bookmark WinHlp32.BMK (XP 32-bit) or WinHlp32 (Windows 7 8.1 64-bit)
600*ae316d1dSXin LI# typically found inside directory %LOCALAPPDATA%\Help
6013e41d09dSXin LI>>>>16	default				x	Windows help Bookmark
6023e41d09dSXin LI!:mime	application/x-winhelp
603*ae316d1dSXin LI!:ext	/bmk
604*ae316d1dSXin LI# DirectoryStart offset of FILEHEADER of internal directory
605*ae316d1dSXin LI#>4	lelong		x		\b, DirectoryStart %8.8x
606*ae316d1dSXin LI## FirstFreeBlock normally for *HLP FFFFFFFFh if no free list or 10h for *ANN
607*ae316d1dSXin LI#>>8	lelong			x		\b, FirstFreeBlock %#8.8x
6083e41d09dSXin LI## ReservedSpace normally 042Fh AFh for *.ANN
60943a5ec4eSXin LI#>>(4.l)	lelong		x		\b, ReservedSpace %#8.8x
6103e41d09dSXin LI## UsedSpace normally 0426h A6h for *.ANN
61143a5ec4eSXin LI#>>(4.l+4)	lelong		x		\b, UsedSpace %#8.8x
6123e41d09dSXin LI## FileFlags normally 04...
61343a5ec4eSXin LI#>>(4.l+5)	lelong		x		\b, FileFlags %#8.8x
6143e41d09dSXin LI## file header magic 0x293B
61543a5ec4eSXin LI#>>(4.l+9)	uleshort	x		\b, file header magic %#4.4x
6163e41d09dSXin LI## file header Flags		0x0402
61743a5ec4eSXin LI#>>(4.l+11)	uleshort	x		\b, file header Flags %#4.4x
6183e41d09dSXin LI## file header PageSize	0400h 80h for *.ANN
61943a5ec4eSXin LI#>>(4.l+13)	uleshort	x		\b, PageSize %#4.4x
6203e41d09dSXin LI## Structure[16]		z4
6213e41d09dSXin LI#>>(4.l+15)	string		>\0		\b, Structure_"%-.16s"
6223e41d09dSXin LI## MustBeZero			0
62343a5ec4eSXin LI#>>(4.l+31)	uleshort	x		\b, MustBeZero %#4.4x
6243e41d09dSXin LI## PageSplits
62543a5ec4eSXin LI#>>(4.l+33)	uleshort	x		\b, PageSplits %#4.4x
6263e41d09dSXin LI## RootPage
62743a5ec4eSXin LI#>>(4.l+35)	uleshort	x		\b, RootPage %#4.4x
6283e41d09dSXin LI## MustBeNegOne			0xffff
62943a5ec4eSXin LI#>>(4.l+37)	uleshort	x		\b, MustBeNegOne %#4.4x
6303e41d09dSXin LI## TotalPages			1
63143a5ec4eSXin LI#>>(4.l+39)	uleshort	x		\b, TotalPages %#4.4x
6323e41d09dSXin LI## NLevels			0x0001
63343a5ec4eSXin LI#>>(4.l+41)	uleshort	x		\b, NLevels %#4.4x
6343e41d09dSXin LI## TotalBtreeEntries
63543a5ec4eSXin LI#>>(4.l+43)	ulelong		x		\b, TotalBtreeEntries %#8.8x
6363e41d09dSXin LI## pages of the B+ tree
63743a5ec4eSXin LI#>>(4.l+47)	ubequad		x		\b, PageStart %#16.16llx
638*ae316d1dSXin LI# GRR: offset is not reachable in few samples like STMMHLP.MVB because probably damaged file
639*ae316d1dSXin LI# or DROID fmt-474-signature-id-748.hlp
640*ae316d1dSXin LI# or for example run file command with higher --parameter bytes=30335189
641*ae316d1dSXin LI>(4.l+9)	uleshort	!0x293B		MS Windows Multimedia Viewer Book
642*ae316d1dSXin LI#!:mime	application/octet-stream
643*ae316d1dSXin LI!:ext	mvb
644*ae316d1dSXin LI# GRR: next line is not executed!
645*ae316d1dSXin LI>>12	lelong			x		(damaged or use higher '-P bytes' option)
646*ae316d1dSXin LI# EntireFileSize; biggest 1551334 for CORELDRW.HLP 30335189 for viewerht.mvb; smallest 28672 for open.mvb
647*ae316d1dSXin LI>12	lelong			x		\b, %d bytes
648b6cee71dSXin LI
6493e41d09dSXin LI# start with colon or semicolon for comment line like Back2Life.cnt
6503e41d09dSXin LI0		regex		\^(:|;)
6513e41d09dSXin LI# look for first keyword Base
6523e41d09dSXin LI>0		search/45	:Base
6533e41d09dSXin LI>>&0				use 		cnt-name
6543e41d09dSXin LI# only solution to search again from beginning , because relative offsets changes when use is called
6553e41d09dSXin LI>0		search/45	:Base
6563e41d09dSXin LI>0		default		x
6573e41d09dSXin LI# look for other keyword Title like in putty.cnt
6583e41d09dSXin LI>>0		search/45	:Title
6593e41d09dSXin LI>>>&0				use 		cnt-name
6603e41d09dSXin LI#
6613e41d09dSXin LI# display mime type and name of Windows help Content source
6623e41d09dSXin LI0	name				cnt-name
6633e41d09dSXin LI# skip space at beginning
66440427ccaSGordon Tetlow>0     string		\040
6653e41d09dSXin LI# name without extension and greater character or name with hlp extension
666a4d6d3b8SXin LI>>1	regex/c		\^([^\xd>]*|.*\\.hlp)	MS Windows help file Content, based "%s"
6673e41d09dSXin LI!:mime	text/plain
6683e41d09dSXin LI!:apple	????TEXT
6693e41d09dSXin LI!:ext	cnt
670*ae316d1dSXin LI# URL:		https://en.wikipedia.org/wiki/WinHelp
671*ae316d1dSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/f/fts.trid.xml
672*ae316d1dSXin LI# Note:		called "Windows Help Full-Text Search index" by TrID
673d38c30c0SXin LI# Windows creates a full text search from hlp file, if the user clicks the "Find" tab and enables keyword indexing
6743e41d09dSXin LI0	string		tfMR			MS Windows help Full Text Search index
6753e41d09dSXin LI!:mime application/x-winhelp-fts
6763e41d09dSXin LI!:ext	fts
677*ae316d1dSXin LI# path of corresponding MS Windows help like: "C:\CDCREATR\creatr32.hlp" "C:\PROGRAMME\IPHOTO PLUS 4\PROGRAMS\Guide.hlp"
678*ae316d1dSXin LI>16	string		>\0			for "%s"
679*ae316d1dSXin LI# From:		Joerg Jenderek
680*ae316d1dSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/f/ftg-winhelp.trid.xml
681*ae316d1dSXin LI# Note:		called "Windows Help Full-Text search Group" by TrID
682*ae316d1dSXin LI0	string		gfMR			MS Windows help Full Text search Group
683*ae316d1dSXin LI!:mime application/x-winhelp-ftg
684*ae316d1dSXin LI!:ext	ftg
685*ae316d1dSXin LI# path of corresponding FTS like: "C:\Windows\Help\winhlp32.FTS"
6863e41d09dSXin LI>16	string		>\0			for "%s"
687b6cee71dSXin LI
688b6cee71dSXin LI# Summary: Hyper terminal
689b6cee71dSXin LI# Created by: unknown
690898496eeSXin LI# Update:	Joerg Jenderek
691898496eeSXin LI# URL:		https://en.wikipedia.org/wiki/HyperACCESS
692898496eeSXin LI#		https://www.hilgraeve.com/hyperterminal/
693898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/h/ht.trid.xml
694898496eeSXin LI# Note:		called "HyperTerminal data file" by TrID and "HyperTerminal File" on English Windows
69540427ccaSGordon Tetlow0	string		HyperTerminal\040
696898496eeSXin LI>14	string		1.0\ --\ HyperTerminal\ data\ file	MS Windows HyperTerminal profile
697898496eeSXin LI#!:mime	application/octet-stream
698898496eeSXin LI!:mime	application/x-ms-ht
699898496eeSXin LI!:ext	ht
700b6cee71dSXin LI
70148c779cdSXin LI# https://ithreats.files.wordpress.com/2009/05/\040
702b6cee71dSXin LI# lnk_the_windows_shortcut_file_format.pdf
703b6cee71dSXin LI# Summary: Windows shortcut
704b6cee71dSXin LI# Created by: unknown
705898496eeSXin LI# Update:	Joerg Jenderek
706898496eeSXin LI# URL:		http://fileformats.archiveteam.org/wiki/Windows_Shortcut
707898496eeSXin LI#		https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/
708898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/l/lnk-shortcut.trid.xml
709898496eeSXin LI#		https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-SHLLINK/%5bMS-SHLLINK%5d.pdf
710898496eeSXin LI# Note:		called "Windows Shortcut" by TrID, "Microsoft Windows Shortcut" by DROID via PUID x-fmt/428 and "Windows shortcut file" by ./msdos (v 1.158)
711898496eeSXin LI# 		partly verified by command like `lnkinfo AOL.lnk`
712b6cee71dSXin LI# 'L' + GUUID
713898496eeSXin LI# HeaderSize + LinkCLSID 00021401-0000-0000-C000-000000000046
714b6cee71dSXin 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
715a4d6d3b8SXin LI!:mime	application/x-ms-shortcut
716a4d6d3b8SXin LI!:ext	lnk
717898496eeSXin LI# LinkFlags
718898496eeSXin LI# HasLinkTargetIDList; if set a LinkTargetIDList structure MUST follow the ShellLinkHeader; If is not set, structure MUST NOT be present
719b6cee71dSXin LI>20	lelong&1	1	\b, Item id list present
720898496eeSXin LI# HasLinkInfo; if set a LinkInfo structure MUST follow the ShellLinkHeader or LinkTargetIDList; If is not set, structure MUST NOT be present
721b6cee71dSXin LI>20	lelong&2	2	\b, Points to a file or directory
722b6cee71dSXin LI>20	lelong&4	4	\b, Has Description string
723b6cee71dSXin LI>20	lelong&8	8	\b, Has Relative path
724b6cee71dSXin LI>20	lelong&16	16	\b, Has Working directory
725b6cee71dSXin LI>20	lelong&32	32	\b, Has command line arguments
726b6cee71dSXin LI>20	lelong&64	64	\b, Icon
727898496eeSXin LI# IconIndex
7289ce06829SXin LI>>56	lelong		x	\b number=%d
729898496eeSXin LI# IsUnicode; If set then StringData section contains Unicode-encoded strings
730898496eeSXin LI>20	lelong&128	128	\b, Unicoded
731898496eeSXin LI# ForceNoLinkInfo; LinkInfo structure is ignored
732898496eeSXin LI>20	lelong&256	256	\b, NoLinkInfo
733898496eeSXin LI# HasExpString; with an EnvironmentVariableDataBlock
734898496eeSXin LI>20	lelong&512	512	\b, HasEnvironment
735898496eeSXin LI# look for BlockSize 314h and EnvironmentVariableDataBlock BlockSignature A0000001h
736898496eeSXin LI>>76	search/1972		\x14\x03\x00\x00\x01\x00\x00\xa0
737898496eeSXin LI# TargetAnsi (260 bytes); NULL-terminated path to environment variable encoded with system default code page
738898496eeSXin LI#>>>&0	string		x	'%s'
739898496eeSXin LI# TargetUnicode (520 bytes): optional NULL-terminated path to same environment variable Unicode encoded
740898496eeSXin LI# like: "%windir%\system32\calc.exe"
741898496eeSXin LI>>>&260	lestring16	x	"%s"
742898496eeSXin LI# RunInSeparateProcess; run in a separate virtual machine when launching a 16-bit application; no examples found
743898496eeSXin LI>20	lelong&1024	1024	\b, RunInSeparateProcess
744898496eeSXin LI# Unused1; undefined and MUST be ignored
745898496eeSXin LI#>20	lelong&2048	2048	\b, Unused1
746898496eeSXin LI# HasDarwinID; with a DarwinDataBlock
747898496eeSXin LI>20	lelong&4096	4096	\b, HasDarwinID
748898496eeSXin LI# look for BlockSize 314h and DarwinDataBlock BlockSignature A0000006h
749898496eeSXin LI>>76	search/1972		\x14\x03\x00\x00\x06\x00\x00\xa0
750898496eeSXin LI# DarwinDataAnsi (260 bytes); NULL-terminated application identifier encoded with system default code page; SHOULD be ignored
751898496eeSXin LI#>>>&0	string		x	'%s'
752898496eeSXin LI# DarwinDataUnicode (520 bytes); NULL-terminated application identifier Unicode encoded
753898496eeSXin LI>>>&260	lestring16	x	"%s"
754898496eeSXin LI# RunAsUser; target application is run as a different user
755898496eeSXin LI>20	lelong&8192	8192	\b, RunAsUser
756898496eeSXin LI# HasExpIcon; with an IconEnvironmentDataBlock
757898496eeSXin LI>20	lelong&16384	16384	\b, HasExpIcon
758898496eeSXin LI# look for BlockSize 314h and IconEnvironmentDataBlock BlockSignature A0000007h
759898496eeSXin LI>>76	search/1972		\x14\x03\x00\x00\x07\x00\x00\xa0
760898496eeSXin LI# TargetAnsi (260 bytes); NULL-terminated path to environment icon variable encoded with system default code page
761898496eeSXin LI#>>>&0	string		x	'%s'
762898496eeSXin LI# TargetUnicode (520 bytes); optional NULL-terminated path to same icon environment variable Unicode encoded
763898496eeSXin LI# like: "%SystemDrive%\Program Files\YaCy\addon\YaCy.ico"
764898496eeSXin LI>>>&260	lestring16	x	"%s"
765898496eeSXin LI# NoPidlAlias; represented in the shell namespace; no examples found
766898496eeSXin LI>20	lelong&32768	32768	\b, NoPidlAlias
767898496eeSXin LI# Unused2; undefined and MUST be ignored
768898496eeSXin LI#>20	lelong&65536	65536	\b, Unused2
769898496eeSXin LI# RunWithShimLayer; with a ShimDataBlock; no examples found
770898496eeSXin LI>20	lelong&131072	131072	\b, RunWithShimLayer
771898496eeSXin LI# ForceNoLinkTrack; TrackerDataBlock is ignored; no examples found
772898496eeSXin LI>20	lelong&262144	262144	\b, ForceNoLinkTrack
773898496eeSXin LI>20	lelong&262144	0
774898496eeSXin LI# look for BlockSize 60h, TrackerDataBlock BlockSignature A0000003h, it length 58h and Version 0
775898496eeSXin LI>>76	search/1972		\x60\x00\x00\x00\x03\x00\x00\xa0\x58\x00\x00\x00\0\0\0\0
776898496eeSXin LI# MachineID (16 bytes); a NULL-terminated NetBIOS name encoded with system default code page of the machine
777898496eeSXin LI>>>&0	string		x			\b, MachineID %0.16s
778898496eeSXin LI# Droid (32 bytes)
779898496eeSXin LI#
780898496eeSXin LI# DroidBirth (32 bytes)
781898496eeSXin LI#
782898496eeSXin LI# EnableTargetMetadata; collect target properties and store in PropertyStoreDataBlock
783898496eeSXin LI>20	lelong&524288	524288	\b, EnableTargetMetadata
784898496eeSXin LI# look for BlockSize >= Ch, PropertyStoreDataBlock BlockSignature A0000009h
785898496eeSXin LI#>>76	search/1972		\x00\x00\x09\x00\x00\xa0
786898496eeSXin LI# PropertyStore (variable)
787898496eeSXin LI#
788898496eeSXin LI# DisableLinkPathTracking; EnvironmentVariableDataBlock is ignored; no examples found
789898496eeSXin LI>20	lelong&1048576	1048576	\b, DisableLinkPathTracking
790898496eeSXin LI# DisableKnownFolderTracking; SpecialFolderDataBlock and KnownFolderDataBlock are ignored and not saved
791898496eeSXin LI>20	lelong&2097152	2097152	\b, DisableKnownFolderTracking
792898496eeSXin LI>20	lelong&2097152	0
793898496eeSXin LI# look for BlockSize 1Ch and KnownFolderDataBlock BlockSignature A000000Bh
794898496eeSXin LI>>76	search/1972		\x1c\x00\x00\x00\x0B\x00\x00\xa0
795898496eeSXin LI# https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/known-folder-guids-for-file-dialog-custom-places
796898496eeSXin LI# KnownFolderID specifies the folder GUID ID
797898496eeSXin LI# ProgramFiles				905E63B6-C1BF-494E-B29C-65B732D3D21A
798898496eeSXin LI# ProgramFilesX86			7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E
799898496eeSXin LI>>>&0	guid	x			KnownFolderID %s
800898496eeSXin LI# DisableKnownFolderAlias; unaliased form of the known folder IDList SHOULD be used; no examples found
801898496eeSXin LI>20	lelong&4194304	4194304	\b, DisableKnownFolderAlias
802898496eeSXin LI# AllowLinkToLink; link that references another link is enabled; no examples found
803898496eeSXin LI>20	lelong&8388608	8388608	\b, AllowLinkToLink
804898496eeSXin LI# UnaliasOnSave; unaliased form of that known folder or the target IDList SHOULD be used; no examples found
805898496eeSXin LI>20	lelong&16777216 16777216	\b, UnaliasOnSave
806898496eeSXin LI# PreferEnvironmentPath; path specified in the EnvironmentVariableDataBlock SHOULD be used
807898496eeSXin LI>20	lelong&33554432	33554432	\b, PreferEnvironmentPath
808898496eeSXin LI# KeepLocalIDListForUNCTarget; UNC name SHOULD be stored in local path IDList in PropertyStoreDataBlock; no examples found
809898496eeSXin LI>20	lelong&67108864	67108864	\b, KeepLocalIDListForUNCTarget
810898496eeSXin LI# FileAttributes
811b6cee71dSXin LI>24	lelong&1	1	\b, Read-Only
812b6cee71dSXin LI>24	lelong&2	2	\b, Hidden
813b6cee71dSXin LI>24	lelong&4	4	\b, System
814898496eeSXin LI# Reserved1; MUST be zero
815898496eeSXin LI>24	lelong&8	8	\b, Reserved1
816b6cee71dSXin LI>24	lelong&16	16	\b, Directory
817b6cee71dSXin LI>24	lelong&32	32	\b, Archive
818898496eeSXin LI# Reserved2; MUST be zero
819898496eeSXin LI>24	lelong&64	64	\b, Reserved2
820b6cee71dSXin LI>24	lelong&128	128	\b, Normal
821b6cee71dSXin LI>24	lelong&256	256	\b, Temporary
822898496eeSXin LI# no examples found
823b6cee71dSXin LI>24	lelong&512	512	\b, Sparse
824898496eeSXin LI# no examples found
825b6cee71dSXin LI>24	lelong&1024	1024	\b, Reparse point
826b6cee71dSXin LI>24	lelong&2048	2048	\b, Compressed
827b6cee71dSXin LI>24	lelong&4096	4096	\b, Offline
828898496eeSXin LI# FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; contents need to be indexed
829898496eeSXin LI>24	lelong&8192	8192	\b, NeedIndexed
830898496eeSXin LI# FILE_ATTRIBUTE_ENCRYPTED; file or directory is encrypted
831898496eeSXin LI>24	lelong&16384	16384	\b, Encrypted
832898496eeSXin LI# value zero means there is no time set on the target
833898496eeSXin LI>28	leqwdate	!0	\b, ctime=%s
834898496eeSXin LI# Access time of target in UTC
835898496eeSXin LI>36	leqwdate	!0	\b, atime=%s
836898496eeSXin LI# write time of target in UTC
837898496eeSXin LI>44	leqwdate	!0	\b, mtime=%s
838898496eeSXin LI# FileSize; 32 bit size of target in bytes
839b6cee71dSXin LI>52	lelong		x	\b, length=%u, window=
840898496eeSXin LI# ShowCommand; 1~SW_SHOWNORMAL 3~SW_SHOWMAXIMIZED HerzlichMEDION.lnk 7~SW_SHOWMINNOACTIVE YaCy.lnk Privoxy.lnk; All other values like 2 MUST be treated as SW_SHOWNORMAL
841898496eeSXin LI#>60	lelong		x	ShowCommand=%#x
842898496eeSXin LI>60	lelong		x
843898496eeSXin LI>>60	lelong		3	\bshowmaximized
844898496eeSXin LI>>60	lelong		7	\bshowminnoactive
845898496eeSXin LI>>60	default		x	\bnormal
846898496eeSXin LI# Hotkey
847898496eeSXin LI>64	uleshort	>0	\b, hot key
848898496eeSXin LI# 41h~A 42h~B ...
849898496eeSXin LI>>64	ubyte		x	%c
850898496eeSXin LI# modifier keys: 0x01~HOTKEYF_SHIFT 0x02~HOTKEYF_CONTROL 0x04~HOTKEYF_ALT
851898496eeSXin LI>>65	ubyte&1		1	\b+SHIFT
852898496eeSXin LI>>65	ubyte&2		2	\b+CONTROL
853898496eeSXin LI>>65	ubyte&4		4	\b+ALT
854898496eeSXin LI# Reserved; MUST be zero
855898496eeSXin LI#>66	uleshort	!0	\b, reserved %#x
856898496eeSXin LI# Reserved2; MUST be zero
857898496eeSXin LI#>68	ulelong		!0	\b, reserved2 %#x
858898496eeSXin LI# Reserved3; MUST be zero
859898496eeSXin LI#>72	ulelong		!0	\b, reserved3 %#x
860898496eeSXin LI# optional LINKTARGET_IDLIST if LinkFlags bit HasLinkTargetIDList is set
861898496eeSXin LI>20	lelong&1	1
862898496eeSXin LI# IDListSize; size of IDList
863898496eeSXin LI>>76	uleshort	x	\b, IDListSize %#4.4x
864898496eeSXin LI# 1st item
865898496eeSXin LI>>78	use		lnk-item
866898496eeSXin LI# 2nd possible item
867898496eeSXin LI>>(78.s+78)	uleshort	>0
868898496eeSXin LI>>>(78.s+78)	use			lnk-item
869898496eeSXin LI# 3rd possible item
870898496eeSXin LI>>>&(&-2.s-2)	uleshort	>0
871898496eeSXin LI>>>>&-2		use			lnk-item
872898496eeSXin LI# 4th possible item
873898496eeSXin LI>>>>&(&-2.s-2)	uleshort	>0
874898496eeSXin LI>>>>>&-2	use			lnk-item
875898496eeSXin LI# Because HasLinkInfo is set, a LinkInfo structure follows
876898496eeSXin LI>20	lelong&2	2
877898496eeSXin LI# if no LINKTARGET_IDLIST (no HasLinkTargetIDList) then direct after header; no example found
878898496eeSXin LI>>20	lelong&1	=0
879898496eeSXin LI>>>76	use			lnk-info
880898496eeSXin LI# if LINKTARGET_IDLIST (HasLinkTargetIDList) then after LINKTARGET_IDLIST by addtional IDListSize bytes
881898496eeSXin LI>>20	lelong&1	=1
882898496eeSXin LI>>>76	uleshort	>0
883898496eeSXin LI#>>>>(76.s+78)	use		lnk-info
884898496eeSXin LI>>>>(76.s+78)	ubelong	x
885898496eeSXin LI# move pointer to beginnig of LinkInfo structure
886898496eeSXin LI>>>>>&-8	ubelong	x
887898496eeSXin LI#>>>>>>&16	ulelong	x	\b, LocalBasePathOffset=%#8.8x
888898496eeSXin LI>>>>>>&(&16.l) string	x	\b, LocalBasePath "%s"
889898496eeSXin LI# check and then display link item (size,data)
890898496eeSXin LI0	name		lnk-item
891898496eeSXin LI# size value 0x0000 means TerminalID; indicates the end of the item IDs list
892898496eeSXin LI>0	uleshort	>0
893898496eeSXin LI#>>0	uleshort	x	\b, ItemIDSize %#4.4x
894898496eeSXin LI# item Data
895898496eeSXin LI#>>2	ubequad		x	\b, Item data=%#16.16llx
896898496eeSXin LI#>>2	ubyte		x	\b, Item type=%#x
897898496eeSXin LI>>2	ubyte		=0x1f	\b, Root folder
898898496eeSXin LI# like:	"26EE0668-A00A-44D7-9371-BEB064C98683"	Control Panel
899898496eeSXin LI#	"20D04FE0-3AEA-1069-A2D8-08002B30309D"	My Computer
900898496eeSXin LI#	"871C5380-42A0-1069-A2EA-08002B30309D"	Internet Explorer
901898496eeSXin LI>>>4	guid		x	"%s"
902898496eeSXin LI>>2	ubyte		=0x2f	\b, Volume
903898496eeSXin LI# like: "C:\" "D:\"
904898496eeSXin LI>>>3	string		x	"%s"
905898496eeSXin LI# Control panel category
906898496eeSXin LI#>>2	ubyte		foo	\b, Control panel category
907898496eeSXin LI# display LinkInfo structure (size,flags,offsets)
908898496eeSXin LI0	name		lnk-info
909898496eeSXin LI# LinkInfoSize; size of the LinkInfo structure
910898496eeSXin LI>0	ulelong		x	\b, LinkInfoSize %#x
911898496eeSXin LI# LinkInfoHeaderSize; if 1C no optional fields; >=24 optional fields are specified
912898496eeSXin LI>4	ulelong		x	\b, LinkInfoHeaderSize %#x
913898496eeSXin LI# LinkInfoFlags;
914898496eeSXin LI#>8	ulelong	 	x	\b, LinkInfoFlags=%#x
915898496eeSXin LI>8	ulelong&1 	1	\b, VolumeIDAndLocalBasePath
916898496eeSXin LI# VolumeIDOffset; location of the VolumeID field (VolumeIDSize DriveType DriveSerialNumber VolumeLabelOffset ... ) inside LinkInfo structure
917898496eeSXin LI>>12	ulelong	  	x	\b, VolumeIDOffset %#x
918898496eeSXin LI# LocalBasePathOffset; location of LocalBasePath field like "C:\test\a.txt" inside LinkInfo structure
919898496eeSXin LI>>16	ulelong		x	\b, LocalBasePathOffset %#x
920898496eeSXin LI# LocalBasePathOffsetUnicode; location of the LocalBasePathUnicode field inside LinkInfo structure
921898496eeSXin LI>>4	ulelong		>23
922898496eeSXin LI>>>28	ulelong		x	\b, LocalBasePathOffsetUnicode %#x
923898496eeSXin LI>8	ulelong&2 	2	\b, CommonNetworkRelativeLinkAndPathSuffix
924898496eeSXin LI# CommonNetworkRelativeLinkOffset; location of the CommonNetworkRelativeLink field inside LinkInfo structure
925898496eeSXin LI>>20	ulelong		x	\b, CommonNetworkRelativeLinkOffset %#x
926898496eeSXin LI# CommonPathSuffixOffset; location of CommonPathSuffix field
927898496eeSXin LI>24	ulelong		x	\b, CommonPathSuffixOffset %#x
928898496eeSXin LI# CommonPathSuffixOffsetUnicode; location of CommonPathSuffixUnicode field inside LinkInfo structure
929898496eeSXin LI>4	ulelong		>23
930898496eeSXin LI>>32	ulelong		x	\b, CommonPathSuffixOffsetUnicode %#x
931b6cee71dSXin LI
932b6cee71dSXin LI# Summary: Outlook Personal Folders
933b6cee71dSXin LI# Created by: unknown
934a2dfb722SXin LI# Update:	Joerg Jenderek
935a2dfb722SXin LI# URL:		http://fileformats.archiveteam.org/wiki/Personal_Folder_File
936a2dfb722SXin LI#		https://en.wikipedia.org/wiki/Personal_Storage_Table
937a2dfb722SXin LI# Reference:	https://interoperability.blob.core.windows.net/files/MS-PST/%5bMS-PST%5d.pdf
938a2dfb722SXin LI#		http://mark0.net/download/triddefs_xml.7z/defs/p/pab.trid.xml
939a2dfb722SXin LI# dwMagic !BDN
940a2dfb722SXin LI0	lelong		0x4E444221
941a2dfb722SXin LI# skip DROID x-fmt-75-signature-id-472.pab x-fmt-248-signature-id-260.pst x-fmt-249-signature-id-261.pst
942a2dfb722SXin LI# by check for existance of bPlatformCreate value
943a2dfb722SXin LI>14	ubyte	x		Microsoft Outlook
944a2dfb722SXin LI#!:mime		application/octet-stream
945a2dfb722SXin LI# NOT official registered !
946a2dfb722SXin LI!:mime		application/vnd.ms-outlook
947a2dfb722SXin LI# dwCRCPartial; 32-bit cyclic redundancy check (CRC) value of followin 471 bytes; zero for 64-bit
948a2dfb722SXin LI#>>4	ulelong		!0			\b, CRC %#x
949a2dfb722SXin LI# wMagicClient; AB (4142h) is used for PAB files; SM (534Dh) is used for PST files; SO (534Fh) is used for OST files
950a2dfb722SXin LI#>>8	leshort		x			\b, wMagicClient=%#x
951a2dfb722SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/p/pab.trid.xml
952a2dfb722SXin LI# Note:		called "Microsoft Personal Address Book" by TrID and
953a2dfb722SXin LI#		"Microsoft Outlook Personal Address Book" by DROID via x-fmt/75
954a2dfb722SXin LI>>8	leshort		0x4142			Personal Address Book
955a2dfb722SXin LI#!:mime	application/x-ms-pab
956a2dfb722SXin LI!:ext	pab
957a2dfb722SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/p/pst.trid.xml
958a2dfb722SXin LI#		http://mark0.net/download/triddefs_xml.7z/defs/p/pst-unicode.trid.xml
959a2dfb722SXin LI# Note:		called "Microsoft OutLook Personal Folder" by TrID and
960a2dfb722SXin LI#		by DROID via x-fmt/248 for ANSI and via x-fmt/249 for Unicode
961a2dfb722SXin LI#>>8	leshort		0x4D53			\b, PST~
962a2dfb722SXin LI# called "Microsoft Outlook email folder" in ./windows version 1.37 and older
963a2dfb722SXin LI>>8	leshort		0x4D53			Personal Storage
964a2dfb722SXin LI#!:mime	application/x-ms-pst
965a2dfb722SXin LI!:ext	pst
966a2dfb722SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/o/ost.trid.xml
967a2dfb722SXin LI# Note:		called "Outlook Exchange Offline Storage" by TrID
968a2dfb722SXin LI>>8	leshort		0x4F53			Offline Storage
969a2dfb722SXin LI#!:mime	application/x-ms-ost
970a2dfb722SXin LI!:ext	ost
971a2dfb722SXin LI# wVer; file format version. 14 or 15 if the file is ANSI; > 21 or 23(=17h) if Unicode; 37 for written by Outlook with WIP
972a2dfb722SXin LI>>10	uleshort	x			(
973a2dfb722SXin LI# probably NO intermediate versions exist
974a2dfb722SXin LI>>10	leshort		<0x10			\b<=2002, ANSI,
975a2dfb722SXin LI>>10	leshort		>0x14			\b>=2003, Unicode,
976a2dfb722SXin LI>>10	uleshort	x			version %u)
977a2dfb722SXin LI# wVerClient; client file format version like: 19 22
978a2dfb722SXin LI#>>12	uleshort	x			\b, wVerClient=%u
979a2dfb722SXin LI# bPlatformCreate; This value MUST be set to 1 but also found 2
980a2dfb722SXin LI>>14	ubyte		>1			\b, bPlatformCreate=%u
981a2dfb722SXin LI# bPlatformAccess; This value MUST be set to 1 but also found 2
982a2dfb722SXin LI>>15	ubyte		>1			\b, bPlatformAccess=%u
983a2dfb722SXin LI# dwReserved1; SHOULD ignore and NOT modify this value; SHOULD initialize to zero
984a2dfb722SXin LI>>16	ulelong		!0			\b, dwReserved1=%#x
985a2dfb722SXin LI# dwReserved2; SHOULD ignore and NOT modify this value; SHOULD initialize to zero
986a2dfb722SXin LI>>20	ulelong		!0			\b, dwReserved2=%#x
987a2dfb722SXin LI# ANSI 32-bit variant Outlook 1997-2002
988a2dfb722SXin LI>>10	uleshort	<16
989a2dfb722SXin LI# bidNextB; next BlockID (ANSI 4 bytes)
990a2dfb722SXin LI#>>>24		ulelong	!0			\b, bidNextB=%#x
991a2dfb722SXin LI# bidNextP; Next available back BlockID pointer
992a2dfb722SXin LI#>>>28		ulelong	!0			\b, bidNextP=%#x
993a2dfb722SXin LI# dwUnique; value monotonically increased when modifying PST; so CRC is changing
994a2dfb722SXin LI>>>32		ulelong	!0			\b, dwUnique=%#x
995a2dfb722SXin LI# rgnid[128]; A fixed array of 32 NodeIDs, each corresponding to one of the 32 possible NID_TYPEs
996a2dfb722SXin LI#>>>36		ubequad	x			\b, rgnid=%#llx...
997a2dfb722SXin LI# dwReserved; Implementations SHOULD ignore this value and SHOULD NOT modify it; Initialized zero
998a2dfb722SXin LI>>>164		ulelong	!0			\b, dwReserved=%#x
999a2dfb722SXin LI# ibFileEof; the size of the PST file, in bytes (ANSI 4 bytes)
1000a2dfb722SXin LI>>>168		ulelong	x			\b, %u bytes
1001a2dfb722SXin LI# ibAMapLast; offset to the last AMap page
1002a2dfb722SXin LI#>>>172		ulelong	x			\b, ibAMapLast=%#x
1003a2dfb722SXin LI# bSentinel; MUST be set to 0x80
1004a2dfb722SXin LI>>>460		ubyte	!0x80			\b, bSentinel=%#x
1005a2dfb722SXin LI# bCryptMethod: 0~No encryption 1~encryption with permutation 2~encryption with cyclic 16~encryption with Windows Information Protection (WIP)
1006a2dfb722SXin LI>>>461		ubyte	>0			\b, bCryptMethod=%u
1007a2dfb722SXin LI# UNICODE 64-bit variant Outlook 2003-2007
1008a2dfb722SXin LI>>10	uleshort >20
1009a2dfb722SXin LI# bidUnused; Unused 8 bytes padding (Unicode only); sometimes like: 0x0000000100000004
1010a2dfb722SXin LI>>>24		ulequad	!0x0000000100000004	\b, bidUnused=%#16.16llx
1011a2dfb722SXin LI# dwUnique; value monotonically increased when modifying PST; so CRC is changing
1012a2dfb722SXin LI>>>40		ulelong	!0			\b, dwUnique=%#x
1013a2dfb722SXin LI# rgnid[] (128 bytes): A fixed array of 32 NIDs, each corresponding to one of the 32 possible
1014a2dfb722SXin LI#>>>44		ubequad	x			\b, rgnid=%#llx...
1015a2dfb722SXin LI# ibFileEof; the size of the PST file, in bytes (Unicode 8 bytes)
1016a2dfb722SXin LI>>>184		ulequad	x			\b, %llu bytes
1017a2dfb722SXin LI# bSentinel; MUST be set to 0x80
1018a2dfb722SXin LI>>>512		ubyte	!0x80			\b, bSentinel=%#x
1019a2dfb722SXin LI# bCryptMethod; Encryption type like: 0 1 2 16
1020a2dfb722SXin LI>>>513		ubyte	>0			\b, bCryptMethod=%u
1021a2dfb722SXin LI# dwCRC; 32-bit CRC of the of the previous 516 bytes
1022a2dfb722SXin LI>>>524		ulelong		x		\b, CRC32 %#x
1023b6cee71dSXin LI
1024b6cee71dSXin LI
1025b6cee71dSXin LI# Summary: Windows help cache
1026b6cee71dSXin LI# Created by: unknown
1027b6cee71dSXin LI0	string		\164\146\115\122\012\000\000\000\001\000\000\000	MS Windows help cache
1028b6cee71dSXin LI
1029b6cee71dSXin LI
1030b6cee71dSXin LI# Summary: IE cache file
1031b6cee71dSXin LI# Created by: Christophe Monniez
1032b6cee71dSXin LI0	string	Client\ UrlCache\ MMF 	Internet Explorer cache file
1033b6cee71dSXin LI>20	string	>\0			version %s
1034b6cee71dSXin LI
1035b6cee71dSXin LI
1036b6cee71dSXin LI# Summary: Registry files
1037b6cee71dSXin LI# Created by: unknown
1038b6cee71dSXin LI# Modified by (1): Joerg Jenderek
1039b6cee71dSXin LI0	string		regf		MS Windows registry file, NT/2000 or above
1040b6cee71dSXin LI0	string		CREG		MS Windows 95/98/ME registry file
1041b6cee71dSXin LI0	string		SHCC3		MS Windows 3.1 registry file
1042b6cee71dSXin LI
1043b6cee71dSXin LI
1044b6cee71dSXin LI# Summary: Windows Registry text
104558a0f0d0SEitan Adler# URL: https://en.wikipedia.org/wiki/Windows_Registry#.REG_files
104658a0f0d0SEitan Adler# Reference: http://fileformats.archiveteam.org/wiki/Windows_Registry
1047b6cee71dSXin LI# Submitted by: Abel Cheung <abelcheung@gmail.com>
104858a0f0d0SEitan Adler# Update: Joerg Jenderek
104958a0f0d0SEitan Adler#		Windows 3-9X variant
105058a0f0d0SEitan Adler0	string		REGEDIT
105158a0f0d0SEitan Adler# skip ASCII text like "REGEDITor.txt" but match
105258a0f0d0SEitan Adler# L1WMAP.REG with only 1 CRNL or org.gnome.gnumeric.reg with 2 NL
105358a0f0d0SEitan Adler>7	search/3	\n			Windows Registry text
105458a0f0d0SEitan Adler!:mime	text/x-ms-regedit
105558a0f0d0SEitan Adler!:ext	reg
105658a0f0d0SEitan Adler#		Windows 9X variant
105758a0f0d0SEitan Adler>>0	string		REGEDIT4		(Win95 or above)
105858a0f0d0SEitan Adler#		Windows 2K ANSI variant
105958a0f0d0SEitan Adler0	string		Windows\ Registry\ Editor\
1060b6cee71dSXin LI>&0	string		Version\ 5.00\r\n\r\n	Windows Registry text (Win2K or above)
106158a0f0d0SEitan Adler!:mime	text/x-ms-regedit
106258a0f0d0SEitan Adler!:ext	reg
106358a0f0d0SEitan Adler#		Windows 2K UTF-16 variant
106458a0f0d0SEitan Adler2	lestring16	Windows\ Registry\ Editor\
106558a0f0d0SEitan Adler>0x32	lestring16	Version\ 5.00\r\n\r\n	Windows Registry little-endian text (Win2K or above)
106658a0f0d0SEitan Adler# relative offset not working
106758a0f0d0SEitan Adler#>&0	lestring16	Version\ 5.00\r\n\r\n	Windows Registry little-endian text (Win2K or above)
106858a0f0d0SEitan Adler!:mime	text/x-ms-regedit
106958a0f0d0SEitan Adler!:ext	reg
107058a0f0d0SEitan Adler#		WINE variant
107158a0f0d0SEitan Adler# URL: https://en.wikipedia.org/wiki/Wine_(software)
107258a0f0d0SEitan Adler# Reference: https://www.winehq.org/pipermail/wine-cvs/2005-October/018763.html
107358a0f0d0SEitan Adler# Note:	WINE use text based registry (system.reg,user.reg,userdef.reg)
107458a0f0d0SEitan Adler#	instead binary hiv structure like Windows
107558a0f0d0SEitan Adler0	string	WINE\ REGISTRY\ Version\ 	WINE registry text
107658a0f0d0SEitan Adler# version 2
107758a0f0d0SEitan Adler>&0	string	x				\b, version %s
107858a0f0d0SEitan Adler!:mime	text/x-wine-extension-reg
107958a0f0d0SEitan Adler!:ext	reg
1080b6cee71dSXin LI
108158a0f0d0SEitan Adler# Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013, Feb 2018
1082c2931133SXin LI# empty ,comment , section
1083c2931133SXin LI# PR/383: remove unicode BOM because it is not portable across regex impls
108458a0f0d0SEitan Adler#0	regex/s		\\`(\\r\\n|;|[[])
108558a0f0d0SEitan Adler# empty line CRLF
108658a0f0d0SEitan Adler0	ubeshort	0x0D0A
108758a0f0d0SEitan Adler>0	use		ini-file
1088a4d6d3b8SXin LI# comment line starting with semicolon
108958a0f0d0SEitan Adler0	string		;
1090a4d6d3b8SXin LI# look for phrase of Windows policy ADMinistrative template (with starting remark)
1091a4d6d3b8SXin LI# like: WINDOW_95_CD/TOOLS/RESKIT/netadmin/poledit/conf.adm
1092a4d6d3b8SXin LI>1	search/3548	END\040CATEGORY
1093a4d6d3b8SXin LI# ADM with remark (by adm-rem.trid.xml) already done by generic ASCII variant
1094a4d6d3b8SXin LI# if no Windows policy ADMinistrative template then Windows INItialization
1095a4d6d3b8SXin LI>1	default		x
1096a4d6d3b8SXin LI>>0	use		ini-file
1097a4d6d3b8SXin LI# section line starting with left bracket
109858a0f0d0SEitan Adler0	string		[
109958a0f0d0SEitan Adler>0	use		ini-file
110058a0f0d0SEitan Adler# check and then display Windows INItialization configuration
110158a0f0d0SEitan Adler0	name		ini-file
110258a0f0d0SEitan Adler# look for left bracket in section line
110358a0f0d0SEitan Adler>0	search/8192	[
110448c779cdSXin LI# https://en.wikipedia.org/wiki/Autorun.inf
110548c779cdSXin LI# https://msdn.microsoft.com/en-us/library/windows/desktop/cc144200.aspx
110658a0f0d0SEitan Adler# space after right bracket
110758a0f0d0SEitan Adler# or AutoRun.Amd64 for 64 bit systems
110858a0f0d0SEitan Adler# or only NL separator
1109a4d6d3b8SXin LI>>&0	regex/c		\^autorun
111058a0f0d0SEitan Adler# but sometimes total commander directory tree file "treeinfo.wc" with lines like
111158a0f0d0SEitan Adler# [AUTORUN]
111258a0f0d0SEitan Adler# [boot]
111358a0f0d0SEitan Adler>>>&0	string		=]\r\n[					Total commander directory treeinfo.wc
111458a0f0d0SEitan Adler!:mime text/plain
111558a0f0d0SEitan Adler!:ext	wc
1116b6cee71dSXin LI# From: Pal Tamas <folti@balabit.hu>
1117b6cee71dSXin LI# Autorun File
111858a0f0d0SEitan Adler>>>&0	string		!]\r\n[					Microsoft Windows Autorun file
1119b6cee71dSXin LI!:mime application/x-setupscript
112058a0f0d0SEitan Adler!:ext	inf
112148c779cdSXin LI# https://msdn.microsoft.com/en-us/library/windows/hardware/ff549520(v=vs.85).aspx
1122b6cee71dSXin LI# version strings ASCII coded case-independent for Windows setup information script file
1123b6cee71dSXin LI>>&0	regex/c		\^(version|strings)]				Windows setup INFormation
1124b6cee71dSXin LI!:mime	application/x-setupscript
1125b6cee71dSXin LI#!:mime application/x-wine-extension-inf
112658a0f0d0SEitan Adler!:ext	inf
112758a0f0d0SEitan Adler# NETCRC.INF OEMCPL.INF
1128b6cee71dSXin LI>>&0	regex/c		\^(WinsockCRCList|OEMCPL)]			Windows setup INFormation
112958a0f0d0SEitan Adler!:mime	application/x-setupscript
113058a0f0d0SEitan Adler!:ext	inf
1131b6cee71dSXin LI# http://www.winfaq.de/faq_html/Content/tip2500/onlinefaq.php?h=tip2653.htm
113248c779cdSXin LI# https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102.aspx
1133b6cee71dSXin LI# .ShellClassInfo DeleteOnCopy LocalizedFileNames ASCII coded case-independent
1134a4d6d3b8SXin LI>>&0	regex/1024c	\^(\\.ShellClassInfo|DeleteOnCopy|LocalizedFileNames)]	Windows desktop.ini
1135b6cee71dSXin LI!:mime application/x-wine-extension-ini
1136b6cee71dSXin LI#!:mime text/plain
113748c779cdSXin LI# https://support.microsoft.com/kb/84709/
1138a4d6d3b8SXin LI>>&0	regex/c		\^don't\ load]					Windows CONTROL.INI
1139b6cee71dSXin LI!:mime application/x-wine-extension-ini
114058a0f0d0SEitan Adler!:ext	ini
1141b6cee71dSXin LI>>&0	regex/c		\^(ndishlp\\$|protman\\$|NETBEUI\\$)]		Windows PROTOCOL.INI
1142b6cee71dSXin LI!:mime application/x-wine-extension-ini
114358a0f0d0SEitan Adler!:ext	ini
114448c779cdSXin LI# https://technet.microsoft.com/en-us/library/cc722567.aspx
1145b6cee71dSXin LI# http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0137.htm
1146b6cee71dSXin LI>>&0	regex/c		\^(windows|Compatibility|embedding)]		Windows WIN.INI
1147b6cee71dSXin LI!:mime application/x-wine-extension-ini
114858a0f0d0SEitan Adler!:ext	ini
114948c779cdSXin LI# https://en.wikipedia.org/wiki/SYSTEM.INI
1150b6cee71dSXin LI>>&0	regex/c		\^(boot|386enh|drivers)]			Windows SYSTEM.INI
1151b6cee71dSXin LI!:mime application/x-wine-extension-ini
115258a0f0d0SEitan Adler!:ext	ini
1153b6cee71dSXin LI# http://www.mdgx.com/newtip6.htm
1154a4d6d3b8SXin LI>>&0	regex/c		\^SafeList]					Windows IOS.INI
1155b6cee71dSXin LI!:mime application/x-wine-extension-ini
115658a0f0d0SEitan Adler!:ext	ini
115748c779cdSXin LI# https://en.wikipedia.org/wiki/NTLDR	Windows Boot Loader information
1158a4d6d3b8SXin LI>>&0	regex/c		\^boot\x20loader]				Windows boot.ini
1159b6cee71dSXin LI!:mime application/x-wine-extension-ini
116058a0f0d0SEitan Adler!:ext	ini
116148c779cdSXin LI# https://en.wikipedia.org/wiki/CONFIG.SYS
1162a4d6d3b8SXin LI>>&0	regex/c		\^menu]						MS-DOS CONFIG.SYS
116358a0f0d0SEitan Adler# @CONFIG.UI configuration file of previous DOS version saved by Caldera OPENDOS INSTALL.EXE
1164d38c30c0SXin LI# CONFIG.PSS saved version of file CONFIG.SYS created by %WINDIR%\SYSTEM\MSCONFIG.EXE
1165d38c30c0SXin LI# CONFIG.TSH renamed file CONFIG.SYS.BAT by %WINDIR%\SYSTEM\MSCONFIG.EXE
116658a0f0d0SEitan Adler# dos and w40 used in dual booting scene
116758a0f0d0SEitan Adler!:ext	sys/dos/w40
116848c779cdSXin LI# https://support.microsoft.com/kb/118579/
1169a4d6d3b8SXin LI>>&0	regex/c		\^Paths]\r\n					MS-DOS MSDOS.SYS
117058a0f0d0SEitan Adler!:ext	sys/dos
117158a0f0d0SEitan Adler# http://chmspec.nongnu.org/latest/INI.html#HHP
1172a4d6d3b8SXin LI>>&0	regex/c		\^options]\r\n					Microsoft HTML Help Project
117358a0f0d0SEitan Adler!:mime text/plain
117458a0f0d0SEitan Adler!:ext	hhp
117543a5ec4eSXin LI# From:		Joerg Jenderek
1176a4d6d3b8SXin LI# URL:		https://documentation.basis.com/BASISHelp/WebHelp/b3odbc/ODBC_Driver/obdcdriv_character_translation.htm
117743a5ec4eSXin LI# Reference:	https://www.garykessler.net/library/file_sigs.html
1178a4d6d3b8SXin LI#		http://mark0.net/download/triddefs_xml.7z/defs/c/cpx.trid.xml
117943a5ec4eSXin LI# Note:		stored in directory %WINDIR%\SysWOW64 or %WINDIR%\system
1180a4d6d3b8SXin LI#		second word often Latin but sometimes Cyrillic like in 12510866.CPX
1181a4d6d3b8SXin LI>>&0	regex/c		\^Windows\ (Latin|Cyrillic)			Windows codepage translator
1182a4d6d3b8SXin LI#!:mime	text/plain
1183a4d6d3b8SXin LI!:mime	text/x-ms-cpx
1184a4d6d3b8SXin LI# like: 12510866.CPX
118543a5ec4eSXin LI!:ext	cpx
1186a4d6d3b8SXin LI# From:		Joerg Jenderek
1187898496eeSXin LI# URL:		https://en.wikipedia.org/wiki/File_Explorer
1188898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/scf-exp.trid.xml,scf-exp-old.trid.xml
1189898496eeSXin LI# Note:		called "Windows Explorer Command Shell File" by TrID and "File Explorer Command" by Windows via SHCmdFile
1190898496eeSXin LI>>&0	regex/c		\^Shell]\r\n					Windows Explorer Shell Command File
1191898496eeSXin LI#!:mime	text/plain
1192898496eeSXin LI!:mime	text/x-ms-scf
1193898496eeSXin LI# like: channels.scf desktop.scf explorer.scf "Desktop anzeigen.scf"
1194898496eeSXin LI!:ext	scf
1195898496eeSXin LI# look for icon file directive maybe pointing to malicious file
1196898496eeSXin LI>>>1		search/128	IconFile=				\b, icon
1197898496eeSXin LI>>>>&0		string		x					"%s"
1198898496eeSXin LI# From:		Joerg Jenderek
1199898496eeSXin LI# URL:		http://en.wikipedia.org/wiki/VIA_Technologies
1200898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/scf-via.trid.xml
1201898496eeSXin LI# Note:		called "VIA setup configuration file" by TrID
1202898496eeSXin LI>>&0	regex/c		\^SCF]\r\n					VIA setup configuration
1203898496eeSXin LI#!:mime	text/plain
1204898496eeSXin LI!:mime	text/x-via-scf
1205898496eeSXin LI# like: SETUP.SCF
1206898496eeSXin LI!:ext	scf
1207898496eeSXin LI# From:		Joerg Jenderek
1208a4d6d3b8SXin LI# URL:		https://en.wikipedia.org/wiki/InstallShield
1209a4d6d3b8SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/l/lid-is.trid.xml
1210a4d6d3b8SXin LI# Note:		contain also 3 keywords like: count Default key0
1211a4d6d3b8SXin LI>>&0	regex/c		\^Languages]					InstallShield Language Identifier
1212a4d6d3b8SXin LI#!:mime	text/plain
1213a4d6d3b8SXin LI!:mime	text/x-installshield-lid
1214a4d6d3b8SXin LI# like: SETUP.LID
1215a4d6d3b8SXin LI!:ext	lid
1216a4d6d3b8SXin LI# From:		Joerg Jenderek
1217a4d6d3b8SXin LI# URL:		https://www.file-extensions.org/tag-file-extension
1218a4d6d3b8SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/t/taginfo.trid.xml
1219a4d6d3b8SXin LI# Note:		contain also keywords like: Application Category Company Misc Version
1220a4d6d3b8SXin LI>>&0	regex/c		\^TagInfo]					TagInfo
1221a4d6d3b8SXin LI#!:mime	text/plain
1222a4d6d3b8SXin LI#!:mime	text/prs.lines.tag
1223a4d6d3b8SXin LI!:mime	text/x-ms-tag
1224a4d6d3b8SXin LI# like: DATA.TAG
1225a4d6d3b8SXin LI!:ext	tag
1226898496eeSXin LI# URL:		https://en.wikipedia.org/wiki/Flatpak
1227898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/f/flatpakref.trid.xml
1228898496eeSXin LI# Note:		called "Flatpack Reference" by TrID
1229898496eeSXin LI>>&0	string		Flatpak\ Ref]					Flatpak repository reference
1230898496eeSXin LI#!:mime	text/plain
1231898496eeSXin LI# https://reposcope.com/mimetype/application/vnd.flatpak.ref
1232898496eeSXin LI!:mime	application/vnd.flatpak.ref
1233898496eeSXin LI!:ext	flatpakref
1234898496eeSXin LI# From:		Joerg Jenderek
1235898496eeSXin LI# URL:		https://en.wikipedia.org/wiki/CloneCD
1236898496eeSXin LI# Reference:	https://en.wikipedia.org/wiki/CloneCD_Control_File
1237898496eeSXin LI#		http://mark0.net/download/triddefs_xml.7z/defs/c/cdimage-clonecd-cue.trid.xml
1238898496eeSXin LI# Note:		called "CloneCD CDImage (description)" by TrID and "CloneCD Control File" by DROID via PUID fmt/1760
1239898496eeSXin LI>>&0	string		CloneCD]					CloneCD CD-image Description
1240898496eeSXin LI#!:mime	text/plain
1241898496eeSXin LI!:mime	text/x-ccd
1242898496eeSXin LI!:ext	ccd
1243b6cee71dSXin LI# unknown keyword after opening bracket
1244b6cee71dSXin LI>>&0	default				x
124558a0f0d0SEitan Adler#>>>&0	string/c			x	UNKNOWN [%s
124658a0f0d0SEitan Adler# look for left bracket of second section
1247b6cee71dSXin LI>>>&0	search/8192			[
1248b6cee71dSXin LI# version Strings FileIdentification
1249b6cee71dSXin LI>>>>&0	string/c			version				Windows setup INFormation
1250b6cee71dSXin LI!:mime application/x-setupscript
125158a0f0d0SEitan Adler!:ext	inf
1252898496eeSXin LI# From:		Joerg Jenderek
1253898496eeSXin LI# URL:		https://cdrtfe.sourceforge.io/
1254898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/c/cfp-cdrtfe.trid.xml
1255898496eeSXin LI>>>>&0	string				FileExplorer]			cdrtfe Project
1256898496eeSXin LI!:mime	text/x-cfp
1257898496eeSXin LI!:ext	cfp
125848c779cdSXin LI# https://en.wikipedia.org/wiki/Initialization_file	Windows Initialization File or other
125958a0f0d0SEitan Adler>>>>&0	default				x
126058a0f0d0SEitan Adler>>>>>&0	ubyte				x
126158a0f0d0SEitan Adler# characters, digits, underscore and white space followed by right bracket
126258a0f0d0SEitan Adler# terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT
126343a5ec4eSXin LI>>>>>>&-1	regex/T			\^([A-Za-z0-9_\(\)\ ]+)\]\r	Generic INItialization configuration [%-.40s
126458a0f0d0SEitan Adler# NETDEF.INF multiarc.ini
126558a0f0d0SEitan Adler#!:mime	application/x-setupscript
126658a0f0d0SEitan Adler!:mime	application/x-wine-extension-ini
126758a0f0d0SEitan Adler#!:mime	text/plain
126858a0f0d0SEitan Adler!:ext	ini/inf
1269898496eeSXin LI# samples with only 1 and unknown section name
1270898496eeSXin LI# XXX: matches a file containing '[1] 2'
1271898496eeSXin LI#>>>&0	default				x				Generic INItialization configuration
1272898496eeSXin LI#>>>>0	string				x				\b, 1st line "%s"
1273a4d6d3b8SXin LI# UTF-16 BOM
1274a4d6d3b8SXin LI0	ubeshort		=0xFFFE
1275a4d6d3b8SXin LI# look for phrase of Windows policy ADMinistrative template (UTF-16 by adm-uni.trid.xml)
1276a4d6d3b8SXin LI# like: wuau.adm
1277a4d6d3b8SXin LI>2	search/0x384A	E\0N\0D\0\040\0C\0A\0T\0E\0G\0O\0R\0Y\0
1278a4d6d3b8SXin LI>>0	use		windows-adm
1279a4d6d3b8SXin LI# if no Windows policy ADMinistrative template then Windows INFormation
1280a4d6d3b8SXin LI>2	default		x
128158a0f0d0SEitan Adler# UTF-16 BOM followed by CR~0D00 , comment~semicolon~3B00 , section~bracket~5B00
1282a4d6d3b8SXin LI>>0	ubelong&0xFFff89FF	=0xFFFE0900
128358a0f0d0SEitan Adler# look for left bracket in section line
1284a4d6d3b8SXin LI>>>2	search/8192		[
128558a0f0d0SEitan Adler# keyword without 1st letter which is maybe up-/down-case
128658a0f0d0SEitan Adler>>>>&3	lestring16		ersion]			Windows setup INFormation
128758a0f0d0SEitan Adler!:mime	application/x-setupscript
1288a4d6d3b8SXin LI# like: hdaudio.inf iscsi.inf spaceport.inf tpm.inf usbhub3.inf UVncVirtualDisplay.inf
128958a0f0d0SEitan Adler!:ext	inf
1290a4d6d3b8SXin LI>>>>&3	lestring16		trings]			Windows setup INFormation
1291a4d6d3b8SXin LI!:mime	application/x-setupscript
1292a4d6d3b8SXin LI# like: arduino_gemma.inf iis.inf MSM8960.inf
1293a4d6d3b8SXin LI!:ext	inf
1294a4d6d3b8SXin LI>>>>&3	lestring16		ourceDisksNames]	Windows setup INFormation
1295a4d6d3b8SXin LI!:mime	application/x-setupscript
1296a4d6d3b8SXin LI# like: atiixpag.inf mdmnokia.inf netefe32.inf rdpbus.inf
1297a4d6d3b8SXin LI!:ext	inf
1298a4d6d3b8SXin LI# netnwcli.inf start with ;---[ NetNWCli.INX ]
1299a4d6d3b8SXin LI>>>>&3	default			x
1300a4d6d3b8SXin LI# look for NL followed by left bracket
1301a4d6d3b8SXin LI>>>>>&0	search/8192		\x0A\x00\x5b
1302a4d6d3b8SXin LI# like: defltwk.inf netvwifibus.inf WSDPrint.inf
1303a4d6d3b8SXin LI>>>>>>&3 lestring16		ersion]			Windows setup INFormation
1304a4d6d3b8SXin LI!:mime	application/x-setupscript
1305a4d6d3b8SXin LI!:ext	inf
1306a4d6d3b8SXin LI
1307a4d6d3b8SXin LI# Summary:	Windows Policy ADMinistrative template
1308a4d6d3b8SXin LI# From:		Joerg Jenderek
1309a4d6d3b8SXin LI# URL:		https://en.wikipedia.org/wiki/Administrative_Template
1310a4d6d3b8SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/a/adm.trid.xml
1311a4d6d3b8SXin LI# Note:		typically stored in directory like: %WINDIR%\system32\GroupPolicy\ADM
1312a4d6d3b8SXin LI# worst case ASCII variant starting with remark line like: inetset.adm
1313a4d6d3b8SXin LI0	search/0x4E	CLASS\040
1314a4d6d3b8SXin LI>&0	string		MACHINE
1315a4d6d3b8SXin LI>>0	use		windows-adm
1316a4d6d3b8SXin LI>&0	string		USER
1317a4d6d3b8SXin LI>>0	use		windows-adm
1318a4d6d3b8SXin LI# display information about Windows policy ADMinistrative template
1319a4d6d3b8SXin LI0	name		windows-adm	Windows Policy Administrative Template
1320a4d6d3b8SXin LI!:mime	text/x-ms-adm
1321a4d6d3b8SXin LI!:ext	adm
1322a4d6d3b8SXin LI# UTF-16 BOM implies UTF-16 encoded ADM (by adm-uni.trid.xml)
1323a4d6d3b8SXin LI>0	ubeshort		=0xFFFE
1324a4d6d3b8SXin LI>>2	lestring16		x		\b, 1st line "%s"
1325a4d6d3b8SXin LI# look for UTF-16 encoded CarriageReturn LineFeed
1326a4d6d3b8SXin LI>>>2	search/0x3A		\r\0\n\0
1327a4d6d3b8SXin LI>>>>&0	lestring16		x		\b, 2nd line "%s"
1328a4d6d3b8SXin LI# no UTF-16 BOM implies "ASCII" encoded ADM (by adm.trid.xml)
1329a4d6d3b8SXin LI>0	ubeshort		!0xFFFE
1330a4d6d3b8SXin LI>>0		string		x		\b, 1st line "%s"
1331a4d6d3b8SXin LI#>>>&0		ubequad		x		\b, 2ND %16.16llx
1332a4d6d3b8SXin LI# 2nd line empty
1333a4d6d3b8SXin LI>>>&2		beshort		=0x0D0A
1334a4d6d3b8SXin LI>>>>&0		beshort		!0x0D0A		\b, 3th line
1335a4d6d3b8SXin LI>>>>>&-2	string		x		"%s"
1336a4d6d3b8SXin LI# 2nd line with content
1337a4d6d3b8SXin LI>>>&2		beshort		!0x0D0A		\b, 2nd line
1338a4d6d3b8SXin LI>>>>&-2		string		x		"%s"
1339b6cee71dSXin LI
1340b6cee71dSXin LI# Windows Precompiled INF files *.PNF added by Joerg Jenderek at Mar 2013 of _PNF_HEADER inf.h
1341b6cee71dSXin LI# http://read.pudn.com/downloads3/sourcecode/windows/248345/win2k/private/windows/setup/setupapi/inf.h__.htm
13422726a701SXin LI# URL:		http://fileformats.archiveteam.org/wiki/INF_(Windows)
13432726a701SXin LI# Reference:	http://en.verysource.com/code/10350344_1/inf.h.html
13442726a701SXin LI# Note:		stored in %Windir%\Inf %Windir%\System32\DriverStore\FileRepository
13452726a701SXin LI# check for valid major and minor versions: 101h - 303h
13462726a701SXin LI0		leshort&0xFcFc	=0x0000
13472726a701SXin LI# GRR: line above (strength 50) is too general as it catches also "PDP-11 UNIX/RT ldp" ./pdp
13482726a701SXin LI>0		leshort&0x0303	!0x0000
13492726a701SXin LI# test for valid InfStyles: 1 2
13502726a701SXin LI>>2		uleshort	>0
13512726a701SXin LI>>>2		uleshort	<3
13522726a701SXin LI# look for colon in WinDirPath after PNF header
13532726a701SXin LI#>>>>0x59	search/18	:
1354898496eeSXin LI# skip few Adobe Photoshop Color swatch ("Mac OS.aco" TRUMATCH-Farben.aco Windows.aco) and some
1355898496eeSXin LI# Targa image (money-256.tga XING_B_UCM8.tga x-fmt-367-signature-id-604.tga) with "invalid low section name" \0
1356898496eeSXin LI>>>>(20.l)	ubelong		>0x40004000
1357898496eeSXin LI>>>>>0	use	PreCompiledInf
13582726a701SXin LI0	name	PreCompiledInf
13592726a701SXin LI>0		uleshort	x	Windows Precompiled iNF
1360b6cee71dSXin LI!:mime	application/x-pnf
13612726a701SXin LI!:ext	pnf
13622726a701SXin LI# major version 1 for older Windows like XP and 3 since about Windows Vista
1363898496eeSXin LI# 101h~95-XP; 301h~Windows Vista-7 ; 302h~Windows 10 14393; 303h~Windows 10 18362-Windows11
13642726a701SXin LI>1		ubyte		x		\b, version %u
13652726a701SXin LI>0		ubyte		x		\b.%u
13662726a701SXin LI>0		uleshort	=0x0101		(Windows
1367898496eeSXin LI>>4	ulelong&0x00000001	!0x00000001	95-98)
13682726a701SXin LI>>4	ulelong&0x00000001	=0x00000001	XP)
13692726a701SXin LI>0		uleshort	=0x0301		(Windows Vista-8.1)
13702726a701SXin LI>0		uleshort	=0x0302		(Windows 10 older)
1371898496eeSXin LI>0		uleshort	=0x0303		(Windows 10-11)
1372b6cee71dSXin LI# 1 ,2 (windows 98 SE)
13732726a701SXin LI>2		uleshort	!2		\b, InfStyle %u
1374b6cee71dSXin LI#	PNF_FLAG_IS_UNICODE		0x00000001
1375b6cee71dSXin LI#	PNF_FLAG_HAS_STRINGS		0x00000002
1376b6cee71dSXin LI#	PNF_FLAG_SRCPATH_IS_URL		0x00000004
1377b6cee71dSXin LI#	PNF_FLAG_HAS_VOLATILE_DIRIDS	0x00000008
1378b6cee71dSXin LI#	PNF_FLAG_INF_VERIFIED		0x00000010
1379b6cee71dSXin LI#	PNF_FLAG_INF_DIGITALLY_SIGNED	0x00000020
13802726a701SXin LI#	UNKNOWN8			0x00000080
13812726a701SXin LI#	UNKNOWN				0x00000100
13822726a701SXin LI#	UNKNOWN1			0x01000000
13832726a701SXin LI#	UNKNOWN2			0x02000000
13842726a701SXin LI>4	ulelong&0x03000180	>0		\b, flags
138543a5ec4eSXin LI>>4	ulelong			x		%#x
13862726a701SXin LI>4	ulelong&0x00000001	0x00000001	\b, unicoded
13872726a701SXin LI>4	ulelong&0x00000002	0x00000002	\b, has strings
13882726a701SXin LI>4	ulelong&0x00000004	0x00000004	\b, src URL
13892726a701SXin LI>4	ulelong&0x00000008	0x00000008	\b, volatile dir ids
13902726a701SXin LI>4	ulelong&0x00000010	0x00000010	\b, verified
13912726a701SXin LI>4	ulelong&0x00000020	0x00000020	\b, digitally signed
13922726a701SXin LI# >4	ulelong&0x00000080	0x00000080	\b, UNKNOWN8
13932726a701SXin LI# >4	ulelong&0x00000100	0x00000100	\b, UNKNOWN
13942726a701SXin LI# >4	ulelong&0x01000000	0x01000000	\b, UNKNOWN1
13952726a701SXin LI# >4	ulelong&0x02000000	0x02000000	\b, UNKNOWN2
139643a5ec4eSXin LI#>8		ulelong		x		\b, InfSubstValueListOffset %#x
1397b6cee71dSXin LI# many 0, 1 lmouusb.PNF, 2 linkfx10.PNF , f webfdr16.PNF
13982726a701SXin LI# , 6 bth.PNF, 9 usbport.PNF, d netnwifi.PNF, 10h nettcpip.PNF
139943a5ec4eSXin LI#>12		uleshort	x		\b, InfSubstValueCount %#x
14002726a701SXin LI# only < 9 found: 8 hcw85b64.PNF
140143a5ec4eSXin LI#>14		uleshort	x		\b, InfVersionDatumCount %#x
14022726a701SXin LI# only found values lower 0x0000ffff ??
140343a5ec4eSXin LI#>16		ulelong		x		\b, InfVersionDataSize %#x
1404b6cee71dSXin LI# only found positive values lower 0x00ffFFff for InfVersionDataOffset
140543a5ec4eSXin LI>20		ulelong		x		\b, at %#x
14062726a701SXin LI>4	ulelong&0x00000001	=0x00000001
1407b6cee71dSXin LI# case independent: CatalogFile Class DriverVer layoutfile LayoutFile SetupClass signature Signature
14082726a701SXin LI>>(20.l)	lestring16	x		"%s"
14092726a701SXin LI>4	ulelong&0x00000001	!0x00000001
14102726a701SXin LI>>(20.l)	string		x		"%s"
1411b6cee71dSXin LI# FILETIME is number of 100-nanosecond intervals since 1 January 1601
14122726a701SXin LI#>24		ulequad		x		\b, InfVersionLastWriteTime %16.16llx
1413898496eeSXin LI>24		qwdate		x		\b, InfVersionLastWriteTime %s
14142726a701SXin LI# for Windows 98, XP
14152726a701SXin LI>0		uleshort	<0x0102
1416b6cee71dSXin LI# only found values lower 0x00ffFFff
14172726a701SXin LI# often 70 but also 78h for corelist.PNF
141843a5ec4eSXin LI# >>32		ulelong		x		\b, StringTableBlockOffset %#x
141943a5ec4eSXin LI# >>36		ulelong		x		\b, StringTableBlockSize %#x
142043a5ec4eSXin LI# >>40		ulelong		x		\b, InfSectionCount %#x
142143a5ec4eSXin LI# >>44		ulelong		x		\b, InfSectionBlockOffset %#x
142243a5ec4eSXin LI# >>48		ulelong		x		\b, InfSectionBlockSize %#x
142343a5ec4eSXin LI# >>52		ulelong		x		\b, InfLineBlockOffset %#x
142443a5ec4eSXin LI# >>56		ulelong		x		\b, InfLineBlockSize %#x
142543a5ec4eSXin LI# >>60		ulelong		x		\b, InfValueBlockOffset %#x
142643a5ec4eSXin LI# >>64		ulelong		x		\b, InfValueBlockSize %#x
1427b6cee71dSXin LI# WinDirPathOffset
14282726a701SXin LI# like 58h, which means direct after PNF header
142943a5ec4eSXin LI#>>68		ulelong		x		\b, at %#x
14302726a701SXin LI>>68		ulelong		x
14312726a701SXin LI>>>4	ulelong&0x00000001	=0x00000001
14322726a701SXin LI#>>>>(68.l)	ubequad		=0x43003a005c005700
1433b6cee71dSXin LI# normally unicoded C:\Windows
14342726a701SXin LI#>>>>>(68.l)	lestring16	x		\b, WinDirPath "%s"
14352726a701SXin LI>>>>(68.l)	ubequad		!0x43003a005c005700
14362726a701SXin LI>>>>>(68.l)	lestring16	x		\b, WinDirPath "%s"
14372726a701SXin LI>>>4	ulelong&0x00000001	!0x00000001
1438b6cee71dSXin LI# normally ASCII C:\WINDOWS
14392726a701SXin LI#>>>>(68.l)	string		=C:\\WINDOWS	\b, WinDirPath "%s"
14402726a701SXin LI>>>>(68.l)	string		!C:\\WINDOWS
14412726a701SXin LI>>>>>(68.l)	string		x		\b, WinDirPath "%s"
1442b6cee71dSXin LI# found OsLoaderPathOffset values often 0 , once 70h corelist.PNF, once 68h ASCII machine.PNF
14432726a701SXin LI>>>72		ulelong		>0		\b,
14442726a701SXin LI>>>>4	ulelong&0x00000001	=0x00000001
14452726a701SXin LI>>>>>(72.l)	lestring16	x		OsLoaderPath "%s"
14462726a701SXin LI>>>>4	ulelong&0x00000001	!0x00000001
1447b6cee71dSXin LI# seldom C:\ instead empty
14482726a701SXin LI>>>>>(72.l)	string		x		OsLoaderPath "%s"
1449b6cee71dSXin LI# 1fdh
145043a5ec4eSXin LI#>>>76		uleshort	x		\b, StringTableHashBucketCount %#x
1451898496eeSXin LI# https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a
1452b6cee71dSXin LI# only 407h found
14532726a701SXin LI>>>78		uleshort	!0x409		\b, LanguageID %x
14542726a701SXin LI#>>>78		uleshort	=0x409		\b, LanguageID %x
1455b6cee71dSXin LI# InfSourcePathOffset often 0
145643a5ec4eSXin LI>>>80		ulelong		>0		\b, at %#x
14572726a701SXin LI>>>>4	ulelong&0x00000001	=0x00000001
14582726a701SXin LI>>>>>(80.l)	lestring16	x		SourcePath "%s"
14592726a701SXin LI>>>>4	ulelong&0x00000001	!0x00000001
14602726a701SXin LI>>>>>(80.l)	string		>\0		SourcePath "%s"
1461b6cee71dSXin LI# OriginalInfNameOffset often 0
146243a5ec4eSXin LI>>>84		ulelong		>0		\b, at %#x
14632726a701SXin LI>>>>4	ulelong&0x00000001	=0x00000001
14642726a701SXin LI>>>>>(84.l)	lestring16	x		InfName "%s"
14652726a701SXin LI>>>>4	ulelong&0x00000001	!0x00000001
14662726a701SXin LI>>>>>(84.l)	string		>\0		InfName "%s"
14672726a701SXin LI
14682726a701SXin LI# for newer Windows like Vista, 7 , 8.1 , 10
14692726a701SXin LI>0		uleshort	>0x0101
147043a5ec4eSXin LI>>80	ulelong			x		\b, at %#x WinDirPath
14712726a701SXin LI>>>4	ulelong&0x00000001	0x00000001
14722726a701SXin LI# normally unicoded C:\Windows
14732726a701SXin LI#>>>>(80.l)	ubequad		=0x43003a005c005700
14742726a701SXin LI#>>>>>(80.l)	lestring16	x		"%s"
14752726a701SXin LI>>>>(80.l)	ubequad		!0x43003a005c005700
14762726a701SXin LI>>>>>(80.l)	lestring16	x		"%s"
14772726a701SXin LI# language id: 0 407h~german 409h~English_US
14782726a701SXin LI>>90		uleshort	!0x409		\b, LanguageID %x
14792726a701SXin LI#>>90		uleshort	=0x409		\b, LanguageID %x
148043a5ec4eSXin LI>>92	ulelong			>0		\b, at %#x
14812726a701SXin LI>>>4	ulelong&0x00000001	0x00000001
14822726a701SXin LI# language string like: de-DE en-US
14832726a701SXin LI>>>>(92.l)	lestring16	x		language %s
1484b6cee71dSXin LI
14853e41d09dSXin LI# Summary: backup file created with utility like NTBACKUP.EXE shipped with Windows NT/2K/XP/2003
14863e41d09dSXin LI# Extension: .bkf
14873e41d09dSXin LI# Created by: Joerg Jenderek
148848c779cdSXin LI# URL: https://en.wikipedia.org/wiki/NTBackup
14893e41d09dSXin LI# Reference: http://laytongraphics.com/mtf/MTF_100a.PDF
14903e41d09dSXin LI# Descriptor BloCK name of Microsoft Tape Format
14913e41d09dSXin LI0	string			TAPE
14923e41d09dSXin LI# Format Logical Address is zero
14933e41d09dSXin LI>20	ulequad			0
14943e41d09dSXin LI# Reserved for MBC is zero
14953e41d09dSXin LI>>28	uleshort		0
14963e41d09dSXin LI# Control Block ID is zero
14973e41d09dSXin LI>>>36	ulelong			0
14983e41d09dSXin LI# BIT4-BIT15, BIT18-BIT31 of block attributes are unused
14993e41d09dSXin LI>>>>4	ulelong&0xFFfcFFe0	0		Windows NTbackup archive
15003e41d09dSXin LI#!:mime application/x-ntbackup
15013e41d09dSXin LI!:ext bkf
15023e41d09dSXin LI# OS ID
15033e41d09dSXin LI>>>>>10	ubyte			1		\b NetWare
15043e41d09dSXin LI>>>>>10	ubyte			13		\b NetWare SMS
15053e41d09dSXin LI>>>>>10	ubyte			14		\b NT
15063e41d09dSXin LI>>>>>10	ubyte			24		\b 3
15073e41d09dSXin LI>>>>>10	ubyte			25		\b OS/2
15083e41d09dSXin LI>>>>>10	ubyte			26		\b 95
15093e41d09dSXin LI>>>>>10	ubyte			27		\b Macintosh
15103e41d09dSXin LI>>>>>10	ubyte			28		\b UNIX
15113e41d09dSXin LI# OS Version (2)
15123e41d09dSXin LI#>>>>>11	ubyte			x		OS V=%x
15133e41d09dSXin LI# MTF_CONTINUATION	Media Sequence Number > 1
15143e41d09dSXin LI#>>>>>4	ulelong&0x00000001	!0		\b, continued
15153e41d09dSXin LI# MTF_COMPRESSION
15163e41d09dSXin LI>>>>>4	ulelong&0x00000004	!0		\b, compressed
15173e41d09dSXin LI# MTF_EOS_AT_EOM	End Of Medium was hit during end of set processing
15183e41d09dSXin LI>>>>>4	ulelong&0x00000008	!0		\b, End Of Medium hit
15193e41d09dSXin LI>>>>>4	ulelong&0x00020000	0
15203e41d09dSXin LI# MTF_SET_MAP_EXISTS	A Media Based Catalog Set Map may exist on tape
15213e41d09dSXin LI>>>>>>4	ulelong&0x00010000	!0		\b, with catalog
15223e41d09dSXin LI# MTF_FDD_ALLOWED	However File/Directory Detail can only exist if a Set Map is also present
15233e41d09dSXin LI>>>>>4	ulelong&0x00020000	!0		\b, with file catalog
15243e41d09dSXin LI# Offset To First Event 238h,240h,28Ch
15253e41d09dSXin LI#>>>>>8	uleshort		x		\b, event offset %4.4x
15263e41d09dSXin LI# Displayable Size (20e0230h 20e024ch 20e0224h)
15273e41d09dSXin LI#>>>>>8	ulequad			x		dis. size %16.16llx
15283e41d09dSXin LI# Media Family ID (455288C4h 4570BD1Ah 45708F2Fh 4570BBF5h)
15293e41d09dSXin LI#>>>>>52	ulelong			x		family ID %8.8x
15303e41d09dSXin LI# TAPE Attributes (3)
15313e41d09dSXin LI#>>>>>56	ulelong			x		TAPE %8.8x
15323e41d09dSXin LI# Media Sequence Number
15333e41d09dSXin LI>>>>>60	uleshort		>1		\b, sequence %u
15343e41d09dSXin LI# Password Encryption Algorithm (3)
153543a5ec4eSXin LI>>>>>62	uleshort		>0		\b, %#x encrypted
15363e41d09dSXin LI# Soft Filemark Block Size * 512 (2)
15373e41d09dSXin LI#>>>>>64	uleshort		=2		\b, soft size %u*512
15383e41d09dSXin LI>>>>>64	uleshort		!2		\b, soft size %u*512
15393e41d09dSXin LI# Media Based Catalog Type (1,2)
15403e41d09dSXin LI#>>>>>66	uleshort		x		\b, catalog type %4.4x
15413e41d09dSXin LI# size of Media Name (66,68,6Eh)
15423e41d09dSXin LI>>>>>68	uleshort		>0
15433e41d09dSXin LI# offset of Media Name (5Eh)
15443e41d09dSXin LI>>>>>>70	uleshort	>0
15453e41d09dSXin LI# 0~, 1~ANSI, 2~UNICODE
15463e41d09dSXin LI>>>>>>>48	ubyte		1
15473e41d09dSXin LI# size terminated ansi coded string normally followed by "MTF Media Label"
15483e41d09dSXin LI>>>>>>>>(70.s)	string		>\0		\b, name: %s
15493e41d09dSXin LI>>>>>>>48	ubyte		2
15503e41d09dSXin LI# Not null, but size terminated unicoded string
15513e41d09dSXin LI>>>>>>>>(70.s)	lestring16	x		\b, name: %s
15523e41d09dSXin LI# size of Media Label (104h)
1553*ae316d1dSXin LI#>>>>>72	uleshort		>0
15543e41d09dSXin LI# offset of Media Label (C4h,C6h,CCh)
15553e41d09dSXin LI>>>>>74		uleshort	>0
15563e41d09dSXin LI>>>>>>48	ubyte		1
15573e41d09dSXin LI#Tag|Version|Vendor|Vendor ID|Creation Time Stamp|Cartridge Label|Side|Media ID|Media Domain ID|Vendor Specific fields
15583e41d09dSXin LI>>>>>>>(74.s)	string		>\0		\b, label: %s
15593e41d09dSXin LI>>>>>>48	ubyte		2
15603e41d09dSXin LI>>>>>>>(74.s)	lestring16	x		\b, label: %s
15613e41d09dSXin LI# size of password name (0,1Ch)
15623e41d09dSXin LI#>>>>>76	uleshort		>0		\b, password size %4.4x
15633e41d09dSXin LI# Software Vendor ID (CBEh)
156443a5ec4eSXin LI>>>>>86	uleshort		x		\b, software (%#x)
15653e41d09dSXin LI# size of Software Name (6Eh)
15663e41d09dSXin LI>>>>>80	uleshort		>0
15673e41d09dSXin LI# offset of Software Name (1C8h,1CAh,1D0h)
15683e41d09dSXin LI>>>>>>82	uleshort	>0
15693e41d09dSXin LI# 1~ANSI, 2~UNICODE
15703e41d09dSXin LI>>>>>>>48	ubyte		1
15713e41d09dSXin LI>>>>>>>>(82.s)	string		>\0		\b: %s
15723e41d09dSXin LI>>>>>>>48	ubyte		2
15733e41d09dSXin LI# size terminated unicoded coded string normally followed by "SPAD"
15743e41d09dSXin LI>>>>>>>>(82.s)	lestring16	x		\b: %s
15753e41d09dSXin LI# Format Logical Block Size (512,1024)
15763e41d09dSXin LI#>>>>>84	uleshort		=1024		\b, block size %u
15773e41d09dSXin LI>>>>>84	uleshort		!1024		\b, block size %u
15783e41d09dSXin LI# Media Date of MTF_DATE_TIME type with 5 bytes
15793e41d09dSXin LI#>>>>>>88	ubequad			x		DATE %16.16llx
15803e41d09dSXin LI# MTF Major Version (1)
15813e41d09dSXin LI#>>>>>>93	ubyte		x		\b, MFT version %x
15823e41d09dSXin LI#
15833e41d09dSXin LI
158458a0f0d0SEitan Adler# URL: https://en.wikipedia.org/wiki/PaintShop_Pro
158548c779cdSXin LI# Reference: https://www.cryer.co.uk/file-types/p/pal.htm
158658a0f0d0SEitan Adler# Created by: Joerg Jenderek
158758a0f0d0SEitan Adler# Note: there exist other color palette formats also with .pal extension
158858a0f0d0SEitan Adler0	string	JASC-PAL\r\n	PaintShop Pro color palette
158958a0f0d0SEitan Adler#!:mime	text/plain
159058a0f0d0SEitan Adler# PspPalette extension is used by newer (probably 8) PaintShopPro versions
159158a0f0d0SEitan Adler!:ext	pal/PspPalette
159258a0f0d0SEitan Adler# 2nd line contains palette file version. For example "0100"
159358a0f0d0SEitan Adler>10	string	!0100		\b, version %.4s
159458a0f0d0SEitan Adler# third line contains the number of colours: 16 256 ...
159558a0f0d0SEitan Adler>16	string	x		\b, %.3s colors
159658a0f0d0SEitan Adler
159748c779cdSXin LI# URL: https://en.wikipedia.org/wiki/Innosetup
159858a0f0d0SEitan Adler# Reference: https://github.com/jrsoftware/issrc/blob/master/Projects/Undo.pas
159958a0f0d0SEitan Adler# Created by: Joerg Jenderek
160058a0f0d0SEitan Adler# Note:	created by like "InnoSetup self-extracting archive" inside ./msdos
160158a0f0d0SEitan Adler# TrID labeles the entry as "Inno Setup Uninstall Log"
160258a0f0d0SEitan Adler#	TUninstallLogID
160358a0f0d0SEitan Adler0	string	Inno\ Setup\ Uninstall\ Log\ (b)	InnoSetup Log
160458a0f0d0SEitan Adler!:mime	application/x-innosetup
160558a0f0d0SEitan Adler# unins000.dat, unins001.dat, ...
160658a0f0d0SEitan Adler!:ext	dat
160758a0f0d0SEitan Adler# " 64-bit" variant
160858a0f0d0SEitan Adler>0x1c	string		>\0				\b%.7s
160958a0f0d0SEitan Adler# AppName[0x80] like "Minimal SYStem", ClamWin Free Antivirus , ...
161058a0f0d0SEitan Adler>0xc0	string		x				%s
1611d38c30c0SXin LI# AppId[0x80] is similar to AppName or
161258a0f0d0SEitan Adler# GUID like {4BB0DCDC-BC24-49EC-8937-72956C33A470} start with left brace
161358a0f0d0SEitan Adler>0x40	ubyte		0x7b
161458a0f0d0SEitan Adler>>0x40	string		x				%-.38s
161558a0f0d0SEitan Adler# do not know how this log version correlates to program version
161643a5ec4eSXin LI>0x140	ulelong		x				\b, version %#x
161758a0f0d0SEitan Adler# NumRecs
161843a5ec4eSXin LI#>0x144	ulelong		x				\b, %#4.4x records
161958a0f0d0SEitan Adler# EndOffset means files size
162058a0f0d0SEitan Adler>0x148	ulelong		x				\b, %u bytes
162158a0f0d0SEitan Adler# Flags 5 25h 35h
162258a0f0d0SEitan Adler#>0x14c	ulelong		x				\b, flags %8.8x
162358a0f0d0SEitan Adler# Reserved: array[0..26] of Longint
162458a0f0d0SEitan Adler# the non Unicode HighestSupportedVersion may never become greater than or equal to 1000
162558a0f0d0SEitan Adler>0x140	ulelong		<1000
162658a0f0d0SEitan Adler# hostname
162758a0f0d0SEitan Adler>>0x1d6	pstring		x				\b, %s
162858a0f0d0SEitan Adler# user name
162958a0f0d0SEitan Adler>>>&0	pstring		x				\b\%s
163058a0f0d0SEitan Adler# directory like C:\Program Files (x86)\GnuWin32
163158a0f0d0SEitan Adler>>>>&0	pstring		x				\b, "%s"
163258a0f0d0SEitan Adler# version 1000 or higher implies unicode
163358a0f0d0SEitan Adler>0x140	ulelong		>999
163458a0f0d0SEitan Adler# hostname
163558a0f0d0SEitan Adler>>0x1db	lestring16	x				\b, %-.9s
163658a0f0d0SEitan Adler# utf string variant with prepending fe??ffFFff
163758a0f0d0SEitan Adler>>0x1db	search/43	\xFF\xFF\xFF
163858a0f0d0SEitan Adler# user name
163958a0f0d0SEitan Adler>>>&0	lestring16	x				\b\%-.9s
164058a0f0d0SEitan Adler>>>&0	search/43	\xFF\xFF\xFF
164158a0f0d0SEitan Adler# directory like C:\Program Files\GIMP 2
164258a0f0d0SEitan Adler>>>>&0	lestring16	x				\b, %-.42s
164358a0f0d0SEitan Adler
164443a5ec4eSXin LI# URL:      https://jrsoftware.org/ishelp/index.php?topic=setup_signeduninstaller
164543a5ec4eSXin LI# Reference:https://github.com/jrsoftware/issrc/blob/main/Projects/Struct.pas
164643a5ec4eSXin LI# From:     Joerg Jenderek
164743a5ec4eSXin LI0	string	Inno\ Setup\ Messages\ (
164843a5ec4eSXin LI# null padded til 0x40 boundary
164943a5ec4eSXin LI>0x38	quad		0				InnoSetup messages
165043a5ec4eSXin LI!:mime	application/x-innosetup-msg
165143a5ec4eSXin LI# unins000.msg, unins001.msg, ...
165243a5ec4eSXin LI!:ext	msg
165343a5ec4eSXin LI# version like 5.1.1 5.1.11 5.5.0 5.5.3 6.0.0
165443a5ec4eSXin LI>>0x15	string		x				\b, version %.5s
165543a5ec4eSXin LI# look for 6th char of version string or terminating right parentheses
165643a5ec4eSXin LI>>>0x1a	ubyte		!0x29				\b%c
165743a5ec4eSXin LI# NumMessages
165843a5ec4eSXin LI>>0x40	ulelong		x				\b, %u messages
165943a5ec4eSXin LI# TotalSize: Cardinal;
166043a5ec4eSXin LI#>>0x44	ulelong		x				\b, TotalSize %u
166143a5ec4eSXin LI# NotTotalSize: Cardinal;
166243a5ec4eSXin LI#>>0x48	ulelong		x				\b, NotTotalSize %u
166343a5ec4eSXin LI# CRCMessages: Longint;
166443a5ec4eSXin LI#>>0x4C	ulelong		x				\b, CRC %#x
166543a5ec4eSXin LI>>0x40	ulelong		x
166643a5ec4eSXin LI# (u) after version means unicoded messages
166743a5ec4eSXin LI>>>0x1c	search/2	(u)				(UTF-16),
166843a5ec4eSXin LI>>>>0x50 lestring16	x				%s
166943a5ec4eSXin LI# ASCII coded message
167043a5ec4eSXin LI>>>0x1c	default		x				(ASCII),
167143a5ec4eSXin LI>>>>0x50 string		x				%s
167243a5ec4eSXin LI
167348c779cdSXin LI# Windows Imaging (WIM) Image
167443a5ec4eSXin LI# Update: Joerg Jenderek at Mar 2019, 2021
167548c779cdSXin LI# URL: https://en.wikipedia.org/wiki/Windows_Imaging_Format
167643a5ec4eSXin LI#      http://fileformats.archiveteam.org/wiki/Windows_Imaging_Format
167748c779cdSXin LI# Reference: https://download.microsoft.com/download/f/e/f/
167848c779cdSXin LI# fefdc36e-392d-4678-9e4e-771ffa2692ab/Windows%20Imaging%20File%20Format.rtf
167948c779cdSXin LI# Note: verified by like `7z t boot.wim` `wiminfo install.esd --header`
168048c779cdSXin LI0	string		MSWIM\000\000\000
168148c779cdSXin LI>0	use		wim-archive
168248c779cdSXin LI# https://wimlib.net/man1/wimoptimize.html
168348c779cdSXin LI0	string		WLPWM\000\000\000
168448c779cdSXin LI>0	use		wim-archive
168548c779cdSXin LI0	name		wim-archive
168648c779cdSXin LI# _WIMHEADER_V1_PACKED ImageTag[8]
168748c779cdSXin LI>0	string		x			Windows imaging
168848c779cdSXin LI!:mime	application/x-ms-wim
168948c779cdSXin LI# TO avoid in file version 5.36 error like
169048c779cdSXin LI# Magdir/windows, 760: Warning: Current entry does not yet have a description
169148c779cdSXin LI# file: could not find any valid magic files! (No error)
169243a5ec4eSXin LI# split WIM
169348c779cdSXin LI>16	ulelong		&0x00000008		(SWM
169448c779cdSXin LI!:ext	swm
169548c779cdSXin LI# usPartNumber; 1, unless the file was split into multiple parts
169648c779cdSXin LI>>40	uleshort	x			\b %u
169748c779cdSXin LI# usTotalParts; The total number of WIM file parts in a spanned set
169848c779cdSXin LI>>42	uleshort	x			\b of %u) image
169943a5ec4eSXin LI# non split WIM
170048c779cdSXin LI>16	ulelong		^0x00000008
170148c779cdSXin LI# https://wimlib.net/man1/wimmount.html
170248c779cdSXin LI# solid WIMs; version 3584; usually contain LZMS-compressed and the .esd extension
170348c779cdSXin LI>>12	ulelong		3584			(ESD) image
170448c779cdSXin LI!:ext	esd
170543a5ec4eSXin LI>>12	ulelong		!3584			(
170643a5ec4eSXin LI# look for archive member RunTime.xml like in Microsoft.Windows.Cosa.Desktop.Client.ppkg
170743a5ec4eSXin LI>>>156	search/68233/s		RunTime.xml	\bWindows provisioning package)
170843a5ec4eSXin LI!:ext	ppkg
170943a5ec4eSXin LI# if is is not a Windows provisioning package, then it is a WIM
171043a5ec4eSXin LI>>>156	default			x		\bWIM) image
171143a5ec4eSXin LI# second disk image part created by Microsoft's RecoveryDrive.exe has name Reconstruct.WIM2
171243a5ec4eSXin LI!:ext	wim/wim2
171348c779cdSXin LI>0	string/b	WLPWM\000\000\000	\b, wimlib pipable format
171448c779cdSXin LI# cbSize size of the WIM header in bytes like 208
171548c779cdSXin LI#>8	ulelong		x			\b, headersize %u
171648c779cdSXin LI# dwVersion version of the WIM file 00010d00h~1.13 00000e00h~0.14
171748c779cdSXin LI>14	uleshort	x			v%u
171848c779cdSXin LI>13	ubyte		x			\b.%u
171948c779cdSXin LI# dwImageCount; The number of images contained in the WIM file
172048c779cdSXin LI>44	ulelong		>1			\b, %u images
172148c779cdSXin LI# dwBootIndex
172248c779cdSXin LI# 1-based index of the bootable image of the WIM, or 0 if no image is bootable
172348c779cdSXin LI>0x78	ulelong		>0			\b, bootable no. %u
172448c779cdSXin LI# dwFlags
172543a5ec4eSXin LI#>16	ulelong		x			\b, flags %#8.8x
172648c779cdSXin LI#define FLAG_HEADER_COMPRESSION		0x00000002
172748c779cdSXin LI#define FLAG_HEADER_READONLY            0x00000004
172848c779cdSXin LI#define FLAG_HEADER_SPANNED		0x00000008
172948c779cdSXin LI#define FLAG_HEADER_RESOURCE_ONLY       0x00000010
173048c779cdSXin LI#define FLAG_HEADER_METADATA_ONLY       0x00000020
173148c779cdSXin LI#define FLAG_HEADER_WRITE_IN_PROGRESS   0x00000040
173248c779cdSXin LI#define FLAG_HEADER_RP_FIX		0x00000080 reparse point fixup
173348c779cdSXin LI#define FLAG_HEADER_COMPRESS_RESERVED   0x00010000
173448c779cdSXin LI#define FLAG_HEADER_COMPRESS_XPRESS     0x00020000
173548c779cdSXin LI#define FLAG_HEADER_COMPRESS_LZX	0x00040000
173648c779cdSXin LI#define FLAG_HEADER_COMPRESS_LZMS	0x00080000
173748c779cdSXin LI#define FLAG_HEADER_COMPRESS_XPRESS2    0x00100000 wimlib-1.13.0\include\wimlib\header.h
173848c779cdSXin LI# XPRESS, with small chunk size
173948c779cdSXin LI>16	ulelong		&0x00100000		\b, XPRESS2
174048c779cdSXin LI>16	ulelong		&0x00080000		\b, LZMS
174148c779cdSXin LI>16	ulelong		&0x00040000		\b, LZX
174248c779cdSXin LI>16	ulelong		&0x00020000		\b, XPRESS
174348c779cdSXin LI>16	ulelong		&0x00000002		compressed
174448c779cdSXin LI>16	ulelong		&0x00000004		\b, read only
174548c779cdSXin LI>16	ulelong		&0x00000010		\b, resource only
174648c779cdSXin LI>16	ulelong		&0x00000020		\b, metadata only
174748c779cdSXin LI>16	ulelong		&0x00000080		\b, reparse point fixup
174848c779cdSXin LI#>16	ulelong		&0x00010000		\b, RESERVED
174948c779cdSXin LI# dwCompressionSize; Uncompressed chunk size for resources or 0 if uncompressed
175048c779cdSXin LI#>20	ulelong		>0			\b, chunk size %u bytes
175148c779cdSXin LI# gWIMGuid
175243a5ec4eSXin LI#>24	ubequad		x			\b, GUID %#16.16llx
175348c779cdSXin LI#>>32	ubequad		x			\b%16.16llx
175448c779cdSXin LI# rhOffsetTable; the location of the resource lookup table
175548c779cdSXin LI# wim_reshdr_disk[24]= u8 size_in_wim[7] + u8 flags + le64 offset_in_wim + le64 uncompressed_size
175643a5ec4eSXin LI#>48	ubequad		x			\b, rhOffsetTable %#16.16llx
175748c779cdSXin LI# rhXmlData; the location of the XML data
175843a5ec4eSXin LI#>0x50	ulelong		x			\b, at %#8.8x
175948c779cdSXin LI# NOT WORKING \xff\xfe<\0W\0I\0M\0
176048c779cdSXin LI#>(0x50.l)	ubequad	x			\b, xml=%16.16llx
176148c779cdSXin LI# rhBootMetadata; the location of the metadata resource
176243a5ec4eSXin LI#>0x60	ubequad		x			\b, rhBootMetadata %#16.16llx
176348c779cdSXin LI# rhIntegrity; the location of integrity table used to verify files
176443a5ec4eSXin LI#>0x7c	ubequad		x			\b, rhIntegrity %#16.16llx
176548c779cdSXin LI# Unused[60]
176643a5ec4eSXin LI#>148	ubequad		!0			\b,unused %#16.16llx
176748c779cdSXin LI#
176848c779cdSXin LI
1769d38c30c0SXin LI# From:		Joerg Jenderek
1770d38c30c0SXin LI# URL:		https://en.wikipedia.org/wiki/Windows_Easy_Transfer
1771d38c30c0SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/m/mig.trid.xml
1772d38c30c0SXin LI# Note:		called "Windows Easy Transfer migration data" by TrID,
1773d38c30c0SXin LI#		"Migration Store" or "EasyTransfer file" by Microsoft
1774d38c30c0SXin LI0		string		1giM	Windows Easy Transfer migration data
1775d38c30c0SXin LI#!:mime		application/octet-stream
1776d38c30c0SXin LI!:mime		application/x-ms-mig
1777d38c30c0SXin LI!:ext		mig
1778d38c30c0SXin LI>0x18		string		=MRTS	without password
1779d38c30c0SXin LI# data offset with 1 space at end
178043a5ec4eSXin LI>>0x1c		ulelong+0x38	x	\b, at %#x
1781d38c30c0SXin LI# look for zlib compressed data by ./compress
1782d38c30c0SXin LI>>(0x1c.l+0x38)	ubyte		x
1783d38c30c0SXin LI>>>&-1	indirect	x
1784d38c30c0SXin LI# in password protected examples MRTS comes some bytes further
1785d38c30c0SXin LI>0x18		string		!MRTS	with password
1786d38c30c0SXin LI# look for first MRTS tag
1787d38c30c0SXin LI>0x18		search/29/b	MRTS
1788d38c30c0SXin LI# probably first file name length like 178, ...
1789d38c30c0SXin LI#>>&0		ulelong		x	\b, 1st length %u
1790d38c30c0SXin LI# URL like File\C:\Users\nutzer\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\desktop.ini
1791d38c30c0SXin LI>>&20		lestring16	x	\b, 1st %-s
1792d38c30c0SXin LI
17932726a701SXin LI# Microsoft SYLK
17942726a701SXin LI# https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK)
17952726a701SXin LI# https://outflank.nl/upload/sylksum.txt
17962726a701SXin LI0	string	ID;P	Microsoft SYLK program
17972726a701SXin LI>4	string	>0	\b, created by %s
17982726a701SXin LI!:ext	slk/sylk
1799a4d6d3b8SXin LI
1800a4d6d3b8SXin LI# Summary:	Windows Performance Monitor Alert
1801a4d6d3b8SXin LI# From:		Joerg Jenderek
1802a4d6d3b8SXin LI# URL:		https://en.wikipedia.org/wiki/Performance_Monitor
1803a4d6d3b8SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/p/pma.trid.xml
1804a4d6d3b8SXin LI# Note:		called "Windows Performance Monitor Alert" by TrID
1805a4d6d3b8SXin LI0	ubelong			=0xDC058340
1806a4d6d3b8SXin LI>4	ubyte			=0		Windows Performance Monitor Alert
1807a4d6d3b8SXin LI#!:mime		application/octet-stream
1808a4d6d3b8SXin LI# https://www.thoughtco.com/mime-types-by-content-type-3469108
1809a4d6d3b8SXin LI# https://filext.com/file-extension/PAM
1810a4d6d3b8SXin LI!:mime		application/x-perfmon
1811a4d6d3b8SXin LI#!:mime		application/x-ms-pma
1812a4d6d3b8SXin LI!:ext		pma
1813a4d6d3b8SXin LI# metric type like: "BrowserMetrics" "CrashpadMetrics" "SetupMetrics"
1814a4d6d3b8SXin LI>>80	string			x		\b, "%s"
1815a4d6d3b8SXin LI
1816a4d6d3b8SXin LI# From:		Joerg Jenderek
1817a4d6d3b8SXin LI# URL:		https://en.wikipedia.org/wiki/InstallShield
1818a4d6d3b8SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/i/ins.trid.xml
1819a4d6d3b8SXin LI# Note:		contain also keywords like: BATCH_INSTALL ISVERSION LOGHANDLE SRCDIR SRCDISK WINDIR WINSYSDISK
1820a4d6d3b8SXin LI0	ubelong	0xB8C90C00	InstallShield Script
1821a4d6d3b8SXin LI#!:mime	application/octet-stream
1822a4d6d3b8SXin LI!:mime	application/x-installshield-ins
1823a4d6d3b8SXin LI# like test.ins Setup.ins
1824a4d6d3b8SXin LI!:ext	ins
1825a4d6d3b8SXin LI# UNKNOWN like: 160034121de07e00 1600341260befe00 16003412e0783700
1826a4d6d3b8SXin LI# 5000010021083f00 50000100b0335600 50000100cbfdf800 50000100dfbc4700
1827a4d6d3b8SXin LI#>4	ubequad		x		\b, at 4 %#16.16llx
1828a4d6d3b8SXin LI# copyright text like:	"Stirling Technologies, Inc.  (c) 1990-1994"
1829898496eeSXin LI#			"InstallSHIELD Software Corporation  (c) 1990-1997"
1830a4d6d3b8SXin LI>13	pstring/h	x		"%s"
1831a4d6d3b8SXin LI# look for specific ASCII variable names
1832a4d6d3b8SXin LI>1	search/0x121/s	SRCDIR	\b, variable names:
1833a4d6d3b8SXin LI# 1st like: SRCDIR
1834a4d6d3b8SXin LI>>&-4		leshort		x	#%u
1835a4d6d3b8SXin LI>>&-2		pstring/h	x	%s
1836a4d6d3b8SXin LI# 2nd like: SRCDISK
1837a4d6d3b8SXin LI>>>&0		leshort		x	#%u
1838a4d6d3b8SXin LI>>>&2		pstring/h	x	%s
1839a4d6d3b8SXin LI# 3rd like: TARGETDISK
1840a4d6d3b8SXin LI>>>>&0		leshort		x	#%u
1841a4d6d3b8SXin LI>>>>&2		pstring/h	x	%s
1842a4d6d3b8SXin LI# 4th like: TARGETDIR
1843a4d6d3b8SXin LI#>>>>>&0		leshort		x	#%u
1844a4d6d3b8SXin LI#>>>>>&2		pstring/h	x	%s
1845a4d6d3b8SXin LI# 5th like: WINDIR
1846a4d6d3b8SXin LI#>>>>>>&0	leshort		x	#%u
1847a4d6d3b8SXin LI#>>>>>>&2	pstring/h	x	%s
1848a4d6d3b8SXin LI# 6th like: WINDISK
1849a4d6d3b8SXin LI#>>>>>>>&0	leshort		x	#%u
1850a4d6d3b8SXin LI#>>>>>>>&2	pstring/h	x	%s
1851a4d6d3b8SXin LI# 7th like: WINSYSDIR
1852a4d6d3b8SXin LI#>>>>>>>>&0	leshort		x	#%u
1853a4d6d3b8SXin LI#>>>>>>>>&2	pstring/h	x	%s
1854a4d6d3b8SXin LI# ... LOGHANDLE
1855a4d6d3b8SXin LI>0		ubelong		x	...
1856a4d6d3b8SXin LI#
1857898496eeSXin LI
1858898496eeSXin LI# Summary:	Microsoft Remote Desktop Protocol connection
1859898496eeSXin LI# From:		Joerg Jenderek
1860898496eeSXin LI# URL:		https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files
1861898496eeSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/r/rdp.trid.xml
1862898496eeSXin LI# Note:		called "Remote Desktop Connection Settings" by TrID
1863898496eeSXin LI0	string		screen\040mode\040id:i:	Remote Desktop Protocol connection
1864898496eeSXin LI#!:mime	text/plain
1865898496eeSXin LI!:mime	text/x-ms-rdp
1866898496eeSXin LI!:ext	rdp
1867898496eeSXin LI# Screen mode: 1~session appear in a window 2~session appear full screen
1868898496eeSXin LI>17	string		1			\b, window mode
1869898496eeSXin LI>17	string		2			\b, full screen mode
1870898496eeSXin LI
1871898496eeSXin LI0	guid	7B5C52E4-D88C-4DA7-AEB1-5378D02996D3	Microsoft OneNote
1872898496eeSXin LI!:ext one
1873898496eeSXin LI!:mime	application/onenote
1874898496eeSXin LI0	guid	43FF2FA1-EFD9-4C76-9EE2-10EA5722765F	Microsoft OneNote Revision Store File
1875898496eeSXin LI
1876898496eeSXin LI# Microsoft XAML Binary Format
1877898496eeSXin LI# From: Alexandre Iooss <erdnaxe@crans.org>
1878898496eeSXin LI# URL: https://github.com/WalkingCat/XbfDump/blob/8832d2ffcaa738434d803fefa2ba99d3af37ed29/xbf_data.h
1879898496eeSXin LI0	string	XBF\0
1880898496eeSXin LI>12	ulelong	<0xFF
1881898496eeSXin LI>>16	ulelong	<0xFF	Microsoft XAML Binary Format
1882898496eeSXin LI!:ext xbf
1883898496eeSXin LI>>>12	ulelong	x	%d
1884898496eeSXin LI>>>16	ulelong	x	\b.%d
1885898496eeSXin LI>>>4	ulelong	x	\b, metadata size: %d bytes
1886898496eeSXin LI>>>8	ulelong	x	\b, node size: %d bytes
1887898496eeSXin LI
1888898496eeSXin LI# Metaswitch MetaView Service Assurance Server exports
1889898496eeSXin LI0	string	MetaView\x20Service\x20Assurance\x20Export\x20File	MetaView SAS export
1890898496eeSXin LI>39     string  Version\x20
1891898496eeSXin LI>>47    byte    x                                                       \b, version %c
1892898496eeSXin LI
1893898496eeSXin LI# Active Directory Group Policy Registry Policy File Format
1894898496eeSXin LI# From: Yuuta Liang <yuuta@yuuta.moe>
1895898496eeSXin LI# URL: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/policy/registry-policy-file-format
1896898496eeSXin LI0	string	PReg
1897898496eeSXin LI>4	lelong	x	Group Policy Registry Policy, Version=%d
1898*ae316d1dSXin LI
1899*ae316d1dSXin LI# Microsoft Type Library Format (.TLB file)
1900*ae316d1dSXin LI# Stores metadata on calling COM APIs (method parameters/etc)
1901*ae316d1dSXin LI# Exists in two formats: the original (SLTG aka Type 1) and a newer format (MSFT aka Type 2)
1902*ae316d1dSXin LI# SLTG: https://www.nationalarchives.gov.uk/PRONOM/fmt/1601
1903*ae316d1dSXin LI# MSFT: https://www.nationalarchives.gov.uk/PRONOM/fmt/1602
1904*ae316d1dSXin LI# (Pronom claims these formats are due to Borland, but that appears to be incorrect, Microsoft invented them.)
1905*ae316d1dSXin LI# The MSFT format is documented here: https://gist.github.com/djhohnstein/e4a346ee1506895000ca0fa93e5a0024
1906*ae316d1dSXin LI# Which is a copy of original: http://theircorp.byethost11.com/files/TypeLib.txt (but which displays incorrectly due to encoding issues)
1907*ae316d1dSXin LI# The MSFT format is generated by the Windows CreateTypeLib2 API: https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-createtypelib2
1908*ae316d1dSXin LI# The SLTG format is generated by the Windows CreateTypeLib API: https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-createtypelib
1909*ae316d1dSXin LI#
1910*ae316d1dSXin LI# Note type libraries can also be embedded as resources inside executables/DLL. No attempt is made here to detect that scenario.
1911*ae316d1dSXin LI
1912*ae316d1dSXin LI# Legacy SLTG format
1913*ae316d1dSXin LI0	string	SLTG
1914*ae316d1dSXin LI>-36	string	TYPELIB	Type Library (legacy SLTG format)
1915*ae316d1dSXin LI
1916*ae316d1dSXin LI# MSFT format
1917*ae316d1dSXin LI0	string	MSFT\x02\x00\x01\x00	Type Library (MSFT format)
1918