-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathumfuncs.h
4865 lines (4351 loc) · 84.1 KB
/
umfuncs.h
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
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
umfuncs.h
Abstract:
Function definitions for Native DLL (ntdll) APIs exclusive to User Mode.
Author:
Alex Ionescu ([email protected]) - Updated - 27-Feb-2006
--*/
#ifdef NTOS_MODE_USER
#ifndef _UMFUNCS_H
#define _UMFUNCS_H
//
// Dependencies
//
#include <..\ndk\umtypes.h>
#include <..\ndk\dbgktypes.h>
struct _CSR_API_MESSAGE;
struct _CSR_CAPTURE_BUFFER;
//
// CSR Functions
//
PVOID
NTAPI
CsrAllocateCaptureBuffer(
ULONG ArgumentCount,
ULONG BufferSize
);
ULONG
NTAPI
CsrAllocateMessagePointer(
struct _CSR_CAPTURE_BUFFER *CaptureBuffer,
ULONG MessageLength,
PVOID *CaptureData
);
VOID
NTAPI
CsrCaptureMessageBuffer(
struct _CSR_CAPTURE_BUFFER *CaptureBuffer,
PVOID MessageString,
ULONG StringLength,
PVOID *CapturedData
);
NTSTATUS
NTAPI
CsrClientConnectToServer(
PWSTR ObjectDirectory,
ULONG ServerId,
PVOID ConnectionInfo,
PULONG ConnectionInfoSize,
PBOOLEAN ServerToServerCall
);
NTSTATUS
NTAPI
CsrClientCallServer(
struct _CSR_API_MESSAGE *Request,
struct _CSR_CAPTURE_BUFFER *CaptureBuffer OPTIONAL,
ULONG ApiNumber,
ULONG RequestLength
);
NTSTATUS
NTAPI
CsrIdentifyAlertableThread(
VOID
);
VOID
NTAPI
CsrFreeCaptureBuffer(
struct _CSR_CAPTURE_BUFFER *CaptureBuffer
);
HANDLE
NTAPI
CsrGetProcessId(
VOID
);
NTSTATUS
NTAPI
CsrNewThread(VOID);
NTSTATUS
NTAPI
CsrSetPriorityClass(
HANDLE Process,
PULONG PriorityClass
);
VOID
NTAPI
CsrProbeForRead(
IN PVOID Address,
IN ULONG Length,
IN ULONG Alignment
);
VOID
NTAPI
CsrProbeForWrite(
IN PVOID Address,
IN ULONG Length,
IN ULONG Alignment
);
//
// Debug Functions
//
__analysis_noreturn
NTSYSAPI
VOID
NTAPI
DbgBreakPointWithStatus(
_In_ ULONG Status
);
NTSTATUS
NTAPI
DbgUiConnectToDbg(
VOID
);
NTSTATUS
NTAPI
DbgUiContinue(
_In_ PCLIENT_ID ClientId,
_In_ NTSTATUS ContinueStatus
);
NTSTATUS
NTAPI
DbgUiDebugActiveProcess(
_In_ HANDLE Process
);
NTSTATUS
NTAPI
DbgUiStopDebugging(
_In_ HANDLE Process
);
NTSYSAPI
NTSTATUS
NTAPI
DbgUiWaitStateChange(
_In_ PDBGUI_WAIT_STATE_CHANGE DbgUiWaitStateCange,
_In_ PLARGE_INTEGER TimeOut
);
NTSTATUS
NTAPI
DbgUiConvertStateChangeStructure(
_In_ PDBGUI_WAIT_STATE_CHANGE WaitStateChange,
_In_ PVOID DebugEvent
);
VOID
NTAPI
DbgUiRemoteBreakin(
VOID
);
NTSTATUS
NTAPI
DbgUiIssueRemoteBreakin(
_In_ HANDLE Process
);
HANDLE
NTAPI
DbgUiGetThreadDebugObject(
VOID
);
//
// Loader Functions
//
NTSTATUS
NTAPI
LdrAddRefDll(
_In_ ULONG Flags,
_In_ PVOID BaseAddress
);
NTSTATUS
NTAPI
LdrDisableThreadCalloutsForDll(
_In_ PVOID BaseAddress
);
NTSTATUS
NTAPI
LdrGetDllHandle(
_In_opt_ PWSTR DllPath,
_In_ PULONG DllCharacteristics,
_In_ PUNICODE_STRING DllName,
_Out_ PVOID *DllHandle
);
NTSTATUS
NTAPI
LdrGetDllHandleEx(
_In_ ULONG Flags,
_In_opt_ PWSTR DllPath,
_In_opt_ PULONG DllCharacteristics,
_In_ PUNICODE_STRING DllName,
_Out_opt_ PVOID *DllHandle);
NTSTATUS
NTAPI
LdrFindEntryForAddress(
_In_ PVOID Address,
_Out_ PLDR_DATA_TABLE_ENTRY *Module
);
NTSTATUS
NTAPI
LdrGetProcedureAddress(
_In_ PVOID BaseAddress,
_In_ PANSI_STRING Name,
_In_ ULONG Ordinal,
_Out_ FARPROC* ProcedureAddress
);
VOID
NTAPI
LdrInitializeThunk(
ULONG Unknown1,
ULONG Unknown2,
ULONG Unknown3,
ULONG Unknown4
);
NTSTATUS
NTAPI
LdrLoadDll(
_In_opt_ PWSTR SearchPath,
_In_opt_ PULONG LoadFlags,
_In_ PUNICODE_STRING Name,
_Out_opt_ PVOID *BaseAddress
);
PIMAGE_BASE_RELOCATION
NTAPI
LdrProcessRelocationBlock(
_In_ ULONG_PTR Address,
_In_ ULONG Count,
_In_ PUSHORT TypeOffset,
_In_ LONG_PTR Delta
);
NTSTATUS
NTAPI
LdrQueryImageFileExecutionOptions(
_In_ PUNICODE_STRING SubKey,
_In_ PCWSTR ValueName,
_In_ ULONG ValueSize,
_Out_ PVOID Buffer,
_In_ ULONG BufferSize,
_Out_opt_ PULONG RetunedLength
);
NTSTATUS
NTAPI
LdrQueryProcessModuleInformation(
_In_opt_ PRTL_PROCESS_MODULES ModuleInformation,
_In_opt_ ULONG Size,
_Out_ PULONG ReturnedSize
);
VOID
NTAPI
LdrSetDllManifestProber(
_In_ PLDR_MANIFEST_PROBER_ROUTINE Routine);
NTSTATUS
NTAPI
LdrShutdownProcess(
VOID
);
NTSTATUS
NTAPI
LdrShutdownThread(
VOID
);
NTSTATUS
NTAPI
LdrUnloadDll(
_In_ PVOID BaseAddress
);
typedef VOID (NTAPI *PLDR_CALLBACK)(PVOID CallbackContext, PCHAR Name);
NTSTATUS
NTAPI
LdrVerifyImageMatchesChecksum(
_In_ HANDLE FileHandle,
_In_ PLDR_CALLBACK Callback,
_In_ PVOID CallbackContext,
_Out_ PUSHORT ImageCharacterstics
);
NTSTATUS
NTAPI
LdrOpenImageFileOptionsKey(
_In_ PUNICODE_STRING SubKey,
_In_ BOOLEAN Wow64,
_Out_ PHANDLE NewKeyHandle
);
NTSTATUS
NTAPI
LdrQueryImageFileKeyOption(
_In_ HANDLE KeyHandle,
_In_ PCWSTR ValueName,
_In_ ULONG Type,
_Out_ PVOID Buffer,
_In_ ULONG BufferSize,
_Out_opt_ PULONG ReturnedLength
);
//This is Google's cache of http://www.howzatt.demon.co.uk/NtTrace/NtTrace.cfg. It is a snapshot of the page as it appeared on 2 Apr 2015 20:42:42 GMT. The current page could have changed in the meantime. Learn more
//Tip: To quickly find your search term on this page, press Ctrl + F or ? - F(Mac) and use the find bar.
//
//
// Text - only version
//
//
//
// // NTDLL Native Interface entry points
//
// // @author Roger Orr <[email protected]>
//
// // Copyright © 2002,2012.
// // This software is distributed in the hope that it will be useful, but
// // without WITHOUT ANY WARRANTY; without even the implied warranty of
// // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// // Permission is granted to anyone to make or distribute verbatim
// // copies of this software provided that the copyright notice and
// // this permission notice are preserved, and that the distributor
// // grants the recipient permission for further distribution as permitted
// // by this notice.
//
// // Comments and suggestions are always welcome.
// // Please report bugs to [email protected].
//
// // $Id: NtTrace.cfg 1405 2013-11-12 23:57:17Z Roger $
//
// typedef USHORT RTL_ATOM;
//
//typedef ULONG_PTR KAFFINITY;
//
//typedef PULONG PNTSTATUS;
//typedef PULONG PACCESS_MASK;
//typedef PULONG PDEVICE_POWER_STATE;
//
//typedef PUSHORT PRTL_ATOM;
//
typedef PVOID PALPC_CONTEXT_ATTR;
typedef PVOID PALPC_INFO;
typedef PVOID PALPC_MESSAGE_ATTRIBUTES;
typedef PVOID PALPC_MESSAGE_VIEW;
typedef PVOID PALPC_PORT_ATTRIBUTES;
typedef PVOID PALPC_SECURITY_ATTR;
//typedef PVOID PBOOT_ENTRY;
//typedef PVOID PCONTEXT;
//typedef PVOID PDRIVER_ENTRY;
//typedef PVOID PEXCEPTION_RECORD;
//typedef PVOID PGENERIC_MAPPING;
//typedef PVOID PGROUP_AFFINITY;
typedef PVOID PGUID;
//typedef PVOID PLUID;
//typedef PVOID PIO_APC_ROUTINE;
//typedef PVOID PPLUGPLAY_EVENT_BLOCK;
//typedef PVOID PPORT_VIEW;
//typedef PVOID PPROCESSOR_NUMBER;
//typedef PVOID PREMOTE_PORT_VIEW;
//typedef PVOID PRTL_USER_PROCESS_PARAMETERS;
//typedef PVOID POBJECT_TYPE_LIST;
//typedef PVOID PPRIVILEGE_SET;
typedef PVOID PSID;
//typedef PVOID PSECURITY_ATTRIBUTES;
typedef PVOID PSECURITY_DESCRIPTOR;
//typedef PVOID PTIMER_APC_ROUTINE;
//typedef PVOID PKTMOBJECT_CURSOR;
//typedef PVOID PTOKEN_DEFAULT_DACL;
//typedef PVOID PTOKEN_GROUPS;
//typedef PVOID PTOKEN_OWNER;
//typedef PVOID PTOKEN_PRIMARY_GROUP;
//typedef PVOID PTOKEN_PRIVILEGES;
//typedef PVOID PTOKEN_SOURCE;
//typedef PVOID PTOKEN_USER;
//typedef PVOID PTRANSACTION_NOTIFICATION;
typedef struct _LPC_MESSAGE {
USHORT DataLength;
USHORT Length;
USHORT MessageType;
USHORT DataInfoOffset;
CLIENT_ID ClientId;
ULONG MessageId;
ULONG CallbackId;
} LPC_MESSAGE, *PLPC_MESSAGE;
//
//// Alternate name for LPC_MESSAGE
//typedef PLPC_MESSAGE PPORT_MESSAGE;
//[Atom]
//NTSTATUS
//NTAPI
//NtAddAtom(
//IN PWSTR AtomName,
//IN ULONG AtomNameLength,
//OUT PRTL_ATOM Atom
//);
//[Atom]
//NTSTATUS
//NTAPI
//NtDeleteAtom(
//IN RTL_ATOM Atom
//);
//[Atom]
//NTSTATUS
//NTAPI
//NtFindAtom(
//IN PWSTR AtomName,
//IN ULONG AtomNameLength,
//OUT PRTL_ATOM Atom OPTIONAL
//);
//[Atom]
//NTSTATUS
//NTAPI
//NtQueryInformationAtom(
//IN RTL_ATOM Atom,
//IN ATOM_INFORMATION_CLASS AtomInformationClass,
//OUT PVOID AtomInformation,
//IN ULONG Length,
//OUT PULONG ReturnLength OPTIONAL
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtCreateProfile(
//OUT PHANDLE ProfileHandle,
//IN HANDLE Process,
//IN PVOID ProfileBase,
//IN ULONG ProfileSize,
//IN ULONG BucketSize,
//IN PULONG Buffer,
//IN ULONG BufferSize,
//IN KPROFILE_SOURCE ProfileSource,
//IN KAFFINITY Affinity
//);
//[Debug]
NTSTATUS
NTAPI
NtCreateProfileEx(
__out PHANDLE ProfileHandle,
__in_opt HANDLE Process,
__in PVOID ProfileBase,
__in ULONG ProfileSize,
__in ULONG BucketSize,
__in PULONG Buffer,
__in ULONG BufferSize,
__in ULONG ProfileSource,
__in ULONG GroupAffinityCount,
__in_opt PGROUP_AFFINITY GroupAffinity
);
//[Debug]
//NTSTATUS
//NTAPI
//NtDebugActiveProcess(
//IN HANDLE Process,
//IN HANDLE DebugHandle
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtDebugContinue(
//IN HANDLE DebugHandle,
//IN PCLIENT_ID ClientId,
//IN NTSTATUS Status
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtQueryDebugFilterState(
//IN ULONG Component,
//IN ULONG Level
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtQueryIntervalProfile(
//IN KPROFILE_SOURCE Source,
//OUT PULONG Interval
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtQueryPerformanceCounter(
//OUT PLARGE_INTEGER Counter,
//OUT PLARGE_INTEGER Freq OPTIONAL
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtRegisterThreadTerminatePort(
//IN HANDLE PortHandle
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtRemoveProcessDebug(
//IN HANDLE ProcessHandle,
//IN HANDLE DebugHandle
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtSetDebugFilterState(
//IN ULONG Component,
//IN ULONG Level,
//IN BOOLEAN State
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtSetInformationDebugObject(
//IN HANDLE DebugHandle,
//IN DEBUGOBJECTINFOCLASS Class,
//IN PVOID Buffer,
//IN ULONG Length,
//OUT PULONG ReturnLength OPTIONAL
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtSetIntervalProfile(
//IN ULONG Interval,
//IN KPROFILE_SOURCE Source
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtStartProfile(
//IN HANDLE ProfileHandle
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtStopProfile(
//IN HANDLE ProfileHandle
//);
typedef enum _DEBUG_CONTROL_CODE {
DebugGetTraceInformation = 1,
DebugSetInternalBreakpoint,
DebugSetSpecialCall,
DebugClearSpecialCalls,
DebugQuerySpecialCalls,
DebugDbgBreakPoint,
DebugMaximum,
DebugSysReadPhysicalMemory = 10,
DebugSysReadIoSpace = 14,
DebugSysWriteIoSpace = 15
} DEBUG_CONTROL_CODE;
//[Debug]
//NTSTATUS
//NTAPI
//NtSystemDebugControl(
//IN DEBUG_CONTROL_CODE Command,
//IN PVOID InputBuffer,
//IN ULONG InputBufferLength,
//OUT PVOID OutputBuffer,
//IN ULONG OutputBufferLength,
//OUT PULONG ReturnLength
//);
//[Debug]
//NTSTATUS
//NTAPI
//NtWaitForDebugEvent(
//IN HANDLE DebugHandle,
//IN BOOLEAN Alertable,
//IN PLARGE_INTEGER Timeout OPTIONAL,
//OUT PULONG Result
//);
//[Device]
//NTSTATUS
//NTAPI
//NtAddBootEntry(
//IN PUNICODE_STRING Name,
//IN PUNICODE_STRING Value
//);
//[Device]
//NTSTATUS
//NTAPI
//NtAddDriverEntry(
//IN PUNICODE_STRING Name,
//IN PUNICODE_STRING Path
//);
//[Device]
//NTSTATUS
//NTAPI
//NtCancelDeviceWakeupRequest(
//IN HANDLE DeviceHandle
//);
//[Device]
//NTSTATUS
//NTAPI
//NtDeleteBootEntry(
//IN PUNICODE_STRING Name
//);
//[Device]
//NTSTATUS
//NTAPI
//NtDeleteDriverEntry(
//IN PUNICODE_STRING Name
//);
//[Device]
NTSTATUS
NTAPI
NtDisableLastKnownGood(
);
//[Device]
NTSTATUS
NTAPI
NtEnableLastKnownGood(
);
//[Device]
//NTSTATUS
//NTAPI
//NtEnumerateBootEntries(
//IN PVOID Buffer,
//IN PULONG BufferLength
//);
//[Device]
//NTSTATUS
//NTAPI
//NtEnumerateDriverEntries(
//IN PVOID Buffer,
//IN PULONG BufferLength
//);
//[Device]
//NTSTATUS
//NTAPI
//NtGetDevicePowerState(
//IN HANDLE DeviceHandle,
//OUT PDEVICE_POWER_STATE State
//);
//[Device]
//NTSTATUS
//NTAPI
//NtGetPlugPlayEvent(
//__in HANDLE EventHandle,
//__in_opt PVOID Context,
//__out PPLUGPLAY_EVENT_BLOCK EventBlock,
//__in ULONG EventBufferSize
//);
//[Device]
//NTSTATUS
//NTAPI
//NtInitiatePowerAction(
//IN POWER_ACTION Action,
//IN SYSTEM_POWER_STATE State,
//IN ULONG Flags,
//IN BOOLEAN Asynch
//);
//[Device]
//NTSTATUS
//NTAPI
//NtLoadDriver(
//IN PUNICODE_STRING DriverName
//);
//[Device]
//NTSTATUS
//NTAPI
//NtModifyBootEntry(
//IN PBOOT_ENTRY BootEntry
//);
//[Device]
//typedef struct _DRIVER_ENTRY{
// 20 // Original Driver Object
// 21 PDRIVER_OBJECT DriverObject;
// 22 // Original Dispatch Functions
// 23 PDRIVER_DISPATCH DriverDispatch[IRP_MJ_MAXIMUM_FUNCTION + 1];
// 24 struct _DRIVER_ENTRY * Next;
// 25 } DRIVER_ENTRY, *PDRIVER_ENTRY;
//NTSTATUS
//NTAPI
//NtModifyDriverEntry(
//IN PEFI_DRIVER_ENTRY DriverEntry
//);
//[Device]
//NTSTATUS
//NTAPI
//NtPlugPlayControl(
//IN ULONG Class,
//IN OUT PVOID Buffer,
//IN ULONG BufferSize
//);
//[Device]
//NTSTATUS
//NTAPI
//NtPowerInformation(
//IN POWER_INFORMATION_LEVEL InformationLevel,
//IN PVOID InputBuffer OPTIONAL,
//IN ULONG InputLength,
//OUT PVOID OutputBuffer,
//IN ULONG OutputLength
//);
//[Device]
//NTSTATUS
//NTAPI
//NtQueryBootEntryOrder(
//IN PULONG OrderArray OPTIONAL,
//IN OUT PULONG OrderCount
//);
//[Device]
//NTSTATUS
//NTAPI
//NtQueryBootOptions(
//OUT PVOID Buffer OPTIONAL,
//IN OUT PULONG BufferLength
//);
//[Device]
NTSTATUS
NTAPI
NtQueryDriverEntryOrder(
OUT PULONG OrderArray OPTIONAL,
IN OUT PULONG OrderCount
);
//[Device]
NTSTATUS
NTAPI
NtReplacePartitionUnit(
__in PUNICODE_STRING TargetInstancePath,
__in PUNICODE_STRING SpareInstancePath,
__in ULONG Flags
);
//[Device]
//NTSTATUS
//NTAPI
//NtRequestDeviceWakeup(
//IN HANDLE DeviceHandle
//);
//[Device]
//NTSTATUS
//NTAPI
//NtRequestWakeupLatency(
//IN ULONG LatencyTime
//);
//[Device]
NTSTATUS
NTAPI
NtSerializeBoot(
);
//[Device]
//NTSTATUS
//NTAPI
//NtSetBootEntryOrder(
//IN PULONG OrderArray,
//IN ULONG OrderCount
//);
//[Device]
//NTSTATUS
//NTAPI
//NtSetBootOptions(
//IN PVOID Buffer,
//IN ULONG BufferLength
//);
//[Device]
//NTSTATUS
//NTAPI
//NtSetDriverEntryOrder(
//IN PULONG OrderArray,
//IN ULONG OrderCount
//);
//[Device]
//NTSTATUS
//NTAPI
//NtSetSystemPowerState(
//IN POWER_ACTION Action,
//IN SYSTEM_POWER_STATE State,
//IN ULONG Flags
//);
//[Device]
//NTSTATUS
//NTAPI
//NtSetThreadExecutionState(
//IN ULONG State,
//OUT PULONG PreviousState
//);
//[Device]
//NTSTATUS
//NTAPI
//NtUnloadDriver(
//IN PUNICODE_STRING DriverName
//);
//[Device]
//NTSTATUS
//NTAPI
//NtVdmControl(
//IN ULONG ControlCode,
//IN PVOID ControlData
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtEnumerateSystemEnvironmentValuesEx(
//IN ULONG Class,
//OUT PVOID Buffer,
//IN ULONG BufferLength
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtGetCurrentProcessorNumber(
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtIsSystemResumeAutomatic(
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtQueryDefaultLocale(
//IN BOOLEAN UserProfile,
//OUT PLCID DefaultLocaleId
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtQueryDefaultUILanguage(
//OUT PULONG LanguageId
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtQueryInstallUILanguage(
//OUT PULONG LanguageId
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtQuerySystemEnvironmentValue(
//IN PUNICODE_STRING Name,
//OUT PWSTR Value,
//IN ULONG Length,
//OUT PULONG ReturnLength OPTIONAL
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtQuerySystemEnvironmentValueEx(
//IN PUNICODE_STRING VariableName,
//IN PVOID Guid,
//OUT PVOID Buffer,
//IN OUT PULONG BufferLength,
//IN OUT PULONG Attributes
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtSetDefaultLocale(
//IN BOOLEAN UserProfile,
//IN LCID LocaleId
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtSetDefaultUILanguage(
//IN ULONG LanguageId
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtSetSystemEnvironmentValue(
//IN PUNICODE_STRING Name,
//IN PUNICODE_STRING Value
//);
//[Environment]
//NTSTATUS
//NTAPI
//NtSetSystemEnvironmentValueEx(
//IN PUNICODE_STRING Name,
//IN PVOID Guid,
//IN PVOID Buffer,
//IN ULONG BufferLength,
//IN ULONG Attributes
//);
//[File]
//NTSTATUS
//NTAPI
//NtAreMappedFilesTheSame(
//IN PVOID Address1,
//IN PVOID Address2
//);
//[File]
//NTSTATUS
//NTAPI
//NtCancelIoFile(
//IN HANDLE FileHandle,
//OUT PIO_STATUS_BLOCK IoStatusBlock