231{
250 PCHAR CurrentVersion;
253
254
256 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\"
257 L"Control\\Session Manager\\Memory Management");
265 {
266
268
269
273 0,
275 &HavePae,
276 sizeof(HavePae));
277
278
280 }
281
282
284 L"\\Registry\\Machine\\Hardware\\Description\\System");
293
294
296 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\"
297 L"Control\\BIOSINFO");
306 0,
311 {
314 }
315
316
321 SystemHandle,
326 0,
328 0,
331
332
334 {
335
340 {
341
343 }
344
345
347 {
348#ifdef _M_AMD64
350#endif
351
353
354
361
362#if defined(_M_IX86)
363
365 {
366
368 "80%u86-%c%x",
372 }
373 else
374 {
375
378 "x86",
382 }
383#elif defined(_M_AMD64)
385 {
386
387 FamilyId = "VIA64";
388 }
390 {
391
392 FamilyId = "AMD64";
393 }
394 else
395 {
396
397 FamilyId = "EM64T";
398 }
399
400
403 FamilyId,
407#else
408#error Unknown architecture
409#endif
410
411
413
414
416 SystemHandle,
419 0xFFFFFFFF,
420 IndexTable);
422 {
426 }
427
428
430 {
431
438
439
441
442
444
445
447 SystemHandle,
448 &FpuHandle,
450 0xFFFFFFFF,
451 IndexTable);
453 {
454
459 }
460
461
463
464
467 {
468
470 }
471 else
472 {
473
474 KiCpuId(&CpuInfo, 0x80000000);
475 ExtendedId = CpuInfo.
Eax;
476 if (ExtendedId >= 0x80000004)
477 {
478
479 PartialString = CpuString;
480 for (ExtendedId = 2; ExtendedId <= 4; ExtendedId++)
481 {
482
483 KiCpuId(&CpuInfo, 0x80000000 | ExtendedId);
484 ((
PULONG)PartialString)[0] = CpuInfo.
Eax;
485 ((
PULONG)PartialString)[1] = CpuInfo.
Ebx;
486 ((
PULONG)PartialString)[2] = CpuInfo.
Ecx;
487 ((
PULONG)PartialString)[3] = CpuInfo.
Edx;
488
489
490 PartialString += 16;
491 }
492
493
495 }
496 }
497
498
500
501
502 if (PartialString)
503 {
504
507 {
508
512 0,
516
517
519 {
520
522 }
523
524
526 }
527 }
528
529
531 {
532
535 {
536
540 0,
544
545
547 }
548 }
549
550
552 {
553
557 0,
561 }
562
563
565 {
566
570 0,
574 }
575
576
578 {
579
583 0,
587 }
588
589
591
592
593 }
594 }
595
596
598 }
599
600
603 &SectionName,
611 {
612
613
616
617 goto Quickie;
618 }
619
620
622 Status = ZwMapViewOfSection(SectionHandle,
625 0,
627 &ViewBase,
633 {
634
635 VideoRomBase = 0xC0000;
636 }
637 else
638 {
639
642
643
644 VideoRomBase &= 0xFFFF8000;
645 if (VideoRomBase < 0xC0000) VideoRomBase = 0xC0000;
646
647
649 }
650
651
653
654
659
660
661 Status = ZwMapViewOfSection(SectionHandle,
664 0,
666 &ViewBase,
672 {
673
675 {
676
679 {
680
684 0,
688
689
691 }
692
693 if (BiosHandle)
694 {
695
698
699
703 {
704
707 0,
711
712
715
716
718 }
719
720
722 }
723 }
724
725
727 {
728
730 do
731 {
732
736 break;
737
738
741
742
744
745
748 {
749
750 break;
751 }
752
753
755
756
758
759
761 {
762
765
766
770 0,
774
775
778 }
779 }
780
781
783 }
784
785
789
790
791 Status = ZwMapViewOfSection(SectionHandle,
794 0,
796 &ViewBase,
802 {
803
805 {
806
809 {
810
814 0,
818
819
822
823
825 }
826 }
827
828
830 {
831
833 do
834 {
835
838 break;
839
840
843
844
846
847
850 {
851
852 break;
853 }
854
855
857
858
860
861
863 {
864
867
868
872 0,
876
877
880 }
881 }
882
883
885 }
886
887
889
890
892
893Quickie:
894
897}
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
UNICODE_STRING KeRosVideoBiosVersion
UNICODE_STRING KeRosProcessorName
UNICODE_STRING KeRosBiosVersion
UNICODE_STRING KeRosBiosDate
UNICODE_STRING KeRosVideoBiosDate
NTSTATUS NTAPI CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, IN HANDLE NodeHandle, OUT PHANDLE NewHandle, IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PUSHORT DeviceIndexTable)
PCM_FULL_RESOURCE_DESCRIPTOR CmpConfigurationData
ULONG CmpConfigurationAreaSize
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
BOOLEAN NTAPI CmpGetBiosDate(IN PCHAR BiosStart, IN ULONG BiosLength, IN PCHAR BiosDate, IN BOOLEAN FromBios)
BOOLEAN NTAPI CmpGetBiosVersion(IN PCHAR BiosStart, IN ULONG BiosLength, IN PCHAR BiosVersion)
#define OBJ_CASE_INSENSITIVE
#define ExFreePoolWithTag(_P, _T)
#define sprintf(buf, format,...)
#define InitializeObjectAttributes(p, n, a, r, s)
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
FORCEINLINE KAFFINITY AFFINITY_MASK(ULONG Index)
NTSYSAPI NTSTATUS NTAPI ZwOpenSection(_Out_ PHANDLE SectionHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI NtSetValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
#define SECTION_ALL_ACCESS
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NtCurrentProcess()
#define REG_OPTION_NON_VOLATILE
#define REG_CREATED_NEW_KEY
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
NTSTATUS NTAPI NtCreateKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG TitleIndex, IN PUNICODE_STRING Class OPTIONAL, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL)
_In_ ULONG _In_ ULONG _In_ ULONG Length
PKPRCB KiProcessorBlock[]
CONFIGURATION_COMPONENT ComponentEntry
CONFIGURATION_CLASS Class
LARGE_INTEGER UpdateSignature
VOID NTAPI KeSetSystemAffinityThread(IN KAFFINITY Affinity)
VOID NTAPI KeRevertToUserAffinityThread(VOID)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName