forked from WerWolv/ImHex-Patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prodinfo.hexpat
208 lines (161 loc) · 3.42 KB
/
prodinfo.hexpat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#pragma author WerWolv
#pragma description Nintendo Switch PRODINFO
enum Model : u16 {
NX = 1
};
struct WlanCountryCode {
char code[3];
} [[static]];
struct Cert {
u8 DeviceKey[0x30];
padding[0x10];
u8 DeviceCertificate[0x180];
padding[0x10];
} [[static]];
enum RegionCode : u32 {
JPN = 0,
USA = 1,
EUR = 2,
AUS = 3,
CHN = 4,
KOR = 5,
HKG = 6
};
enum ProductModel : u32 {
Invalid = 0,
NX = 1,
Copper = 2,
Iowa = 3,
Hoag = 4,
Calcio = 5,
Aula = 6
};
struct PRODINFO {
char MagicNumber[4];
u32 Version;
u32 BodySize;
Model Model;
u16 UpdateCount;
padding[0x10];
u8 BodyHash[0x20];
char ConfigurationId1[0x1E];
padding[0x02];
padding[0x20];
u32 WlanCountryCodesNum;
u32 WlanCountryCodesLastIndex;
WlanCountryCode WlanCountryCodes[WlanCountryCodesNum];
padding[0x180 - sizeof(WlanCountryCodes)];
padding[0x08];
u8 WlanMacAddress[6];
padding[0x10 - 6];
u8 BdAddress[6];
padding[0x10 - 6];
u8 AccelerometerOffset[6];
padding[2];
u8 AccelerometerScale[6];
padding[2];
u8 GyroscopeOffset[6];
padding[2];
u8 GyroscopeScale[6];
padding[2];
char SerialNumber[0x18];
padding[8];
Cert EccP256Certificate;
Cert EccB233Certificate;
Cert Ecc256ETicket;
Cert Ecc233ETicket;
u8 SslKey[0x110];
padding[0x10];
u32 SslCertificateSize;
padding[0x0C];
u8 SslCertificate[0x800];
u8 SslCertificateHash[0x20];
u8 RandomNumber[0x1000];
u8 RandomNumberHash[0x20];
u8 GameCardKey[0x110];
u8 GameCardCertificate[0x400];
padding[0x10];
u8 GameCardCertificateHash[0x20];
u8 Rsa2048ETicketKey[0x220];
padding[0x10];
u8 Rsa2048ETicketCertificate[0x240];
padding[0x10];
char BatteryLot[0x18];
padding[0x08];
u8 SpeakerCalibrationValue[0x800];
padding[0x10];
RegionCode RegionCode;
padding[0x0C];
u8 AmiiboKey[0x50];
padding[0x10];
u8 AmiiboEcqvCertificate[0x14];
padding[0x0C];
u8 AmiiboEcdsaCertificate[0x70];
padding[0x10];
u8 AmiiboEcqvBlsKey[0x40];
padding[0x10];
u8 AmiiboEcqvBlsCertificate[0x20];
padding[0x10];
u8 AmiiboEcqvBlsRootCertificate[0x90];
padding[0x10];
ProductModel ProductModel;
padding[0x0C];
u8 ColorVariation[6];
padding[0x0A];
u8 LcdBacklightBrightnessMapping[0x0C];
padding[0x04];
u8 ExtendedEccB233DeviceKey[0x50];
padding[0x10];
u8 ExtendedEccP256ETicketKey[0x50];
padding[0x10];
u8 ExtendedEccB233ETicketKey[0x50];
padding[0x10];
u8 ExtendedRsa2048ETicketKey[0x240];
padding[0x10];
u8 ExtendedSslKey[0x130];
padding[0x10];
u8 ExtendedGameCardKey[0x130];
padding[0x10];
u32 LcdVendorId;
padding[0x0C];
u8 ExtendedRsa2048DeviceKey[0x240];
padding[0x10];
u8 Rsa2048DeviceCertificate[0x240];
padding[0x10];
u8 UsbTypeCPowerSourceCircuitVersion;
padding[0x0F];
u32 HousingSubColor;
padding[0x0C];
u32 HousingBezelColor;
padding[0x0C];
u32 HousingMainColor1;
padding[0x0C];
u32 HousingMainColor2;
padding[0x0C];
u32 HousingMainColor3;
padding[0x0C];
u8 AnalogStickModuleTypeL;
padding[0x0F];
u8 AnalogStickModelParameterL[0x12];
padding[0x0E];
u8 AnalogStickFactoryCalibrationL[0x09];
padding[0x07];
u8 AnalogStickModuleTypeR;
padding[0x0F];
u8 AnalogStickModelParameterR[0x12];
padding[0x0E];
u8 AnalogStickFactoryCalibrationR[0x09];
padding[0x07];
u8 ConsoleSixAxisSensorModuleType;
padding[0x0F];
u8 ConsoleSixAxisSensorHorizontalOffset[6];
padding[0x0A];
u8 BatteryVersion;
padding[0x0F];
u8 TouchIcVendorId;
padding[0x0F];
u32 ColorModel;
padding[0x0C];
u8 ConsoleSixAxisSensorMountType;
};
PRODINFO PRODINFO @ 0x00;