-
Notifications
You must be signed in to change notification settings - Fork 3
/
CPU_Helper.asm
591 lines (535 loc) · 23 KB
/
CPU_Helper.asm
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
;==============================================================================
;
; UASM64 Library
;
; https://github.com/mrfearless/UASM64-Library
;
;==============================================================================
.686
.MMX
.XMM
.x64
option casemap : none
IF @Platform EQ 1
option win64 : 11
ENDIF
option frame : auto
_CPU_Features_CalcStringLength PROTO lpTable:QWORD, qwRecordCount:QWORD, qwRegValue:QWORD, qwStringType:QWORD, qwStringStyle:QWORD, lpqwCount:QWORD
_CPU_Features_CopyStrings PROTO lpTable:QWORD, qwRecordCount:QWORD, qwRegValue:QWORD, qwStringType:QWORD, qwStringStyle:QWORD, lpszFeatureString:QWORD, qwStringOffset:QWORD, qwEntriesFound:QWORD, bMore:QWORD
;RtlMoveMemory PROTO Destination:QWORD, Source:QWORD, qwLength:QWORD
;lstrlen PROTO lpszStr:QWORD
;includelib kernel32.lib
include UASM64.inc
IFNDEF CPU_FEATURES_RECORD
CPU_FEATURES_RECORD STRUCT
BitValue DD ?
lpszMnemonic DB 24 DUP (?)
lpszFeature DB 80 DUP (?)
CPU_FEATURES_RECORD ENDS
ENDIF
.DATA
szCFSS_NULL DB 0
qwCFSS_NULL DQ ($ - szCFSS_NULL)
szCFSS_SPACE DB 32
qwCFSS_SPACE DQ ($ - szCFSS_SPACE)
szCFSS_COMMA DB ', '
qwCFSS_COMMA DQ ($ - szCFSS_COMMA)
szCFSS_TAB DB 09
qwCFSS_TAB DQ ($ - szCFSS_TAB)
szCFSS_LF DB 10
qwCFSS_LF DQ ($ - szCFSS_LF)
szCFSS_CRLF DB 13,10
qwCFSS_CRLF DQ ($ - szCFSS_CRLF)
szCFSS_LIST DB '- '
qwCFSS_LIST DQ ($ - szCFSS_LIST)
szCFST_BOTH DB ': '
qwCFST_BOTH DQ ($ - szCFST_BOTH)
.CODE
UASM64_ALIGN
;------------------------------------------------------------------------------
; _CPU_Features_CalcStringLength
;
; Internal function used by CPU_Basic_Features, CPU_Basic_Features_Ext0,
; CPU_Basic_Features_Ext1, CPU_Basic_Features_Ext2 and CPU_Extended_Features
;
; Go through the CPU_FEATURES table specified by the lpTable parameter and AND
; each BitValue against the value in the qwRegValue parameter
;
; For each that matches, calculate the length of string (along with string
; style) and add that to the total for all strings: ; qwAllStringsLength
;
; Parameters:
;
; * lpTable - Pointer to the CPU_FEATURES table to use.
;
; * qwRecordCount - Total record count of the specified CPU_FEATURES table.
;
; * qwRegValue - The register value from CPUID to check against each record.
;
; * qwStringType - The type of feature string to include, can be one of the
; following value:
;
; * CFST_MNEMONIC - Short form of the feature: "AVX"
; * CFST_FEATURE - Long form describing the feature: "Advanced Vector Exte.."
; * CFST_BOTH - "AVX: Advanced Vector Extensions (AVX) Instruction Extensions"
;
; * qwStringStyle - the style of formatting for the feature string, can be one
; of the following values:
;
; * CFSS_NULL - null separated.
; * CFSS_SPACE - space separated.
; * CFSS_COMMA - comma and space separated.
; * CFSS_TAB - tab separated.
; * CFSS_LF - line feed (LF) separated.
; * CFSS_CRLF - carriage return (CR) and line feed (LF) separated.
; * CFSS_LIST - dash '- ' precedes text and CRLF separates.
;
; * lpqwCount - Pointer to a QWORD variable to store the count of matching
; records found whilst calculating the string length for all records.
;
; Returns:
;
; Returns in RAX the length of the calculated string to hold all the
; information from the table specified, that has matching records for the
; qwRegValue value. 0 if an error occured or no matching records found.
;
;------------------------------------------------------------------------------
_CPU_Features_CalcStringLength PROC FRAME USES RBX lpTable:QWORD, qwRecordCount:QWORD, qwRegValue:QWORD, qwStringType:QWORD, qwStringStyle:QWORD, lpqwCount:QWORD
LOCAL pRecord:QWORD
LOCAL nRecord:QWORD
LOCAL bRecord:QWORD
LOCAL BitValue:QWORD
LOCAL qwEntriesFound:QWORD
LOCAL lpszString:QWORD
LOCAL qwStringLength:QWORD
LOCAL qwStringLengthBoth:QWORD
LOCAL qwStringLengthFeature:QWORD
LOCAL qwAllStringsLength:QWORD
IFDEF DEBUG64
PrintText '_CPU_Features_CalcStringLength'
ENDIF
.IF lpTable == 0
jmp _CPU_Features_CalcStringLength_Error
.ENDIF
mov qwStringLength, 0
mov qwAllStringsLength, 0
mov rax, lpTable
mov pRecord, rax
mov nRecord, 0
mov qwEntriesFound, 0
mov rax, 0
.WHILE rax < qwRecordCount
mov rbx, pRecord
mov eax, dword ptr [rbx]
mov BitValue, rax
;------------------------------------------------------------------
; AND the values, to determine if we have found a match
;------------------------------------------------------------------
mov bRecord, FALSE
and rax, qwRegValue
.IF rax == BitValue
mov bRecord, TRUE
.ENDIF
;------------------------------------------------------------------
; If we have found a match we calculate length of string and adjust
; for the string style required and add to qwAllStringsLength
;------------------------------------------------------------------
.IF bRecord == TRUE
mov rbx, pRecord
mov rax, qwStringType
.IF rax == CFST_MNEMONIC ; Short form of the feature: "AVX"
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
add qwAllStringsLength, rax
.ELSEIF rax == CFST_FEATURE ; Long form describing the feature: "Advanced Vector Extensions (AVX) Instruction Extensions"
lea rax, [rbx].CPU_FEATURES_RECORD.lpszFeature
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
add qwAllStringsLength, rax
.ELSEIF rax == CFST_BOTH ; Both
; first check for the total string length for both
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLengthBoth, rax
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszFeature
mov lpszString, rax
Invoke String_LengthA, lpszString
add qwStringLengthBoth, rax
.IF qwStringLengthBoth != 0
mov qwStringLengthFeature, rax ; save lpszFeature length to here
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
add qwAllStringsLength, rax
.IF qwStringLength != 0 && qwStringLengthFeature != 0
add qwAllStringsLength, 2 ; for ': '
.ENDIF
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszFeature
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
add qwAllStringsLength, rax
.ELSE
mov qwStringLength, 0
.ENDIF
.ELSE ; same as CFST_MNEMONIC
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
add qwAllStringsLength, rax
.ENDIF
.IF qwStringLength != 0
mov rax, qwStringStyle
.IF rax == CFSS_NULL ; null seperated, double null terminated.
mov rax, 1
.ELSEIF rax == CFSS_SPACE ; space seperated, null terminated.
mov rax, 1
.ELSEIF rax == CFSS_COMMA ; comma and space seperated, null terminated.
mov rax, 2
.ELSEIF rax == CFSS_TAB ; tab seperated, null terminated.
mov rax, 1
.ELSEIF rax == CFSS_LF ; line feed (LF) seperated, null terminated.
mov rax, 1
.ELSEIF rax == CFSS_CRLF ; carriage return (CR) and line feed (LF) seperated, null terminated.
mov rax, 2
.ELSEIF rax == CFSS_LIST ; dash preceeds text and CRLF seperates, null terminated.
mov rax, 4
.ELSE
mov rax, 1 ; CFSS_NULL
.ENDIF
add qwAllStringsLength, rax
inc qwEntriesFound
.ENDIF
.ENDIF
add pRecord, SIZEOF CPU_FEATURES_RECORD
inc nRecord
mov rax, nRecord
.ENDW
IFDEF DEBUG64
PrintDec qwEntriesFound
ENDIF
.IF lpqwCount != 0
mov rbx, lpqwCount
mov rax, qwEntriesFound
mov [rbx], rax
.ENDIF
mov rax, qwAllStringsLength
ret
_CPU_Features_CalcStringLength_Error:
.IF lpqwCount != 0
mov rbx, lpqwCount
mov rax, 0
mov [rbx], rax
.ENDIF
mov rax, 0
ret
_CPU_Features_CalcStringLength ENDP
UASM64_ALIGN
;------------------------------------------------------------------------------
; _CPU_Features_CopyStrings
;
; Internal function used by CPU_Basic_Features, CPU_Basic_Features_Ext0,
; CPU_Basic_Features_Ext1, CPU_Basic_Features_Ext2 and CPU_Extended_Features
;
; Go through the CPU_FEATURES table specified by the lpTable parameter and AND
; each BitValue against the value in the qwRegValue parameter
;
; For each that matches, copy the string for that record (along with string
; style) and append that to the buffer for all the strings, which is pointed to
; by thge lpszFeatureString parameter.
;
; Parameters:
;
; * lpTable - Pointer to the CPU_FEATURES table to use.
;
; * qwRecordCount - Total record count of the specified CPU_FEATURES table.
;
; * qwRegValue - The register value from CPUID to check against each record.
;
; * qwStringType - The type of feature string to include, can be one of the
; following value:
;
; * CFST_MNEMONIC - Short form of the feature: "AVX"
; * CFST_FEATURE - Long form describing the feature: "Advanced Vector Exte.."
; * CFST_BOTH - "AVX: Advanced Vector Extensions (AVX) Instruction Extensions"
;
; * qwStringStyle - the style of formatting for the feature string, can be one
; of the following values:
;
; * CFSS_NULL - null separated.
; * CFSS_SPACE - space separated.
; * CFSS_COMMA - comma and space separated.
; * CFSS_TAB - tab separated.
; * CFSS_LF - line feed (LF) separated.
; * CFSS_CRLF - carriage return (CR) and line feed (LF) separated.
; * CFSS_LIST - dash '- ' precedes text and CRLF separates.
;
; * lpszFeatureString - A pointer to a buffer to store the strings copied from
; the record that matches the value in the qwRegValue parameter.
;
; * qwStringOffset - The starting offset in the string pointed to by the
; lpszFeatureString parameter to start copying to.
;
; * qwEntriesFound - Parameter details.
;
; * bMore - TRUE if more will be added to lpszFeatureString later on, or FALSE.
;
; Returns:
;
; In RAX, the current position in the buffer for the string pointed to by the
; lpszFeatureString parameter, which can be used in subsequent calls to this
; function, by passing the value in via the qwStringOffset parameter.
;
; 0 is returned if an error occurred, no entries to search for or no buffer to
; copy the strings to.
;
;------------------------------------------------------------------------------
_CPU_Features_CopyStrings PROC FRAME USES RBX lpTable:QWORD, qwRecordCount:QWORD, qwRegValue:QWORD, qwStringType:QWORD, qwStringStyle:QWORD, lpszFeatureString:QWORD, qwStringOffset:QWORD, qwEntriesFound:QWORD, bMore:QWORD
LOCAL pRecord:QWORD
LOCAL nRecord:QWORD
LOCAL bRecord:QWORD
LOCAL BitValue:QWORD
LOCAL lpszString:QWORD
LOCAL qwStringLength:QWORD
LOCAL qwStringLengthBoth:QWORD
LOCAL qwStringLengthFeature:QWORD
LOCAL qwEntry:QWORD
LOCAL qwFeatureStringPos:QWORD
IFDEF DEBUG64
PrintText '_CPU_Features_CopyStrings'
ENDIF
.IF lpTable == 0 || lpszFeatureString == 0 || qwEntriesFound == 0
jmp _CPU_Features_CopyStrings_Error
.ENDIF
mov rax, qwStringOffset
mov qwFeatureStringPos, rax
mov qwEntry, 1
mov qwStringLength, 0
mov rax, lpTable
mov pRecord, rax
mov nRecord, 0
mov rax, 0
.WHILE rax < qwRecordCount
mov rbx, pRecord
mov eax, dword ptr [rbx]
mov BitValue, rax
;------------------------------------------------------------------
; AND the values, to determine if we have found a match
;------------------------------------------------------------------
mov bRecord, FALSE
and rax, qwRegValue
.IF rax == BitValue
mov bRecord, TRUE
.ENDIF
IFDEF DEBUG64
.IF qwEntriesFound == 1
mov rax, qwRegValue
.IF rax == BitValue
PrintDec qwRegValue
PrintDec BitValue
PrintDec qwStringOffset
PrintDec bMore
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
DbgDump rax, 4
.ENDIF
.ENDIF
ENDIF
;--------------------------------------------------------------
; If we have found a match we copy the string (and add for the
; string style) to the total strings buffer: lpszAllStrings
;--------------------------------------------------------------
.IF bRecord == TRUE
.IF qwStringStyle == CFSS_LIST ; dash preceeds text and CRLF seperates, null terminated.
lea rax, szCFSS_LIST
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_LIST
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_LIST
mov rax, qwCFSS_LIST
add qwFeatureStringPos, rax
.ENDIF
mov rbx, pRecord
mov rax, qwStringType
.IF rax == CFST_MNEMONIC ; Short form of the feature: "AVX"
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
mov rax, lpszString
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwStringLength
;Invoke RtlMoveMemory, rdi, rsi, qwStringLength
mov rax, qwStringLength
add qwFeatureStringPos, rax
.ELSEIF rax == CFST_FEATURE ; Long form describing the feature: "Advanced Vector Extensions (AVX) Instruction Extensions"
lea rax, [rbx].CPU_FEATURES_RECORD.lpszFeature
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
mov rax, lpszString
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwStringLength
;Invoke RtlMoveMemory, rdi, rsi, qwStringLength
mov rax, qwStringLength
add qwFeatureStringPos, rax
.ELSEIF rax == CFST_BOTH ; Both
; first check for the total string length for both
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLengthBoth, rax
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszFeature
mov lpszString, rax
Invoke String_LengthA, lpszString
add qwStringLengthBoth, rax
.IF qwStringLengthBoth != 0
mov qwStringLengthFeature, rax ; save lpszFeature length to here
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
mov rax, lpszString
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwStringLength
;Invoke RtlMoveMemory, rdi, rsi, qwStringLength
mov rax, qwStringLength
add qwFeatureStringPos, rax
.IF qwStringLength != 0 && qwStringLengthFeature != 0
; ': '
lea rax, szCFST_BOTH
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFST_BOTH
;Invoke RtlMoveMemory, rdi, rsi, qwCFST_BOTH
mov rax, qwCFST_BOTH
add qwFeatureStringPos, rax
.ENDIF
mov rbx, pRecord
lea rax, [rbx].CPU_FEATURES_RECORD.lpszFeature
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
mov rax, lpszString
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwStringLength
;Invoke RtlMoveMemory, rdi, rsi, qwStringLength
mov rax, qwStringLength
add qwFeatureStringPos, rax
.ELSE
mov qwStringLength, 0
.ENDIF
.ELSE ; same as CFST_MNEMONIC
lea rax, [rbx].CPU_FEATURES_RECORD.lpszMnemonic
mov lpszString, rax
Invoke String_LengthA, lpszString
mov qwStringLength, rax
mov rax, lpszString
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwStringLength
;Invoke RtlMoveMemory, rdi, rsi, qwStringLength
mov rax, qwStringLength
add qwFeatureStringPos, rax
.ENDIF
mov rax, qwEntry
.IF rax < qwEntriesFound || (rax == qwEntriesFound && bMore == TRUE)
.IF qwStringLength != 0
mov rax, qwStringStyle
.IF rax == CFSS_NULL ; null seperated, double null terminated.
lea rax, szCFSS_NULL
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_NULL
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_NULL
mov rax, qwCFSS_NULL
add qwFeatureStringPos, rax
.ELSEIF rax == CFSS_SPACE ; space seperated, null terminated.
lea rax, szCFSS_SPACE
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_SPACE
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_SPACE
mov rax, qwCFSS_SPACE
add qwFeatureStringPos, rax
.ELSEIF rax == CFSS_COMMA ; comma and space seperated, null terminated.
lea rax, szCFSS_COMMA
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_COMMA
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_COMMA
mov rax, qwCFSS_COMMA
add qwFeatureStringPos, rax
.ELSEIF rax == CFSS_TAB ; tab seperated, null terminated.
lea rax, szCFSS_TAB
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_TAB
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_TAB
mov rax, qwCFSS_TAB
add qwFeatureStringPos, rax
.ELSEIF rax == CFSS_LF ; line feed (LF) seperated, null terminated.
lea rax, szCFSS_LF
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_LF
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_LF
mov rax, qwCFSS_LF
add qwFeatureStringPos, rax
.ELSEIF rax == CFSS_CRLF ; carriage return (CR) and line feed (LF) seperated, null terminated.
lea rax, szCFSS_CRLF
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_CRLF
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_CRLF
mov rax, qwCFSS_CRLF
add qwFeatureStringPos, rax
.ELSEIF rax == CFSS_LIST ; dash preceeds text and CRLF seperates, null terminated.
lea rax, szCFSS_CRLF
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_CRLF
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_CRLF
mov rax, qwCFSS_CRLF
add qwFeatureStringPos, rax
.ELSE
lea rax, szCFSS_NULL
mov rbx, lpszFeatureString
add rbx, qwFeatureStringPos
Invoke Memory_Copy, rax, rbx, qwCFSS_NULL
;Invoke RtlMoveMemory, rdi, rsi, qwCFSS_NULL
mov rax, qwCFSS_NULL
add qwFeatureStringPos, rax
.ENDIF
.ENDIF
.ENDIF
inc qwEntry
.ENDIF
add pRecord, SIZEOF CPU_FEATURES_RECORD
inc nRecord
mov rax, nRecord
.ENDW
mov rax, qwFeatureStringPos
ret
_CPU_Features_CopyStrings_Error:
mov rax, 0
ret
_CPU_Features_CopyStrings endp
END