1
2
3
4#pragma pack(push,8)
5#pragma pack(pop)
6typedef unsigned short wchar_t;
7typedef unsigned long ULONG_PTR;
8typedef unsigned long *PULONG_PTR;
9typedef ULONG_PTR SIZE_T;
10typedef void *PVOID;
11typedef char CHAR;
12typedef short SHORT;
13typedef long LONG;
14typedef wchar_t WCHAR;
15typedef WCHAR *PWSTR;
16typedef WCHAR const *PCWSTR;
17typedef CHAR *PCHAR;
18typedef LONG *PLONG;
19typedef unsigned char UCHAR;
20typedef unsigned short USHORT;
21typedef unsigned long ULONG;
22typedef UCHAR *PUCHAR;
23typedef ULONG *PULONG;
24typedef void *HANDLE;
25typedef HANDLE *PHANDLE;
26typedef char CCHAR;
27typedef short CSHORT;
28typedef ULONG LCID;
29typedef LONG NTSTATUS;
30typedef long long LONGLONG;
31struct __anonstruct____missing_field_name_1 {
32 ULONG LowPart ;
33 LONG HighPart ;
34};
35struct __anonstruct_u_2 {
36 ULONG LowPart ;
37 LONG HighPart ;
38};
39union _LARGE_INTEGER {
40 struct __anonstruct____missing_field_name_1 __annonCompField1 ;
41 struct __anonstruct_u_2 u ;
42 LONGLONG QuadPart ;
43};
44typedef union _LARGE_INTEGER LARGE_INTEGER;
45typedef LARGE_INTEGER *PLARGE_INTEGER;
46struct _LUID {
47 ULONG LowPart ;
48 LONG HighPart ;
49};
50typedef struct _LUID LUID;
51typedef LARGE_INTEGER PHYSICAL_ADDRESS;
52enum _EVENT_TYPE {
53 NotificationEvent = 0,
54 SynchronizationEvent = 1
55} ;
56typedef enum _EVENT_TYPE EVENT_TYPE;
57typedef char const *PCSZ;
58struct _STRING {
59 USHORT Length ;
60 USHORT MaximumLength ;
61 PCHAR Buffer ;
62};
63typedef struct _STRING STRING;
64typedef STRING *PSTRING;
65typedef PSTRING PANSI_STRING;
66struct _UNICODE_STRING {
67 USHORT Length ;
68 USHORT MaximumLength ;
69 PWSTR Buffer ;
70};
71typedef struct _UNICODE_STRING UNICODE_STRING;
72typedef UNICODE_STRING *PUNICODE_STRING;
73typedef UCHAR BOOLEAN;
74typedef BOOLEAN *PBOOLEAN;
75struct _LIST_ENTRY {
76 struct _LIST_ENTRY *Flink ;
77 struct _LIST_ENTRY *Blink ;
78};
79typedef struct _LIST_ENTRY LIST_ENTRY;
80typedef struct _LIST_ENTRY *PLIST_ENTRY;
81struct _OBJECT_ATTRIBUTES {
82 ULONG Length ;
83 HANDLE RootDirectory ;
84 PUNICODE_STRING ObjectName ;
85 ULONG Attributes ;
86 PVOID SecurityDescriptor ;
87 PVOID SecurityQualityOfService ;
88};
89typedef struct _OBJECT_ATTRIBUTES OBJECT_ATTRIBUTES;
90typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
91struct _GUID {
92 unsigned long Data1 ;
93 unsigned short Data2 ;
94 unsigned short Data3 ;
95 unsigned char Data4[8] ;
96};
97typedef struct _GUID GUID;
98typedef unsigned int size_t;
99typedef UCHAR KIRQL;
100struct _KTHREAD;
101typedef struct _KTHREAD *PKTHREAD;
102struct _ETHREAD;
103typedef struct _ETHREAD *PETHREAD;
104struct _EPROCESS;
105typedef struct _EPROCESS *PEPROCESS;
106struct _IO_TIMER;
107typedef struct _IO_TIMER *PIO_TIMER;
108struct _OBJECT_TYPE;
109typedef struct _OBJECT_TYPE *POBJECT_TYPE;
110typedef CCHAR KPROCESSOR_MODE;
111struct _KAPC;
112struct _KAPC;
113typedef void (*PKNORMAL_ROUTINE)(PVOID NormalContext , PVOID SystemArgument1 , PVOID SystemArgument2 );
114struct _KAPC {
115 CSHORT Type ;
116 CSHORT Size ;
117 ULONG Spare0 ;
118 struct _KTHREAD *Thread ;
119 LIST_ENTRY ApcListEntry ;
120 void (*KernelRoutine)(struct _KAPC *Apc , PKNORMAL_ROUTINE *NormalRoutine , PVOID *NormalContext ,
121 PVOID *SystemArgument1 , PVOID *SystemArgument2 ) ;
122 void (*RundownRoutine)(struct _KAPC *Apc ) ;
123 void (*NormalRoutine)(PVOID NormalContext , PVOID SystemArgument1 , PVOID SystemArgument2 ) ;
124 PVOID NormalContext ;
125 PVOID SystemArgument1 ;
126 PVOID SystemArgument2 ;
127 CCHAR ApcStateIndex ;
128 KPROCESSOR_MODE ApcMode ;
129 BOOLEAN Inserted ;
130};
131typedef struct _KAPC KAPC;
132struct _KDPC;
133struct _KDPC;
134struct _KDPC {
135 CSHORT Type ;
136 UCHAR Number ;
137 UCHAR Importance ;
138 LIST_ENTRY DpcListEntry ;
139 void (*DeferredRoutine)(struct _KDPC *Dpc , PVOID DeferredContext , PVOID SystemArgument1 ,
140 PVOID SystemArgument2 ) ;
141 PVOID DeferredContext ;
142 PVOID SystemArgument1 ;
143 PVOID SystemArgument2 ;
144 PULONG_PTR Lock ;
145};
146typedef struct _KDPC KDPC;
147typedef struct _KDPC *PKDPC;
148struct _MDL {
149 struct _MDL *Next ;
150 CSHORT Size ;
151 CSHORT MdlFlags ;
152 struct _EPROCESS *Process ;
153 PVOID MappedSystemVa ;
154 PVOID StartVa ;
155 ULONG ByteCount ;
156 ULONG ByteOffset ;
157};
158typedef struct _MDL MDL;
159typedef struct _MDL *PMDL;
160typedef PVOID PACCESS_TOKEN;
161typedef PVOID PSECURITY_DESCRIPTOR;
162typedef ULONG ACCESS_MASK;
163#pragma pack(push,4)
164struct _LUID_AND_ATTRIBUTES {
165 LUID Luid ;
166 ULONG Attributes ;
167};
168typedef struct _LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES;
169#pragma pack(pop)
170struct _PRIVILEGE_SET {
171 ULONG PrivilegeCount ;
172 ULONG Control ;
173 LUID_AND_ATTRIBUTES Privilege[1] ;
174};
175typedef struct _PRIVILEGE_SET PRIVILEGE_SET;
176enum _SECURITY_IMPERSONATION_LEVEL {
177 SecurityAnonymous = 0,
178 SecurityIdentification = 1,
179 SecurityImpersonation = 2,
180 SecurityDelegation = 3
181} ;
182typedef enum _SECURITY_IMPERSONATION_LEVEL SECURITY_IMPERSONATION_LEVEL;
183typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE;
184struct _SECURITY_QUALITY_OF_SERVICE {
185 ULONG Length ;
186 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel ;
187 SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode ;
188 BOOLEAN EffectiveOnly ;
189};
190typedef struct _SECURITY_QUALITY_OF_SERVICE *PSECURITY_QUALITY_OF_SERVICE;
191typedef ULONG SECURITY_INFORMATION;
192typedef LONG KPRIORITY;
193typedef ULONG_PTR KSPIN_LOCK;
194typedef KSPIN_LOCK *PKSPIN_LOCK;
195struct _RTL_QUERY_REGISTRY_TABLE {
196 NTSTATUS (*QueryRoutine)(PWSTR ValueName , ULONG ValueType ,
197 PVOID ValueData , ULONG ValueLength ,
198 PVOID Context , PVOID EntryContext ) ;
199 ULONG Flags ;
200 PWSTR Name ;
201 PVOID EntryContext ;
202 ULONG DefaultType ;
203 PVOID DefaultData ;
204 ULONG DefaultLength ;
205};
206typedef struct _RTL_QUERY_REGISTRY_TABLE *PRTL_QUERY_REGISTRY_TABLE;
207union __anonunion____missing_field_name_6 {
208 NTSTATUS Status ;
209 PVOID Pointer ;
210};
211struct _IO_STATUS_BLOCK {
212 union __anonunion____missing_field_name_6 __annonCompField4 ;
213 ULONG_PTR Information ;
214};
215typedef struct _IO_STATUS_BLOCK IO_STATUS_BLOCK;
216typedef struct _IO_STATUS_BLOCK *PIO_STATUS_BLOCK;
217enum _FILE_INFORMATION_CLASS {
218 FileDirectoryInformation = 1,
219 FileFullDirectoryInformation = 2,
220 FileBothDirectoryInformation = 3,
221 FileBasicInformation = 4,
222 FileStandardInformation = 5,
223 FileInternalInformation = 6,
224 FileEaInformation = 7,
225 FileAccessInformation = 8,
226 FileNameInformation = 9,
227 FileRenameInformation = 10,
228 FileLinkInformation = 11,
229 FileNamesInformation = 12,
230 FileDispositionInformation = 13,
231 FilePositionInformation = 14,
232 FileFullEaInformation = 15,
233 FileModeInformation = 16,
234 FileAlignmentInformation = 17,
235 FileAllInformation = 18,
236 FileAllocationInformation = 19,
237 FileEndOfFileInformation = 20,
238 FileAlternateNameInformation = 21,
239 FileStreamInformation = 22,
240 FilePipeInformation = 23,
241 FilePipeLocalInformation = 24,
242 FilePipeRemoteInformation = 25,
243 FileMailslotQueryInformation = 26,
244 FileMailslotSetInformation = 27,
245 FileCompressionInformation = 28,
246 FileObjectIdInformation = 29,
247 FileCompletionInformation = 30,
248 FileMoveClusterInformation = 31,
249 FileQuotaInformation = 32,
250 FileReparsePointInformation = 33,
251 FileNetworkOpenInformation = 34,
252 FileAttributeTagInformation = 35,
253 FileTrackingInformation = 36,
254 FileMaximumInformation = 37
255} ;
256typedef enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS;
257struct _FILE_BASIC_INFORMATION {
258 LARGE_INTEGER CreationTime ;
259 LARGE_INTEGER LastAccessTime ;
260 LARGE_INTEGER LastWriteTime ;
261 LARGE_INTEGER ChangeTime ;
262 ULONG FileAttributes ;
263};
264typedef struct _FILE_BASIC_INFORMATION *PFILE_BASIC_INFORMATION;
265struct _FILE_STANDARD_INFORMATION {
266 LARGE_INTEGER AllocationSize ;
267 LARGE_INTEGER EndOfFile ;
268 ULONG NumberOfLinks ;
269 BOOLEAN DeletePending ;
270 BOOLEAN Directory ;
271};
272typedef struct _FILE_STANDARD_INFORMATION *PFILE_STANDARD_INFORMATION;
273struct _FILE_NETWORK_OPEN_INFORMATION {
274 LARGE_INTEGER CreationTime ;
275 LARGE_INTEGER LastAccessTime ;
276 LARGE_INTEGER LastWriteTime ;
277 LARGE_INTEGER ChangeTime ;
278 LARGE_INTEGER AllocationSize ;
279 LARGE_INTEGER EndOfFile ;
280 ULONG FileAttributes ;
281};
282typedef struct _FILE_NETWORK_OPEN_INFORMATION *PFILE_NETWORK_OPEN_INFORMATION;
283enum _FSINFOCLASS {
284 FileFsVolumeInformation = 1,
285 FileFsLabelInformation = 2,
286 FileFsSizeInformation = 3,
287 FileFsDeviceInformation = 4,
288 FileFsAttributeInformation = 5,
289 FileFsControlInformation = 6,
290 FileFsFullSizeInformation = 7,
291 FileFsObjectIdInformation = 8,
292 FileFsMaximumInformation = 9
293} ;
294typedef enum _FSINFOCLASS FS_INFORMATION_CLASS;
295enum _INTERFACE_TYPE {
296 InterfaceTypeUndefined = -1,
297 Internal = 0,
298 Isa = 1,
299 Eisa = 2,
300 MicroChannel = 3,
301 TurboChannel = 4,
302 PCIBus = 5,
303 VMEBus = 6,
304 NuBus = 7,
305 PCMCIABus = 8,
306 CBus = 9,
307 MPIBus = 10,
308 MPSABus = 11,
309 ProcessorInternal = 12,
310 InternalPowerBus = 13,
311 PNPISABus = 14,
312 PNPBus = 15,
313 MaximumInterfaceType = 16
314} ;
315typedef enum _INTERFACE_TYPE INTERFACE_TYPE;
316typedef enum _INTERFACE_TYPE *PINTERFACE_TYPE;
317struct _IO_ERROR_LOG_PACKET {
318 UCHAR MajorFunctionCode ;
319 UCHAR RetryCount ;
320 USHORT DumpDataSize ;
321 USHORT NumberOfStrings ;
322 USHORT StringOffset ;
323 USHORT EventCategory ;
324 NTSTATUS ErrorCode ;
325 ULONG UniqueErrorValue ;
326 NTSTATUS FinalStatus ;
327 ULONG SequenceNumber ;
328 ULONG IoControlCode ;
329 LARGE_INTEGER DeviceOffset ;
330 ULONG DumpData[1] ;
331};
332typedef struct _IO_ERROR_LOG_PACKET IO_ERROR_LOG_PACKET;
333struct _KEY_VALUE_FULL_INFORMATION {
334 ULONG TitleIndex ;
335 ULONG Type ;
336 ULONG DataOffset ;
337 ULONG DataLength ;
338 ULONG NameLength ;
339 WCHAR Name[1] ;
340};
341typedef struct _KEY_VALUE_FULL_INFORMATION *PKEY_VALUE_FULL_INFORMATION;
342struct _CLIENT_ID {
343 HANDLE UniqueProcess ;
344 HANDLE UniqueThread ;
345};
346typedef struct _CLIENT_ID CLIENT_ID;
347typedef CLIENT_ID *PCLIENT_ID;
348enum _SYSTEM_POWER_STATE {
349 PowerSystemUnspecified = 0,
350 PowerSystemWorking = 1,
351 PowerSystemSleeping1 = 2,
352 PowerSystemSleeping2 = 3,
353 PowerSystemSleeping3 = 4,
354 PowerSystemHibernate = 5,
355 PowerSystemShutdown = 6,
356 PowerSystemMaximum = 7
357} ;
358typedef enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE;
359enum __anonenum_POWER_ACTION_11 {
360 PowerActionNone = 0,
361 PowerActionReserved = 1,
362 PowerActionSleep = 2,
363 PowerActionHibernate = 3,
364 PowerActionShutdown = 4,
365 PowerActionShutdownReset = 5,
366 PowerActionShutdownOff = 6,
367 PowerActionWarmEject = 7
368} ;
369typedef enum __anonenum_POWER_ACTION_11 POWER_ACTION;
370enum _DEVICE_POWER_STATE {
371 PowerDeviceUnspecified = 0,
372 PowerDeviceD0 = 1,
373 PowerDeviceD1 = 2,
374 PowerDeviceD2 = 3,
375 PowerDeviceD3 = 4,
376 PowerDeviceMaximum = 5
377} ;
378typedef enum _DEVICE_POWER_STATE DEVICE_POWER_STATE;
379union _POWER_STATE {
380 SYSTEM_POWER_STATE SystemState ;
381 DEVICE_POWER_STATE DeviceState ;
382};
383typedef union _POWER_STATE POWER_STATE;
384enum _POWER_STATE_TYPE {
385 SystemPowerState = 0,
386 DevicePowerState = 1
387} ;
388typedef enum _POWER_STATE_TYPE POWER_STATE_TYPE;
389typedef PVOID PASSIGNED_RESOURCE;
390#pragma pack(push,4)
391struct __anonstruct_Generic_16 {
392 PHYSICAL_ADDRESS Start ;
393 ULONG Length ;
394};
395struct __anonstruct_Port_17 {
396 PHYSICAL_ADDRESS Start ;
397 ULONG Length ;
398};
399struct __anonstruct_Interrupt_18 {
400 ULONG Level ;
401 ULONG Vector ;
402 ULONG Affinity ;
403};
404struct __anonstruct_Memory_19 {
405 PHYSICAL_ADDRESS Start ;
406 ULONG Length ;
407};
408struct __anonstruct_Dma_20 {
409 ULONG Channel ;
410 ULONG Port ;
411 ULONG Reserved1 ;
412};
413struct __anonstruct_DevicePrivate_21 {
414 ULONG Data[3] ;
415};
416struct __anonstruct_BusNumber_22 {
417 ULONG Start ;
418 ULONG Length ;
419 ULONG Reserved ;
420};
421struct __anonstruct_DeviceSpecificData_23 {
422 ULONG DataSize ;
423 ULONG Reserved1 ;
424 ULONG Reserved2 ;
425};
426union __anonunion_u_15 {
427 struct __anonstruct_Generic_16 Generic ;
428 struct __anonstruct_Port_17 Port ;
429 struct __anonstruct_Interrupt_18 Interrupt ;
430 struct __anonstruct_Memory_19 Memory ;
431 struct __anonstruct_Dma_20 Dma ;
432 struct __anonstruct_DevicePrivate_21 DevicePrivate ;
433 struct __anonstruct_BusNumber_22 BusNumber ;
434 struct __anonstruct_DeviceSpecificData_23 DeviceSpecificData ;
435};
436struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
437 UCHAR Type ;
438 UCHAR ShareDisposition ;
439 USHORT Flags ;
440 union __anonunion_u_15 u ;
441};
442typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR CM_PARTIAL_RESOURCE_DESCRIPTOR;
443#pragma pack(pop)
444struct _CM_PARTIAL_RESOURCE_LIST {
445 USHORT Version ;
446 USHORT Revision ;
447 ULONG Count ;
448 CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1] ;
449};
450typedef struct _CM_PARTIAL_RESOURCE_LIST CM_PARTIAL_RESOURCE_LIST;
451struct _CM_FULL_RESOURCE_DESCRIPTOR {
452 INTERFACE_TYPE InterfaceType ;
453 ULONG BusNumber ;
454 CM_PARTIAL_RESOURCE_LIST PartialResourceList ;
455};
456typedef struct _CM_FULL_RESOURCE_DESCRIPTOR CM_FULL_RESOURCE_DESCRIPTOR;
457struct _CM_RESOURCE_LIST {
458 ULONG Count ;
459 CM_FULL_RESOURCE_DESCRIPTOR List[1] ;
460};
461typedef struct _CM_RESOURCE_LIST *PCM_RESOURCE_LIST;
462#pragma pack(push,1)
463#pragma pack(pop)
464struct __anonstruct_Port_25 {
465 ULONG Length ;
466 ULONG Alignment ;
467 PHYSICAL_ADDRESS MinimumAddress ;
468 PHYSICAL_ADDRESS MaximumAddress ;
469};
470struct __anonstruct_Memory_26 {
471 ULONG Length ;
472 ULONG Alignment ;
473 PHYSICAL_ADDRESS MinimumAddress ;
474 PHYSICAL_ADDRESS MaximumAddress ;
475};
476struct __anonstruct_Interrupt_27 {
477 ULONG MinimumVector ;
478 ULONG MaximumVector ;
479};
480struct __anonstruct_Dma_28 {
481 ULONG MinimumChannel ;
482 ULONG MaximumChannel ;
483};
484struct __anonstruct_Generic_29 {
485 ULONG Length ;
486 ULONG Alignment ;
487 PHYSICAL_ADDRESS MinimumAddress ;
488 PHYSICAL_ADDRESS MaximumAddress ;
489};
490struct __anonstruct_DevicePrivate_30 {
491 ULONG Data[3] ;
492};
493struct __anonstruct_BusNumber_31 {
494 ULONG Length ;
495 ULONG MinBusNumber ;
496 ULONG MaxBusNumber ;
497 ULONG Reserved ;
498};
499struct __anonstruct_AssignedResource_32 {
500 PASSIGNED_RESOURCE AssignedResource ;
501};
502struct __anonstruct_SubAllocateFrom_33 {
503 UCHAR Type ;
504 UCHAR Reserved[3] ;
505 PASSIGNED_RESOURCE AssignedResource ;
506 PHYSICAL_ADDRESS Transformation ;
507};
508struct __anonstruct_ConfigData_34 {
509 ULONG Priority ;
510 ULONG Reserved1 ;
511 ULONG Reserved2 ;
512};
513union __anonunion_u_24 {
514 struct __anonstruct_Port_25 Port ;
515 struct __anonstruct_Memory_26 Memory ;
516 struct __anonstruct_Interrupt_27 Interrupt ;
517 struct __anonstruct_Dma_28 Dma ;
518 struct __anonstruct_Generic_29 Generic ;
519 struct __anonstruct_DevicePrivate_30 DevicePrivate ;
520 struct __anonstruct_BusNumber_31 BusNumber ;
521 struct __anonstruct_AssignedResource_32 AssignedResource ;
522 struct __anonstruct_SubAllocateFrom_33 SubAllocateFrom ;
523 struct __anonstruct_ConfigData_34 ConfigData ;
524};
525struct _IO_RESOURCE_DESCRIPTOR {
526 UCHAR Option ;
527 UCHAR Type ;
528 UCHAR ShareDisposition ;
529 UCHAR Spare1 ;
530 USHORT Flags ;
531 USHORT Spare2 ;
532 union __anonunion_u_24 u ;
533};
534typedef struct _IO_RESOURCE_DESCRIPTOR IO_RESOURCE_DESCRIPTOR;
535struct _IO_RESOURCE_LIST {
536 USHORT Version ;
537 USHORT Revision ;
538 ULONG Count ;
539 IO_RESOURCE_DESCRIPTOR Descriptors[1] ;
540};
541typedef struct _IO_RESOURCE_LIST IO_RESOURCE_LIST;
542struct _IO_RESOURCE_REQUIREMENTS_LIST {
543 ULONG ListSize ;
544 INTERFACE_TYPE InterfaceType ;
545 ULONG BusNumber ;
546 ULONG SlotNumber ;
547 ULONG Reserved[3] ;
548 ULONG AlternativeLists ;
549 IO_RESOURCE_LIST List[1] ;
550};
551typedef struct _IO_RESOURCE_REQUIREMENTS_LIST *PIO_RESOURCE_REQUIREMENTS_LIST;
552enum _CONFIGURATION_TYPE {
553 ArcSystem = 0,
554 CentralProcessor = 1,
555 FloatingPointProcessor = 2,
556 PrimaryIcache = 3,
557 PrimaryDcache = 4,
558 SecondaryIcache = 5,
559 SecondaryDcache = 6,
560 SecondaryCache = 7,
561 EisaAdapter = 8,
562 TcAdapter = 9,
563 ScsiAdapter = 10,
564 DtiAdapter = 11,
565 MultiFunctionAdapter = 12,
566 DiskController = 13,
567 TapeController = 14,
568 CdromController = 15,
569 WormController = 16,
570 SerialController = 17,
571 NetworkController = 18,
572 DisplayController = 19,
573 ParallelController = 20,
574 PointerController = 21,
575 KeyboardController = 22,
576 AudioController = 23,
577 OtherController = 24,
578 DiskPeripheral = 25,
579 FloppyDiskPeripheral = 26,
580 TapePeripheral = 27,
581 ModemPeripheral = 28,
582 MonitorPeripheral = 29,
583 PrinterPeripheral = 30,
584 PointerPeripheral = 31,
585 KeyboardPeripheral = 32,
586 TerminalPeripheral = 33,
587 OtherPeripheral = 34,
588 LinePeripheral = 35,
589 NetworkPeripheral = 36,
590 SystemMemory = 37,
591 DockingInformation = 38,
592 RealModeIrqRoutingTable = 39,
593 MaximumType = 40
594} ;
595typedef enum _CONFIGURATION_TYPE CONFIGURATION_TYPE;
596typedef enum _CONFIGURATION_TYPE *PCONFIGURATION_TYPE;
597enum _KWAIT_REASON {
598 Executive = 0,
599 FreePage = 1,
600 PageIn = 2,
601 PoolAllocation = 3,
602 DelayExecution = 4,
603 Suspended = 5,
604 UserRequest = 6,
605 WrExecutive = 7,
606 WrFreePage = 8,
607 WrPageIn = 9,
608 WrPoolAllocation = 10,
609 WrDelayExecution = 11,
610 WrSuspended = 12,
611 WrUserRequest = 13,
612 WrEventPair = 14,
613 WrQueue = 15,
614 WrLpcReceive = 16,
615 WrLpcReply = 17,
616 WrVirtualMemory = 18,
617 WrPageOut = 19,
618 WrRendezvous = 20,
619 Spare2 = 21,
620 Spare3 = 22,
621 Spare4 = 23,
622 Spare5 = 24,
623 Spare6 = 25,
624 WrKernel = 26,
625 MaximumWaitReason = 27
626} ;
627typedef enum _KWAIT_REASON KWAIT_REASON;
628struct _DISPATCHER_HEADER {
629 UCHAR Type ;
630 UCHAR Absolute ;
631 UCHAR Size ;
632 UCHAR Inserted ;
633 LONG SignalState ;
634 LIST_ENTRY WaitListHead ;
635};
636typedef struct _DISPATCHER_HEADER DISPATCHER_HEADER;
637struct _KDEVICE_QUEUE {
638 CSHORT Type ;
639 CSHORT Size ;
640 LIST_ENTRY DeviceListHead ;
641 KSPIN_LOCK Lock ;
642 BOOLEAN Busy ;
643};
644typedef struct _KDEVICE_QUEUE KDEVICE_QUEUE;
645struct _KDEVICE_QUEUE_ENTRY {
646 LIST_ENTRY DeviceListEntry ;
647 ULONG SortKey ;
648 BOOLEAN Inserted ;
649};
650typedef struct _KDEVICE_QUEUE_ENTRY KDEVICE_QUEUE_ENTRY;
651struct _KEVENT {
652 DISPATCHER_HEADER Header ;
653};
654typedef struct _KEVENT KEVENT;
655typedef struct _KEVENT *PKEVENT;
656typedef struct _KEVENT *PRKEVENT;
657struct _KSEMAPHORE {
658 DISPATCHER_HEADER Header ;
659 LONG Limit ;
660};
661typedef struct _KSEMAPHORE *PKSEMAPHORE;
662typedef struct _KSEMAPHORE *PRKSEMAPHORE;
663enum _MEMORY_CACHING_TYPE {
664 MmNonCached = 0,
665 MmCached = 1,
666 MmWriteCombined = 2,
667 MmHardwareCoherentCached = 3,
668 MmNonCachedUnordered = 4,
669 MmUSWCCached = 5,
670 MmMaximumCacheType = 6
671} ;
672typedef enum _MEMORY_CACHING_TYPE MEMORY_CACHING_TYPE;
673enum _POOL_TYPE {
674 NonPagedPool = 0,
675 PagedPool = 1,
676 NonPagedPoolMustSucceed = 2,
677 DontUseThisType = 3,
678 NonPagedPoolCacheAligned = 4,
679 PagedPoolCacheAligned = 5,
680 NonPagedPoolCacheAlignedMustS = 6,
681 MaxPoolType = 7,
682 NonPagedPoolSession = 32,
683 PagedPoolSession = 33,
684 NonPagedPoolMustSucceedSession = 34,
685 DontUseThisTypeSession = 35,
686 NonPagedPoolCacheAlignedSession = 36,
687 PagedPoolCacheAlignedSession = 37,
688 NonPagedPoolCacheAlignedMustSSession = 38
689} ;
690typedef enum _POOL_TYPE POOL_TYPE;
691struct _FAST_MUTEX {
692 LONG Count ;
693 PKTHREAD Owner ;
694 ULONG Contention ;
695 KEVENT Event ;
696 ULONG OldIrql ;
697};
698typedef struct _FAST_MUTEX *PFAST_MUTEX;
699typedef ULONG_PTR ERESOURCE_THREAD;
700union __anonunion____missing_field_name_38 {
701 LONG OwnerCount ;
702 ULONG TableSize ;
703};
704struct _OWNER_ENTRY {
705 ERESOURCE_THREAD OwnerThread ;
706 union __anonunion____missing_field_name_38 __annonCompField10 ;
707};
708typedef struct _OWNER_ENTRY OWNER_ENTRY;
709typedef struct _OWNER_ENTRY *POWNER_ENTRY;
710union __anonunion____missing_field_name_39 {
711 PVOID Address ;
712 ULONG_PTR CreatorBackTraceIndex ;
713};
714struct _ERESOURCE {
715 LIST_ENTRY SystemResourcesList ;
716 POWNER_ENTRY OwnerTable ;
717 SHORT ActiveCount ;
718 USHORT Flag ;
719 PKSEMAPHORE SharedWaiters ;
720 PKEVENT ExclusiveWaiters ;
721 OWNER_ENTRY OwnerThreads[2] ;
722 ULONG ContentionCount ;
723 USHORT NumberOfSharedWaiters ;
724 USHORT NumberOfExclusiveWaiters ;
725 union __anonunion____missing_field_name_39 __annonCompField11 ;
726 KSPIN_LOCK SpinLock ;
727};
728enum _MM_PAGE_PRIORITY {
729 LowPagePriority = 0,
730 NormalPagePriority = 16,
731 HighPagePriority = 32
732} ;
733typedef enum _MM_PAGE_PRIORITY MM_PAGE_PRIORITY;
734struct _DRIVER_OBJECT;
735struct _DRIVER_OBJECT;
736struct _SECURITY_SUBJECT_CONTEXT {
737 PACCESS_TOKEN ClientToken ;
738 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel ;
739 PACCESS_TOKEN PrimaryToken ;
740 PVOID ProcessAuditId ;
741};
742typedef struct _SECURITY_SUBJECT_CONTEXT SECURITY_SUBJECT_CONTEXT;
743struct _INITIAL_PRIVILEGE_SET {
744 ULONG PrivilegeCount ;
745 ULONG Control ;
746 LUID_AND_ATTRIBUTES Privilege[3] ;
747};
748typedef struct _INITIAL_PRIVILEGE_SET INITIAL_PRIVILEGE_SET;
749union __anonunion_Privileges_40 {
750 INITIAL_PRIVILEGE_SET InitialPrivilegeSet ;
751 PRIVILEGE_SET PrivilegeSet ;
752};
753struct _ACCESS_STATE {
754 LUID OperationID ;
755 BOOLEAN SecurityEvaluated ;
756 BOOLEAN GenerateAudit ;
757 BOOLEAN GenerateOnClose ;
758 BOOLEAN PrivilegesAllocated ;
759 ULONG Flags ;
760 ACCESS_MASK RemainingDesiredAccess ;
761 ACCESS_MASK PreviouslyGrantedAccess ;
762 ACCESS_MASK OriginalDesiredAccess ;
763 SECURITY_SUBJECT_CONTEXT SubjectSecurityContext ;
764 PSECURITY_DESCRIPTOR SecurityDescriptor ;
765 PVOID AuxData ;
766 union __anonunion_Privileges_40 Privileges ;
767 BOOLEAN AuditPrivileges ;
768 UNICODE_STRING ObjectName ;
769 UNICODE_STRING ObjectTypeName ;
770};
771typedef struct _ACCESS_STATE *PACCESS_STATE;
772struct _DEVICE_OBJECT;
773struct _DEVICE_OBJECT;
774struct _DRIVER_OBJECT;
775struct _FILE_OBJECT;
776struct _FILE_OBJECT;
777struct _IRP;
778struct _IRP;
779struct _SCSI_REQUEST_BLOCK;
780struct _SCSI_REQUEST_BLOCK;
781typedef NTSTATUS (*PDRIVER_DISPATCH)(struct _DEVICE_OBJECT *DeviceObject , struct _IRP *Irp );
782struct _COMPRESSED_DATA_INFO;
783struct _FAST_IO_DISPATCH {
784 ULONG SizeOfFastIoDispatch ;
785 BOOLEAN (*FastIoCheckIfPossible)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
786 ULONG Length , BOOLEAN Wait , ULONG LockKey ,
787 BOOLEAN CheckForReadOperation , PIO_STATUS_BLOCK IoStatus ,
788 struct _DEVICE_OBJECT *DeviceObject ) ;
789 BOOLEAN (*FastIoRead)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
790 ULONG Length , BOOLEAN Wait , ULONG LockKey , PVOID Buffer ,
791 PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT *DeviceObject ) ;
792 BOOLEAN (*FastIoWrite)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
793 ULONG Length , BOOLEAN Wait , ULONG LockKey , PVOID Buffer ,
794 PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT *DeviceObject ) ;
795 BOOLEAN (*FastIoQueryBasicInfo)(struct _FILE_OBJECT *FileObject , BOOLEAN Wait ,
796 PFILE_BASIC_INFORMATION Buffer , PIO_STATUS_BLOCK IoStatus ,
797 struct _DEVICE_OBJECT *DeviceObject ) ;
798 BOOLEAN (*FastIoQueryStandardInfo)(struct _FILE_OBJECT *FileObject , BOOLEAN Wait ,
799 PFILE_STANDARD_INFORMATION Buffer , PIO_STATUS_BLOCK IoStatus ,
800 struct _DEVICE_OBJECT *DeviceObject ) ;
801 BOOLEAN (*FastIoLock)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
802 PLARGE_INTEGER Length , PEPROCESS ProcessId , ULONG Key ,
803 BOOLEAN FailImmediately , BOOLEAN ExclusiveLock , PIO_STATUS_BLOCK IoStatus ,
804 struct _DEVICE_OBJECT *DeviceObject ) ;
805 BOOLEAN (*FastIoUnlockSingle)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
806 PLARGE_INTEGER Length , PEPROCESS ProcessId , ULONG Key ,
807 PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT *DeviceObject ) ;
808 BOOLEAN (*FastIoUnlockAll)(struct _FILE_OBJECT *FileObject , PEPROCESS ProcessId ,
809 PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT *DeviceObject ) ;
810 BOOLEAN (*FastIoUnlockAllByKey)(struct _FILE_OBJECT *FileObject , PVOID ProcessId ,
811 ULONG Key , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT *DeviceObject ) ;
812 BOOLEAN (*FastIoDeviceControl)(struct _FILE_OBJECT *FileObject , BOOLEAN Wait ,
813 PVOID InputBuffer , ULONG InputBufferLength , PVOID OutputBuffer ,
814 ULONG OutputBufferLength , ULONG IoControlCode ,
815 PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT *DeviceObject ) ;
816 void (*AcquireFileForNtCreateSection)(struct _FILE_OBJECT *FileObject ) ;
817 void (*ReleaseFileForNtCreateSection)(struct _FILE_OBJECT *FileObject ) ;
818 void (*FastIoDetachDevice)(struct _DEVICE_OBJECT *SourceDevice , struct _DEVICE_OBJECT *TargetDevice ) ;
819 BOOLEAN (*FastIoQueryNetworkOpenInfo)(struct _FILE_OBJECT *FileObject , BOOLEAN Wait ,
820 struct _FILE_NETWORK_OPEN_INFORMATION *Buffer ,
821 struct _IO_STATUS_BLOCK *IoStatus , struct _DEVICE_OBJECT *DeviceObject ) ;
822 NTSTATUS (*AcquireForModWrite)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER EndingOffset ,
823 struct _ERESOURCE **ResourceToRelease , struct _DEVICE_OBJECT *DeviceObject ) ;
824 BOOLEAN (*MdlRead)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
825 ULONG Length , ULONG LockKey , PMDL *MdlChain , PIO_STATUS_BLOCK IoStatus ,
826 struct _DEVICE_OBJECT *DeviceObject ) ;
827 BOOLEAN (*MdlReadComplete)(struct _FILE_OBJECT *FileObject , PMDL MdlChain , struct _DEVICE_OBJECT *DeviceObject ) ;
828 BOOLEAN (*PrepareMdlWrite)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
829 ULONG Length , ULONG LockKey , PMDL *MdlChain , PIO_STATUS_BLOCK IoStatus ,
830 struct _DEVICE_OBJECT *DeviceObject ) ;
831 BOOLEAN (*MdlWriteComplete)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
832 PMDL MdlChain , struct _DEVICE_OBJECT *DeviceObject ) ;
833 BOOLEAN (*FastIoReadCompressed)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
834 ULONG Length , ULONG LockKey , PVOID Buffer , PMDL *MdlChain ,
835 PIO_STATUS_BLOCK IoStatus , struct _COMPRESSED_DATA_INFO *CompressedDataInfo ,
836 ULONG CompressedDataInfoLength , struct _DEVICE_OBJECT *DeviceObject ) ;
837 BOOLEAN (*FastIoWriteCompressed)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
838 ULONG Length , ULONG LockKey , PVOID Buffer ,
839 PMDL *MdlChain , PIO_STATUS_BLOCK IoStatus , struct _COMPRESSED_DATA_INFO *CompressedDataInfo ,
840 ULONG CompressedDataInfoLength , struct _DEVICE_OBJECT *DeviceObject ) ;
841 BOOLEAN (*MdlReadCompleteCompressed)(struct _FILE_OBJECT *FileObject , PMDL MdlChain ,
842 struct _DEVICE_OBJECT *DeviceObject ) ;
843 BOOLEAN (*MdlWriteCompleteCompressed)(struct _FILE_OBJECT *FileObject , PLARGE_INTEGER FileOffset ,
844 PMDL MdlChain , struct _DEVICE_OBJECT *DeviceObject ) ;
845 BOOLEAN (*FastIoQueryOpen)(struct _IRP *Irp , PFILE_NETWORK_OPEN_INFORMATION NetworkInformation ,
846 struct _DEVICE_OBJECT *DeviceObject ) ;
847 NTSTATUS (*ReleaseForModWrite)(struct _FILE_OBJECT *FileObject , struct _ERESOURCE *ResourceToRelease ,
848 struct _DEVICE_OBJECT *DeviceObject ) ;
849 NTSTATUS (*AcquireForCcFlush)(struct _FILE_OBJECT *FileObject , struct _DEVICE_OBJECT *DeviceObject ) ;
850 NTSTATUS (*ReleaseForCcFlush)(struct _FILE_OBJECT *FileObject , struct _DEVICE_OBJECT *DeviceObject ) ;
851};
852typedef struct _FAST_IO_DISPATCH *PFAST_IO_DISPATCH;
853enum _IO_ALLOCATION_ACTION {
854 KeepObject = 1,
855 DeallocateObject = 2,
856 DeallocateObjectKeepRegisters = 3
857} ;
858typedef enum _IO_ALLOCATION_ACTION IO_ALLOCATION_ACTION;
859struct _IO_SECURITY_CONTEXT {
860 PSECURITY_QUALITY_OF_SERVICE SecurityQos ;
861 PACCESS_STATE AccessState ;
862 ACCESS_MASK DesiredAccess ;
863 ULONG FullCreateOptions ;
864};
865typedef struct _IO_SECURITY_CONTEXT *PIO_SECURITY_CONTEXT;
866struct _VPB {
867 CSHORT Type ;
868 CSHORT Size ;
869 USHORT Flags ;
870 USHORT VolumeLabelLength ;
871 struct _DEVICE_OBJECT *DeviceObject ;
872 struct _DEVICE_OBJECT *RealDevice ;
873 ULONG SerialNumber ;
874 ULONG ReferenceCount ;
875 WCHAR VolumeLabel[(32U * sizeof(WCHAR )) / sizeof(WCHAR )] ;
876};
877typedef struct _VPB *PVPB;
878struct _WAIT_CONTEXT_BLOCK {
879 KDEVICE_QUEUE_ENTRY WaitQueueEntry ;
880 IO_ALLOCATION_ACTION (*DeviceRoutine)(struct _DEVICE_OBJECT *DeviceObject , struct _IRP *Irp ,
881 PVOID MapRegisterBase , PVOID Context ) ;
882 PVOID DeviceContext ;
883 ULONG NumberOfMapRegisters ;
884 PVOID DeviceObject ;
885 PVOID CurrentIrp ;
886 PKDPC BufferChainingDpc ;
887};
888typedef struct _WAIT_CONTEXT_BLOCK WAIT_CONTEXT_BLOCK;
889union __anonunion_Queue_43 {
890 LIST_ENTRY ListEntry ;
891 WAIT_CONTEXT_BLOCK Wcb ;
892};
893struct _DEVOBJ_EXTENSION;
894struct _DEVICE_OBJECT {
895 CSHORT Type ;
896 USHORT Size ;
897 LONG ReferenceCount ;
898 struct _DRIVER_OBJECT *DriverObject ;
899 struct _DEVICE_OBJECT *NextDevice ;
900 struct _DEVICE_OBJECT *AttachedDevice ;
901 struct _IRP *CurrentIrp ;
902 PIO_TIMER Timer ;
903 ULONG Flags ;
904 ULONG Characteristics ;
905 PVPB Vpb ;
906 PVOID DeviceExtension ;
907 ULONG DeviceType ;
908 CCHAR StackSize ;
909 union __anonunion_Queue_43 Queue ;
910 ULONG AlignmentRequirement ;
911 KDEVICE_QUEUE DeviceQueue ;
912 KDPC Dpc ;
913 ULONG ActiveThreadCount ;
914 PSECURITY_DESCRIPTOR SecurityDescriptor ;
915 KEVENT DeviceLock ;
916 USHORT SectorSize ;
917 USHORT Spare1 ;
918 struct _DEVOBJ_EXTENSION *DeviceObjectExtension ;
919 PVOID Reserved ;
920};
921typedef struct _DEVICE_OBJECT DEVICE_OBJECT;
922typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
923struct _DEVOBJ_EXTENSION {
924 CSHORT Type ;
925 USHORT Size ;
926 PDEVICE_OBJECT DeviceObject ;
927};
928struct _DRIVER_EXTENSION {
929 struct _DRIVER_OBJECT *DriverObject ;
930 NTSTATUS (*AddDevice)(struct _DRIVER_OBJECT *DriverObject , struct _DEVICE_OBJECT *PhysicalDeviceObject ) ;
931 ULONG Count ;
932 UNICODE_STRING ServiceKeyName ;
933};
934typedef struct _DRIVER_EXTENSION *PDRIVER_EXTENSION;
935struct _DRIVER_OBJECT {
936 CSHORT Type ;
937 CSHORT Size ;
938 PDEVICE_OBJECT DeviceObject ;
939 ULONG Flags ;
940 PVOID DriverStart ;
941 ULONG DriverSize ;
942 PVOID DriverSection ;
943 PDRIVER_EXTENSION DriverExtension ;
944 UNICODE_STRING DriverName ;
945 PUNICODE_STRING HardwareDatabase ;
946 PFAST_IO_DISPATCH FastIoDispatch ;
947 NTSTATUS (*DriverInit)(struct _DRIVER_OBJECT *DriverObject , PUNICODE_STRING RegistryPath ) ;
948 void (*DriverStartIo)(struct _DEVICE_OBJECT *DeviceObject , struct _IRP *Irp ) ;
949 void (*DriverUnload)(struct _DRIVER_OBJECT *DriverObject ) ;
950 PDRIVER_DISPATCH MajorFunction[28] ;
951};
952typedef struct _DRIVER_OBJECT DRIVER_OBJECT;
953typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
954struct _SECTION_OBJECT_POINTERS {
955 PVOID DataSectionObject ;
956 PVOID SharedCacheMap ;
957 PVOID ImageSectionObject ;
958};
959typedef struct _SECTION_OBJECT_POINTERS SECTION_OBJECT_POINTERS;
960typedef SECTION_OBJECT_POINTERS *PSECTION_OBJECT_POINTERS;
961struct _IO_COMPLETION_CONTEXT {
962 PVOID Port ;
963 PVOID Key ;
964};
965typedef struct _IO_COMPLETION_CONTEXT *PIO_COMPLETION_CONTEXT;
966struct _FILE_OBJECT {
967 CSHORT Type ;
968 CSHORT Size ;
969 PDEVICE_OBJECT DeviceObject ;
970 PVPB Vpb ;
971 PVOID FsContext ;
972 PVOID FsContext2 ;
973 PSECTION_OBJECT_POINTERS SectionObjectPointer ;
974 PVOID PrivateCacheMap ;
975 NTSTATUS FinalStatus ;
976 struct _FILE_OBJECT *RelatedFileObject ;
977 BOOLEAN LockOperation ;
978 BOOLEAN DeletePending ;
979 BOOLEAN ReadAccess ;
980 BOOLEAN WriteAccess ;
981 BOOLEAN DeleteAccess ;
982 BOOLEAN SharedRead ;
983 BOOLEAN SharedWrite ;
984 BOOLEAN SharedDelete ;
985 ULONG Flags ;
986 UNICODE_STRING FileName ;
987 LARGE_INTEGER CurrentByteOffset ;
988 ULONG Waiters ;
989 ULONG Busy ;
990 PVOID LastLock ;
991 KEVENT Lock ;
992 KEVENT Event ;
993 PIO_COMPLETION_CONTEXT CompletionContext ;
994};
995typedef struct _FILE_OBJECT *PFILE_OBJECT;
996union __anonunion_AssociatedIrp_44 {
997 struct _IRP *MasterIrp ;
998 LONG IrpCount ;
999 PVOID SystemBuffer ;
1000};
1001struct __anonstruct_AsynchronousParameters_46 {
1002 void (*UserApcRoutine)(PVOID ApcContext , PIO_STATUS_BLOCK IoStatusBlock ,
1003 ULONG Reserved ) ;
1004 PVOID UserApcContext ;
1005};
1006union __anonunion_Overlay_45 {
1007 struct __anonstruct_AsynchronousParameters_46 AsynchronousParameters ;
1008 LARGE_INTEGER AllocationSize ;
1009};
1010struct __anonstruct____missing_field_name_50 {
1011 PVOID DriverContext[4] ;
1012};
1013union __anonunion____missing_field_name_49 {
1014 KDEVICE_QUEUE_ENTRY DeviceQueueEntry ;
1015 struct __anonstruct____missing_field_name_50 __annonCompField14 ;
1016};
1017struct _IO_STACK_LOCATION;
1018union __anonunion____missing_field_name_52 {
1019 struct _IO_STACK_LOCATION *CurrentStackLocation ;
1020 ULONG PacketType ;
1021};
1022struct __anonstruct____missing_field_name_51 {
1023 LIST_ENTRY ListEntry ;
1024 union __anonunion____missing_field_name_52 __annonCompField16 ;
1025};
1026struct __anonstruct_Overlay_48 {
1027 union __anonunion____missing_field_name_49 __annonCompField15 ;
1028 PETHREAD Thread ;
1029 PCHAR AuxiliaryBuffer ;
1030 struct __anonstruct____missing_field_name_51 __annonCompField17 ;
1031 PFILE_OBJECT OriginalFileObject ;
1032};
1033union __anonunion_Tail_47 {
1034 struct __anonstruct_Overlay_48 Overlay ;
1035 KAPC Apc ;
1036 PVOID CompletionKey ;
1037};
1038struct _IRP {
1039 CSHORT Type ;
1040 USHORT Size ;
1041 PMDL MdlAddress ;
1042 ULONG Flags ;
1043 union __anonunion_AssociatedIrp_44 AssociatedIrp ;
1044 LIST_ENTRY ThreadListEntry ;
1045 IO_STATUS_BLOCK IoStatus ;
1046 KPROCESSOR_MODE RequestorMode ;
1047 BOOLEAN PendingReturned ;
1048 CHAR StackCount ;
1049 CHAR CurrentLocation ;
1050 BOOLEAN Cancel ;
1051 KIRQL CancelIrql ;
1052 CCHAR ApcEnvironment ;
1053 UCHAR AllocationFlags ;
1054 PIO_STATUS_BLOCK UserIosb ;
1055 PKEVENT UserEvent ;
1056 union __anonunion_Overlay_45 Overlay ;
1057 void (*CancelRoutine)(struct _DEVICE_OBJECT *DeviceObject , struct _IRP *Irp ) ;
1058 PVOID UserBuffer ;
1059 union __anonunion_Tail_47 Tail ;
1060};
1061typedef struct _IRP IRP;
1062typedef struct _IRP *PIRP;
1063enum _DEVICE_RELATION_TYPE {
1064 BusRelations = 0,
1065 EjectionRelations = 1,
1066 PowerRelations = 2,
1067 RemovalRelations = 3,
1068 TargetDeviceRelation = 4
1069} ;
1070typedef enum _DEVICE_RELATION_TYPE DEVICE_RELATION_TYPE;
1071enum _DEVICE_USAGE_NOTIFICATION_TYPE {
1072 DeviceUsageTypeUndefined = 0,
1073 DeviceUsageTypePaging = 1,
1074 DeviceUsageTypeHibernation = 2,
1075 DeviceUsageTypeDumpFile = 3
1076} ;
1077typedef enum _DEVICE_USAGE_NOTIFICATION_TYPE DEVICE_USAGE_NOTIFICATION_TYPE;
1078struct _INTERFACE {
1079 USHORT Size ;
1080 USHORT Version ;
1081 PVOID Context ;
1082 void (*InterfaceReference)(PVOID Context ) ;
1083 void (*InterfaceDereference)(PVOID Context ) ;
1084};
1085typedef struct _INTERFACE *PINTERFACE;
1086struct _DEVICE_CAPABILITIES {
1087 USHORT Size ;
1088 USHORT Version ;
1089 ULONG DeviceD1 : 1 ;
1090 ULONG DeviceD2 : 1 ;
1091 ULONG LockSupported : 1 ;
1092 ULONG EjectSupported : 1 ;
1093 ULONG Removable : 1 ;
1094 ULONG DockDevice : 1 ;
1095 ULONG UniqueID : 1 ;
1096 ULONG SilentInstall : 1 ;
1097 ULONG RawDeviceOK : 1 ;
1098 ULONG SurpriseRemovalOK : 1 ;
1099 ULONG WakeFromD0 : 1 ;
1100 ULONG WakeFromD1 : 1 ;
1101 ULONG WakeFromD2 : 1 ;
1102 ULONG WakeFromD3 : 1 ;
1103 ULONG HardwareDisabled : 1 ;
1104 ULONG NonDynamic : 1 ;
1105 ULONG WarmEjectSupported : 1 ;
1106 ULONG Reserved : 15 ;
1107 ULONG Address ;
1108 ULONG UINumber ;
1109 DEVICE_POWER_STATE DeviceState[7] ;
1110 SYSTEM_POWER_STATE SystemWake ;
1111 DEVICE_POWER_STATE DeviceWake ;
1112 ULONG D1Latency ;
1113 ULONG D2Latency ;
1114 ULONG D3Latency ;
1115};
1116typedef struct _DEVICE_CAPABILITIES *PDEVICE_CAPABILITIES;
1117struct _POWER_SEQUENCE {
1118 ULONG SequenceD1 ;
1119 ULONG SequenceD2 ;
1120 ULONG SequenceD3 ;
1121};
1122typedef struct _POWER_SEQUENCE *PPOWER_SEQUENCE;
1123enum __anonenum_BUS_QUERY_ID_TYPE_53 {
1124 BusQueryDeviceID = 0,
1125 BusQueryHardwareIDs = 1,
1126 BusQueryCompatibleIDs = 2,
1127 BusQueryInstanceID = 3,
1128 BusQueryDeviceSerialNumber = 4
1129} ;
1130typedef enum __anonenum_BUS_QUERY_ID_TYPE_53 BUS_QUERY_ID_TYPE;
1131enum __anonenum_DEVICE_TEXT_TYPE_54 {
1132 DeviceTextDescription = 0,
1133 DeviceTextLocationInformation = 1
1134} ;
1135typedef enum __anonenum_DEVICE_TEXT_TYPE_54 DEVICE_TEXT_TYPE;
1136#pragma pack(push,4)
1137struct __anonstruct_Create_56 {
1138 PIO_SECURITY_CONTEXT SecurityContext ;
1139 ULONG Options ;
1140 USHORT FileAttributes ;
1141 USHORT ShareAccess ;
1142 ULONG EaLength ;
1143};
1144struct __anonstruct_Read_57 {
1145 ULONG Length ;
1146 ULONG Key ;
1147 LARGE_INTEGER ByteOffset ;
1148};
1149struct __anonstruct_Write_58 {
1150 ULONG Length ;
1151 ULONG Key ;
1152 LARGE_INTEGER ByteOffset ;
1153};
1154struct __anonstruct_QueryFile_59 {
1155 ULONG Length ;
1156 FILE_INFORMATION_CLASS FileInformationClass ;
1157};
1158struct __anonstruct____missing_field_name_62 {
1159 BOOLEAN ReplaceIfExists ;
1160 BOOLEAN AdvanceOnly ;
1161};
1162union __anonunion____missing_field_name_61 {
1163 struct __anonstruct____missing_field_name_62 __annonCompField18 ;
1164 ULONG ClusterCount ;
1165 HANDLE DeleteHandle ;
1166};
1167struct __anonstruct_SetFile_60 {
1168 ULONG Length ;
1169 FILE_INFORMATION_CLASS FileInformationClass ;
1170 PFILE_OBJECT FileObject ;
1171 union __anonunion____missing_field_name_61 __annonCompField19 ;
1172};
1173struct __anonstruct_QueryVolume_63 {
1174 ULONG Length ;
1175 FS_INFORMATION_CLASS FsInformationClass ;
1176};
1177struct __anonstruct_DeviceIoControl_64 {
1178 ULONG OutputBufferLength ;
1179 ULONG InputBufferLength ;
1180 ULONG IoControlCode ;
1181 PVOID Type3InputBuffer ;
1182};
1183struct __anonstruct_QuerySecurity_65 {
1184 SECURITY_INFORMATION SecurityInformation ;
1185 ULONG Length ;
1186};
1187struct __anonstruct_SetSecurity_66 {
1188 SECURITY_INFORMATION SecurityInformation ;
1189 PSECURITY_DESCRIPTOR SecurityDescriptor ;
1190};
1191struct __anonstruct_MountVolume_67 {
1192 PVPB Vpb ;
1193 PDEVICE_OBJECT DeviceObject ;
1194};
1195struct __anonstruct_VerifyVolume_68 {
1196 PVPB Vpb ;
1197 PDEVICE_OBJECT DeviceObject ;
1198};
1199struct __anonstruct_Scsi_69 {
1200 struct _SCSI_REQUEST_BLOCK *Srb ;
1201};
1202struct __anonstruct_QueryDeviceRelations_70 {
1203 DEVICE_RELATION_TYPE Type ;
1204};
1205struct __anonstruct_QueryInterface_71 {
1206 GUID const *InterfaceType ;
1207 USHORT Size ;
1208 USHORT Version ;
1209 PINTERFACE Interface ;
1210 PVOID InterfaceSpecificData ;
1211};
1212struct __anonstruct_DeviceCapabilities_72 {
1213 PDEVICE_CAPABILITIES Capabilities ;
1214};
1215struct __anonstruct_FilterResourceRequirements_73 {
1216 PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList ;
1217};
1218struct __anonstruct_ReadWriteConfig_74 {
1219 ULONG WhichSpace ;
1220 PVOID Buffer ;
1221 ULONG Offset ;
1222 ULONG Length ;
1223};
1224struct __anonstruct_SetLock_75 {
1225 BOOLEAN Lock ;
1226};
1227struct __anonstruct_QueryId_76 {
1228 BUS_QUERY_ID_TYPE IdType ;
1229};
1230struct __anonstruct_QueryDeviceText_77 {
1231 DEVICE_TEXT_TYPE DeviceTextType ;
1232 LCID LocaleId ;
1233};
1234struct __anonstruct_UsageNotification_78 {
1235 BOOLEAN InPath ;
1236 BOOLEAN Reserved[3] ;
1237 DEVICE_USAGE_NOTIFICATION_TYPE Type ;
1238};
1239struct __anonstruct_WaitWake_79 {
1240 SYSTEM_POWER_STATE PowerState ;
1241};
1242struct __anonstruct_PowerSequence_80 {
1243 PPOWER_SEQUENCE PowerSequence ;
1244};
1245struct __anonstruct_Power_81 {
1246 ULONG SystemContext ;
1247 POWER_STATE_TYPE Type ;
1248 POWER_STATE State ;
1249 POWER_ACTION ShutdownType ;
1250};
1251struct __anonstruct_StartDevice_82 {
1252 PCM_RESOURCE_LIST AllocatedResources ;
1253 PCM_RESOURCE_LIST AllocatedResourcesTranslated ;
1254};
1255struct __anonstruct_WMI_83 {
1256 ULONG_PTR ProviderId ;
1257 PVOID DataPath ;
1258 ULONG BufferSize ;
1259 PVOID Buffer ;
1260};
1261struct __anonstruct_Others_84 {
1262 PVOID Argument1 ;
1263 PVOID Argument2 ;
1264 PVOID Argument3 ;
1265 PVOID Argument4 ;
1266};
1267union __anonunion_Parameters_55 {
1268 struct __anonstruct_Create_56 Create ;
1269 struct __anonstruct_Read_57 Read ;
1270 struct __anonstruct_Write_58 Write ;
1271 struct __anonstruct_QueryFile_59 QueryFile ;
1272 struct __anonstruct_SetFile_60 SetFile ;
1273 struct __anonstruct_QueryVolume_63 QueryVolume ;
1274 struct __anonstruct_DeviceIoControl_64 DeviceIoControl ;
1275 struct __anonstruct_QuerySecurity_65 QuerySecurity ;
1276 struct __anonstruct_SetSecurity_66 SetSecurity ;
1277 struct __anonstruct_MountVolume_67 MountVolume ;
1278 struct __anonstruct_VerifyVolume_68 VerifyVolume ;
1279 struct __anonstruct_Scsi_69 Scsi ;
1280 struct __anonstruct_QueryDeviceRelations_70 QueryDeviceRelations ;
1281 struct __anonstruct_QueryInterface_71 QueryInterface ;
1282 struct __anonstruct_DeviceCapabilities_72 DeviceCapabilities ;
1283 struct __anonstruct_FilterResourceRequirements_73 FilterResourceRequirements ;
1284 struct __anonstruct_ReadWriteConfig_74 ReadWriteConfig ;
1285 struct __anonstruct_SetLock_75 SetLock ;
1286 struct __anonstruct_QueryId_76 QueryId ;
1287 struct __anonstruct_QueryDeviceText_77 QueryDeviceText ;
1288 struct __anonstruct_UsageNotification_78 UsageNotification ;
1289 struct __anonstruct_WaitWake_79 WaitWake ;
1290 struct __anonstruct_PowerSequence_80 PowerSequence ;
1291 struct __anonstruct_Power_81 Power ;
1292 struct __anonstruct_StartDevice_82 StartDevice ;
1293 struct __anonstruct_WMI_83 WMI ;
1294 struct __anonstruct_Others_84 Others ;
1295};
1296struct _IO_STACK_LOCATION {
1297 UCHAR MajorFunction ;
1298 UCHAR MinorFunction ;
1299 UCHAR Flags ;
1300 UCHAR Control ;
1301 union __anonunion_Parameters_55 Parameters ;
1302 PDEVICE_OBJECT DeviceObject ;
1303 PFILE_OBJECT FileObject ;
1304 NTSTATUS (*CompletionRoutine)(PDEVICE_OBJECT DeviceObject , PIRP Irp , PVOID Context ) ;
1305 PVOID Context ;
1306};
1307typedef struct _IO_STACK_LOCATION IO_STACK_LOCATION;
1308typedef struct _IO_STACK_LOCATION *PIO_STACK_LOCATION;
1309#pragma pack(pop)
1310struct _CONFIGURATION_INFORMATION {
1311 ULONG DiskCount ;
1312 ULONG FloppyCount ;
1313 ULONG CdRomCount ;
1314 ULONG TapeCount ;
1315 ULONG ScsiPortCount ;
1316 ULONG SerialCount ;
1317 ULONG ParallelCount ;
1318 BOOLEAN AtDiskPrimaryAddressClaimed ;
1319 BOOLEAN AtDiskSecondaryAddressClaimed ;
1320 ULONG Version ;
1321 ULONG MediumChangerCount ;
1322};
1323typedef struct _CONFIGURATION_INFORMATION CONFIGURATION_INFORMATION;
1324typedef struct _CONFIGURATION_INFORMATION *PCONFIGURATION_INFORMATION;
1325struct _OBJECT_HANDLE_INFORMATION {
1326 ULONG HandleAttributes ;
1327 ACCESS_MASK GrantedAccess ;
1328};
1329typedef struct _OBJECT_HANDLE_INFORMATION *POBJECT_HANDLE_INFORMATION;
1330struct _KEYBOARD_INPUT_DATA {
1331 USHORT UnitId ;
1332 USHORT MakeCode ;
1333 USHORT Flags ;
1334 USHORT Reserved ;
1335 ULONG ExtraInformation ;
1336};
1337typedef struct _KEYBOARD_INPUT_DATA *PKEYBOARD_INPUT_DATA;
1338struct _CONNECT_DATA {
1339 PDEVICE_OBJECT ClassDeviceObject ;
1340 PVOID ClassService ;
1341};
1342typedef struct _CONNECT_DATA CONNECT_DATA;
1343typedef struct _CONNECT_DATA *PCONNECT_DATA;
1344enum _TRANSMIT_STATE {
1345 Idle = 0,
1346 SendingBytes = 1
1347} ;
1348typedef enum _TRANSMIT_STATE TRANSMIT_STATE;
1349struct _OUTPUT_PACKET {
1350 PUCHAR Bytes ;
1351 ULONG CurrentByte ;
1352 ULONG ByteCount ;
1353 TRANSMIT_STATE State ;
1354};
1355typedef struct _OUTPUT_PACKET *POUTPUT_PACKET;
1356enum _KEYBOARD_SCAN_STATE {
1357 Normal = 0,
1358 GotE0 = 1,
1359 GotE1 = 2
1360} ;
1361typedef enum _KEYBOARD_SCAN_STATE *PKEYBOARD_SCAN_STATE;
1362struct _INTERNAL_I8042_HOOK_KEYBOARD {
1363 PVOID Context ;
1364 NTSTATUS (*InitializationRoutine)(PVOID InitializationContext , PVOID SynchFuncContext ,
1365 NTSTATUS (*ReadPort)(PVOID Context , PUCHAR Value ,
1366 BOOLEAN WaitForACK ) , NTSTATUS (*WritePort)(PVOID Context ,
1367 UCHAR Value ,
1368 BOOLEAN WaitForACK ) ,
1369 PBOOLEAN TurnTranslationOn ) ;
1370 BOOLEAN (*IsrRoutine)(PVOID IsrContext , PKEYBOARD_INPUT_DATA CurrentInput , POUTPUT_PACKET CurrentOutput ,
1371 UCHAR StatusByte , PUCHAR Byte , PBOOLEAN ContinueProcessing ,
1372 PKEYBOARD_SCAN_STATE ScanState ) ;
1373 void (*IsrWritePort)(PVOID Context , UCHAR Value ) ;
1374 void (*QueueKeyboardPacket)(PVOID Context ) ;
1375 PVOID CallContext ;
1376};
1377typedef struct _INTERNAL_I8042_HOOK_KEYBOARD INTERNAL_I8042_HOOK_KEYBOARD;
1378typedef struct _INTERNAL_I8042_HOOK_KEYBOARD *PINTERNAL_I8042_HOOK_KEYBOARD;
1379struct _DEVICE_EXTENSION {
1380 PDEVICE_OBJECT Self ;
1381 PDEVICE_OBJECT PDO ;
1382 PDEVICE_OBJECT TopOfStack ;
1383 LONG EnableCount ;
1384 CONNECT_DATA UpperConnectData ;
1385 PVOID UpperContext ;
1386 NTSTATUS (*UpperInitializationRoutine)(PVOID InitializationContext , PVOID SynchFuncContext ,
1387 NTSTATUS (*ReadPort)(PVOID Context , PUCHAR Value ,
1388 BOOLEAN WaitForACK ) ,
1389 NTSTATUS (*WritePort)(PVOID Context , UCHAR Value ,
1390 BOOLEAN WaitForACK ) ,
1391 PBOOLEAN TurnTranslationOn ) ;
1392 BOOLEAN (*UpperIsrHook)(PVOID IsrContext , PKEYBOARD_INPUT_DATA CurrentInput ,
1393 POUTPUT_PACKET CurrentOutput , UCHAR StatusByte , PUCHAR Byte ,
1394 PBOOLEAN ContinueProcessing , PKEYBOARD_SCAN_STATE ScanState ) ;
1395 void (*IsrWritePort)(PVOID Context , UCHAR Value ) ;
1396 void (*QueueKeyboardPacket)(PVOID Context ) ;
1397 PVOID CallContext ;
1398 DEVICE_POWER_STATE DeviceState ;
1399 BOOLEAN Started ;
1400 BOOLEAN SurpriseRemoved ;
1401 BOOLEAN Removed ;
1402};
1403typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION;
1404typedef struct _DEVICE_EXTENSION *PDEVICE_EXTENSION;
1405#pragma pack(push,8)
1406#pragma pack(pop)
1407struct _KAPC;
1408struct _KDPC;
1409#pragma pack(push,4)
1410#pragma pack(pop)
1411#pragma pack(push,4)
1412#pragma pack(pop)
1413#pragma pack(push,1)
1414#pragma pack(pop)
1415struct _DRIVER_OBJECT;
1416struct _DEVICE_OBJECT;
1417struct _DRIVER_OBJECT;
1418struct _FILE_OBJECT;
1419struct _IRP;
1420struct _SCSI_REQUEST_BLOCK;
1421#pragma pack(push,4)
1422#pragma pack(pop)
1423#pragma once
1424#pragma once
1425#pragma once
1426#pragma once
1427#pragma warning(push)
1428#pragma warning(disable:4035)
1429#pragma warning(pop)
1430#pragma once
1431extern void *memcpy(void * , void const * , size_t ) ;
1432extern void *memset(void * , int , size_t ) ;
1433#pragma warning(disable:4103)
1434#pragma warning(disable:4103)
1435 NTSTATUS RtlQueryRegistryValues(ULONG RelativeTo ,
1436 PCWSTR Path ,
1437 PRTL_QUERY_REGISTRY_TABLE QueryTable ,
1438 PVOID Context ,
1439 PVOID Environment ) ;
1440 NTSTATUS RtlDeleteRegistryValue(ULONG RelativeTo ,
1441 PCWSTR Path ,
1442 PCWSTR ValueName ) ;
1443 void RtlInitString(PSTRING DestinationString ,
1444 PCSZ SourceString ) ;
1445 void RtlInitUnicodeString(PUNICODE_STRING DestinationString ,
1446 PCWSTR SourceString ) ;
1447 NTSTATUS RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString ,
1448 PANSI_STRING SourceString ,
1449 BOOLEAN AllocateDestinationString ) ;
1450 void RtlCopyUnicodeString(PUNICODE_STRING DestinationString ,
1451 PUNICODE_STRING SourceString ) ;
1452 void RtlFreeUnicodeString(PUNICODE_STRING UnicodeString ) ;
1453 SIZE_T RtlCompareMemory(void const *Source1 ,
1454 void const *Source2 ,
1455 SIZE_T Length ) ;
1456#pragma warning(push)
1457#pragma warning(disable:4035)
1458#pragma warning(pop)
1459extern LONG InterlockedIncrement(PLONG Addend ) ;
1460extern LONG InterlockedDecrement(PLONG Addend ) ;
1461#pragma warning(disable:4035)
1462#pragma warning(push)
1463#pragma warning(disable:4164)
1464#pragma function(_enable)
1465#pragma function(_disable)
1466#pragma warning(pop)
1467#pragma warning(disable:4103)
1468#pragma warning(disable:4103)
1469#pragma warning(disable:4103)
1470#pragma warning(disable:4103)
1471 void KeInitializeEvent(PRKEVENT Event , EVENT_TYPE Type ,
1472 BOOLEAN State ) ;
1473 LONG KeSetEvent(PRKEVENT Event , KPRIORITY Increment ,
1474 BOOLEAN Wait ) ;
1475 void KeInitializeSemaphore(PRKSEMAPHORE Semaphore ,
1476 LONG Count , LONG Limit ) ;
1477 LONG KeReleaseSemaphore(PRKSEMAPHORE Semaphore , KPRIORITY Increment ,
1478 LONG Adjustment , BOOLEAN Wait ) ;
1479 NTSTATUS KeDelayExecutionThread(KPROCESSOR_MODE WaitMode ,
1480 BOOLEAN Alertable ,
1481 PLARGE_INTEGER Interval ) ;
1482 NTSTATUS KeWaitForSingleObject(PVOID Object , KWAIT_REASON WaitReason ,
1483 KPROCESSOR_MODE WaitMode ,
1484 BOOLEAN Alertable ,
1485 PLARGE_INTEGER Timeout ) ;
1486 void KeInitializeSpinLock(PKSPIN_LOCK SpinLock ) ;
1487 void KfReleaseSpinLock(PKSPIN_LOCK SpinLock ,
1488 KIRQL NewIrql ) ;
1489 PVOID ExAllocatePoolWithTag(POOL_TYPE PoolType ,
1490 SIZE_T NumberOfBytes ,
1491 ULONG Tag ) ;
1492 void ExFreePool(PVOID P ) ;
1493 void ExAcquireFastMutex(PFAST_MUTEX FastMutex ) ;
1494 void ExReleaseFastMutex(PFAST_MUTEX FastMutex ) ;
1495 PLIST_ENTRY ExfInterlockedInsertHeadList(PLIST_ENTRY ListHead ,
1496 PLIST_ENTRY ListEntry ,
1497 PKSPIN_LOCK Lock ) ;
1498 PLIST_ENTRY ExfInterlockedInsertTailList(PLIST_ENTRY ListHead ,
1499 PLIST_ENTRY ListEntry ,
1500 PKSPIN_LOCK Lock ) ;
1501 PLIST_ENTRY ExfInterlockedRemoveHeadList(PLIST_ENTRY ListHead ,
1502 PKSPIN_LOCK Lock ) ;
1503 void MmUnlockPages(PMDL MemoryDescriptorList ) ;
1504 PVOID MmMapLockedPagesSpecifyCache(PMDL MemoryDescriptorList ,
1505 KPROCESSOR_MODE AccessMode ,
1506 MEMORY_CACHING_TYPE CacheType ,
1507 PVOID BaseAddress ,
1508 ULONG BugCheckOnFailure ,
1509 MM_PAGE_PRIORITY Priority ) ;
1510 PVOID MmAllocateContiguousMemory(SIZE_T NumberOfBytes ,
1511 PHYSICAL_ADDRESS HighestAcceptableAddress ) ;
1512 void MmFreeContiguousMemory(PVOID BaseAddress ) ;
1513 void MmResetDriverPaging(PVOID AddressWithinSection ) ;
1514 PVOID MmPageEntireDriver(PVOID AddressWithinSection ) ;
1515 NTSTATUS PsCreateSystemThread(PHANDLE ThreadHandle ,
1516 ULONG DesiredAccess ,
1517 POBJECT_ATTRIBUTES ObjectAttributes ,
1518 HANDLE ProcessHandle ,
1519 PCLIENT_ID ClientId ,
1520 void (*StartRoutine)(PVOID StartContext ) ,
1521 PVOID StartContext ) ;
1522 NTSTATUS PsTerminateSystemThread(NTSTATUS ExitStatus ) ;
1523#pragma warning(disable:4103)
1524#pragma warning(disable:4103)
1525 PMDL IoAllocateMdl(PVOID VirtualAddress , ULONG Length ,
1526 BOOLEAN SecondaryBuffer , BOOLEAN ChargeQuota ,
1527 PIRP Irp ) ;
1528 PDEVICE_OBJECT IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice ,
1529 PDEVICE_OBJECT TargetDevice ) ;
1530 PIRP IoBuildAsynchronousFsdRequest(ULONG MajorFunction ,
1531 PDEVICE_OBJECT DeviceObject ,
1532 PVOID Buffer ,
1533 ULONG Length ,
1534 PLARGE_INTEGER StartingOffset ,
1535 PIO_STATUS_BLOCK IoStatusBlock ) ;
1536 PIRP IoBuildDeviceIoControlRequest(ULONG IoControlCode ,
1537 PDEVICE_OBJECT DeviceObject ,
1538 PVOID InputBuffer ,
1539 ULONG InputBufferLength ,
1540 PVOID OutputBuffer ,
1541 ULONG OutputBufferLength ,
1542 BOOLEAN InternalDeviceIoControl ,
1543 PKEVENT Event ,
1544 PIO_STATUS_BLOCK IoStatusBlock ) ;
1545 NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject ,
1546 PIRP Irp ) ;
1547 void IofCompleteRequest(PIRP Irp ,
1548 CCHAR PriorityBoost ) ;
1549 NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject ,
1550 ULONG DeviceExtensionSize ,
1551 PUNICODE_STRING DeviceName ,
1552 ULONG DeviceType , ULONG DeviceCharacteristics ,
1553 BOOLEAN Exclusive , PDEVICE_OBJECT *DeviceObject ) ;
1554 NTSTATUS IoCreateSymbolicLink(PUNICODE_STRING SymbolicLinkName ,
1555 PUNICODE_STRING DeviceName ) ;
1556 void IoDeleteDevice(PDEVICE_OBJECT DeviceObject ) ;
1557 NTSTATUS IoDeleteSymbolicLink(PUNICODE_STRING SymbolicLinkName ) ;
1558 void IoDetachDevice(PDEVICE_OBJECT TargetDevice ) ;
1559 void IoFreeIrp(PIRP Irp ) ;
1560 void IoFreeMdl(PMDL Mdl ) ;
1561 PCONFIGURATION_INFORMATION IoGetConfigurationInformation(void) ;
1562 NTSTATUS IoQueryDeviceDescription(PINTERFACE_TYPE BusType ,
1563 PULONG BusNumber ,
1564 PCONFIGURATION_TYPE ControllerType ,
1565 PULONG ControllerNumber ,
1566 PCONFIGURATION_TYPE PeripheralType ,
1567 PULONG PeripheralNumber ,
1568 NTSTATUS (*CalloutRoutine)(PVOID Context ,
1569 PUNICODE_STRING PathName ,
1570 INTERFACE_TYPE BusType ,
1571 ULONG BusNumber ,
1572 PKEY_VALUE_FULL_INFORMATION *BusInformation ,
1573 CONFIGURATION_TYPE ControllerType ,
1574 ULONG ControllerNumber ,
1575 PKEY_VALUE_FULL_INFORMATION *ControllerInformation ,
1576 CONFIGURATION_TYPE PeripheralType ,
1577 ULONG PeripheralNumber ,
1578 PKEY_VALUE_FULL_INFORMATION *PeripheralInformation ) ,
1579 PVOID Context ) ;
1580 void IoReleaseCancelSpinLock(KIRQL Irql ) ;
1581 void IoSetHardErrorOrVerifyDevice(PIRP Irp , PDEVICE_OBJECT DeviceObject ) ;
1582 NTSTATUS IoRegisterDeviceInterface(PDEVICE_OBJECT PhysicalDeviceObject ,
1583 GUID const *InterfaceClassGuid ,
1584 PUNICODE_STRING ReferenceString ,
1585 PUNICODE_STRING SymbolicLinkName ) ;
1586 NTSTATUS IoSetDeviceInterfaceState(PUNICODE_STRING SymbolicLinkName ,
1587 BOOLEAN Enable ) ;
1588#pragma warning(disable:4200)
1589#pragma warning(default:4200)
1590 NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject ,
1591 PIRP Irp ) ;
1592 void PoStartNextPowerIrp(PIRP Irp ) ;
1593 NTSTATUS ObReferenceObjectByHandle(HANDLE Handle ,
1594 ACCESS_MASK DesiredAccess ,
1595 POBJECT_TYPE ObjectType ,
1596 KPROCESSOR_MODE AccessMode ,
1597 PVOID *Object ,
1598 POBJECT_HANDLE_INFORMATION HandleInformation ) ;
1599 void ObfDereferenceObject(PVOID Object ) ;
1600 NTSTATUS ZwClose(HANDLE Handle ) ;
1601#pragma once
1602#pragma once
1603#pragma once
1604NTSTATUS KbFilter_AddDevice(PDRIVER_OBJECT Driver , PDEVICE_OBJECT PDO ) ;
1605NTSTATUS KbFilter_CreateClose(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ;
1606NTSTATUS KbFilter_DispatchPassThrough(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ;
1607NTSTATUS KbFilter_InternIoCtl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ;
1608extern NTSTATUS KbFilter_IoCtl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ;
1609NTSTATUS KbFilter_PnP(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ;
1610NTSTATUS KbFilter_Power(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ;
1611NTSTATUS KbFilter_InitializationRoutine(PDEVICE_OBJECT DeviceObject , PVOID SynchFuncContext ,
1612 NTSTATUS (*ReadPort)(PVOID Context , PUCHAR Value ,
1613 BOOLEAN WaitForACK ) ,
1614 NTSTATUS (*WritePort)(PVOID Context , UCHAR Value ,
1615 BOOLEAN WaitForACK ) ,
1616 PBOOLEAN TurnTranslationOn ) ;
1617BOOLEAN KbFilter_IsrHook(PDEVICE_OBJECT DeviceObject , PKEYBOARD_INPUT_DATA CurrentInput ,
1618 POUTPUT_PACKET CurrentOutput , UCHAR StatusByte , PUCHAR DataByte ,
1619 PBOOLEAN ContinueProcessing , PKEYBOARD_SCAN_STATE ScanState ) ;
1620void KbFilter_ServiceCallback(PDEVICE_OBJECT DeviceObject , PKEYBOARD_INPUT_DATA InputDataStart ,
1621 PKEYBOARD_INPUT_DATA InputDataEnd , PULONG InputDataConsumed ) ;
1622void KbFilter_Unload(PDRIVER_OBJECT Driver ) ;
1623NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject , PUNICODE_STRING RegistryPath ) ;
1624#pragma alloc_text(INIT,DriverEntry)
1625#pragma alloc_text(PAGE,KbFilter_AddDevice)
1626#pragma alloc_text(PAGE,KbFilter_CreateClose)
1627#pragma alloc_text(PAGE,KbFilter_IoCtl)
1628#pragma alloc_text(PAGE,KbFilter_InternIoCtl)
1629#pragma alloc_text(PAGE,KbFilter_Unload)
1630#pragma alloc_text(PAGE,KbFilter_DispatchPassThrough)
1631#pragma alloc_text(PAGE,KbFilter_PnP)
1632#pragma alloc_text(PAGE,KbFilter_Power)
1633void errorFn(void)
1634{
1635
1636 {
1637 ERROR:
1638 goto ERROR;
1639}
1640}
1641int s ;
1642int UNLOADED ;
1643int NP ;
1644int DC ;
1645int SKIP1 ;
1646int SKIP2 ;
1647int MPR1 ;
1648int MPR3 ;
1649int IPC ;
1650int pended ;
1651NTSTATUS (*compFptr)(PDEVICE_OBJECT DeviceObject , PIRP Irp , PVOID Context ) ;
1652int compRegistered ;
1653int lowerDriverReturn ;
1654int setEventCalled ;
1655int customIrp ;
1656int myStatus ;
1657void _BLAST_init(void)
1658{
1659
1660 {
1661 UNLOADED = 0;
1662 NP = 1;
1663 DC = 2;
1664 SKIP1 = 3;
1665 SKIP2 = 4;
1666 MPR1 = 5;
1667 MPR3 = 6;
1668 IPC = 7;
1669 s = UNLOADED;
1670 pended = 0;
1671 compFptr = 0;
1672 compRegistered = 0;
1673 lowerDriverReturn = 0;
1674 setEventCalled = 0;
1675 customIrp = 0;
1676 return;
1677}
1678}
1679NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject , PUNICODE_STRING RegistryPath )
1680{ ULONG i ;
1681
1682 {
1683 DriverObject->MajorFunction[i] = & KbFilter_DispatchPassThrough;
1684 DriverObject->MajorFunction[0] = & KbFilter_CreateClose;
1685 DriverObject->MajorFunction[2] = & KbFilter_CreateClose;
1686 DriverObject->MajorFunction[27] = & KbFilter_PnP;
1687 DriverObject->MajorFunction[22] = & KbFilter_Power;
1688 DriverObject->MajorFunction[15] = & KbFilter_InternIoCtl;
1689 DriverObject->DriverUnload = & KbFilter_Unload;
1690 (DriverObject->DriverExtension)->AddDevice = & KbFilter_AddDevice;
1691 return (0L);
1692}
1693}
1694NTSTATUS KbFilter_AddDevice(PDRIVER_OBJECT Driver , PDEVICE_OBJECT PDO )
1695{ PDEVICE_EXTENSION devExt ;
1696 PDEVICE_OBJECT device ;
1697 NTSTATUS status ;
1698
1699 {
1700 {
1701 status = 0L;
1702 status = IoCreateDevice(Driver, sizeof(DEVICE_EXTENSION ), (void *)0, 11, 0, 0,
1703 & device);
1704 }
1705 if (! (status >= 0L)) {
1706 return (status);
1707 } else {
1708
1709 }
1710 {
1711 memset(device->DeviceExtension, 0, sizeof(DEVICE_EXTENSION ));
1712 devExt = (struct _DEVICE_EXTENSION *)device->DeviceExtension;
1713 devExt->TopOfStack = IoAttachDeviceToDeviceStack(device, PDO);
1714 devExt->Self = device;
1715 devExt->PDO = PDO;
1716 devExt->DeviceState = 1;
1717 devExt->SurpriseRemoved = 0;
1718 devExt->Removed = 0;
1719 devExt->Started = 0;
1720 device->Flags |= 8196UL;
1721 device->Flags &= 4294967167UL;
1722 }
1723 return (status);
1724}
1725}
1726NTSTATUS KbFilter_Complete(PDEVICE_OBJECT DeviceObject , PIRP Irp , PVOID Context )
1727{ PKEVENT event ;
1728
1729 {
1730 {
1731 event = (struct _KEVENT *)Context;
1732 KeSetEvent(event, 0, 0);
1733 }
1734 return (-1073741802L);
1735}
1736}
1737NTSTATUS KbFilter_CreateClose(PDEVICE_OBJECT DeviceObject , PIRP Irp )
1738{ PIO_STACK_LOCATION irpStack ;
1739 NTSTATUS status ;
1740 PDEVICE_EXTENSION devExt ;
1741 LONG tmp ;
1742 LONG tmp___0 ;
1743 NTSTATUS tmp___1 ;
1744
1745 {
1746 irpStack = Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation;
1747 devExt = (struct _DEVICE_EXTENSION *)DeviceObject->DeviceExtension;
1748 status = Irp->IoStatus.__annonCompField4.Status;
1749 status = myStatus;
1750 if (irpStack->MajorFunction == 0) {
1751 goto switch_0_0;
1752 } else {
1753 if (irpStack->MajorFunction == 2) {
1754 goto switch_0_2;
1755 } else {
1756 if (0) {
1757 switch_0_0: ;
1758 if ((unsigned int )((void *)0) == (unsigned int )devExt->UpperConnectData.ClassService) {
1759 status = -1073741436L;
1760 } else {
1761 {
1762 tmp = InterlockedIncrement(& devExt->EnableCount);
1763 }
1764 if (1L == tmp) {
1765
1766 } else {
1767
1768 }
1769 }
1770 goto switch_0_break;
1771 switch_0_2:
1772 {
1773 tmp___0 = InterlockedDecrement(& devExt->EnableCount);
1774 }
1775 if (0L == tmp___0) {
1776
1777 } else {
1778
1779 }
1780 goto switch_0_break;
1781 } else {
1782 switch_0_break: ;
1783 }
1784 }
1785 }
1786 {
1787 Irp->IoStatus.__annonCompField4.Status = status;
1788 myStatus = status;
1789 tmp___1 = KbFilter_DispatchPassThrough(DeviceObject, Irp);
1790 }
1791 return (tmp___1);
1792}
1793}
1794NTSTATUS KbFilter_DispatchPassThrough(PDEVICE_OBJECT DeviceObject , PIRP Irp )
1795{ PIO_STACK_LOCATION irpStack ;
1796 NTSTATUS tmp ;
1797
1798 {
1799 irpStack = Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation;
1800 if (s == NP) {
1801 s = SKIP1;
1802 } else {
1803 {
1804 errorFn();
1805 }
1806 }
1807 {
1808 Irp->CurrentLocation = (CHAR )((int )Irp->CurrentLocation + 1);
1809 Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation += 1;
1810 tmp = IofCallDriver(((struct _DEVICE_EXTENSION *)DeviceObject->DeviceExtension)->TopOfStack,
1811 Irp);
1812 }
1813 return (tmp);
1814}
1815}
1816NTSTATUS KbFilter_InternIoCtl(PDEVICE_OBJECT DeviceObject , PIRP Irp )
1817{ PIO_STACK_LOCATION irpStack ;
1818 PDEVICE_EXTENSION devExt ;
1819 PINTERNAL_I8042_HOOK_KEYBOARD hookKeyboard ;
1820 PCONNECT_DATA connectData ;
1821 NTSTATUS status ;
1822 NTSTATUS tmp ;
1823
1824 {
1825 status = 0L;
1826 devExt = (struct _DEVICE_EXTENSION *)DeviceObject->DeviceExtension;
1827 Irp->IoStatus.Information = 0;
1828 irpStack = Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation;
1829 if (irpStack->Parameters.DeviceIoControl.IoControlCode == (((11 << 16) | (128 << 2)) | 3)) {
1830 goto switch_1_exp_0;
1831 } else {
1832 if (irpStack->Parameters.DeviceIoControl.IoControlCode == (((11 << 16) | (256 << 2)) | 3)) {
1833 goto switch_1_exp_1;
1834 } else {
1835 if (irpStack->Parameters.DeviceIoControl.IoControlCode == (((11 << 16) | (4080 << 2)) | 3)) {
1836 goto switch_1_exp_2;
1837 } else {
1838 if (irpStack->Parameters.DeviceIoControl.IoControlCode == 11 << 16) {
1839 goto switch_1_exp_3;
1840 } else {
1841 if (irpStack->Parameters.DeviceIoControl.IoControlCode == ((11 << 16) | (32 << 2))) {
1842 goto switch_1_exp_4;
1843 } else {
1844 if (irpStack->Parameters.DeviceIoControl.IoControlCode == ((11 << 16) | (16 << 2))) {
1845 goto switch_1_exp_5;
1846 } else {
1847 if (irpStack->Parameters.DeviceIoControl.IoControlCode == ((11 << 16) | (2 << 2))) {
1848 goto switch_1_exp_6;
1849 } else {
1850 if (irpStack->Parameters.DeviceIoControl.IoControlCode == ((11 << 16) | (8 << 2))) {
1851 goto switch_1_exp_7;
1852 } else {
1853 if (irpStack->Parameters.DeviceIoControl.IoControlCode == ((11 << 16) | (1 << 2))) {
1854 goto switch_1_exp_8;
1855 } else {
1856 if (0) {
1857 switch_1_exp_0: ;
1858 if ((unsigned int )devExt->UpperConnectData.ClassService != (unsigned int )((void *)0)) {
1859 status = -1073741757L;
1860 goto switch_1_break;
1861 } else {
1862 if (irpStack->Parameters.DeviceIoControl.InputBufferLength < (ULONG )sizeof(CONNECT_DATA )) {
1863 status = -1073741811L;
1864 goto switch_1_break;
1865 } else {
1866
1867 }
1868 }
1869 connectData = (struct _CONNECT_DATA *)irpStack->Parameters.DeviceIoControl.Type3InputBuffer;
1870 devExt->UpperConnectData = *connectData;
1871 connectData->ClassDeviceObject = devExt->Self;
1872 connectData->ClassService = & KbFilter_ServiceCallback;
1873 goto switch_1_break;
1874 switch_1_exp_1:
1875 status = -1073741822L;
1876 goto switch_1_break;
1877 switch_1_exp_2: ;
1878 if (irpStack->Parameters.DeviceIoControl.InputBufferLength < (ULONG )sizeof(INTERNAL_I8042_HOOK_KEYBOARD )) {
1879 status = -1073741811L;
1880 goto switch_1_break;
1881 } else {
1882
1883 }
1884 hookKeyboard = (struct _INTERNAL_I8042_HOOK_KEYBOARD *)irpStack->Parameters.DeviceIoControl.Type3InputBuffer;
1885 devExt->UpperContext = hookKeyboard->Context;
1886 hookKeyboard->Context = (void *)DeviceObject;
1887 if (hookKeyboard->InitializationRoutine) {
1888 devExt->UpperInitializationRoutine = hookKeyboard->InitializationRoutine;
1889 } else {
1890
1891 }
1892 hookKeyboard->InitializationRoutine = (NTSTATUS (*)(PVOID InitializationContext ,
1893 PVOID SynchFuncContext ,
1894 NTSTATUS (*ReadPort)(PVOID Context ,
1895 PUCHAR Value ,
1896 BOOLEAN WaitForACK ) ,
1897 NTSTATUS (*WritePort)(PVOID Context ,
1898 UCHAR Value ,
1899 BOOLEAN WaitForACK ) ,
1900 PBOOLEAN TurnTranslationOn ))(& KbFilter_InitializationRoutine);
1901 if (hookKeyboard->IsrRoutine) {
1902 devExt->UpperIsrHook = hookKeyboard->IsrRoutine;
1903 } else {
1904
1905 }
1906 hookKeyboard->IsrRoutine = (BOOLEAN (*)(PVOID IsrContext , PKEYBOARD_INPUT_DATA CurrentInput ,
1907 POUTPUT_PACKET CurrentOutput ,
1908 UCHAR StatusByte , PUCHAR Byte ,
1909 PBOOLEAN ContinueProcessing ,
1910 PKEYBOARD_SCAN_STATE ScanState ))(& KbFilter_IsrHook);
1911 devExt->IsrWritePort = hookKeyboard->IsrWritePort;
1912 devExt->QueueKeyboardPacket = hookKeyboard->QueueKeyboardPacket;
1913 devExt->CallContext = hookKeyboard->CallContext;
1914 status = 0L;
1915 goto switch_1_break;
1916 switch_1_exp_3: ;
1917 switch_1_exp_4: ;
1918 switch_1_exp_5: ;
1919 switch_1_exp_6: ;
1920 switch_1_exp_7: ;
1921 switch_1_exp_8: ;
1922 goto switch_1_break;
1923 } else {
1924 switch_1_break: ;
1925 }
1926 }
1927 }
1928 }
1929 }
1930 }
1931 }
1932 }
1933 }
1934 }
1935 if (! (status >= 0L)) {
1936 {
1937 Irp->IoStatus.__annonCompField4.Status = status;
1938 myStatus = status;
1939 IofCompleteRequest(Irp, 0);
1940 }
1941 return (status);
1942 } else {
1943
1944 }
1945 {
1946 tmp = KbFilter_DispatchPassThrough(DeviceObject, Irp);
1947 }
1948 return (tmp);
1949}
1950}
1951NTSTATUS KbFilter_PnP(PDEVICE_OBJECT DeviceObject , PIRP Irp )
1952{ PDEVICE_EXTENSION devExt ;
1953 PIO_STACK_LOCATION irpStack ;
1954 NTSTATUS status ;
1955 KEVENT event ;
1956 PIO_STACK_LOCATION irpSp ;
1957 PIO_STACK_LOCATION nextIrpSp ;
1958 PIO_STACK_LOCATION irpSp___0 ;
1959
1960 {
1961 status = 0L;
1962 devExt = (struct _DEVICE_EXTENSION *)DeviceObject->DeviceExtension;
1963 irpStack = Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation;
1964 if (irpStack->MinorFunction == 0) {
1965 goto switch_2_0;
1966 } else {
1967 if (irpStack->MinorFunction == 23) {
1968 goto switch_2_23;
1969 } else {
1970 if (irpStack->MinorFunction == 2) {
1971 goto switch_2_2;
1972 } else {
1973 if (irpStack->MinorFunction == 1) {
1974 goto switch_2_1;
1975 } else {
1976 if (irpStack->MinorFunction == 5) {
1977 goto switch_2_5;
1978 } else {
1979 if (irpStack->MinorFunction == 3) {
1980 goto switch_2_3;
1981 } else {
1982 if (irpStack->MinorFunction == 6) {
1983 goto switch_2_6;
1984 } else {
1985 if (irpStack->MinorFunction == 13) {
1986 goto switch_2_13;
1987 } else {
1988 if (irpStack->MinorFunction == 4) {
1989 goto switch_2_4;
1990 } else {
1991 if (irpStack->MinorFunction == 7) {
1992 goto switch_2_7;
1993 } else {
1994 if (irpStack->MinorFunction == 8) {
1995 goto switch_2_8;
1996 } else {
1997 if (irpStack->MinorFunction == 9) {
1998 goto switch_2_9;
1999 } else {
2000 if (irpStack->MinorFunction == 12) {
2001 goto switch_2_12;
2002 } else {
2003 if (irpStack->MinorFunction == 10) {
2004 goto switch_2_10;
2005 } else {
2006 if (irpStack->MinorFunction == 11) {
2007 goto switch_2_11;
2008 } else {
2009 if (irpStack->MinorFunction == 15) {
2010 goto switch_2_15;
2011 } else {
2012 if (irpStack->MinorFunction == 16) {
2013 goto switch_2_16;
2014 } else {
2015 if (irpStack->MinorFunction == 17) {
2016 goto switch_2_17;
2017 } else {
2018 if (irpStack->MinorFunction == 18) {
2019 goto switch_2_18;
2020 } else {
2021 if (irpStack->MinorFunction == 19) {
2022 goto switch_2_19;
2023 } else {
2024 if (irpStack->MinorFunction == 20) {
2025 goto switch_2_20;
2026 } else {
2027 {
2028 goto switch_2_default;
2029 if (0) {
2030 switch_2_0:
2031 {
2032 irpSp = Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation;
2033 nextIrpSp = Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation - 1;
2034 memcpy(nextIrpSp, irpSp, (long )(& ((IO_STACK_LOCATION *)0)->CompletionRoutine));
2035 nextIrpSp->Control = 0;
2036
2037 }
2038 if (s != NP) {
2039 {
2040 errorFn();
2041 }
2042 } else {
2043 if (compRegistered != 0) {
2044 {
2045 errorFn();
2046 }
2047 } else {
2048 compRegistered = 1;
2049 compFptr = & KbFilter_Complete;
2050 }
2051 }
2052 {
2053 irpSp___0 = Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation - 1;
2054 irpSp___0->CompletionRoutine = & KbFilter_Complete;
2055 irpSp___0->Context = & event;
2056 irpSp___0->Control = 0;
2057 irpSp___0->Control = 64;
2058 irpSp___0->Control = (int )irpSp___0->Control | 128;
2059 irpSp___0->Control = (int )irpSp___0->Control | 32;
2060 status = IofCallDriver(devExt->TopOfStack,
2061 Irp);
2062 }
2063 if (259L == status) {
2064 {
2065 KeWaitForSingleObject(& event, 0,
2066 0, 0, (void *)0);
2067 }
2068 } else {
2069
2070 }
2071 if (status >= 0L) {
2072 if ((long )myStatus >= 0L) {
2073 devExt->Started = 1;
2074 devExt->Removed = 0;
2075 devExt->SurpriseRemoved = 0;
2076 } else {
2077
2078 }
2079 } else {
2080
2081 }
2082 {
2083 Irp->IoStatus.__annonCompField4.Status = status;
2084 myStatus = status;
2085 Irp->IoStatus.Information = 0;
2086 IofCompleteRequest(Irp, 0);
2087 }
2088 goto switch_2_break;
2089 switch_2_23:
2090 devExt->SurpriseRemoved = 1;
2091 if (s == NP) {
2092 s = SKIP1;
2093 } else {
2094 {
2095 errorFn();
2096 }
2097 }
2098 {
2099 Irp->CurrentLocation = (CHAR )((int )Irp->CurrentLocation + 1);
2100 Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation += 1;
2101 status = IofCallDriver(devExt->TopOfStack,
2102 Irp);
2103 }
2104 goto switch_2_break;
2105 switch_2_2:
2106 devExt->Removed = 1;
2107 if (s == NP) {
2108 s = SKIP1;
2109 } else {
2110 {
2111 errorFn();
2112 }
2113 }
2114 {
2115 Irp->CurrentLocation = (CHAR )((int )Irp->CurrentLocation + 1);
2116 Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation += 1;
2117 IofCallDriver(devExt->TopOfStack, Irp);
2118
2119
2120 status = 0L;
2121 }
2122 goto switch_2_break;
2123 switch_2_1: ;
2124 switch_2_5: ;
2125 switch_2_3: ;
2126 switch_2_6: ;
2127 switch_2_13: ;
2128 switch_2_4: ;
2129 switch_2_7: ;
2130 switch_2_8: ;
2131 switch_2_9: ;
2132 switch_2_12: ;
2133 switch_2_10: ;
2134 switch_2_11: ;
2135 switch_2_15: ;
2136 switch_2_16: ;
2137 switch_2_17: ;
2138 switch_2_18: ;
2139 switch_2_19: ;
2140 switch_2_20: ;
2141 switch_2_default: ;
2142 if (s == NP) {
2143 s = SKIP1;
2144 } else {
2145 {
2146 errorFn();
2147 }
2148 }
2149 {
2150 Irp->CurrentLocation = (CHAR )((int )Irp->CurrentLocation + 1);
2151 Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation += 1;
2152 status = IofCallDriver(devExt->TopOfStack,
2153 Irp);
2154 }
2155 goto switch_2_break;
2156 } else {
2157 switch_2_break: ;
2158 }
2159 }
2160 }
2161 }
2162 }
2163 }
2164 }
2165 }
2166 }
2167 }
2168 }
2169 }
2170 }
2171 }
2172 }
2173 }
2174 }
2175 }
2176 }
2177 }
2178 }
2179 }
2180 }
2181 return (status);
2182}
2183}
2184NTSTATUS KbFilter_Power(PDEVICE_OBJECT DeviceObject , PIRP Irp )
2185{ PIO_STACK_LOCATION irpStack ;
2186 PDEVICE_EXTENSION devExt ;
2187 POWER_STATE powerState ;
2188 POWER_STATE_TYPE powerType ;
2189 NTSTATUS tmp ;
2190
2191 {
2192 devExt = (struct _DEVICE_EXTENSION *)DeviceObject->DeviceExtension;
2193 irpStack = Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation;
2194 powerType = irpStack->Parameters.Power.Type;
2195 powerState = irpStack->Parameters.Power.State;
2196 if (irpStack->MinorFunction == 2) {
2197 goto switch_3_2;
2198 } else {
2199 if (irpStack->MinorFunction == 1) {
2200 goto switch_3_1;
2201 } else {
2202 if (irpStack->MinorFunction == 0) {
2203 goto switch_3_0;
2204 } else {
2205 if (irpStack->MinorFunction == 3) {
2206 goto switch_3_3;
2207 } else {
2208 {
2209 goto switch_3_default;
2210 if (0) {
2211 switch_3_2: ;
2212 if ((int )powerType == 1) {
2213 devExt->DeviceState = powerState.DeviceState;
2214 } else {
2215
2216 }
2217 switch_3_1: ;
2218 switch_3_0: ;
2219 switch_3_3: ;
2220 switch_3_default: ;
2221 goto switch_3_break;
2222 } else {
2223 switch_3_break: ;
2224 }
2225 }
2226 }
2227 }
2228 }
2229 }
2230 {
2231
2232 }
2233 if (s == NP) {
2234 s = SKIP1;
2235 } else {
2236 {
2237 errorFn();
2238 }
2239 }
2240 {
2241 Irp->CurrentLocation = (CHAR )((int )Irp->CurrentLocation + 1);
2242 Irp->Tail.Overlay.__annonCompField17.__annonCompField16.CurrentStackLocation += 1;
2243 tmp = PoCallDriver(devExt->TopOfStack, Irp);
2244 }
2245 return (tmp);
2246}
2247}
2248NTSTATUS KbFilter_InitializationRoutine(PDEVICE_OBJECT DeviceObject , PVOID SynchFuncContext ,
2249 NTSTATUS (*ReadPort)(PVOID Context , PUCHAR Value ,
2250 BOOLEAN WaitForACK ) ,
2251 NTSTATUS (*WritePort)(PVOID Context , UCHAR Value ,
2252 BOOLEAN WaitForACK ) ,
2253 PBOOLEAN TurnTranslationOn )
2254{ PDEVICE_EXTENSION devExt ;
2255 NTSTATUS status ;
2256
2257 {
2258 status = 0L;
2259 devExt = DeviceObject->DeviceExtension;
2260 if (devExt->UpperInitializationRoutine) {
2261 {
2262 status = (*(devExt->UpperInitializationRoutine))(devExt->UpperContext, SynchFuncContext,
2263 ReadPort, WritePort, TurnTranslationOn);
2264 }
2265 if (! (status >= 0L)) {
2266 return (status);
2267 } else {
2268
2269 }
2270 } else {
2271
2272 }
2273 *TurnTranslationOn = 1;
2274 return (status);
2275}
2276}
2277BOOLEAN KbFilter_IsrHook(PDEVICE_OBJECT DeviceObject , PKEYBOARD_INPUT_DATA CurrentInput ,
2278 POUTPUT_PACKET CurrentOutput , UCHAR StatusByte , PUCHAR DataByte ,
2279 PBOOLEAN ContinueProcessing , PKEYBOARD_SCAN_STATE ScanState )
2280{ PDEVICE_EXTENSION devExt ;
2281 BOOLEAN retVal ;
2282
2283 {
2284 retVal = 1;
2285 devExt = DeviceObject->DeviceExtension;
2286 if (devExt->UpperIsrHook) {
2287 {
2288 retVal = (*(devExt->UpperIsrHook))(devExt->UpperContext, CurrentInput, CurrentOutput,
2289 StatusByte, DataByte, ContinueProcessing, ScanState);
2290 }
2291 if (! retVal) {
2292 return (retVal);
2293 } else {
2294 if (! *ContinueProcessing) {
2295 return (retVal);
2296 } else {
2297
2298 }
2299 }
2300 } else {
2301
2302 }
2303 *ContinueProcessing = 1;
2304 return (retVal);
2305}
2306}
2307void KbFilter_ServiceCallback(PDEVICE_OBJECT DeviceObject , PKEYBOARD_INPUT_DATA InputDataStart ,
2308 PKEYBOARD_INPUT_DATA InputDataEnd , PULONG InputDataConsumed )
2309{ PDEVICE_EXTENSION devExt ;
2310
2311 {
2312 {
2313 devExt = (struct _DEVICE_EXTENSION *)DeviceObject->DeviceExtension;
2314 (*((void (*)(PVOID NormalContext , PVOID SystemArgument1 , PVOID SystemArgument2 ,
2315 PVOID SystemArgument3 ))devExt->UpperConnectData.ClassService))(devExt->UpperConnectData.ClassDeviceObject,
2316 InputDataStart,
2317 InputDataEnd,
2318 InputDataConsumed);
2319 }
2320 return;
2321}
2322}
2323void KbFilter_Unload(PDRIVER_OBJECT Driver )
2324{
2325
2326 {
2327 return;
2328}
2329}
2330#pragma once
2331#pragma once
2332#pragma once
2333#pragma once
2334#pragma warning(push)
2335#pragma warning(disable:4035)
2336#pragma warning(pop)
2337#pragma once
2338#pragma warning(disable:4103)
2339#pragma warning(disable:4103)
2340#pragma warning(push)
2341#pragma warning(disable:4035)
2342#pragma warning(pop)
2343#pragma warning(disable:4035)
2344#pragma warning(push)
2345#pragma warning(disable:4164)
2346#pragma function(_enable)
2347#pragma function(_disable)
2348#pragma warning(pop)
2349#pragma warning(disable:4103)
2350#pragma warning(disable:4103)
2351#pragma warning(disable:4103)
2352#pragma warning(disable:4103)
2353#pragma warning(disable:4103)
2354#pragma warning(disable:4103)
2355#pragma warning(disable:4200)
2356#pragma warning(default:4200)
2357IRP *pirp ;
2358void stub_driver_init(void)
2359{
2360
2361 {
2362 s = NP;
2363 pended = 0;
2364 compFptr = 0;
2365 compRegistered = 0;
2366 lowerDriverReturn = 0;
2367 setEventCalled = 0;
2368 customIrp = 0;
2369 return;
2370}
2371}
2372int main(void)
2373{ DRIVER_OBJECT d ;
2374 UNICODE_STRING u ;
2375 NTSTATUS status ;
2376 int we_should_unload ;
2377 PIRP irp ;
2378 int __BLAST_NONDET ;
2379 int irp_choice ;
2380 DEVICE_OBJECT devobj ;
2381
2382 {
2383 {
2384 pirp = & irp;
2385 _BLAST_init();
2386 status = DriverEntry(& d, & u);
2387 }
2388 if (status >= 0L) {
2389 s = NP;
2390 customIrp = 0;
2391 setEventCalled = customIrp;
2392 lowerDriverReturn = setEventCalled;
2393 compRegistered = lowerDriverReturn;
2394 compFptr = compRegistered;
2395 pended = compFptr;
2396 pirp->IoStatus.__annonCompField4.Status = 0L;
2397 myStatus = 0L;
2398 if (irp_choice == 0) {
2399 pirp->IoStatus.__annonCompField4.Status = -1073741637L;
2400 myStatus = -1073741637L;
2401 } else {
2402
2403 }
2404 {
2405 status = KbFilter_AddDevice(& d, & devobj);
2406 stub_driver_init();
2407 }
2408 if (! (status >= 0L)) {
2409 return (-1);
2410 } else {
2411
2412 }
2413 if (__BLAST_NONDET == 0) {
2414 goto switch_4_0;
2415 } else {
2416 if (__BLAST_NONDET == 1) {
2417 goto switch_4_1;
2418 } else {
2419 if (__BLAST_NONDET == 2) {
2420 goto switch_4_2;
2421 } else {
2422 if (__BLAST_NONDET == 3) {
2423 goto switch_4_3;
2424 } else {
2425 if (__BLAST_NONDET == 4) {
2426 goto switch_4_4;
2427 } else {
2428 if (__BLAST_NONDET == 8) {
2429 goto switch_4_8;
2430 } else {
2431 {
2432 goto switch_4_default;
2433 if (0) {
2434 switch_4_0:
2435 {
2436 status = KbFilter_CreateClose(& devobj, pirp);
2437 }
2438 goto switch_4_break;
2439 switch_4_1:
2440 {
2441 status = KbFilter_CreateClose(& devobj, pirp);
2442 }
2443 goto switch_4_break;
2444 switch_4_2:
2445 {
2446 status = KbFilter_IoCtl(& devobj, pirp);
2447 }
2448 goto switch_4_break;
2449 switch_4_3:
2450 {
2451 status = KbFilter_PnP(& devobj, pirp);
2452 }
2453 goto switch_4_break;
2454 switch_4_4:
2455 {
2456 status = KbFilter_Power(& devobj, pirp);
2457 }
2458 goto switch_4_break;
2459 switch_4_8:
2460 {
2461 status = KbFilter_InternIoCtl(& devobj, pirp);
2462 }
2463 goto switch_4_break;
2464 switch_4_default: ;
2465 return (-1);
2466 } else {
2467 switch_4_break: ;
2468 }
2469 }
2470 }
2471 }
2472 }
2473 }
2474 }
2475 }
2476 if (we_should_unload) {
2477 {
2478
2479 }
2480 } else {
2481
2482 }
2483 } else {
2484
2485 }
2486 if (pended == 1) {
2487 if (s == NP) {
2488 s = NP;
2489 } else {
2490 goto _L___2;
2491 }
2492 } else {
2493 _L___2:
2494 if (pended == 1) {
2495 if (s == MPR3) {
2496 s = MPR3;
2497 } else {
2498 goto _L___1;
2499 }
2500 } else {
2501 _L___1:
2502 if (s == UNLOADED) {
2503
2504 } else {
2505 if (status == -1L) {
2506
2507 } else {
2508 if (s != SKIP2) {
2509 if (s != IPC) {
2510 if (s != DC) {
2511
2512 } else {
2513 goto _L___0;
2514 }
2515 } else {
2516 goto _L___0;
2517 }
2518 } else {
2519 _L___0:
2520 if (pended == 1) {
2521 if (status != 259L) {
2522 {
2523 errorFn();
2524 }
2525 } else {
2526
2527 }
2528 } else {
2529 if (s == DC) {
2530 if (status == 259L) {
2531 {
2532 errorFn();
2533 }
2534 } else {
2535
2536 }
2537 } else {
2538 if (status != (NTSTATUS )lowerDriverReturn) {
2539
2540 } else {
2541
2542 }
2543 }
2544 }
2545 }
2546 }
2547 }
2548 }
2549 }
2550 return (status);
2551}
2552}
2553char _SLAM_alloc_dummy ;
2554char *malloc(int i )
2555{ int __BLAST_NONDET ;
2556
2557 {
2558 if (__BLAST_NONDET) {
2559 return ((char *)0);
2560 } else {
2561 return ((char *)1);
2562 }
2563}
2564}
2565 void ExAcquireFastMutex(PFAST_MUTEX FastMutex ) ;
2566void ExAcquireFastMutex(PFAST_MUTEX FastMutex )
2567{
2568
2569 {
2570 return;
2571}
2572}
2573 void ExReleaseFastMutex(PFAST_MUTEX FastMutex ) ;
2574void ExReleaseFastMutex(PFAST_MUTEX FastMutex )
2575{
2576
2577 {
2578 return;
2579}
2580}
2581 PVOID ExAllocatePoolWithTag(POOL_TYPE PoolType ,
2582 SIZE_T NumberOfBytes ,
2583 ULONG Tag ) ;
2584PVOID ExAllocatePoolWithTag(POOL_TYPE PoolType , SIZE_T NumberOfBytes ,
2585 ULONG Tag )
2586{ PVOID x ;
2587 char *tmp ;
2588
2589 {
2590 {
2591 tmp = malloc(NumberOfBytes);
2592 x = tmp;
2593 }
2594 return (x);
2595}
2596}
2597 void ExFreePool(PVOID P ) ;
2598void ExFreePool(PVOID P )
2599{
2600
2601 {
2602 return;
2603}
2604}
2605 PLIST_ENTRY ExfInterlockedInsertHeadList(PLIST_ENTRY ListHead ,
2606 PLIST_ENTRY ListEntry ,
2607 PKSPIN_LOCK Lock ) ;
2608PLIST_ENTRY ExfInterlockedInsertHeadList(PLIST_ENTRY ListHead ,
2609 PLIST_ENTRY ListEntry ,
2610 PKSPIN_LOCK Lock )
2611{
2612
2613 {
2614 return ((void *)0);
2615}
2616}
2617 PLIST_ENTRY ExfInterlockedInsertTailList(PLIST_ENTRY ListHead ,
2618 PLIST_ENTRY ListEntry ,
2619 PKSPIN_LOCK Lock ) ;
2620PLIST_ENTRY ExfInterlockedInsertTailList(PLIST_ENTRY ListHead ,
2621 PLIST_ENTRY ListEntry ,
2622 PKSPIN_LOCK Lock )
2623{
2624
2625 {
2626 return ((void *)0);
2627}
2628}
2629 PLIST_ENTRY ExfInterlockedRemoveHeadList(PLIST_ENTRY ListHead ,
2630 PKSPIN_LOCK Lock ) ;
2631PLIST_ENTRY ExfInterlockedRemoveHeadList(PLIST_ENTRY ListHead ,
2632 PKSPIN_LOCK Lock )
2633{
2634
2635 {
2636 return ((void *)0);
2637}
2638}
2639 PMDL IoAllocateMdl(PVOID VirtualAddress , ULONG Length ,
2640 BOOLEAN SecondaryBuffer , BOOLEAN ChargeQuota ,
2641 PIRP Irp ) ;
2642PMDL IoAllocateMdl(PVOID VirtualAddress , ULONG Length , BOOLEAN SecondaryBuffer ,
2643 BOOLEAN ChargeQuota , PIRP Irp )
2644{ int __BLAST_NONDET ;
2645 char *tmp ;
2646
2647 {
2648 if (__BLAST_NONDET == 0) {
2649 goto switch_5_0;
2650 } else {
2651 {
2652 goto switch_5_default;
2653 if (0) {
2654 switch_5_0:
2655 {
2656 tmp = malloc(sizeof(MDL ));
2657 }
2658 return ((void *)tmp);
2659 switch_5_default: ;
2660 return ((void *)0);
2661 } else {
2662 switch_5_break: ;
2663 }
2664 }
2665 }
2666}
2667}
2668 PDEVICE_OBJECT IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice ,
2669 PDEVICE_OBJECT TargetDevice ) ;
2670PDEVICE_OBJECT IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice , PDEVICE_OBJECT TargetDevice )
2671{ int __BLAST_NONDET ;
2672
2673 {
2674 if (__BLAST_NONDET == 0) {
2675 goto switch_6_0;
2676 } else {
2677 {
2678 goto switch_6_default;
2679 if (0) {
2680 switch_6_0: ;
2681 return (TargetDevice);
2682 switch_6_default: ;
2683 return ((void *)0);
2684 } else {
2685 switch_6_break: ;
2686 }
2687 }
2688 }
2689}
2690}
2691 PIRP IoBuildAsynchronousFsdRequest(ULONG MajorFunction ,
2692 PDEVICE_OBJECT DeviceObject ,
2693 PVOID Buffer ,
2694 ULONG Length ,
2695 PLARGE_INTEGER StartingOffset ,
2696 PIO_STATUS_BLOCK IoStatusBlock ) ;
2697PIRP IoBuildAsynchronousFsdRequest(ULONG MajorFunction , PDEVICE_OBJECT DeviceObject ,
2698 PVOID Buffer , ULONG Length , PLARGE_INTEGER StartingOffset ,
2699 PIO_STATUS_BLOCK IoStatusBlock )
2700{ int __BLAST_NONDET ;
2701 char *tmp ;
2702
2703 {
2704 customIrp = 1;
2705 if (__BLAST_NONDET == 0) {
2706 goto switch_7_0;
2707 } else {
2708 {
2709 goto switch_7_default;
2710 if (0) {
2711 switch_7_0:
2712 {
2713 tmp = malloc(sizeof(IRP ));
2714 }
2715 return ((void *)tmp);
2716 switch_7_default: ;
2717 return ((void *)0);
2718 } else {
2719 switch_7_break: ;
2720 }
2721 }
2722 }
2723}
2724}
2725 PIRP IoBuildDeviceIoControlRequest(ULONG IoControlCode ,
2726 PDEVICE_OBJECT DeviceObject ,
2727 PVOID InputBuffer ,
2728 ULONG InputBufferLength ,
2729 PVOID OutputBuffer ,
2730 ULONG OutputBufferLength ,
2731 BOOLEAN InternalDeviceIoControl ,
2732 PKEVENT Event ,
2733 PIO_STATUS_BLOCK IoStatusBlock ) ;
2734PIRP IoBuildDeviceIoControlRequest(ULONG IoControlCode , PDEVICE_OBJECT DeviceObject ,
2735 PVOID InputBuffer , ULONG InputBufferLength , PVOID OutputBuffer ,
2736 ULONG OutputBufferLength , BOOLEAN InternalDeviceIoControl ,
2737 PKEVENT Event , PIO_STATUS_BLOCK IoStatusBlock )
2738{ int __BLAST_NONDET ;
2739 char *tmp ;
2740
2741 {
2742 customIrp = 1;
2743 if (__BLAST_NONDET == 0) {
2744 goto switch_8_0;
2745 } else {
2746 {
2747 goto switch_8_default;
2748 if (0) {
2749 switch_8_0:
2750 {
2751 tmp = malloc(sizeof(IRP ));
2752 }
2753 return ((void *)tmp);
2754 switch_8_default: ;
2755 return ((void *)0);
2756 } else {
2757 switch_8_break: ;
2758 }
2759 }
2760 }
2761}
2762}
2763 NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject ,
2764 ULONG DeviceExtensionSize ,
2765 PUNICODE_STRING DeviceName ,
2766 ULONG DeviceType , ULONG DeviceCharacteristics ,
2767 BOOLEAN Exclusive , PDEVICE_OBJECT *DeviceObject ) ;
2768NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject , ULONG DeviceExtensionSize ,
2769 PUNICODE_STRING DeviceName , ULONG DeviceType , ULONG DeviceCharacteristics ,
2770 BOOLEAN Exclusive , PDEVICE_OBJECT *DeviceObject )
2771{ int __BLAST_NONDET ;
2772 char *tmp ;
2773
2774 {
2775 if (__BLAST_NONDET == 0) {
2776 goto switch_9_0;
2777 } else {
2778 {
2779 goto switch_9_default;
2780 if (0) {
2781 switch_9_0:
2782 {
2783 tmp = malloc(sizeof(DEVICE_OBJECT ));
2784 *DeviceObject = (void *)tmp;
2785 }
2786 return (0L);
2787 switch_9_default: ;
2788 return (-1073741823L);
2789 } else {
2790 switch_9_break: ;
2791 }
2792 }
2793 }
2794}
2795}
2796 NTSTATUS IoCreateSymbolicLink(PUNICODE_STRING SymbolicLinkName ,
2797 PUNICODE_STRING DeviceName ) ;
2798NTSTATUS IoCreateSymbolicLink(PUNICODE_STRING SymbolicLinkName , PUNICODE_STRING DeviceName )
2799{ int __BLAST_NONDET ;
2800
2801 {
2802 if (__BLAST_NONDET == 0) {
2803 goto switch_10_0;
2804 } else {
2805 {
2806 goto switch_10_default;
2807 if (0) {
2808 switch_10_0: ;
2809 return (0L);
2810 switch_10_default: ;
2811 return (-1073741823L);
2812 } else {
2813 switch_10_break: ;
2814 }
2815 }
2816 }
2817}
2818}
2819 void IoDeleteDevice(PDEVICE_OBJECT DeviceObject ) ;
2820void IoDeleteDevice(PDEVICE_OBJECT DeviceObject )
2821{
2822
2823 {
2824 return;
2825}
2826}
2827 NTSTATUS IoDeleteSymbolicLink(PUNICODE_STRING SymbolicLinkName ) ;
2828NTSTATUS IoDeleteSymbolicLink(PUNICODE_STRING SymbolicLinkName )
2829{ int __BLAST_NONDET ;
2830
2831 {
2832 if (__BLAST_NONDET == 0) {
2833 goto switch_11_0;
2834 } else {
2835 {
2836 goto switch_11_default;
2837 if (0) {
2838 switch_11_0: ;
2839 return (0L);
2840 switch_11_default: ;
2841 return (-1073741823L);
2842 } else {
2843 switch_11_break: ;
2844 }
2845 }
2846 }
2847}
2848}
2849 void IoDetachDevice(PDEVICE_OBJECT TargetDevice ) ;
2850void IoDetachDevice(PDEVICE_OBJECT TargetDevice )
2851{
2852
2853 {
2854 return;
2855}
2856}
2857 void IoFreeIrp(PIRP Irp ) ;
2858void IoFreeIrp(PIRP Irp )
2859{
2860
2861 {
2862 return;
2863}
2864}
2865 void IoFreeMdl(PMDL Mdl ) ;
2866void IoFreeMdl(PMDL Mdl )
2867{
2868
2869 {
2870 return;
2871}
2872}
2873 PCONFIGURATION_INFORMATION IoGetConfigurationInformation(void) ;
2874PCONFIGURATION_INFORMATION IoGetConfigurationInformation(void)
2875{ char *tmp ;
2876
2877 {
2878 {
2879 tmp = malloc(sizeof(CONFIGURATION_INFORMATION ));
2880 }
2881 return ((void *)tmp);
2882}
2883}
2884 NTSTATUS IoQueryDeviceDescription(PINTERFACE_TYPE BusType ,
2885 PULONG BusNumber ,
2886 PCONFIGURATION_TYPE ControllerType ,
2887 PULONG ControllerNumber ,
2888 PCONFIGURATION_TYPE PeripheralType ,
2889 PULONG PeripheralNumber ,
2890 NTSTATUS (*CalloutRoutine)(PVOID Context ,
2891 PUNICODE_STRING PathName ,
2892 INTERFACE_TYPE BusType ,
2893 ULONG BusNumber ,
2894 PKEY_VALUE_FULL_INFORMATION *BusInformation ,
2895 CONFIGURATION_TYPE ControllerType ,
2896 ULONG ControllerNumber ,
2897 PKEY_VALUE_FULL_INFORMATION *ControllerInformation ,
2898 CONFIGURATION_TYPE PeripheralType ,
2899 ULONG PeripheralNumber ,
2900 PKEY_VALUE_FULL_INFORMATION *PeripheralInformation ) ,
2901 PVOID Context ) ;
2902NTSTATUS IoQueryDeviceDescription(PINTERFACE_TYPE BusType , PULONG BusNumber , PCONFIGURATION_TYPE ControllerType ,
2903 PULONG ControllerNumber , PCONFIGURATION_TYPE PeripheralType ,
2904 PULONG PeripheralNumber , NTSTATUS (*CalloutRoutine)(PVOID Context ,
2905 PUNICODE_STRING PathName ,
2906 INTERFACE_TYPE BusType ,
2907 ULONG BusNumber ,
2908 PKEY_VALUE_FULL_INFORMATION *BusInformation ,
2909 CONFIGURATION_TYPE ControllerType ,
2910 ULONG ControllerNumber ,
2911 PKEY_VALUE_FULL_INFORMATION *ControllerInformation ,
2912 CONFIGURATION_TYPE PeripheralType ,
2913 ULONG PeripheralNumber ,
2914 PKEY_VALUE_FULL_INFORMATION *PeripheralInformation ) ,
2915 PVOID Context )
2916{ int __BLAST_NONDET ;
2917
2918 {
2919 if (__BLAST_NONDET == 0) {
2920 goto switch_12_0;
2921 } else {
2922 {
2923 goto switch_12_default;
2924 if (0) {
2925 switch_12_0: ;
2926 return (0L);
2927 switch_12_default: ;
2928 return (-1073741823L);
2929 } else {
2930 switch_12_break: ;
2931 }
2932 }
2933 }
2934}
2935}
2936 NTSTATUS IoRegisterDeviceInterface(PDEVICE_OBJECT PhysicalDeviceObject ,
2937 GUID const *InterfaceClassGuid ,
2938 PUNICODE_STRING ReferenceString ,
2939 PUNICODE_STRING SymbolicLinkName ) ;
2940NTSTATUS IoRegisterDeviceInterface(PDEVICE_OBJECT PhysicalDeviceObject ,
2941 GUID const *InterfaceClassGuid ,
2942 PUNICODE_STRING ReferenceString ,
2943 PUNICODE_STRING SymbolicLinkName )
2944{ int __BLAST_NONDET ;
2945
2946 {
2947 if (__BLAST_NONDET == 0) {
2948 goto switch_13_0;
2949 } else {
2950 {
2951 goto switch_13_default;
2952 if (0) {
2953 switch_13_0: ;
2954 return (0L);
2955 switch_13_default: ;
2956 return (-1073741808L);
2957 } else {
2958 switch_13_break: ;
2959 }
2960 }
2961 }
2962}
2963}
2964 void IoReleaseCancelSpinLock(KIRQL Irql ) ;
2965void IoReleaseCancelSpinLock(KIRQL Irql )
2966{
2967
2968 {
2969 return;
2970}
2971}
2972 NTSTATUS IoSetDeviceInterfaceState(PUNICODE_STRING SymbolicLinkName ,
2973 BOOLEAN Enable ) ;
2974NTSTATUS IoSetDeviceInterfaceState(PUNICODE_STRING SymbolicLinkName , BOOLEAN Enable )
2975{ int __BLAST_NONDET ;
2976
2977 {
2978 if (__BLAST_NONDET == 0) {
2979 goto switch_14_0;
2980 } else {
2981 {
2982 goto switch_14_default;
2983 if (0) {
2984 switch_14_0: ;
2985 return (0L);
2986 switch_14_default: ;
2987 return (-1073741823L);
2988 } else {
2989 switch_14_break: ;
2990 }
2991 }
2992 }
2993}
2994}
2995 void IoSetHardErrorOrVerifyDevice(PIRP Irp , PDEVICE_OBJECT DeviceObject ) ;
2996void IoSetHardErrorOrVerifyDevice(PIRP Irp , PDEVICE_OBJECT DeviceObject )
2997{
2998
2999 {
3000 return;
3001}
3002}
3003void stubMoreProcessingRequired(void)
3004{
3005
3006 {
3007 if (s == NP) {
3008 s = MPR1;
3009 } else {
3010 {
3011 errorFn();
3012 }
3013 }
3014 return;
3015}
3016}
3017 NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject ,
3018 PIRP Irp ) ;
3019NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject ,
3020 PIRP Irp )
3021{ int __BLAST_NONDET ;
3022 NTSTATUS returnVal2 ;
3023 int compRetStatus ;
3024 PVOID lcontext ;
3025 NTSTATUS tmp ;
3026
3027 {
3028 if (compRegistered) {
3029 {
3030 tmp = KbFilter_Complete(DeviceObject, Irp, lcontext);
3031 compRetStatus = tmp;
3032 }
3033 if ((long )compRetStatus == -1073741802L) {
3034 {
3035 stubMoreProcessingRequired();
3036 }
3037 } else {
3038
3039 }
3040 } else {
3041
3042 }
3043 if (__BLAST_NONDET == 0) {
3044 goto switch_15_0;
3045 } else {
3046 if (__BLAST_NONDET == 1) {
3047 goto switch_15_1;
3048 } else {
3049 {
3050 goto switch_15_default;
3051 if (0) {
3052 switch_15_0:
3053 returnVal2 = 0L;
3054 goto switch_15_break;
3055 switch_15_1:
3056 returnVal2 = -1073741823L;
3057 goto switch_15_break;
3058 switch_15_default:
3059 returnVal2 = 259L;
3060 goto switch_15_break;
3061 } else {
3062 switch_15_break: ;
3063 }
3064 }
3065 }
3066 }
3067 if (s == NP) {
3068 s = IPC;
3069 lowerDriverReturn = returnVal2;
3070 } else {
3071 if (s == MPR1) {
3072 if (returnVal2 == 259L) {
3073 s = MPR3;
3074 lowerDriverReturn = returnVal2;
3075 } else {
3076 s = NP;
3077 lowerDriverReturn = returnVal2;
3078 }
3079 } else {
3080 if (s == SKIP1) {
3081 s = SKIP2;
3082 lowerDriverReturn = returnVal2;
3083 } else {
3084 {
3085 errorFn();
3086 }
3087 }
3088 }
3089 }
3090 return (returnVal2);
3091}
3092}
3093 void IofCompleteRequest(PIRP Irp ,
3094 CCHAR PriorityBoost ) ;
3095void IofCompleteRequest(PIRP Irp , CCHAR PriorityBoost )
3096{
3097
3098 {
3099 if (s == NP) {
3100 s = DC;
3101 } else {
3102 {
3103 errorFn();
3104 }
3105 }
3106 return;
3107}
3108}
3109 KIRQL KeAcquireSpinLockRaiseToDpc(PKSPIN_LOCK SpinLock ) ;
3110KIRQL KeAcquireSpinLockRaiseToDpc(PKSPIN_LOCK SpinLock )
3111{
3112
3113 {
3114 return ((unsigned char)0);
3115}
3116}
3117 NTSTATUS KeDelayExecutionThread(KPROCESSOR_MODE WaitMode ,
3118 BOOLEAN Alertable ,
3119 PLARGE_INTEGER Interval ) ;
3120NTSTATUS KeDelayExecutionThread(KPROCESSOR_MODE WaitMode , BOOLEAN Alertable , PLARGE_INTEGER Interval )
3121{ int __BLAST_NONDET ;
3122
3123 {
3124 if (__BLAST_NONDET == 0) {
3125 goto switch_16_0;
3126 } else {
3127 {
3128 goto switch_16_default;
3129 if (0) {
3130 switch_16_0: ;
3131 return (0L);
3132 switch_16_default: ;
3133 return (-1073741823L);
3134 } else {
3135 switch_16_break: ;
3136 }
3137 }
3138 }
3139}
3140}
3141 void KeInitializeEvent(PRKEVENT Event , EVENT_TYPE Type ,
3142 BOOLEAN State ) ;
3143void KeInitializeEvent(PRKEVENT Event , EVENT_TYPE Type , BOOLEAN State )
3144{
3145
3146 {
3147 return;
3148}
3149}
3150 void KeInitializeSemaphore(PRKSEMAPHORE Semaphore ,
3151 LONG Count , LONG Limit ) ;
3152void KeInitializeSemaphore(PRKSEMAPHORE Semaphore , LONG Count , LONG Limit )
3153{
3154
3155 {
3156 return;
3157}
3158}
3159 void KeInitializeSpinLock(PKSPIN_LOCK SpinLock ) ;
3160void KeInitializeSpinLock(PKSPIN_LOCK SpinLock )
3161{
3162
3163 {
3164 return;
3165}
3166}
3167 LONG KeReleaseSemaphore(PRKSEMAPHORE Semaphore , KPRIORITY Increment ,
3168 LONG Adjustment , BOOLEAN Wait ) ;
3169LONG KeReleaseSemaphore(PRKSEMAPHORE Semaphore , KPRIORITY Increment , LONG Adjustment ,
3170 BOOLEAN Wait )
3171{ LONG r ;
3172
3173 {
3174 return (r);
3175}
3176}
3177 void KfReleaseSpinLock(PKSPIN_LOCK SpinLock ,
3178 KIRQL NewIrql ) ;
3179void KfReleaseSpinLock(PKSPIN_LOCK SpinLock , KIRQL NewIrql )
3180{
3181
3182 {
3183 return;
3184}
3185}
3186 LONG KeSetEvent(PRKEVENT Event , KPRIORITY Increment ,
3187 BOOLEAN Wait ) ;
3188LONG KeSetEvent(PRKEVENT Event , KPRIORITY Increment , BOOLEAN Wait )
3189{ LONG l ;
3190
3191 {
3192 setEventCalled = 1;
3193 return (l);
3194}
3195}
3196 NTSTATUS KeWaitForSingleObject(PVOID Object , KWAIT_REASON WaitReason ,
3197 KPROCESSOR_MODE WaitMode ,
3198 BOOLEAN Alertable ,
3199 PLARGE_INTEGER Timeout ) ;
3200NTSTATUS KeWaitForSingleObject(PVOID Object , KWAIT_REASON WaitReason , KPROCESSOR_MODE WaitMode ,
3201 BOOLEAN Alertable , PLARGE_INTEGER Timeout )
3202{ int __BLAST_NONDET ;
3203
3204 {
3205 if (s == MPR3) {
3206 if (setEventCalled == 1) {
3207 s = NP;
3208 setEventCalled = 0;
3209 } else {
3210 goto _L;
3211 }
3212 } else {
3213 _L:
3214 if (customIrp == 1) {
3215 s = NP;
3216 customIrp = 0;
3217 } else {
3218 if (s == MPR3) {
3219 {
3220 errorFn();
3221 }
3222 } else {
3223
3224 }
3225 }
3226 }
3227 if (__BLAST_NONDET == 0) {
3228 goto switch_17_0;
3229 } else {
3230 {
3231 goto switch_17_default;
3232 if (0) {
3233 switch_17_0: ;
3234 return (0L);
3235 switch_17_default: ;
3236 return (-1073741823L);
3237 } else {
3238 switch_17_break: ;
3239 }
3240 }
3241 }
3242}
3243}
3244 PVOID MmAllocateContiguousMemory(SIZE_T NumberOfBytes ,
3245 PHYSICAL_ADDRESS HighestAcceptableAddress ) ;
3246PVOID MmAllocateContiguousMemory(SIZE_T NumberOfBytes , PHYSICAL_ADDRESS HighestAcceptableAddress )
3247{ int __BLAST_NONDET ;
3248 char *tmp ;
3249
3250 {
3251 if (__BLAST_NONDET == 0) {
3252 goto switch_18_0;
3253 } else {
3254 if (__BLAST_NONDET == 1) {
3255 goto switch_18_1;
3256 } else {
3257 if (0) {
3258 switch_18_0:
3259 {
3260 tmp = malloc(NumberOfBytes);
3261 }
3262 return (tmp);
3263 switch_18_1: ;
3264 return ((void *)0);
3265 } else {
3266 switch_18_break: ;
3267 }
3268 }
3269 }
3270 return ((void *)0);
3271}
3272}
3273 void MmFreeContiguousMemory(PVOID BaseAddress ) ;
3274void MmFreeContiguousMemory(PVOID BaseAddress )
3275{
3276
3277 {
3278 return;
3279}
3280}
3281 PVOID MmMapLockedPagesSpecifyCache(PMDL MemoryDescriptorList ,
3282 KPROCESSOR_MODE AccessMode ,
3283 MEMORY_CACHING_TYPE CacheType ,
3284 PVOID BaseAddress ,
3285 ULONG BugCheckOnFailure ,
3286 MM_PAGE_PRIORITY Priority ) ;
3287PVOID MmMapLockedPagesSpecifyCache(PMDL MemoryDescriptorList , KPROCESSOR_MODE AccessMode ,
3288 MEMORY_CACHING_TYPE CacheType , PVOID BaseAddress ,
3289 ULONG BugCheckOnFailure , MM_PAGE_PRIORITY Priority )
3290{
3291
3292 {
3293 return ((void *)0);
3294}
3295}
3296 PVOID MmPageEntireDriver(PVOID AddressWithinSection ) ;
3297PVOID MmPageEntireDriver(PVOID AddressWithinSection )
3298{
3299
3300 {
3301 return ((void *)0);
3302}
3303}
3304 void MmResetDriverPaging(PVOID AddressWithinSection ) ;
3305void MmResetDriverPaging(PVOID AddressWithinSection )
3306{
3307
3308 {
3309 return;
3310}
3311}
3312 void MmUnlockPages(PMDL MemoryDescriptorList ) ;
3313void MmUnlockPages(PMDL MemoryDescriptorList )
3314{
3315
3316 {
3317 return;
3318}
3319}
3320 NTSTATUS ObReferenceObjectByHandle(HANDLE Handle ,
3321 ACCESS_MASK DesiredAccess ,
3322 POBJECT_TYPE ObjectType ,
3323 KPROCESSOR_MODE AccessMode ,
3324 PVOID *Object ,
3325 POBJECT_HANDLE_INFORMATION HandleInformation ) ;
3326NTSTATUS ObReferenceObjectByHandle(HANDLE Handle , ACCESS_MASK DesiredAccess , POBJECT_TYPE ObjectType ,
3327 KPROCESSOR_MODE AccessMode , PVOID *Object , POBJECT_HANDLE_INFORMATION HandleInformation )
3328{ int __BLAST_NONDET ;
3329
3330 {
3331 if (__BLAST_NONDET == 0) {
3332 goto switch_19_0;
3333 } else {
3334 {
3335 goto switch_19_default;
3336 if (0) {
3337 switch_19_0: ;
3338 return (0L);
3339 switch_19_default: ;
3340 return (-1073741823L);
3341 } else {
3342 switch_19_break: ;
3343 }
3344 }
3345 }
3346}
3347}
3348 void ObfDereferenceObject(PVOID Object ) ;
3349void ObfDereferenceObject(PVOID Object )
3350{
3351
3352 {
3353 return;
3354}
3355}
3356 NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject ,
3357 PIRP Irp ) ;
3358NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject , PIRP Irp )
3359{ int __BLAST_NONDET ;
3360 int compRetStatus ;
3361 NTSTATUS returnVal ;
3362 PVOID lcontext ;
3363 NTSTATUS tmp ;
3364
3365 {
3366 if (compRegistered) {
3367 {
3368 tmp = KbFilter_Complete(DeviceObject, Irp, lcontext);
3369 compRetStatus = tmp;
3370 }
3371 if ((long )compRetStatus == -1073741802L) {
3372 {
3373 stubMoreProcessingRequired();
3374 }
3375 } else {
3376
3377 }
3378 } else {
3379
3380 }
3381 if (__BLAST_NONDET == 0) {
3382 goto switch_20_0;
3383 } else {
3384 if (__BLAST_NONDET == 1) {
3385 goto switch_20_1;
3386 } else {
3387 {
3388 goto switch_20_default;
3389 if (0) {
3390 switch_20_0:
3391 returnVal = 0L;
3392 goto switch_20_break;
3393 switch_20_1:
3394 returnVal = -1073741823L;
3395 goto switch_20_break;
3396 switch_20_default:
3397 returnVal = 259L;
3398 goto switch_20_break;
3399 } else {
3400 switch_20_break: ;
3401 }
3402 }
3403 }
3404 }
3405 if (s == NP) {
3406 s = IPC;
3407 lowerDriverReturn = returnVal;
3408 } else {
3409 if (s == MPR1) {
3410 if (returnVal == 259L) {
3411 s = MPR3;
3412 lowerDriverReturn = returnVal;
3413 } else {
3414 s = NP;
3415 lowerDriverReturn = returnVal;
3416 }
3417 } else {
3418 if (s == SKIP1) {
3419 s = SKIP2;
3420 lowerDriverReturn = returnVal;
3421 } else {
3422 {
3423 errorFn();
3424 }
3425 }
3426 }
3427 }
3428 return (returnVal);
3429}
3430}
3431 void PoStartNextPowerIrp(PIRP Irp ) ;
3432void PoStartNextPowerIrp(PIRP Irp )
3433{
3434
3435 {
3436 return;
3437}
3438}
3439 NTSTATUS PsCreateSystemThread(PHANDLE ThreadHandle ,
3440 ULONG DesiredAccess ,
3441 POBJECT_ATTRIBUTES ObjectAttributes ,
3442 HANDLE ProcessHandle ,
3443 PCLIENT_ID ClientId ,
3444 void (*StartRoutine)(PVOID StartContext ) ,
3445 PVOID StartContext ) ;
3446NTSTATUS PsCreateSystemThread(PHANDLE ThreadHandle , ULONG DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes ,
3447 HANDLE ProcessHandle , PCLIENT_ID ClientId , void (*StartRoutine)(PVOID StartContext ) ,
3448 PVOID StartContext )
3449{ int __BLAST_NONDET ;
3450
3451 {
3452 if (__BLAST_NONDET == 0) {
3453 goto switch_21_0;
3454 } else {
3455 {
3456 goto switch_21_default;
3457 if (0) {
3458 switch_21_0: ;
3459 return (0L);
3460 switch_21_default: ;
3461 return (-1073741823L);
3462 } else {
3463 switch_21_break: ;
3464 }
3465 }
3466 }
3467}
3468}
3469 NTSTATUS PsTerminateSystemThread(NTSTATUS ExitStatus ) ;
3470NTSTATUS PsTerminateSystemThread(NTSTATUS ExitStatus )
3471{ int __BLAST_NONDET ;
3472
3473 {
3474 if (__BLAST_NONDET == 0) {
3475 goto switch_22_0;
3476 } else {
3477 {
3478 goto switch_22_default;
3479 if (0) {
3480 switch_22_0: ;
3481 return (0L);
3482 switch_22_default: ;
3483 return (-1073741823L);
3484 } else {
3485 switch_22_break: ;
3486 }
3487 }
3488 }
3489}
3490}
3491 NTSTATUS RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString ,
3492 PANSI_STRING SourceString ,
3493 BOOLEAN AllocateDestinationString ) ;
3494NTSTATUS RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString ,
3495 PANSI_STRING SourceString ,
3496 BOOLEAN AllocateDestinationString )
3497{ int __BLAST_NONDET ;
3498
3499 {
3500 if (__BLAST_NONDET == 0) {
3501 goto switch_23_0;
3502 } else {
3503 {
3504 goto switch_23_default;
3505 if (0) {
3506 switch_23_0: ;
3507 return (0L);
3508 switch_23_default: ;
3509 return (-1073741823L);
3510 } else {
3511 switch_23_break: ;
3512 }
3513 }
3514 }
3515}
3516}
3517 SIZE_T RtlCompareMemory(void const *Source1 ,
3518 void const *Source2 ,
3519 SIZE_T Length ) ;
3520SIZE_T RtlCompareMemory(void const *Source1 , void const *Source2 ,
3521 SIZE_T Length )
3522{ SIZE_T r ;
3523
3524 {
3525 return (r);
3526}
3527}
3528 void RtlCopyUnicodeString(PUNICODE_STRING DestinationString ,
3529 PUNICODE_STRING SourceString ) ;
3530void RtlCopyUnicodeString(PUNICODE_STRING DestinationString ,
3531 PUNICODE_STRING SourceString )
3532{
3533
3534 {
3535 return;
3536}
3537}
3538 NTSTATUS RtlDeleteRegistryValue(ULONG RelativeTo ,
3539 PCWSTR Path ,
3540 PCWSTR ValueName ) ;
3541NTSTATUS RtlDeleteRegistryValue(ULONG RelativeTo ,
3542 PCWSTR Path , PCWSTR ValueName )
3543{ int __BLAST_NONDET ;
3544
3545 {
3546 if (__BLAST_NONDET == 0) {
3547 goto switch_24_0;
3548 } else {
3549 {
3550 goto switch_24_default;
3551 if (0) {
3552 switch_24_0: ;
3553 return (0L);
3554 switch_24_default: ;
3555 return (-1073741823L);
3556 } else {
3557 switch_24_break: ;
3558 }
3559 }
3560 }
3561}
3562}
3563 void RtlFreeUnicodeString(PUNICODE_STRING UnicodeString ) ;
3564void RtlFreeUnicodeString(PUNICODE_STRING UnicodeString )
3565{
3566
3567 {
3568 return;
3569}
3570}
3571 void RtlInitString(PSTRING DestinationString ,
3572 PCSZ SourceString ) ;
3573void RtlInitString(PSTRING DestinationString , PCSZ SourceString )
3574{
3575
3576 {
3577 return;
3578}
3579}
3580 void RtlInitUnicodeString(PUNICODE_STRING DestinationString ,
3581 PCWSTR SourceString ) ;
3582void RtlInitUnicodeString(PUNICODE_STRING DestinationString ,
3583 PCWSTR SourceString )
3584{
3585
3586 {
3587 return;
3588}
3589}
3590 NTSTATUS RtlQueryRegistryValues(ULONG RelativeTo ,
3591 PCWSTR Path ,
3592 PRTL_QUERY_REGISTRY_TABLE QueryTable ,
3593 PVOID Context ,
3594 PVOID Environment ) ;
3595NTSTATUS RtlQueryRegistryValues(ULONG RelativeTo ,
3596 PCWSTR Path , PRTL_QUERY_REGISTRY_TABLE QueryTable ,
3597 PVOID Context , PVOID Environment )
3598{ int __BLAST_NONDET ;
3599
3600 {
3601 if (__BLAST_NONDET == 0) {
3602 goto switch_25_0;
3603 } else {
3604 {
3605 goto switch_25_default;
3606 if (0) {
3607 switch_25_0: ;
3608 return (0L);
3609 switch_25_default: ;
3610 return (-1073741823L);
3611 } else {
3612 switch_25_break: ;
3613 }
3614 }
3615 }
3616}
3617}
3618 NTSTATUS ZwClose(HANDLE Handle ) ;
3619NTSTATUS ZwClose(HANDLE Handle )
3620{ int __BLAST_NONDET ;
3621
3622 {
3623 if (__BLAST_NONDET == 0) {
3624 goto switch_26_0;
3625 } else {
3626 {
3627 goto switch_26_default;
3628 if (0) {
3629 switch_26_0: ;
3630 return (0L);
3631 switch_26_default: ;
3632 return (-1073741823L);
3633 } else {
3634 switch_26_break: ;
3635 }
3636 }
3637 }
3638}
3639}