1 /*
2  * The file header definition of a Windows 9x/Me Registry File (CREG)
3  *
4  * Copyright (C) 2013-2021, Joachim Metz <joachim.metz@gmail.com>
5  *
6  * Refer to AUTHORS for acknowledgements.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #if !defined( _CREG_FILE_HEADER_H )
23 #define _CREG_FILE_HEADER_H
24 
25 #include <common.h>
26 #include <types.h>
27 
28 #if defined( __cplusplus )
29 extern "C" {
30 #endif
31 
32 typedef struct creg_file_header creg_file_header_t;
33 
34 struct creg_file_header
35 {
36 	/* The signature
37 	 * Consists of 4 bytes
38 	 * Contains: "CREG"
39 	 */
40 	uint8_t signature[ 4 ];
41 
42 	/* The minor version number
43 	 * Consists of 2 bytes
44 	 */
45 	uint8_t minor_version[ 2 ];
46 
47 	/* The major version number
48 	 * Consists of 2 bytes
49 	 */
50 	uint8_t major_version[ 2 ];
51 
52 	/* The data blocks list offset
53 	 * Consists of 4 bytes
54 	 */
55 	uint8_t data_blocks_list_offset[ 4 ];
56 
57 	/* Unknown
58 	 * Consists of 4 bytes
59 	 */
60 	uint8_t unknown1[ 4 ];
61 
62 	/* The number of data blocks
63 	 * Consists of 2 bytes
64 	 */
65 	uint8_t number_of_data_blocks[ 2 ];
66 
67 	/* Unknown
68 	 * Consists of 2 bytes
69 	 */
70 	uint8_t unknown2[ 2 ];
71 
72 	/* Unknown
73 	 * Consists of 4 bytes
74 	 */
75 	uint8_t unknown3[ 4 ];
76 
77 	/* Unknown
78 	 * Consists of 8 bytes
79 	 */
80 	uint8_t unknown4[ 8 ];
81 };
82 
83 #if defined( __cplusplus )
84 }
85 #endif
86 
87 #endif /* !defined( _CREG_FILE_HEADER_H ) */
88 
89