; ====================================================;
;                                                     ;
;     kernel32.inc for EC v2 Fasm visual projects     ;
;                   (version 1.0.6)                   ;
;                                                     ;
;         Copyright © Ramon Sala - 2018-2021          ;
;                                                     ;
; ====================================================;

if ~defined KERNEL32_INC
define KERNEL32_INC 1

GUID_MAX_POWER_SAVINGS                          equ     <0A1841308H, 03541H, 04FABH, <0BCH, 081H, 0F7H, 015H, 056H, 0F2H, 00BH, 04AH>>
GUID_MIN_POWER_SAVINGS                          equ     <08C5E7FDAH, 0E8BFH, 04A96H, <09AH, 085H, 0A6H, 0E2H, 03AH, 08CH, 063H, 05CH>>
GUID_TYPICAL_POWER_SAVINGS                      equ     <0381B4222H, 0F694H, 041F0H, <096H, 085H, 0FFH, 05BH, 0B2H, 060H, 0DFH, 02EH>>
NO_SUBGROUP_GUID                                equ     <0FEA3413EH, 07E05H, 04911H, <09AH, 071H, 070H, 003H, 031H, 0F1H, 0C2H, 094H>>
ALL_POWERSCHEMES_GUID                           equ     <068A1E95EH, 013EAH, 041E1H, <080H, 011H, 00CH, 049H, 06CH, 0A4H, 090H, 0B0H>>
GUID_POWERSCHEME_PERSONALITY                    equ     <0245D8541H, 03943H, 04422H, <0B0H, 025H, 013H, 0A7H, 084H, 0F6H, 079H, 0B7H>>
GUID_ACTIVE_POWERSCHEME                         equ     <031F9F286H, 05084H, 042FEH, <0B7H, 020H, 02BH, 002H, 064H, 099H, 037H, 063H>>
GUID_VIDEO_SUBGROUP                             equ     <07516B95FH, 0F776H, 04464H, <08CH, 053H, 006H, 016H, 07FH, 040H, 0CCH, 099H>>
GUID_VIDEO_POWERDOWN_TIMEOUT                    equ     <03C0BC021H, 0C8A8H, 04E07H, <0A9H, 073H, 06BH, 014H, 0CBH, 0CBH, 02BH, 07EH>>
GUID_VIDEO_ANNOYANCE_TIMEOUT                    equ     <082DBCF2DH, 0CD67H, 040C5H, <0BFH, 0DCH, 09FH, 01AH, 05CH, 0CDH, 046H, 063H>>
GUID_VIDEO_ADAPTIVE_PERCENT_INCREASE            equ     <0EED904DFH, 0B142H, 04183H, <0B1H, 00BH, 05AH, 011H, 097H, 0A3H, 078H, 064H>>
GUID_VIDEO_DIM_TIMEOUT                          equ     <017AAA29BH, 08B43H, 04B94H, <0AAH, 0FEH, 035H, 0F6H, 04DH, 0AAH, 0F1H, 0EEH>>
GUID_VIDEO_ADAPTIVE_POWERDOWN                   equ     <090959D22H, 0D6A1H, 049B9H, <0AFH, 093H, 0BCH, 0E8H, 085H, 0ADH, 033H, 05BH>>
GUID_MONITOR_POWER_ON                           equ     <002731015H, 04510H, 04526H, <099H, 0E6H, 0E5H, 0A1H, 07EH, 0BDH, 01AH, 0EAH>>
GUID_DEVICE_POWER_POLICY_VIDEO_BRIGHTNESS       equ     <0ADED5E82H, 0B909H, 04619H, <099H, 049H, 0F5H, 0D7H, 01DH, 0ACH, 00BH, 0CBH>>
GUID_DEVICE_POWER_POLICY_VIDEO_DIM_BRIGHTNESS   equ     <0F1FBFDE2H, 0A960H, 04165H, <09FH, 088H, 050H, 066H, 079H, 011H, 0CEH, 096H>>
GUID_VIDEO_CURRENT_MONITOR_BRIGHTNESS           equ     <08FFEE2C6H, 02D01H, 046BEH, <0ADH, 0B9H, 039H, 08AH, 0DDH, 0C5H, 0B4H, 0FFH>>
GUID_VIDEO_ADAPTIVE_DISPLAY_BRIGHTNESS          equ     <0FBD9AA66H, 09553H, 04097H, <0BAH, 044H, 0EDH, 06EH, 09DH, 065H, 0EAH, 0B8H>>
GUID_SESSION_DISPLAY_STATE                      equ     <073A5E93AH, 05BB1H, 04F93H, <089H, 05BH, 0DBH, 0D0H, 0DAH, 085H, 059H, 067H>>
GUID_CONSOLE_DISPLAY_STATE                      equ     <06FE69556H, 0704AH, 047A0H, <08FH, 024H, 0C2H, 08DH, 093H, 06FH, 0DAH, 047H>>
GUID_ALLOW_DISPLAY_REQUIRED                     equ     <0A9CEB8DAH, 0CD46H, 044FBH, <0A9H, 08BH, 002H, 0AFH, 069H, 0DEH, 046H, 023H>>
GUID_DISK_SUBGROUP                              equ     <00012EE47H, 09041H, 04B5DH, <09BH, 077H, 053H, 05FH, 0BAH, 08BH, 014H, 042H>>
GUID_DISK_POWERDOWN_TIMEOUT                     equ     <06738E2C4H, 0E8A5H, 04A42H, <0B1H, 06AH, 0E0H, 040H, 0E7H, 069H, 075H, 06EH>>
GUID_DISK_BURST_IGNORE_THRESHOLD                equ     <080E3C60EH, 0BB94H, 04AD8H, <0BBH, 0E0H, 00DH, 031H, 095H, 0EFH, 0C6H, 063H>>
GUID_DISK_ADAPTIVE_POWERDOWN                    equ     <0396A32E1H, 0499AH, 040B2H, <091H, 024H, 0A9H, 06AH, 0FEH, 070H, 076H, 067H>>
GUID_SLEEP_SUBGROUP                             equ     <0238C9FA8H, 00AADH, 041EDH, <083H, 0F4H, 097H, 0BEH, 024H, 02CH, 08FH, 020H>>
GUID_SLEEP_IDLE_THRESHOLD                       equ     <081CD32E0H, 07833H, 044F3H, <087H, 037H, 070H, 081H, 0F3H, 08DH, 01FH, 070H>>
GUID_STANDBY_TIMEOUT                            equ     <029F6C1DBH, 086DAH, 048C5H, <09FH, 0DBH, 0F2H, 0B6H, 07BH, 01FH, 044H, 0DAH>>
GUID_UNATTEND_SLEEP_TIMEOUT                     equ     <07BC4A2F9H, 0D8FCH, 04469H, <0B0H, 07BH, 033H, 0EBH, 078H, 05AH, 0ACH, 0A0H>>
GUID_HIBERNATE_TIMEOUT                          equ     <09D7815A6H, 07EE4H, 0497EH, <088H, 088H, 051H, 05AH, 005H, 0F0H, 023H, 064H>>
GUID_HIBERNATE_FASTS4_POLICY                    equ     <094AC6D29H, 073CEH, 041A6H, <080H, 09FH, 063H, 063H, 0BAH, 021H, 0B4H, 07EH>>
GUID_CRITICAL_POWER_TRANSITION                  equ     <0B7A27025H, 0E569H, 046c2H, <0A5H, 004H, 02BH, 096H, 0CAH, 0D2H, 025H, 0A1H>>
GUID_SYSTEM_AWAYMODE                            equ     <098A7F580H, 001F7H, 048AAH, <09CH, 00FH, 044H, 035H, 02CH, 029H, 0E5H, 0C0H>>
GUID_ALLOW_AWAYMODE                             equ     <025DFA149H, 05DD1H, 04736H, <0B5H, 0ABH, 0E8H, 0A3H, 07BH, 05BH, 081H, 087H>>
GUID_ALLOW_STANDBY_STATES                       equ     <0ABFC2519H, 03608H, 04C2AH, <094H, 0EAH, 017H, 01BH, 00EH, 0D5H, 046H, 0ABH>>
GUID_ALLOW_RTC_WAKE                             equ     <0BD3B718AH, 00680H, 04D9DH, <08AH, 0B2H, 0E1H, 0D2H, 0B4H, 0ACH, 080H, 06DH>>
GUID_ALLOW_SYSTEM_REQUIRED                      equ     <0A4B195F5H, 08225H, 047D8H, <080H, 012H, 09DH, 041H, 036H, 097H, 086H, 0E2H>>
GUID_SYSTEM_BUTTON_SUBGROUP                     equ     <04F971E89H, 0EEBDH, 04455H, <0A8H, 0DEH, 09EH, 059H, 004H, 00EH, 073H, 047H>>
GUID_POWERBUTTON_ACTION                         equ     <07648EFA3H, 0DD9CH, 04E3EH, <0B5H, 066H, 050H, 0F9H, 029H, 038H, 062H, 080H>>
GUID_POWERBUTTON_ACTION_FLAGS                   equ     <0857E7FACH, 0034BH, 04704H, <0ABH, 0B1H, 0BCH, 0A5H, 04AH, 0A3H, 014H, 078H>>
GUID_SLEEPBUTTON_ACTION                         equ     <096996BC0H, 0AD50H, 047ECH, <092H, 03BH, 06FH, 041H, 087H, 04DH, 0D9H, 0EBH>>
GUID_SLEEPBUTTON_ACTION_FLAGS                   equ     <02A160AB1H, 0B69DH, 04743H, <0B7H, 018H, 0BFH, 014H, 041H, 0D5H, 0E4H, 093H>>
GUID_USERINTERFACEBUTTON_ACTION                 equ     <0A7066653H, 08D6CH, 040A8H, <091H, 00EH, 0A1H, 0F5H, 04BH, 084H, 0C7H, 0E5H>>
GUID_LIDCLOSE_ACTION                            equ     <05CA83367H, 06E45H, 0459FH, <0A2H, 07BH, 047H, 06BH, 01DH, 001H, 0C9H, 036H>>
GUID_LIDCLOSE_ACTION_FLAGS                      equ     <097E969ACH, 00D6CH, 04D08H, <092H, 07CH, 0D7H, 0BDH, 07AH, 0D7H, 085H, 07BH>>
GUID_LIDOPEN_POWERSTATE                         equ     <099FF10E7H, 023B1H, 04C07H, <0A9H, 0D1H, 05CH, 032H, 006H, 0D7H, 041H, 0B4H>>
GUID_BATTERY_SUBGROUP                           equ     <0E73A048DH, 0BF27H, 04F12H, <097H, 031H, 08BH, 020H, 076H, 0E8H, 089H, 01FH>>
GUID_BATTERY_DISCHARGE_ACTION_0                 equ     <0637EA02FH, 0BBCBH, 04015H, <08EH, 02CH, 0A1H, 0C7H, 0B9H, 0C0H, 0B5H, 046H>>
GUID_BATTERY_DISCHARGE_LEVEL_0                  equ     <09A66D8D7H, 04FF7H, 04EF9H, <0B5H, 0A2H, 05AH, 032H, 06CH, 0A2H, 0A4H, 069H>>
GUID_BATTERY_DISCHARGE_FLAGS_0                  equ     <05DBB7C9FH, 038E9H, 040D2H, <097H, 049H, 04FH, 08AH, 00EH, 09FH, 064H, 00FH>>
GUID_BATTERY_DISCHARGE_ACTION_1                 equ     <0D8742DCBH, 03E6AH, 04B3CH, <0B3H, 0FEH, 037H, 046H, 023H, 0CDH, 0CFH, 006H>>
GUID_BATTERY_DISCHARGE_LEVEL_1                  equ     <08183BA9AH, 0E910H, 048DAH, <087H, 069H, 014H, 0AEH, 06DH, 0C1H, 017H, 00AH>>
GUID_BATTERY_DISCHARGE_FLAGS_1                  equ     <0BCDED951H, 0187BH, 04D05H, <0BCH, 0CCH, 0F7H, 0E5H, 019H, 060H, 0C2H, 058H>>
GUID_BATTERY_DISCHARGE_ACTION_2                 equ     <0421CBA38H, 01A8EH, 04881H, <0ACH, 089H, 0E3H, 03AH, 08BH, 004H, 0ECH, 0E4H>>
GUID_BATTERY_DISCHARGE_LEVEL_2                  equ     <007A07CA2H, 0ADAFH, 040D7H, <0B0H, 077H, 053H, 03AH, 0ADH, 0EDH, 01BH, 0FAH>>
GUID_BATTERY_DISCHARGE_FLAGS_2                  equ     <07FD2F0C4H, 0FEB7H, 04DA3H, <081H, 017H, 0E3H, 0FBH, 0EDH, 0C4H, 065H, 082H>>
GUID_BATTERY_DISCHARGE_ACTION_3                 equ     <080472613H, 09780H, 0455EH, <0B3H, 008H, 072H, 0D3H, 000H, 03CH, 0F2H, 0F8H>>
GUID_BATTERY_DISCHARGE_LEVEL_3                  equ     <058AFD5A6H, 0C2DDH, 047D2H, <09FH, 0BFH, 0EFH, 070H, 0CCH, 05CH, 059H, 065H>>
GUID_BATTERY_DISCHARGE_FLAGS_3                  equ     <073613CCFH, 0DBFAH, 04279H, <083H, 056H, 049H, 035H, 0f6H, 0bfH, 062H, 0F3H>>
GUID_PROCESSOR_SETTINGS_SUBGROUP                equ     <054533251H, 082BEH, 04824H, <096H, 0C1H, 047H, 0B6H, 00BH, 074H, 00DH, 000H>>
GUID_PROCESSOR_THROTTLE_POLICY                  equ     <057027304H, 04AF6H, 04104H, <092H, 060H, 0E3H, 0D9H, 052H, 048H, 0FCH, 036H>>
GUID_PROCESSOR_THROTTLE_MAXIMUM                 equ     <0BC5038F7H, 023E0H, 04960H, <096H, 0DAH, 033H, 0ABH, 0AFH, 059H, 035H, 0ECH>>
GUID_PROCESSOR_THROTTLE_MINIMUM                 equ     <0893DEE8EH, 02BEFH, 041E0H, <089H, 0C6H, 0B5H, 05DH, 009H, 029H, 096H, 04CH>>
GUID_PROCESSOR_ALLOW_THROTTLING                 equ     <03B04D4FDH, 01CC7H, 04F23H, <0ABH, 01CH, 0D1H, 033H, 078H, 019H, 0C4H, 0BBH>>
GUID_PROCESSOR_IDLESTATE_POLICY                 equ     <068F262A7H, 0F621H, 04069H, <0B9H, 0A5H, 048H, 074H, 016H, 09BH, 0E2H, 03CH>>
GUID_PROCESSOR_PERFSTATE_POLICY                 equ     <0BBDC3814H, 018E9H, 04463H, <08AH, 055H, 0D1H, 097H, 032H, 07CH, 045H, 0C0H>>
GUID_PROCESSOR_PERF_INCREASE_THRESHOLD          equ     <006CADF0EH, 064EDH, 0448AH, <089H, 027H, 0CEH, 07BH, 0F9H, 00EH, 0B3H, 05DH>>
GUID_PROCESSOR_PERF_DECREASE_THRESHOLD          equ     <012A0AB44H, 0FE28H, 04FA9H, <0B3H, 0BDH, 04BH, 064H, 0F4H, 049H, 060H, 0A6H>>
GUID_PROCESSOR_PERF_INCREASE_POLICY             equ     <0465E1F50H, 0B610H, 0473AH, <0ABH, 058H, 000H, 0D1H, 007H, 07DH, 0C4H, 018H>>
GUID_PROCESSOR_PERF_DECREASE_POLICY             equ     <040FBEFC7H, 02E9DH, 04D25H, <0A1H, 085H, 00CH, 0FDH, 085H, 074H, 0BAH, 0C6H>>
GUID_PROCESSOR_PERF_INCREASE_TIME               equ     <0984CF492H, 03BEDH, 04488H, <0A8H, 0F9H, 042H, 086H, 0C9H, 07BH, 0F5H, 0AAH>>
GUID_PROCESSOR_PERF_DECREASE_TIME               equ     <0D8EDEB9BH, 095CFH, 04F95H, <0A7H, 03CH, 0B0H, 061H, 097H, 036H, 093H, 0C8H>>
GUID_PROCESSOR_PERF_TIME_CHECK                  equ     <04D2B0152H, 07D5CH, 0498BH, <088H, 0E2H, 034H, 034H, 053H, 092H, 0A2H, 0C5H>>
GUID_PROCESSOR_PERF_BOOST_POLICY                equ     <045BCC044H, 0D885H, 043E2H, <086H, 005H, 0EEH, 00EH, 0C6H, 0E9H, 06BH, 059H>>
GUID_SYSTEM_COOLING_POLICY                      equ     <094D3A615H, 0A899H, 04AC5H, <0AEH, 02BH, 0E4H, 0D8H, 0F6H, 034H, 036H, 07FH>>
GUID_LOCK_CONSOLE_ON_WAKE                       equ     <00E796BDBH, 0100DH, 047D6H, <0A2H, 0D5H, 0F7H, 0D2H, 0DAH, 0A5H, 01FH, 051H>>
GUID_DEVICE_IDLE_POLICY                         equ     <04FAAB71AH, 092E5H, 04726H, <0B5H, 031H, 022H, 045H, 059H, 067H, 02DH, 019H>>
GUID_PPM_PERFSTATE_CHANGE_GUID                  equ     <0A5B32DDDH, 07F39H, 04ABCH, <0B8H, 092H, 090H, 00EH, 043H, 0B5H, 09EH, 0BBH>>
GUID_PPM_PERFSTATE_DOMAIN_CHANGE_GUID           equ     <0995E6B7FH, 0D653H, 0497AH, <0B9H, 078H, 036H, 0A3H, 00CH, 029H, 0BFH, 001H>>
GUID_PPM_IDLESTATE_CHANGE_GUID                  equ     <04838FE4FH, 0F71CH, 04E51H, <09EH, 0CCH, 084H, 030H, 0A7H, 0ACH, 04CH, 06CH>>
GUID_PPM_PERFSTATES_DATA_GUID                   equ     <05708CC20H, 07D40H, 04BF4H, <0B4H, 0AAH, 02BH, 001H, 033H, 08DH, 001H, 026H>>
GUID_PPM_IDLESTATES_DATA_GUID                   equ     <0BA138E10H, 0E250H, 04AD7H, <086H, 016H, 0CFH, 01AH, 07AH, 0D4H, 010H, 0E7H>>
GUID_PPM_IDLE_ACCOUNTING_GUID                   equ     <0E2A26F78H, 0AE07H, 04EE0H, <0A3H, 00FH, 0CEH, 054H, 0F5H, 05AH, 094H, 0CDH>>
GUID_PPM_THERMALCONSTRAINT_GUID                 equ     <0A852C2C8H, 01A4CH, 0423BH, <08CH, 02CH, 0F3H, 00DH, 082H, 093H, 01AH, 088H>>
GUID_PPM_PERFMON_PERFSTATE_GUID                 equ     <07FD18652H, 00CFEH, 040D2H, <0B0H, 0A1H, 00BH, 006H, 06AH, 087H, 075H, 09EH>>
GUID_PPM_THERMAL_POLICY_CHANGE_GUID             equ     <048F377B8H, 06880H, 04C7BH, <08BH, 0DCH, 038H, 001H, 076H, 0C6H, 065H, 04DH>>
GUID_NULL                                       equ     <000000000H, 00000H, 00000H, <000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H>>

ANSI_NULL                                       equ     0
UNICODE_NULL                                    equ     0

MINCHAR                                         equ     80H
MAXCHAR                                         equ     7FH
MINSHORT                                        equ     8000H
MAXSHORT                                        equ     7FFFH
MINLONG                                         equ     80000000H
MAXLONG                                         equ     07FFFFFFFH
MAXBYTE                                         equ     0FFH
MAXWORD                                         equ     0FFFFH
MAXDWORD                                        equ     0FFFFFFFFH

NLS_VALID_LOCALE_MASK                           equ     000FFFFFH

VER_SERVER_NT                                   equ     80000000H
VER_WORKSTATION_NT                              equ     40000000H
VER_SUITE_SMALLBUSINESS                         equ     00000001H
VER_SUITE_ENTERPRISE                            equ     00000002H
VER_SUITE_BACKOFFICE                            equ     00000004H
VER_SUITE_COMMUNICATIONS                        equ     00000008H
VER_SUITE_TERMINAL                              equ     00000010H
VER_SUITE_SMALLBUSINESS_RESTRICTED              equ     00000020H
VER_SUITE_EMBEDDEDNT                            equ     00000040H
VER_SUITE_DATACENTER                            equ     00000080H
VER_SUITE_SINGLEUSERTS                          equ     00000100H
VER_SUITE_PERSONAL                              equ     00000200H
VER_SUITE_BLADE                                 equ     00000400H
VER_SUITE_EMBEDDED_RESTRICTED                   equ     00000800H
VER_SUITE_SECURITY_APPLIANCE                    equ     00001000H
VER_SUITE_STORAGE_SERVER                        equ     00002000H
VER_SUITE_COMPUTE_SERVER                        equ     00004000H
VER_SUITE_WH_SERVER                             equ     00008000H

ActivationContextBasicInformation               equ     1
ActivationContextDetailedInformation            equ     2
AssemblyDetailedInformationInActivationContext  equ     3
FileInformationInAssemblyOfAssemblyInActivationContext  equ 4
RunlevelInformationInActivationContext          equ     5
CompatibilityInformationInActivationContext     equ     6
ActivationContextManifestResourceName           equ     7
MaxActivationContextInfoClass                   equ     8

AssemblyDetailedInformationInActivationContxt   equ     3
FileInformationInAssemblyOfAssemblyInActivationContxt   equ 4

PRODUCT_UNDEFINED                               equ     00000000H

PRODUCT_ULTIMATE                                equ     00000001H
PRODUCT_HOME_BASIC                              equ     00000002H
PRODUCT_HOME_PREMIUM                            equ     00000003H
PRODUCT_ENTERPRISE                              equ     00000004H
PRODUCT_HOME_BASIC_N                            equ     00000005H
PRODUCT_BUSINESS                                equ     00000006H
PRODUCT_STANDARD_SERVER                         equ     00000007H
PRODUCT_DATACENTER_SERVER                       equ     00000008H
PRODUCT_SMALLBUSINESS_SERVER                    equ     00000009H
PRODUCT_ENTERPRISE_SERVER                       equ     0000000AH
PRODUCT_STARTER                                 equ     0000000BH
PRODUCT_DATACENTER_SERVER_CORE                  equ     0000000CH
PRODUCT_STANDARD_SERVER_CORE                    equ     0000000DH
PRODUCT_ENTERPRISE_SERVER_CORE                  equ     0000000EH
PRODUCT_ENTERPRISE_SERVER_IA64                  equ     0000000FH
PRODUCT_BUSINESS_N                              equ     00000010H
PRODUCT_WEB_SERVER                              equ     00000011H
PRODUCT_CLUSTER_SERVER                          equ     00000012H
PRODUCT_HOME_SERVER                             equ     00000013H
PRODUCT_STORAGE_EXPRESS_SERVER                  equ     00000014H
PRODUCT_STORAGE_STANDARD_SERVER                 equ     00000015H
PRODUCT_STORAGE_WORKGROUP_SERVER                equ     00000016H
PRODUCT_STORAGE_ENTERPRISE_SERVER               equ     00000017H
PRODUCT_SERVER_FOR_SMALLBUSINESS                equ     00000018H
PRODUCT_SMALLBUSINESS_SERVER_PREMIUM            equ     00000019H
PRODUCT_HOME_PREMIUM_N                          equ     0000001AH
PRODUCT_ENTERPRISE_N                            equ     0000001BH
PRODUCT_ULTIMATE_N                              equ     0000001CH
PRODUCT_WEB_SERVER_CORE                         equ     0000001DH
PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT        equ     0000001EH
PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY          equ     0000001FH
PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING         equ     00000020H
PRODUCT_SERVER_FOUNDATION                       equ     00000021H
PRODUCT_HOME_PREMIUM_SERVER                     equ     00000022H
PRODUCT_SERVER_FOR_SMALLBUSINESS_V              equ     00000023H
PRODUCT_STANDARD_SERVER_V                       equ     00000024H
PRODUCT_DATACENTER_SERVER_V                     equ     00000025H
PRODUCT_ENTERPRISE_SERVER_V                     equ     00000026H
PRODUCT_DATACENTER_SERVER_CORE_V                equ     00000027H
PRODUCT_STANDARD_SERVER_CORE_V                  equ     00000028H
PRODUCT_ENTERPRISE_SERVER_CORE_V                equ     00000029H
PRODUCT_HYPERV                                  equ     0000002AH
PRODUCT_STORAGE_EXPRESS_SERVER_CORE             equ     0000002BH
PRODUCT_STORAGE_STANDARD_SERVER_CORE            equ     0000002CH
PRODUCT_STORAGE_WORKGROUP_SERVER_CORE           equ     0000002DH
PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE          equ     0000002EH
PRODUCT_STARTER_N                               equ     0000002FH
PRODUCT_PROFESSIONAL                            equ     00000030H
PRODUCT_PROFESSIONAL_N                          equ     00000031H
PRODUCT_SB_SOLUTION_SERVER                      equ     00000032H
PRODUCT_SERVER_FOR_SB_SOLUTIONS                 equ     00000033H
PRODUCT_STANDARD_SERVER_SOLUTIONS               equ     00000034H
PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE          equ     00000035H
PRODUCT_SB_SOLUTION_SERVER_EM                   equ     00000036H
PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM              equ     00000037H
PRODUCT_SOLUTION_EMBEDDEDSERVER                 equ     00000038H
PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE            equ     00000039H
PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE       equ     0000003FH
PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT           equ     0000003BH
PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL           equ     0000003CH
PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC        equ     0000003DH
PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC        equ     0000003EH
PRODUCT_CLUSTER_SERVER_V                        equ     00000040H
PRODUCT_EMBEDDED                                equ     00000041H
PRODUCT_STARTER_E                               equ     00000042H
PRODUCT_HOME_BASIC_E                            equ     00000043H
PRODUCT_HOME_PREMIUM_E                          equ     00000044H
PRODUCT_PROFESSIONAL_E                          equ     00000045H
PRODUCT_ENTERPRISE_E                            equ     00000046H
PRODUCT_ULTIMATE_E                              equ     00000047H
PRODUCT_UNLICENSED                              equ     0ABCDABCDH

LOCALE_USER_DEFAULT                             equ     0400H

LOCALE_SYSTEM_DEFAULT                           equ     2048
LOCALE_NOUSEROVERRIDE                           equ     80000000H

LANG_NEUTRAL                                    equ     00H
LANG_INVARIANT                                  equ     7FH

LANG_AFRIKAANS                                  equ     36H
LANG_ALBANIAN                                   equ     1CH
LANG_ALSATIAN                                   equ     84H
LANG_AMHARIC                                    equ     5EH
LANG_ARABIC                                     equ     01H
LANG_ARMENIAN                                   equ     2BH
LANG_ASSAMESE                                   equ     4DH
LANG_AZERI                                      equ     2CH
LANG_AZERBAIJANI                                equ     2CH
LANG_BANGLA                                     equ     45H
LANG_BASHKIR                                    equ     6dH
LANG_BASQUE                                     equ     2DH
LANG_BELARUSIAN                                 equ     23H
LANG_BENGALI                                    equ     45H
LANG_BRETON                                     equ     7EH
LANG_BOSNIAN                                    equ     1AH
LANG_BOSNIAN_NEUTRAL                            equ     781AH
LANG_BULGARIAN                                  equ     02H
LANG_CATALAN                                    equ     03H
LANG_CENTRAL_KURDISH                            equ     92H
LANG_CHEROKEE                                   equ     5CH
LANG_CHINESE                                    equ     04H
LANG_CHINESE_SIMPLIFIED                         equ     04H
LANG_CHINESE_TRADITIONAL                        equ     7C04H
LANG_CORSICAN                                   equ     83H
LANG_CROATIAN                                   equ     1AH
LANG_CZECH                                      equ     05H
LANG_DANISH                                     equ     06H
LANG_DARI                                       equ     8CH
LANG_DIVEHI                                     equ     65H
LANG_DUTCH                                      equ     13H
LANG_ENGLISH                                    equ     09H
LANG_ESTONIAN                                   equ     25H
LANG_FAEROESE                                   equ     38H
LANG_FARSI                                      equ     29H
LANG_FILIPINO                                   equ     64H
LANG_FINNISH                                    equ     0BH
LANG_FRENCH                                     equ     0CH
LANG_FRISIAN                                    equ     62H
LANG_FULAH                                      equ     67H
LANG_GALICIAN                                   equ     56H
LANG_GEORGIAN                                   equ     37H
LANG_GERMAN                                     equ     07H
LANG_GREEK                                      equ     08H
LANG_GREENLANDIC                                equ     6FH
LANG_GUJARATI                                   equ     47H
LANG_HAUSA                                      equ     68H
LANG_HAWAIIAN                                   equ     75H
LANG_HEBREW                                     equ     0DH
LANG_HINDI                                      equ     39H
LANG_HUNGARIAN                                  equ     0EH
LANG_ICELANDIC                                  equ     0FH
LANG_IGBO                                       equ     70H
LANG_INDONESIAN                                 equ     21H
LANG_INUKTITUT                                  equ     5DH
LANG_IRISH                                      equ     3CH
LANG_ITALIAN                                    equ     10H
LANG_JAPANESE                                   equ     11H
LANG_KANNADA                                    equ     4BH
LANG_KASHMIRI                                   equ     60H
LANG_KAZAK                                      equ     3FH
LANG_KHMER                                      equ     53H
LANG_KICHE                                      equ     86H
LANG_KINYARWANDA                                equ     87H
LANG_KONKANI                                    equ     57H
LANG_KOREAN                                     equ     12H
LANG_KYRGYZ                                     equ     40H
LANG_LAO                                        equ     54H
LANG_LATVIAN                                    equ     26H
LANG_LITHUANIAN                                 equ     27H
LANG_LOWER_SORBIAN                              equ     2EH
LANG_LUXEMBOURGISH                              equ     6EH
LANG_MACEDONIAN                                 equ     2FH
LANG_MALAY                                      equ     3EH
LANG_MALAYALAM                                  equ     4CH
LANG_MALTESE                                    equ     3AH
LANG_MANIPURI                                   equ     58H
LANG_MAORI                                      equ     81H
LANG_MAPUDUNGUN                                 equ     7AH
LANG_MARATHI                                    equ     4EH
LANG_MOHAWK                                     equ     7CH
LANG_MONGOLIAN                                  equ     50H
LANG_NEPALI                                     equ     61H
LANG_NORWEGIAN                                  equ     14H
LANG_OCCITAN                                    equ     82H
LANG_ODIA                                       equ     48H
LANG_ORIYA                                      equ     48H
LANG_PASHTO                                     equ     63H
LANG_PERSIAN                                    equ     29H
LANG_POLISH                                     equ     15H
LANG_PORTUGUESE                                 equ     16H
LANG_PULAR                                      equ     67H
LANG_PUNJABI                                    equ     46H
LANG_QUECHUA                                    equ     6BH
LANG_ROMANIAN                                   equ     18H
LANG_ROMANSH                                    equ     17H
LANG_RUSSIAN                                    equ     19H
LANG_SAKHA                                      equ     85H
LANG_SAMI                                       equ     3BH
LANG_SANSKRIT                                   equ     4FH
LANG_SCOTTISH_GAELIC                            equ     91H
LANG_SERBIAN                                    equ     1AH
LANG_SERBIAN_NEUTRAL                            equ     7C1AH
LANG_SINDHI                                     equ     59H
LANG_SINHALESE                                  equ     5BH
LANG_SLOVAK                                     equ     1BH
LANG_SLOVENIAN                                  equ     24H
LANG_SOTHO                                      equ     6CH
LANG_SPANISH                                    equ     0AH
LANG_SWAHILI                                    equ     41H
LANG_SWEDISH                                    equ     1DH
LANG_SYRIAC                                     equ     5AH
LANG_TAJIK                                      equ     28H
LANG_TAMAZIGHT                                  equ     5FH
LANG_TAMIL                                      equ     49H
LANG_TATAR                                      equ     44H
LANG_TELUGU                                     equ     4AH
LANG_THAI                                       equ     1EH
LANG_TIBETAN                                    equ     51H
LANG_TIGRIGNA                                   equ     73H
LANG_TIGRINYA                                   equ     73H
LANG_TSWANA                                     equ     32H
LANG_TURKISH                                    equ     1FH
LANG_TURKMEN                                    equ     42H
LANG_UIGHUR                                     equ     80H
LANG_UKRAINIAN                                  equ     22H
LANG_UPPER_SORBIAN                              equ     2EH
LANG_URDU                                       equ     20H
LANG_UZBEK                                      equ     43H
LANG_VALENCIAN                                  equ     03H
LANG_VIETNAMESE                                 equ     2AH
LANG_WELSH                                      equ     52H
LANG_WOLOF                                      equ     88H
LANG_XHOSA                                      equ     34H
LANG_YAKUT                                      equ     85H
LANG_YI                                         equ     78H
LANG_YORUBA                                     equ     6AH
LANG_ZULU                                       equ     35H

SUBLANG_NEUTRAL                                 equ     00H
SUBLANG_DEFAULT                                 equ     01H
SUBLANG_SYS_DEFAULT                             equ     02H
SUBLANG_CUSTOM_DEFAULT                          equ     03H
SUBLANG_CUSTOM_UNSPECIFIED                      equ     04H
SUBLANG_UI_CUSTOM_DEFAULT                       equ     05H

SUBLANG_AFRIKAANS_SOUTH_AFRICA                  equ     01H
SUBLANG_ALBANIAN_ALBANIA                        equ     01H
SUBLANG_ALSATIAN_FRANCE                         equ     01H
SUBLANG_AMHARIC_ETHIOPIA                        equ     01H
SUBLANG_ARABIC_SAUDI_ARABIA                     equ     01H
SUBLANG_ARABIC_IRAQ                             equ     02H
SUBLANG_ARABIC_EGYPT                            equ     03H
SUBLANG_ARABIC_LIBYA                            equ     04H
SUBLANG_ARABIC_ALGERIA                          equ     05H
SUBLANG_ARABIC_MOROCCO                          equ     06H
SUBLANG_ARABIC_TUNISIA                          equ     07H
SUBLANG_ARABIC_OMAN                             equ     08H
SUBLANG_ARABIC_YEMEN                            equ     09H
SUBLANG_ARABIC_SYRIA                            equ     0AH
SUBLANG_ARABIC_JORDAN                           equ     0BH
SUBLANG_ARABIC_LEBANON                          equ     0CH
SUBLANG_ARABIC_KUWAIT                           equ     0DH
SUBLANG_ARABIC_UAE                              equ     0EH
SUBLANG_ARABIC_BAHRAIN                          equ     0FH
SUBLANG_ARABIC_QATAR                            equ     10H
SUBLANG_ARMENIAN_ARMENIA                        equ     01H
SUBLANG_ASSAMESE_INDIA                          equ     01H
SUBLANG_AZERI_LATIN                             equ     01H
SUBLANG_AZERI_CYRILLIC                          equ     02H
SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN            equ     01H
SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC         equ     02H
SUBLANG_BANGLA_INDIA                            equ     01H
SUBLANG_BANGLA_BANGLADESH                       equ     02H
SUBLANG_BASHKIR_RUSSIA                          equ     01H
SUBLANG_BASQUE_BASQUE                           equ     01H
SUBLANG_BELARUSIAN_BELARUS                      equ     01H
SUBLANG_BENGALI_INDIA                           equ     01H
SUBLANG_BENGALI_BANGLADESH                      equ     02H
SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN        equ     05H
SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC     equ     08H
SUBLANG_BRETON_FRANCE                           equ     01H
SUBLANG_BULGARIAN_BULGARIA                      equ     01H
SUBLANG_CATALAN_CATALAN                         equ     01H
SUBLANG_CENTRAL_KURDISH_IRAQ                    equ     01H
SUBLANG_CHEROKEE_CHEROKEE                       equ     01H
SUBLANG_CHINESE_TRADITIONAL                     equ     01H
SUBLANG_CHINESE_SIMPLIFIED                      equ     02H
SUBLANG_CHINESE_HONGKONG                        equ     03H
SUBLANG_CHINESE_SINGAPORE                       equ     04H
SUBLANG_CHINESE_MACAU                           equ     05H
SUBLANG_CORSICAN_FRANCE                         equ     01H
SUBLANG_CZECH_CZECH_REPUBLIC                    equ     01H
SUBLANG_CROATIAN_CROATIA                        equ     01H
SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN       equ     04H
SUBLANG_DANISH_DENMARK                          equ     01H
SUBLANG_DARI_AFGHANISTAN                        equ     01H
SUBLANG_DIVEHI_MALDIVES                         equ     01H
SUBLANG_DUTCH                                   equ     01H
SUBLANG_DUTCH_BELGIAN                           equ     02H
SUBLANG_ENGLISH_US                              equ     01H
SUBLANG_ENGLISH_UK                              equ     02H
SUBLANG_ENGLISH_AUS                             equ     03H
SUBLANG_ENGLISH_CAN                             equ     04H
SUBLANG_ENGLISH_NZ                              equ     05H
SUBLANG_ENGLISH_EIRE                            equ     06H
SUBLANG_ENGLISH_SOUTH_AFRICA                    equ     07H
SUBLANG_ENGLISH_JAMAICA                         equ     08H
SUBLANG_ENGLISH_CARIBBEAN                       equ     09H
SUBLANG_ENGLISH_BELIZE                          equ     0AH
SUBLANG_ENGLISH_TRINIDAD                        equ     0BH
SUBLANG_ENGLISH_ZIMBABWE                        equ     0CH
SUBLANG_ENGLISH_PHILIPPINES                     equ     0DH
SUBLANG_ENGLISH_INDIA                           equ     10H
SUBLANG_ENGLISH_MALAYSIA                        equ     11H
SUBLANG_ENGLISH_SINGAPORE                       equ     12H
SUBLANG_ESTONIAN_ESTONIA                        equ     01H
SUBLANG_FAEROESE_FAROE_ISLANDS                  equ     01H
SUBLANG_FILIPINO_PHILIPPINES                    equ     01H
SUBLANG_FINNISH_FINLAND                         equ     01H
SUBLANG_FRENCH                                  equ     01H
SUBLANG_FRENCH_BELGIAN                          equ     02H
SUBLANG_FRENCH_CANADIAN                         equ     03H
SUBLANG_FRENCH_SWISS                            equ     04H
SUBLANG_FRENCH_LUXEMBOURG                       equ     05H
SUBLANG_FRENCH_MONACO                           equ     06H
SUBLANG_FRISIAN_NETHERLANDS                     equ     01H
SUBLANG_FULAH_SENEGAL                           equ     02H
SUBLANG_GALICIAN_GALICIAN                       equ     01H
SUBLANG_GEORGIAN_GEORGIA                        equ     01H
SUBLANG_GERMAN                                  equ     01H
SUBLANG_GERMAN_SWISS                            equ     02H
SUBLANG_GERMAN_AUSTRIAN                         equ     03H
SUBLANG_GERMAN_LUXEMBOURG                       equ     04H
SUBLANG_GERMAN_LIECHTENSTEIN                    equ     05H
SUBLANG_GREEK_GREECE                            equ     01H
SUBLANG_GREENLANDIC_GREENLAND                   equ     01H
SUBLANG_GUJARATI_INDIA                          equ     01H
SUBLANG_HAUSA_NIGERIA_LATIN                     equ     01H
SUBLANG_HAWAIIAN_US                             equ     01H
SUBLANG_HEBREW_ISRAEL                           equ     01H
SUBLANG_HINDI_INDIA                             equ     01H
SUBLANG_HUNGARIAN_HUNGARY                       equ     01H
SUBLANG_ICELANDIC_ICELAND                       equ     01H
SUBLANG_IGBO_NIGERIA                            equ     01H
SUBLANG_INDONESIAN_INDONESIA                    equ     01H
SUBLANG_INUKTITUT_CANADA                        equ     01H
SUBLANG_INUKTITUT_CANADA_LATIN                  equ     02H
SUBLANG_IRISH_IRELAND                           equ     02H
SUBLANG_ITALIAN                                 equ     01H
SUBLANG_ITALIAN_SWISS                           equ     02H
SUBLANG_JAPANESE_JAPAN                          equ     01H
SUBLANG_KANNADA_INDIA                           equ     01H
SUBLANG_KASHMIRI_SASIA                          equ     02H
SUBLANG_KASHMIRI_INDIA                          equ     02H
SUBLANG_KAZAK_KAZAKHSTAN                        equ     01H
SUBLANG_KHMER_CAMBODIA                          equ     01H
SUBLANG_KICHE_GUATEMALA                         equ     01H
SUBLANG_KINYARWANDA_RWANDA                      equ     01H
SUBLANG_KONKANI_INDIA                           equ     01H
SUBLANG_KOREAN                                  equ     01H
SUBLANG_KYRGYZ_KYRGYZSTAN                       equ     01H
SUBLANG_LAO_LAO                                 equ     01H
SUBLANG_LATVIAN_LATVIA                          equ     01H
SUBLANG_LITHUANIAN                              equ     01H
SUBLANG_LOWER_SORBIAN_GERMANY                   equ     02H
SUBLANG_LUXEMBOURGISH_LUXEMBOURG                equ     01H
SUBLANG_MACEDONIAN_MACEDONIA                    equ     01H
SUBLANG_MALAY_MALAYSIA                          equ     01H
SUBLANG_MALAY_BRUNEI_DARUSSALAM                 equ     02H
SUBLANG_MALAYALAM_INDIA                         equ     01H
SUBLANG_MALTESE_MALTA                           equ     01H
SUBLANG_MAORI_NEW_ZEALAND                       equ     01H
SUBLANG_MAPUDUNGUN_CHILE                        equ     01H
SUBLANG_MARATHI_INDIA                           equ     01H
SUBLANG_MOHAWK_MOHAWK                           equ     01H
SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA             equ     01H
SUBLANG_MONGOLIAN_PRC                           equ     02H
SUBLANG_NEPALI_INDIA                            equ     02H
SUBLANG_NEPALI_NEPAL                            equ     01H
SUBLANG_NORWEGIAN_BOKMAL                        equ     01H
SUBLANG_NORWEGIAN_NYNORSK                       equ     02H
SUBLANG_OCCITAN_FRANCE                          equ     01H
SUBLANG_ODIA_INDIA                              equ     01H
SUBLANG_ORIYA_INDIA                             equ     01H
SUBLANG_PASHTO_AFGHANISTAN                      equ     01H
SUBLANG_PERSIAN_IRAN                            equ     01H
SUBLANG_POLISH_POLAND                           equ     01H
SUBLANG_PORTUGUESE                              equ     02H
SUBLANG_PORTUGUESE_BRAZILIAN                    equ     01H
SUBLANG_PULAR_SENEGAL                           equ     02H
SUBLANG_PUNJABI_INDIA                           equ     01H
SUBLANG_PUNJABI_PAKISTAN                        equ     02H
SUBLANG_QUECHUA_BOLIVIA                         equ     01H
SUBLANG_QUECHUA_ECUADOR                         equ     02H
SUBLANG_QUECHUA_PERU                            equ     03H
SUBLANG_ROMANIAN_ROMANIA                        equ     01H
SUBLANG_ROMANSH_SWITZERLAND                     equ     01H
SUBLANG_RUSSIAN_RUSSIA                          equ     01H
SUBLANG_SAKHA_RUSSIA                            equ     01H
SUBLANG_SAMI_NORTHERN_NORWAY                    equ     01H
SUBLANG_SAMI_NORTHERN_SWEDEN                    equ     02H
SUBLANG_SAMI_NORTHERN_FINLAND                   equ     03H
SUBLANG_SAMI_LULE_NORWAY                        equ     04H
SUBLANG_SAMI_LULE_SWEDEN                        equ     05H
SUBLANG_SAMI_SOUTHERN_NORWAY                    equ     06H
SUBLANG_SAMI_SOUTHERN_SWEDEN                    equ     07H
SUBLANG_SAMI_SKOLT_FINLAND                      equ     08H
SUBLANG_SAMI_INARI_FINLAND                      equ     09H
SUBLANG_SANSKRIT_INDIA                          equ     01H
SUBLANG_SCOTTISH_GAELIC                         equ     01H
SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN        equ     06H
SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC     equ     07H
SUBLANG_SERBIAN_MONTENEGRO_LATIN                equ     0BH
SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC             equ     0CH
SUBLANG_SERBIAN_SERBIA_LATIN                    equ     09H
SUBLANG_SERBIAN_SERBIA_CYRILLIC                 equ     0AH
SUBLANG_SERBIAN_CROATIA                         equ     01H
SUBLANG_SERBIAN_LATIN                           equ     02H
SUBLANG_SERBIAN_CYRILLIC                        equ     03H
SUBLANG_SINDHI_INDIA                            equ     01H
SUBLANG_SINDHI_PAKISTAN                         equ     02H
SUBLANG_SINDHI_AFGHANISTAN                      equ     02H
SUBLANG_SINHALESE_SRI_LANKA                     equ     01H
SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA             equ     01H
SUBLANG_SLOVAK_SLOVAKIA                         equ     01H
SUBLANG_SLOVENIAN_SLOVENIA                      equ     01H
SUBLANG_SPANISH                                 equ     01H
SUBLANG_SPANISH_MEXICAN                         equ     02H
SUBLANG_SPANISH_MODERN                          equ     03H
SUBLANG_SPANISH_GUATEMALA                       equ     04H
SUBLANG_SPANISH_COSTA_RICA                      equ     05H
SUBLANG_SPANISH_PANAMA                          equ     06H
SUBLANG_SPANISH_DOMINICAN_REPUBLIC              equ     07H
SUBLANG_SPANISH_VENEZUELA                       equ     08H
SUBLANG_SPANISH_COLOMBIA                        equ     09H
SUBLANG_SPANISH_PERU                            equ     0AH
SUBLANG_SPANISH_ARGENTINA                       equ     0BH
SUBLANG_SPANISH_ECUADOR                         equ     0CH
SUBLANG_SPANISH_CHILE                           equ     0DH
SUBLANG_SPANISH_URUGUAY                         equ     0EH
SUBLANG_SPANISH_PARAGUAY                        equ     0FH
SUBLANG_SPANISH_BOLIVIA                         equ     10H
SUBLANG_SPANISH_EL_SALVADOR                     equ     11H
SUBLANG_SPANISH_HONDURAS                        equ     12H
SUBLANG_SPANISH_NICARAGUA                       equ     13H
SUBLANG_SPANISH_PUERTO_RICO                     equ     14H
SUBLANG_SPANISH_US                              equ     15H
SUBLANG_SWAHILI_KENYA                           equ     01H
SUBLANG_SWEDISH                                 equ     01H
SUBLANG_SWEDISH_FINLAND                         equ     02H
SUBLANG_SYRIAC_SYRIA                            equ     01H
SUBLANG_TAJIK_TAJIKISTAN                        equ     01H
SUBLANG_TAMAZIGHT_ALGERIA_LATIN                 equ     02H
SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH              equ     04H
SUBLANG_TAMIL_INDIA                             equ     01H
SUBLANG_TAMIL_SRI_LANKA                         equ     02H
SUBLANG_TATAR_RUSSIA                            equ     01H
SUBLANG_TELUGU_INDIA                            equ     01H
SUBLANG_THAI_THAILAND                           equ     01H
SUBLANG_TIBETAN_PRC                             equ     01H
SUBLANG_TIGRIGNA_ERITREA                        equ     02H
SUBLANG_TIGRINYA_ERITREA                        equ     02H
SUBLANG_TIGRINYA_ETHIOPIA                       equ     01H
SUBLANG_TSWANA_BOTSWANA                         equ     02H
SUBLANG_TSWANA_SOUTH_AFRICA                     equ     01H
SUBLANG_TURKISH_TURKEY                          equ     01H
SUBLANG_TURKMEN_TURKMENISTAN                    equ     01H
SUBLANG_UIGHUR_PRC                              equ     01H
SUBLANG_UKRAINIAN_UKRAINE                       equ     01H
SUBLANG_UPPER_SORBIAN_GERMANY                   equ     01H
SUBLANG_URDU_PAKISTAN                           equ     01H
SUBLANG_URDU_INDIA                              equ     02H
SUBLANG_UZBEK_LATIN                             equ     01H
SUBLANG_UZBEK_CYRILLIC                          equ     02H
SUBLANG_VALENCIAN_VALENCIA                      equ     02H
SUBLANG_VIETNAMESE_VIETNAM                      equ     01H
SUBLANG_WELSH_UNITED_KINGDOM                    equ     01H
SUBLANG_WOLOF_SENEGAL                           equ     01H
SUBLANG_XHOSA_SOUTH_AFRICA                      equ     01H
SUBLANG_YAKUT_RUSSIA                            equ     01H
SUBLANG_YI_PRC                                  equ     01H
SUBLANG_YORUBA_NIGERIA                          equ     01H
SUBLANG_ZULU_SOUTH_AFRICA                       equ     01H

SORT_DEFAULT                                    equ     0H

SORT_JAPANESE_XJIS                              equ     0H
SORT_JAPANESE_UNICODE                           equ     1H
SORT_JAPANESE_RADICALSTROKE                     equ     4H

SORT_CHINESE_BIG5                               equ     0H
SORT_CHINESE_PRCP                               equ     0H
SORT_CHINESE_UNICODE                            equ     1H
SORT_CHINESE_PRC                                equ     2H
SORT_CHINESE_BOPOMOFO                           equ     3H
SORT_CHINESE_RADICALSTROKE                      equ     4H

SORT_KOREAN_KSC                                 equ     0H
SORT_KOREAN_UNICODE                             equ     1H

SORT_GERMAN_PHONE_BOOK                          equ     1H

SORT_HUNGARIAN_DEFAULT                          equ     0H
SORT_HUNGARIAN_TECHNICAL                        equ     1H

SORT_GEORGIAN_TRADITIONAL                       equ     0H
SORT_GEORGIAN_MODERN                            equ     1H

LOCALE_NAME_MAX_LENGTH                          equ     85

LOCALE_CUSTOM_DEFAULT                           equ     ((LANG_NEUTRAL or (SUBLANG_CUSTOM_DEFAULT shl 10)) or (SORT_DEFAULT shl 16))
LOCALE_CUSTOM_UNSPECIFIED                       equ     ((LANG_NEUTRAL or (SUBLANG_CUSTOM_UNSPECIFIED shl 10)) or (SORT_DEFAULT shl 16))
LOCALE_CUSTOM_UI_DEFAULT                        equ     ((LANG_NEUTRAL or (SUBLANG_UI_CUSTOM_DEFAULT shl 10)) or (SORT_DEFAULT shl 16))
LOCALE_NEUTRAL                                  equ     ((LANG_NEUTRAL or (SUBLANG_NEUTRAL shl 10)) or (SORT_DEFAULT shl 16))
LOCALE_INVARIANT                                equ     ((LANG_INVARIANT or (SUBLANG_NEUTRAL shl 10)) or (SORT_DEFAULT shl 16))

LANG_SYSTEM_DEFAULT                             equ     ((SUBLANG_SYS_DEFAULT shl 10) or LANG_NEUTRAL)
LANG_USER_DEFAULT                               equ     ((SUBLANG_DEFAULT shl 10) or LANG_NEUTRAL)

LOCALE_TRANSIENT_KEYBOARD1                      equ     02000H
LOCALE_TRANSIENT_KEYBOARD2                      equ     02400H
LOCALE_TRANSIENT_KEYBOARD3                      equ     02800H
LOCALE_TRANSIENT_KEYBOARD4                      equ     02C00H

LOCALE_UNASSIGNED_LCID                          equ     LOCALE_CUSTOM_UNSPECIFIED

STATUS_WAIT_0                                   equ     000000000H
STATUS_ABANDONED_WAIT_0                         equ     000000080H
STATUS_USER_APC                                 equ     0000000C0H
STATUS_TIMEOUT                                  equ     000000102H
STATUS_PENDING                                  equ     000000103H
DBG_EXCEPTION_HANDLED                           equ     000010001H
DBG_CONTINUE                                    equ     000010002H
STATUS_SEGMENT_NOTIFICATION                     equ     040000005H
DBG_TERMINATE_THREAD                            equ     040010003H
DBG_TERMINATE_PROCESS                           equ     040010004H
DBG_CONTROL_C                                   equ     040010005H
DBG_PRINTEXCEPTION_C                            equ     040010006H
DBG_RIPEXCEPTION                                equ     040010007H
DBG_CONTROL_BREAK                               equ     040010008H
DBG_COMMAND_EXCEPTION                           equ     040010009H
STATUS_GUARD_PAGE_VIOLATION                     equ     080000001H
STATUS_DATATYPE_MISALIGNMENT                    equ     080000002H
STATUS_BREAKPOINT                               equ     080000003H
STATUS_SINGLE_STEP                              equ     080000004H
STATUS_LONGJUMP                                 equ     080000026H
STATUS_UNWIND_CONSOLIDATE                       equ     080000029H
DBG_EXCEPTION_NOT_HANDLED                       equ     080010001H
STATUS_ACCESS_VIOLATION                         equ     0C0000005H
STATUS_IN_PAGE_ERROR                            equ     0C0000006H
STATUS_INVALID_HANDLE                           equ     0C0000008H
STATUS_INVALID_PARAMETER                        equ     0C000000DH
STATUS_NO_MEMORY                                equ     0C0000017H
STATUS_ILLEGAL_INSTRUCTION                      equ     0C000001DH
STATUS_NONCONTINUABLE_EXCEPTION                 equ     0C0000025H
STATUS_INVALID_DISPOSITION                      equ     0C0000026H
STATUS_ARRAY_BOUNDS_EXCEEDED                    equ     0C000008CH
STATUS_FLOAT_DENORMAL_OPERAND                   equ     0C000008DH
STATUS_FLOAT_DIVIDE_BY_ZERO                     equ     0C000008EH
STATUS_FLOAT_INEXACT_RESULT                     equ     0C000008FH
STATUS_FLOAT_INVALID_OPERATION                  equ     0C0000090H
STATUS_FLOAT_OVERFLOW                           equ     0C0000091H
STATUS_FLOAT_STACK_CHECK                        equ     0C0000092H
STATUS_FLOAT_UNDERFLOW                          equ     0C0000093H
STATUS_INTEGER_DIVIDE_BY_ZERO                   equ     0C0000094H
STATUS_INTEGER_OVERFLOW                         equ     0C0000095H
STATUS_PRIVILEGED_INSTRUCTION                   equ     0C0000096H
STATUS_STACK_OVERFLOW                           equ     0C00000FDH
STATUS_DLL_NOT_FOUND                            equ     0C0000135H
STATUS_ORDINAL_NOT_FOUND                        equ     0C0000138H
STATUS_ENTRYPOINT_NOT_FOUND                     equ     0C0000139H
STATUS_CONTROL_C_EXIT                           equ     0C000013AH
STATUS_DLL_INIT_FAILED                          equ     0C0000142H
STATUS_POSSIBLE_DEADLOCK                        equ     0C0000194H
STATUS_FLOAT_MULTIPLE_FAULTS                    equ     0C00002B4H
STATUS_FLOAT_MULTIPLE_TRAPS                     equ     0C00002B5H
STATUS_REG_NAT_CONSUMPTION                      equ     0C00002C9H
STATUS_STACK_BUFFER_OVERRUN                     equ     0C0000409H
STATUS_INVALID_CRUNTIME_PARAMETER               equ     0C0000417H
STATUS_ASSERTION_FAILURE                        equ     0C0000420H
STATUS_SXS_EARLY_DEACTIVATION                   equ     0C015000FH
STATUS_SXS_INVALID_DEACTIVATION                 equ     0C0150010H

MAXIMUM_WAIT_OBJECTS                            equ     64
MAXIMUM_SUSPEND_COUNT                           equ     MAXCHAR

EXCEPTION_NONCONTINUABLE                        equ     01H
EXCEPTION_UNWINDING                             equ     02H
EXCEPTION_EXIT_UNWIND                           equ     04H
EXCEPTION_STACK_INVALID                         equ     08H
EXCEPTION_NESTED_CALL                           equ     010H
EXCEPTION_TARGET_UNWIND                         equ     020H
EXCEPTION_COLLIDED_UNWIND                       equ     040H
EXCEPTION_UNWIND                                equ     (EXCEPTION_UNWINDING or EXCEPTION_EXIT_UNWIND or \
                                                        EXCEPTION_TARGET_UNWIND or EXCEPTION_COLLIDED_UNWIND)

DELETE                                          equ     000010000H
READ_CONTROL                                    equ     000020000H
WRITE_DAC                                       equ     000040000H
WRITE_OWNER                                     equ     000080000H
SYNCHRONIZE                                     equ     000100000H

STANDARD_RIGHTS_REQUIRED                        equ     0000F0000H
STANDARD_RIGHTS_READ                            equ     READ_CONTROL
STANDARD_RIGHTS_WRITE                           equ     READ_CONTROL
STANDARD_RIGHTS_EXECUTE                         equ     READ_CONTROL
STANDARD_RIGHTS_ALL                             equ     0001F0000H

SPECIFIC_RIGHTS_ALL                             equ     00000FFFFH

ACCESS_SYSTEM_SECURITY                          equ     001000000H

MAXIMUM_ALLOWED                                 equ     002000000H

GENERIC_READ                                    equ     080000000H
GENERIC_WRITE                                   equ     040000000H
GENERIC_EXECUTE                                 equ     020000000H
GENERIC_ALL                                     equ     010000000H

SID_HASH_SIZE                                   equ     32
TYPEDEF                                         SID_HASH_ENTRY, xptr

SID_REVISION                                    equ     1
SID_MAX_SUB_AUTHORITIES                         equ     15
SID_RECOMMENDED_SUB_AUTHORITIES                 equ     1

SECURITY_NULL_SID_AUTHORITY                     equ     <0,0,0,0,0,0>
SECURITY_WORLD_SID_AUTHORITY                    equ     <0,0,0,0,0,1>
SECURITY_LOCAL_SID_AUTHORITY                    equ     <0,0,0,0,0,2>
SECURITY_CREATOR_SID_AUTHORITY                  equ     <0,0,0,0,0,3>
SECURITY_NON_UNIQUE_AUTHORITY                   equ     <0,0,0,0,0,4>
SECURITY_RESOURCE_MANAGER_AUTHORITY             equ     <0,0,0,0,0,9>
SECURITY_NULL_RID                               equ     000000000H
SECURITY_WORLD_RID                              equ     000000000H
SECURITY_LOCAL_RID                              equ     000000000H
SECURITY_LOCAL_LOGON_RID                        equ     000000001H
SECURITY_CREATOR_OWNER_RID                      equ     000000000H
SECURITY_CREATOR_GROUP_RID                      equ     000000001H
SECURITY_CREATOR_OWNER_SERVER_RID               equ     000000002H
SECURITY_CREATOR_GROUP_SERVER_RID               equ     000000003H
SECURITY_CREATOR_OWNER_RIGHTS_RID               equ     000000004H

SECURITY_NT_AUTHORITY                           equ     <0,0,0,0,0,5>

SECURITY_DIALUP_RID                             equ     000000001H
SECURITY_NETWORK_RID                            equ     000000002H
SECURITY_BATCH_RID                              equ     000000003H
SECURITY_INTERACTIVE_RID                        equ     000000004H
SECURITY_LOGON_IDS_RID                          equ     000000005H
SECURITY_LOGON_IDS_RID_COUNT                    equ     3
SECURITY_SERVICE_RID                            equ     000000006H
SECURITY_ANONYMOUS_LOGON_RID                    equ     000000007H
SECURITY_PROXY_RID                              equ     000000008H
SECURITY_ENTERPRISE_CONTROLLERS_RID             equ     000000009H
SECURITY_SERVER_LOGON_RID                       equ     SECURITY_ENTERPRISE_CONTROLLERS_RID>
SECURITY_PRINCIPAL_SELF_RID                     equ     00000000AH
SECURITY_AUTHENTICATED_USER_RID                 equ     00000000BH
SECURITY_RESTRICTED_CODE_RID                    equ     00000000CH
SECURITY_TERMINAL_SERVER_RID                    equ     00000000DH
SECURITY_REMOTE_LOGON_RID                       equ     00000000EH
SECURITY_THIS_ORGANIZATION_RID                  equ     00000000FH
SECURITY_IUSER_RID                              equ     000000011H
SECURITY_LOCAL_SYSTEM_RID                       equ     000000012H
SECURITY_LOCAL_SERVICE_RID                      equ     000000013H
SECURITY_NETWORK_SERVICE_RID                    equ     000000014H
SECURITY_NT_NON_UNIQUE                          equ     000000015H
SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT           equ     3
SECURITY_ENTERPRISE_READONLY_CONTROLLERS_RID    equ     000000016H
SECURITY_BUILTIN_DOMAIN_RID                     equ     000000020H
SECURITY_WRITE_RESTRICTED_CODE_RID              equ     000000021H
SECURITY_PACKAGE_BASE_RID                       equ     000000040H
SECURITY_PACKAGE_RID_COUNT                      equ     2
SECURITY_PACKAGE_NTLM_RID                       equ     00000000AH
SECURITY_PACKAGE_SCHANNEL_RID                   equ     00000000EH
SECURITY_PACKAGE_DIGEST_RID                     equ     000000015H
SECURITY_CRED_TYPE_BASE_RID                     equ     000000041H
SECURITY_CRED_TYPE_RID_COUNT                    equ     2
SECURITY_CRED_TYPE_THIS_ORG_CERT_RID            equ     000000001H
SECURITY_MIN_BASE_RID                           equ     000000050H
SECURITY_SERVICE_ID_BASE_RID                    equ     000000050H
SECURITY_SERVICE_ID_RID_COUNT                   equ     6
SECURITY_RESERVED_ID_BASE_RID                   equ     000000051H
SECURITY_APPPOOL_ID_BASE_RID                    equ     000000052H
SECURITY_APPPOOL_ID_RID_COUNT                   equ     6
SECURITY_VIRTUALSERVER_ID_BASE_RID              equ     000000053H
SECURITY_VIRTUALSERVER_ID_RID_COUNT             equ     6
SECURITY_USERMODEDRIVERHOST_ID_BASE_RID         equ     000000054H
SECURITY_USERMODEDRIVERHOST_ID_RID_COUNT        equ     6
SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_BASE_RID  equ 000000055H
SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_RID_COUNT equ 6
SECURITY_WMIHOST_ID_BASE_RID                    equ     000000056H
SECURITY_WMIHOST_ID_RID_COUNT                   equ     6
SECURITY_TASK_ID_BASE_RID                       equ     000000057H
SECURITY_NFS_ID_BASE_RID                        equ     000000058H
SECURITY_COM_ID_BASE_RID                        equ     000000059H
SECURITY_WINDOW_MANAGER_BASE_RID                equ     00000005AH
SECURITY_RDV_GFX_BASE_RID                       equ     00000005BH
SECURITY_DASHOST_ID_BASE_RID                    equ     00000005CH
SECURITY_DASHOST_ID_RID_COUNT                   equ     6
SECURITY_VIRTUALACCOUNT_ID_RID_COUNT            equ     6
SECURITY_MAX_BASE_RID                           equ     00000006FH
SECURITY_MAX_ALWAYS_FILTERED                    equ     0000003E7H
SECURITY_MIN_NEVER_FILTERED                     equ     0000003E8H
SECURITY_OTHER_ORGANIZATION_RID                 equ     0000003E8H
SECURITY_WINDOWSMOBILE_ID_BASE_RID              equ     000000070H

DOMAIN_USER_RID_ADMIN                           equ     0000001F4H
DOMAIN_USER_RID_GUEST                           equ     0000001F5H
DOMAIN_USER_RID_KRBTGT                          equ     0000001F6H
DOMAIN_USER_RID_MAX                             equ     0000003E7H

DOMAIN_GROUP_RID_ADMINS                         equ     000000200H
DOMAIN_GROUP_RID_USERS                          equ     000000201H
DOMAIN_GROUP_RID_GUESTS                         equ     000000202H
DOMAIN_GROUP_RID_COMPUTERS                      equ     000000203H
DOMAIN_GROUP_RID_CONTROLLERS                    equ     000000204H
DOMAIN_GROUP_RID_CERT_ADMINS                    equ     000000205H
DOMAIN_GROUP_RID_SCHEMA_ADMINS                  equ     000000206H
DOMAIN_GROUP_RID_ENTERPRISE_ADMINS              equ     000000207H
DOMAIN_GROUP_RID_POLICY_ADMINS                  equ     000000208H
DOMAIN_GROUP_RID_READONLY_CONTROLLERS           equ     000000209H
DOMAIN_GROUP_RID_CLONEABLE_CONTROLLERS          equ     00000020AH
DOMAIN_GROUP_RID_CDC_RESERVED                   equ     00000020CH
DOMAIN_GROUP_RID_PROTECTED_USERS                equ     00000020DH

DOMAIN_ALIAS_RID_ADMINS                         equ     000000220H
DOMAIN_ALIAS_RID_USERS                          equ     000000221H
DOMAIN_ALIAS_RID_GUESTS                         equ     000000222H
DOMAIN_ALIAS_RID_POWER_USERS                    equ     000000223H

DOMAIN_ALIAS_RID_ACCOUNT_OPS                    equ     000000224H
DOMAIN_ALIAS_RID_SYSTEM_OPS                     equ     000000225H
DOMAIN_ALIAS_RID_PRINT_OPS                      equ     000000226H
DOMAIN_ALIAS_RID_BACKUP_OPS                     equ     000000227H

DOMAIN_ALIAS_RID_REPLICATOR                     equ     000000228H
DOMAIN_ALIAS_RID_RAS_SERVERS                    equ     000000229H
DOMAIN_ALIAS_RID_PREW2KCOMPACCESS               equ     00000022AH
DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS           equ     00000022BH
DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS      equ     00000022CH
DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS equ     00000022DH
DOMAIN_ALIAS_RID_MONITORING_USERS               equ     00000022EH
DOMAIN_ALIAS_RID_LOGGING_USERS                  equ     00000022FH
DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS            equ     000000230H
DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS             equ     000000231H
DOMAIN_ALIAS_RID_DCOM_USERS                     equ     000000232H
DOMAIN_ALIAS_RID_IUSERS                         equ     000000238H
DOMAIN_ALIAS_RID_CRYPTO_OPERATORS               equ     000000239H
DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP     equ     00000023BH
DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP equ     00000023CH
DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP        equ     00000023DH
DOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP      equ     00000023EH
DOMAIN_ALIAS_RID_RDS_REMOTE_ACCESS_SERVERS      equ     00000023FH
DOMAIN_ALIAS_RID_RDS_ENDPOINT_SERVERS           equ     000000240H
DOMAIN_ALIAS_RID_RDS_MANAGEMENT_SERVERS         equ     000000241H
DOMAIN_ALIAS_RID_HYPER_V_ADMINS                 equ     000000242H
DOMAIN_ALIAS_RID_ACCESS_CONTROL_ASSISTANCE_OPS  equ     000000243H
DOMAIN_ALIAS_RID_REMOTE_MANAGEMENT_USERS        equ     000000244H

SECURITY_MANDATORY_LABEL_AUTHORITY              equ     <0,0,0,0,0,16>
SECURITY_MANDATORY_UNTRUSTED_RID                equ     000000000H
SECURITY_MANDATORY_LOW_RID                      equ     000001000H
SECURITY_MANDATORY_MEDIUM_RID                   equ     000002000H
SECURITY_MANDATORY_MEDIUM_PLUS_RID              equ     (SECURITY_MANDATORY_MEDIUM_RID + 0100H)
SECURITY_MANDATORY_HIGH_RID                     equ     000003000H
SECURITY_MANDATORY_SYSTEM_RID                   equ     000004000H
SECURITY_MANDATORY_PROTECTED_PROCESS_RID        equ     000005000H

SECURITY_MANDATORY_MAXIMUM_USER_RID             equ     SECURITY_MANDATORY_SYSTEM_RID

WinNullSid                                      equ     0
WinWorldSid                                     equ     1
WinLocalSid                                     equ     2
WinCreatorOwnerSid                              equ     3
WinCreatorGroupSid                              equ     4
WinCreatorOwnerServerSid                        equ     5
WinCreatorGroupServerSid                        equ     6
WinNtAuthoritySid                               equ     7
WinDialupSid                                    equ     8
WinNetworkSid                                   equ     9
WinBatchSid                                     equ     10
WinInteractiveSid                               equ     11
WinServiceSid                                   equ     12
WinAnonymousSid                                 equ     13
WinProxySid                                     equ     14
WinEnterpriseControllersSid                     equ     15
WinSelfSid                                      equ     16
WinAuthenticatedUserSid                         equ     17
WinRestrictedCodeSid                            equ     18
WinTerminalServerSid                            equ     19
WinRemoteLogonIdSid                             equ     20
WinLogonIdsSid                                  equ     21
WinLocalSystemSid                               equ     22
WinLocalServiceSid                              equ     23
WinNetworkServiceSid                            equ     24
WinBuiltinDomainSid                             equ     25
WinBuiltinAdministratorsSid                     equ     26
WinBuiltinUsersSid                              equ     27
WinBuiltinGuestsSid                             equ     28
WinBuiltinPowerUsersSid                         equ     29
WinBuiltinAccountOperatorsSid                   equ     30
WinBuiltinSystemOperatorsSid                    equ     31
WinBuiltinPrintOperatorsSid                     equ     32
WinBuiltinBackupOperatorsSid                    equ     33
WinBuiltinReplicatorSid                         equ     34
WinBuiltinPreWindows2000CompatibleAccessSid     equ     35
WinBuiltinRemoteDesktopUsersSid                 equ     36
WinBuiltinNetworkConfigurationOperatorsSid      equ     37
WinAccountAdministratorSid                      equ     38
WinAccountGuestSid                              equ     39
WinAccountKrbtgtSid                             equ     40
WinAccountDomainAdminsSid                       equ     41
WinAccountDomainUsersSid                        equ     42
WinAccountDomainGuestsSid                       equ     43
WinAccountComputersSid                          equ     44
WinAccountControllersSid                        equ     45
WinAccountCertAdminsSid                         equ     46
WinAccountSchemaAdminsSid                       equ     47
WinAccountEnterpriseAdminsSid                   equ     48
WinAccountPolicyAdminsSid                       equ     49
WinAccountRasAndIasServersSid                   equ     50
WinNTLMAuthenticationSid                        equ     51
WinDigestAuthenticationSid                      equ     52
WinSChannelAuthenticationSid                    equ     53
WinThisOrganizationSid                          equ     54
WinOtherOrganizationSid                         equ     55
WinBuiltinIncomingForestTrustBuildersSid        equ     56
WinBuiltinPerfMonitoringUsersSid                equ     57
WinBuiltinPerfLoggingUsersSid                   equ     58
WinBuiltinAuthorizationAccessSid                equ     59
WinBuiltinTerminalServerLicenseServersSid       equ     60
WinBuiltinDCOMUsersSid                          equ     61
WinBuiltinIUsersSid                             equ     62
WinIUserSid                                     equ     63
WinBuiltinCryptoOperatorsSid                    equ     64
WinUntrustedLabelSid                            equ     65
WinLowLabelSid                                  equ     66
WinMediumLabelSid                               equ     67
WinHighLabelSid                                 equ     68
WinSystemLabelSid                               equ     69
WinWriteRestrictedCodeSid                       equ     70
WinCreatorOwnerRightsSid                        equ     71
WinCacheablePrincipalsGroupSid                  equ     72
WinNonCacheablePrincipalsGroupSid               equ     73
WinEnterpriseReadonlyControllersSid             equ     74
WinAccountReadonlyControllersSid                equ     75
WinBuiltinEventLogReadersGroup                  equ     76
WinNewEnterpriseReadonlyControllersSid          equ     77
WinBuiltinCertSvcDComAccessGroup                equ     78
WinMediumPlusLabelSid                           equ     79
WinLocalLogonSid                                equ     80
WinConsoleLogonSid                              equ     81
WinThisOrganizationCertificateSid               equ     82

SYSTEM_LUID                                     equ     <03E7H,00H>
ANONYMOUS_LOGON_LUID                            equ     <03E6H,00H>
LOCALSERVICE_LUID                               equ     <03E5H,00H>
NETWORKSERVICE_LUID                             equ     <03E4H,00H>
IUSER_LUID                                      equ     <03E3H,00H>

SE_GROUP_MANDATORY                              equ     000000001H
SE_GROUP_ENABLED_BY_DEFAULT                     equ     000000002H
SE_GROUP_ENABLED                                equ     000000004H
SE_GROUP_OWNER                                  equ     000000008H
SE_GROUP_USE_FOR_DENY_ONLY                      equ     000000010H
SE_GROUP_INTEGRITY                              equ     000000020H
SE_GROUP_INTEGRITY_ENABLED                      equ     000000040H
SE_GROUP_LOGON_ID                               equ     0C0000000H
SE_GROUP_RESOURCE                               equ     020000000H

SE_GROUP_VALID_ATTRIBUTES                       equ     (SE_GROUP_MANDATORY or SE_GROUP_ENABLED_BY_DEFAULT or \
                                                        SE_GROUP_ENABLED or SE_GROUP_OWNER or \
                                                        SE_GROUP_USE_FOR_DENY_ONLY or SE_GROUP_LOGON_ID or \
                                                        SE_GROUP_RESOURCE or SE_GROUP_INTEGRITY)

ACL_REVISION                                    equ     2
ACL_REVISION1                                   equ     1
ACL_REVISION2                                   equ     2
ACL_REVISION3                                   equ     3
ACL_REVISION4                                   equ     4
ACL_REVISION_DS                                 equ     4

MIN_ACL_REVISION                                equ     ACL_REVISION2
MAX_ACL_REVISION                                equ     ACL_REVISION4

ACCESS_MIN_MS_ACE_TYPE                          equ     00H
ACCESS_ALLOWED_ACE_TYPE                         equ     00H
ACCESS_DENIED_ACE_TYPE                          equ     01H
SYSTEM_AUDIT_ACE_TYPE                           equ     02H
SYSTEM_ALARM_ACE_TYPE                           equ     03H
ACCESS_MAX_MS_V2_ACE_TYPE                       equ     03H

ACCESS_ALLOWED_COMPOUND_ACE_TYPE                equ     04H
ACCESS_MAX_MS_V3_ACE_TYPE                       equ     04H

ACCESS_MIN_MS_OBJECT_ACE_TYPE                   equ     05H
ACCESS_ALLOWED_OBJECT_ACE_TYPE                  equ     05H
ACCESS_DENIED_OBJECT_ACE_TYPE                   equ     06H
SYSTEM_AUDIT_OBJECT_ACE_TYPE                    equ     07H
SYSTEM_ALARM_OBJECT_ACE_TYPE                    equ     08H
ACCESS_MAX_MS_OBJECT_ACE_TYPE                   equ     08H

ACCESS_MAX_MS_V4_ACE_TYPE                       equ     08H
ACCESS_MAX_MS_ACE_TYPE                          equ     08H
ACCESS_ALLOWED_CALLBACK_ACE_TYPE                equ     09H
ACCESS_DENIED_CALLBACK_ACE_TYPE                 equ     0AH
ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE         equ     0BH
ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE          equ     0CH
SYSTEM_AUDIT_CALLBACK_ACE_TYPE                  equ     0DH
SYSTEM_ALARM_CALLBACK_ACE_TYPE                  equ     0EH
SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE           equ     0FH
SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE           equ     010H

SYSTEM_MANDATORY_LABEL_ACE_TYPE                 equ     011H
SYSTEM_RESOURCE_ATTRIBUTE_ACE_TYPE              equ     012H
SYSTEM_SCOPED_POLICY_ID_ACE_TYPE                equ     013H
SYSTEM_PROCESS_TRUST_LABEL_ACE_TYPE             equ     014H
ACCESS_MAX_MS_V5_ACE_TYPE                       equ     014H

SYSTEM_MANDATORY_LABEL_NO_WRITE_UP              equ     01H
SYSTEM_MANDATORY_LABEL_NO_READ_UP               equ     02H
SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP            equ     04H

SYSTEM_MANDATORY_LABEL_VALID_MASK               equ     (SYSTEM_MANDATORY_LABEL_NO_WRITE_UP or \
                                                        SYSTEM_MANDATORY_LABEL_NO_READ_UP or \
                                                        SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP)

OBJECT_INHERIT_ACE                              equ     01H
CONTAINER_INHERIT_ACE                           equ     02H
NO_PROPAGATE_INHERIT_ACE                        equ     04H
INHERIT_ONLY_ACE                                equ     08H
INHERITED_ACE                                   equ     010H
VALID_INHERIT_FLAGS                             equ     01FH

SUCCESSFUL_ACCESS_ACE_FLAG                      equ     040H
FAILED_ACCESS_ACE_FLAG                          equ     080H

ACE_OBJECT_TYPE_PRESENT                         equ     01H
ACE_INHERITED_OBJECT_TYPE_PRESENT               equ     02H

SECURITY_DESCRIPTOR_REVISION                    equ     1
SECURITY_DESCRIPTOR_REVISION1                   equ     1

SECURITY_DESCRIPTOR_MIN_LENGTH                  equ     SIZEOF SECURITY_DESCRIPTOR

SE_OWNER_DEFAULTED                              equ     00001H
SE_GROUP_DEFAULTED                              equ     00002H
SE_DACL_PRESENT                                 equ     00004H
SE_DACL_DEFAULTED                               equ     00008H
SE_SACL_PRESENT                                 equ     00010H
SE_SACL_DEFAULTED                               equ     00020H
SE_DACL_AUTO_INHERIT_REQ                        equ     00100H
SE_SACL_AUTO_INHERIT_REQ                        equ     00200H
SE_DACL_AUTO_INHERITED                          equ     00400H
SE_SACL_AUTO_INHERITED                          equ     00800H
SE_DACL_PROTECTED                               equ     01000H
SE_SACL_PROTECTED                               equ     02000H
SE_RM_CONTROL_VALID                             equ     04000H
SE_SELF_RELATIVE                                equ     08000H

ACCESS_OBJECT_GUID                              equ     0
ACCESS_PROPERTY_SET_GUID                        equ     1
ACCESS_PROPERTY_GUID                            equ     2
ACCESS_MAX_LEVEL                                equ     4

AUDIT_ALLOW_NO_PRIVILEGE                        equ     01H

ACCESS_DS_SOURCE_A                              equ     <DS>
ACCESS_DS_SOURCE_W                              equ     L("DS")
ACCESS_DS_OBJECT_TYPE_NAME_A                    equ     <Directory Service Object>
ACCESS_DS_OBJECT_TYPE_NAME_W                    equ     L("Directory Service Object")

SE_PRIVILEGE_ENABLED_BY_DEFAULT                 equ     000000001H
SE_PRIVILEGE_ENABLED                            equ     000000002H
SE_PRIVILEGE_REMOVED                            equ     000000004H
SE_PRIVILEGE_USED_FOR_ACCESS                    equ     080000000H

SE_PRIVILEGE_VALID_ATTRIBUTES                   equ     (SE_PRIVILEGE_ENABLED_BY_DEFAULT or SE_PRIVILEGE_ENABLED or \
                                                        SE_PRIVILEGE_REMOVED or SE_PRIVILEGE_USED_FOR_ACCESS)

PRIVILEGE_SET_ALL_NECESSARY                     equ     1

SE_CREATE_TOKEN_NAME                            equ     TEXT("SeCreateTokenPrivilege")
SE_ASSIGNPRIMARYTOKEN_NAME                      equ     TEXT("SeAssignPrimaryTokenPrivilege")
SE_LOCK_MEMORY_NAME                             equ     TEXT("SeLockMemoryPrivilege")
SE_INCREASE_QUOTA_NAME                          equ     TEXT("SeIncreaseQuotaPrivilege")
SE_UNSOLICITED_INPUT_NAME                       equ     TEXT("SeUnsolicitedInputPrivilege")
SE_MACHINE_ACCOUNT_NAME                         equ     TEXT("SeMachineAccountPrivilege")
SE_TCB_NAME                                     equ     TEXT("SeTcbPrivilege")
SE_SECURITY_NAME                                equ     TEXT("SeSecurityPrivilege")
SE_TAKE_OWNERSHIP_NAME                          equ     TEXT("SeTakeOwnershipPrivilege")
SE_LOAD_DRIVER_NAME                             equ     TEXT("SeLoadDriverPrivilege")
SE_SYSTEM_PROFILE_NAME                          equ     TEXT("SeSystemProfilePrivilege")
SE_SYSTEMTIME_NAME                              equ     TEXT("SeSystemtimePrivilege")
SE_PROF_SINGLE_PROCESS_NAME                     equ     TEXT("SeProfileSingleProcessPrivilege")
SE_INC_BASE_PRIORITY_NAME                       equ     TEXT("SeIncreaseBasePriorityPrivilege")
SE_CREATE_PAGEFILE_NAME                         equ     TEXT("SeCreatePagefilePrivilege")
SE_CREATE_PERMANENT_NAME                        equ     TEXT("SeCreatePermanentPrivilege")
SE_BACKUP_NAME                                  equ     TEXT("SeBackupPrivilege")
SE_RESTORE_NAME                                 equ     TEXT("SeRestorePrivilege")
SE_SHUTDOWN_NAME                                equ     TEXT("SeShutdownPrivilege")
SE_DEBUG_NAME                                   equ     TEXT("SeDebugPrivilege")
SE_AUDIT_NAME                                   equ     TEXT("SeAuditPrivilege")
SE_SYSTEM_ENVIRONMENT_NAME                      equ     TEXT("SeSystemEnvironmentPrivilege")
SE_CHANGE_NOTIFY_NAME                           equ     TEXT("SeChangeNotifyPrivilege")
SE_REMOTE_SHUTDOWN_NAME                         equ     TEXT("SeRemoteShutdownPrivilege")
SE_UNDOCK_NAME                                  equ     TEXT("SeUndockPrivilege")
SE_SYNC_AGENT_NAME                              equ     TEXT("SeSyncAgentPrivilege")
SE_ENABLE_DELEGATION_NAME                       equ     TEXT("SeEnableDelegationPrivilege")
SE_MANAGE_VOLUME_NAME                           equ     TEXT("SeManageVolumePrivilege")
SE_IMPERSONATE_NAME                             equ     TEXT("SeImpersonatePrivilege")
SE_CREATE_GLOBAL_NAME                           equ     TEXT("SeCreateGlobalPrivilege")
SE_TRUSTED_CREDMAN_ACCESS_NAME                  equ     TEXT("SeTrustedCredManAccessPrivilege")
SE_RELABEL_NAME                                 equ     TEXT("SeRelabelPrivilege")
SE_INC_WORKING_SET_NAME                         equ     TEXT("SeIncreaseWorkingSetPrivilege")
SE_TIME_ZONE_NAME                               equ     TEXT("SeTimeZonePrivilege")
SE_CREATE_SYMBOLIC_LINK_NAME                    equ     TEXT("SeCreateSymbolicLinkPrivilege")

TOKEN_ASSIGN_PRIMARY                            equ     00001H
TOKEN_DUPLICATE                                 equ     00002H
TOKEN_IMPERSONATE                               equ     00004H
TOKEN_QUERY                                     equ     00008H
TOKEN_QUERY_SOURCE                              equ     00010H
TOKEN_ADJUST_PRIVILEGES                         equ     00020H
TOKEN_ADJUST_GROUPS                             equ     00040H
TOKEN_ADJUST_DEFAULT                            equ     00080H
TOKEN_ADJUST_SESSIONID                          equ     00100H

TOKEN_ALL_ACCESS_P                              equ     (STANDARD_RIGHTS_REQUIRED or TOKEN_ASSIGN_PRIMARY or \
                                                        TOKEN_DUPLICATE or TOKEN_IMPERSONATE or TOKEN_QUERY or \
                                                        TOKEN_ADJUST_PRIVILEGES or TOKEN_ADJUST_GROUPS or \
                                                        TOKEN_ADJUST_DEFAULT)

if defined APP_WIN64
    TOKEN_ALL_ACCESS                            equ     TOKEN_ALL_ACCESS_P
else
    TOKEN_ALL_ACCESS                            equ     (TOKEN_ALL_ACCESS_P or TOKEN_ADJUST_SESSIONID)
end if

TOKEN_READ                                      equ     (STANDARD_RIGHTS_READ or TOKEN_QUERY)
TOKEN_WRITE                                     equ     (STANDARD_RIGHTS_WRITE or TOKEN_ADJUST_PRIVILEGES or \
                                                        TOKEN_ADJUST_GROUPS or TOKEN_ADJUST_DEFAULT)
TOKEN_EXECUTE                                   equ     STANDARD_RIGHTS_EXECUTE
TOKEN_TRUST_CONSTRAINT_MASK                     equ     (STANDARD_RIGHTS_READ or TOKEN_QUERY or TOKEN_QUERY_SOURCE)

POLICY_AUDIT_SUBCATEGORY_COUNT                  equ     56

TOKEN_SOURCE_LENGTH                             equ     8

TOKEN_MANDATORY_POLICY_OFF                      equ     00H
TOKEN_MANDATORY_POLICY_NO_WRITE_UP              equ     01H
TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN          equ     02H
TOKEN_MANDATORY_POLICY_VALID_MASK               equ     (TOKEN_MANDATORY_POLICY_NO_WRITE_UP or TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN)

SECURITY_DYNAMIC_TRACKING                       equ     TRUE
SECURITY_STATIC_TRACKING                        equ     FALSE
TYPEDEF                                         SECURITY_CONTEXT_TRACKING_MODE, db
TYPEDEF                                         PSECURITY_CONTEXT_TRACKING_MODE, xptr

DISABLE_MAX_PRIVILEGE                           equ     01H
SANDBOX_INERT                                   equ     02H
LUA_TOKEN                                       equ     04H
WRITE_RESTRICTED                                equ     08H

OWNER_SECURITY_INFORMATION                      equ     000000001H
GROUP_SECURITY_INFORMATION                      equ     000000002H
DACL_SECURITY_INFORMATION                       equ     000000004H
SACL_SECURITY_INFORMATION                       equ     000000008H
LABEL_SECURITY_INFORMATION                      equ     000000010H
ATTRIBUTE_SECURITY_INFORMATION                  equ     000000020H
SCOPE_SECURITY_INFORMATION                      equ     000000040H
PROCESS_TRUST_LABEL_SECURITY_INFORMATION        equ     000000080H
BACKUP_SECURITY_INFORMATION                     equ     000010000H

PROTECTED_DACL_SECURITY_INFORMATION             equ     080000000H
PROTECTED_SACL_SECURITY_INFORMATION             equ     040000000H
UNPROTECTED_DACL_SECURITY_INFORMATION           equ     020000000H
UNPROTECTED_SACL_SECURITY_INFORMATION           equ     010000000H

PROCESS_TERMINATE                               equ     00001H
PROCESS_CREATE_THREAD                           equ     00002H
PROCESS_SET_SESSIONID                           equ     00004H
PROCESS_VM_OPERATION                            equ     00008H
PROCESS_VM_READ                                 equ     00010H
PROCESS_VM_WRITE                                equ     00020H
PROCESS_DUP_HANDLE                              equ     00040H
PROCESS_CREATE_PROCESS                          equ     00080H
PROCESS_SET_QUOTA                               equ     00100H
PROCESS_SET_INFORMATION                         equ     00200H
PROCESS_QUERY_INFORMATION                       equ     00400H
PROCESS_SUSPEND_RESUME                          equ     00800H
PROCESS_QUERY_LIMITED_INFORMATION               equ     01000H
PROCESS_SET_LIMITED_INFORMATION                 equ     02000H

if (NTDDI_VERSION < NTDDI_VISTA)
    PROCESS_ALL_ACCESS                          equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 0FFFH)
else
    PROCESS_ALL_ACCESS                          equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 0FFFFH)
end if

if defined APP_WIN64
    MAXIMUM_PROCESSORS                          equ     64
else
    MAXIMUM_PROCESSORS                          equ     32
end if

THREAD_TERMINATE                                equ     00001H
THREAD_SUSPEND_RESUME                           equ     00002H
THREAD_GET_CONTEXT                              equ     00008H
THREAD_SET_CONTEXT                              equ     00010H
THREAD_QUERY_INFORMATION                        equ     00040H
THREAD_SET_INFORMATION                          equ     00020H
THREAD_SET_THREAD_TOKEN                         equ     00080H
THREAD_IMPERSONATE                              equ     00100H
THREAD_DIRECT_IMPERSONATION                     equ     00200H
THREAD_SET_LIMITED_INFORMATION                  equ     00400H
THREAD_QUERY_LIMITED_INFORMATION                equ     00800H
THREAD_RESUME                                   equ     01000H

if (NTDDI_VERSION < NTDDI_VISTA)
    THREAD_ALL_ACCESS                           equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 03FFH)
else
    THREAD_ALL_ACCESS                           equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 0FFFFH)
end if

JOB_OBJECT_ASSIGN_PROCESS                       equ     00001H
JOB_OBJECT_SET_ATTRIBUTES                       equ     00002H
JOB_OBJECT_QUERY                                equ     00004H
JOB_OBJECT_TERMINATE                            equ     00008H
JOB_OBJECT_SET_SECURITY_ATTRIBUTES              equ     00010H
JOB_OBJECT_ALL_ACCESS                           equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 01FH)

FLS_MAXIMUM_AVAILABLE                           equ     128
TLS_MINIMUM_AVAILABLE                           equ     64

THREAD_BASE_PRIORITY_LOWRT                      equ     15
THREAD_BASE_PRIORITY_MAX                        equ     2
THREAD_BASE_PRIORITY_MIN                        equ     (-2)
THREAD_BASE_PRIORITY_IDLE                       equ     (-15)

JOB_OBJECT_TERMINATE_AT_END_OF_JOB              equ     0
JOB_OBJECT_POST_AT_END_OF_JOB                   equ     1

JOB_OBJECT_MSG_END_OF_JOB_TIME                  equ     1
JOB_OBJECT_MSG_END_OF_PROCESS_TIME              equ     2
JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT             equ     3
JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO              equ     4
JOB_OBJECT_MSG_NEW_PROCESS                      equ     6
JOB_OBJECT_MSG_EXIT_PROCESS                     equ     7
JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS            equ     8
JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT             equ     9
JOB_OBJECT_MSG_JOB_MEMORY_LIMIT                 equ     10
JOB_OBJECT_MSG_NOTIFICATION_LIMIT               equ     11
JOB_OBJECT_MSG_JOB_CYCLE_TIME_LIMIT             equ     12

JOB_OBJECT_MSG_MINIMUM                          equ     1
JOB_OBJECT_MSG_MAXIMUM                          equ     12
JOB_OBJECT_VALID_COMPLETION_FILTER              equ     (((1 shl (JOB_OBJECT_MSG_MAXIMUM + 1))) - 1) - ((1 shl JOB_OBJECT_MSG_MINIMUM) - 1)

OB_OBJECT_LIMIT_WORKINGSET                     equ     000000001H
JOB_OBJECT_LIMIT_PROCESS_TIME                   equ     000000002H
JOB_OBJECT_LIMIT_JOB_TIME                       equ     000000004H
JOB_OBJECT_LIMIT_ACTIVE_PROCESS                 equ     000000008H
JOB_OBJECT_LIMIT_AFFINITY                       equ     000000010H
JOB_OBJECT_LIMIT_PRIORITY_CLASS                 equ     000000020H
JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME              equ     000000040H
JOB_OBJECT_LIMIT_SCHEDULING_CLASS               equ     000000080H

JOB_OBJECT_LIMIT_PROCESS_MEMORY                 equ     000000100H
JOB_OBJECT_LIMIT_JOB_MEMORY                     equ     000000200H
JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION     equ     000000400H
JOB_OBJECT_LIMIT_BREAKAWAY_OK                   equ     000000800H
JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK            equ     000001000H
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE              equ     000002000H
JOB_OBJECT_LIMIT_SUBSET_AFFINITY                equ     000004000H
JOB_OBJECT_LIMIT_RESERVED3                      equ     000008000H
JOB_OBJECT_LIMIT_RESERVED4                      equ     000010000H
JOB_OBJECT_LIMIT_RESERVED5                      equ     000020000H
JOB_OBJECT_LIMIT_RESERVED6                      equ     000040000H

JOB_OBJECT_LIMIT_JOB_READ_BYTES                 equ     000010000H
JOB_OBJECT_LIMIT_JOB_WRITE_BYTES                equ     000020000H
JOB_OBJECT_LIMIT_RATE_CONTROL                   equ     000040000H

JOB_OBJECT_LIMIT_VALID_FLAGS                    equ     00007FFFFH

JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS              equ     0000000FFH
JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS           equ     000007FFFH
JOB_OBJECT_NOTIFICATION_LIMIT_VALID_FLAGS       equ     000070204H
JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS           equ     00007FFFFH

JOB_OBJECT_UILIMIT_NONE                         equ     000000000H
JOB_OBJECT_UILIMIT_HANDLES                      equ     000000001H
JOB_OBJECT_UILIMIT_READCLIPBOARD                equ     000000002H
JOB_OBJECT_UILIMIT_WRITECLIPBOARD               equ     000000004H
JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS             equ     000000008H
JOB_OBJECT_UILIMIT_DISPLAYSETTINGS              equ     000000010H
JOB_OBJECT_UILIMIT_GLOBALATOMS                  equ     000000020H
JOB_OBJECT_UILIMIT_DESKTOP                      equ     000000040H
JOB_OBJECT_UILIMIT_EXITWINDOWS                  equ     000000080H
JOB_OBJECT_UILIMIT_ALL                          equ     0000000FFH

JOB_OBJECT_UI_VALID_FLAGS                       equ     0000000FFH

JOB_OBJECT_SECURITY_NO_ADMIN                    equ     000000001H
JOB_OBJECT_SECURITY_RESTRICTED_TOKEN            equ     000000002H
JOB_OBJECT_SECURITY_ONLY_TOKEN                  equ     000000004H
JOB_OBJECT_SECURITY_FILTER_TOKENS               equ     000000008H
JOB_OBJECT_SECURITY_VALID_FLAGS                 equ     00000000FH

EVENT_MODIFY_STATE                              equ     00002H
EVENT_ALL_ACCESS                                equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 03H)
MUTANT_QUERY_STATE                              equ     00001H
MUTANT_ALL_ACCESS                               equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or MUTANT_QUERY_STATE)
SEMAPHORE_MODIFY_STATE                          equ     00002H
SEMAPHORE_ALL_ACCESS                            equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 03H)

TIMER_QUERY_STATE                               equ     00001H
TIMER_MODIFY_STATE                              equ     00002H
TIMER_ALL_ACCESS                                equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or TIMER_QUERY_STATE or TIMER_MODIFY_STATE)

TIME_ZONE_ID_UNKNOWN                            equ     0
TIME_ZONE_ID_STANDARD                           equ     1
TIME_ZONE_ID_DAYLIGHT                           equ     2

PROCESSOR_INTEL_386                             equ     386
PROCESSOR_INTEL_486                             equ     486
PROCESSOR_INTEL_PENTIUM                         equ     586
PROCESSOR_INTEL_IA64                            equ     2200
PROCESSOR_AMD_X8664                             equ     8664
PROCESSOR_MIPS_R4000                            equ     4000
PROCESSOR_ALPHA_21064                           equ     21064
PROCESSOR_PPC_601                               equ     601
PROCESSOR_PPC_603                               equ     603
PROCESSOR_PPC_604                               equ     604
PROCESSOR_PPC_620                               equ     620
PROCESSOR_HITACHI_SH3                           equ     10003
PROCESSOR_HITACHI_SH3E                          equ     10004
PROCESSOR_HITACHI_SH4                           equ     10005
PROCESSOR_MOTOROLA_821                          equ     821
PROCESSOR_SHx_SH3                               equ     103
PROCESSOR_SHx_SH4                               equ     104
PROCESSOR_STRONGARM                             equ     2577
PROCESSOR_ARM720                                equ     1824
PROCESSOR_ARM820                                equ     2080
PROCESSOR_ARM920                                equ     2336
PROCESSOR_ARM_7TDMI                             equ     70001
PROCESSOR_OPTIL                                 equ     0494FH

PROCESSOR_ARCHITECTURE_INTEL                    equ     0
PROCESSOR_ARCHITECTURE_MIPS                     equ     1
PROCESSOR_ARCHITECTURE_ALPHA                    equ     2
PROCESSOR_ARCHITECTURE_PPC                      equ     3
PROCESSOR_ARCHITECTURE_SHX                      equ     4
PROCESSOR_ARCHITECTURE_ARM                      equ     5
PROCESSOR_ARCHITECTURE_IA64                     equ     6
PROCESSOR_ARCHITECTURE_ALPHA64                  equ     7
PROCESSOR_ARCHITECTURE_MSIL                     equ     8
PROCESSOR_ARCHITECTURE_AMD64                    equ     9
PROCESSOR_ARCHITECTURE_IA32_ON_WIN64            equ     10

PROCESSOR_ARCHITECTURE_NEUTRAL                  equ     11
PROCESSOR_ARCHITECTURE_UNKNOWN                  equ     0FFFFH

PF_FLOATING_POINT_PRECISION_ERRATA              equ     0
PF_FLOATING_POINT_EMULATED                      equ     1
PF_COMPARE_EXCHANGE_DOUBLE                      equ     2
PF_MMX_INSTRUCTIONS_AVAILABLE                   equ     3
PF_PPC_MOVEMEM_64BIT_OK                         equ     4
PF_ALPHA_BYTE_INSTRUCTIONS                      equ     5
PF_XMMI_INSTRUCTIONS_AVAILABLE                  equ     6
PF_3DNOW_INSTRUCTIONS_AVAILABLE                 equ     7
PF_RDTSC_INSTRUCTION_AVAILABLE                  equ     8
PF_PAE_ENABLED                                  equ     9
PF_XMMI64_INSTRUCTIONS_AVAILABLE                equ     10
PF_SSE_DAZ_MODE_AVAILABLE                       equ     11
PF_NX_ENABLED                                   equ     12
PF_SSE3_INSTRUCTIONS_AVAILABLE                  equ     13
PF_COMPARE_EXCHANGE128                          equ     14
PF_COMPARE64_EXCHANGE128                        equ     15
PF_CHANNELS_ENABLED                             equ     16
PF_XSAVE_ENABLED                                equ     17
PF_ARM_VFP_32_REGISTERS_AVAILABLE               equ     18
PF_ARM_NEON_INSTRUCTIONS_AVAILABLE              equ     19
PF_SECOND_LEVEL_ADDRESS_TRANSLATION             equ     20
PF_VIRT_FIRMWARE_ENABLED                        equ     21
PF_RDWRFSGSBASE_AVAILABLE                       equ     22
PF_FASTFAIL_AVAILABLE                           equ     23
PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE             equ     24
PF_ARM_64BIT_LOADSTORE_ATOMIC                   equ     25
PF_ARM_EXTERNAL_CACHE_AVAILABLE                 equ     26
PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE              equ     27
PF_RDRAND_INSTRUCTION_AVAILABLE                 equ     28

SECTION_QUERY                                   equ     00001H
SECTION_MAP_WRITE                               equ     00002H
SECTION_MAP_READ                                equ     00004H
SECTION_MAP_EXECUTE                             equ     00008H
SECTION_EXTEND_SIZE                             equ     00010H
SECTION_MAP_EXECUTE_EXPLICIT                    equ     00020H
SECTION_ALL_ACCESS                              equ     (STANDARD_RIGHTS_REQUIRED or SECTION_QUERY or SECTION_MAP_WRITE or \
                                                        SECTION_MAP_READ or SECTION_MAP_EXECUTE or SECTION_EXTEND_SIZE)

SESSION_QUERY_ACCESS                            equ     00001H
SESSION_MODIFY_ACCESS                           equ     00002H
SESSION_ALL_ACCESS                              equ     (STANDARD_RIGHTS_REQUIRED or SESSION_QUERY_ACCESS or SESSION_MODIFY_ACCESS)

PAGE_NOACCESS                                   equ     001H
PAGE_READONLY                                   equ     002H
PAGE_READWRITE                                  equ     004H
PAGE_WRITECOPY                                  equ     008H
PAGE_EXECUTE                                    equ     010H
PAGE_EXECUTE_READ                               equ     020H
PAGE_EXECUTE_READWRITE                          equ     040H
PAGE_EXECUTE_WRITECOPY                          equ     080H

PAGE_GUARD                                      equ     0100H
PAGE_NOCACHE                                    equ     0200H
PAGE_WRITECOMBINE                               equ     0400H
PAGE_REVERT_TO_FILE_MAP                         equ     080000000H

MEM_COMMIT                                      equ     01000H
MEM_RESERVE                                     equ     02000H
MEM_DECOMMIT                                    equ     04000H
MEM_RELEASE                                     equ     08000H
MEM_FREE                                        equ     010000H
MEM_PRIVATE                                     equ     020000H
MEM_MAPPED                                      equ     040000H
MEM_RESET                                       equ     080000H
MEM_TOP_DOWN                                    equ     0100000H
MEM_WRITE_WATCH                                 equ     0200000H
MEM_PHYSICAL                                    equ     0400000H
MEM_ROTATE                                      equ     0800000H
MEM_DIFFERENT_IMAGE_BASE_OK                     equ     0800000H
MEM_RESET_UNDO                                  equ     01000000H
MEM_LARGE_PAGES                                 equ     020000000H
MEM_4MB_PAGES                                   equ     080000000H

SEC_IMAGE                                       equ     01000000H
MEM_IMAGE                                       equ     SEC_IMAGE

WRITE_WATCH_FLAG_RESET                          equ     001H

FILE_READ_DATA                                  equ     00001H
FILE_LIST_DIRECTORY                             equ     00001H
FILE_WRITE_DATA                                 equ     00002H
FILE_ADD_FILE                                   equ     00002H

FILE_APPEND_DATA                                equ     00004H
FILE_ADD_SUBDIRECTORY                           equ     00004H
FILE_CREATE_PIPE_INSTANCE                       equ     00004H
FILE_READ_EA                                    equ     00008H
FILE_WRITE_EA                                   equ     00010H
FILE_EXECUTE                                    equ     00020H
FILE_TRAVERSE                                   equ     00020H
FILE_DELETE_CHILD                               equ     00040H
FILE_READ_ATTRIBUTES                            equ     00080H
FILE_WRITE_ATTRIBUTES                           equ     00100H

FILE_ALL_ACCESS                                 equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 01FFH)
FILE_GENERIC_READ                               equ     (STANDARD_RIGHTS_READ or FILE_READ_DATA or FILE_READ_ATTRIBUTES or \
                                                        FILE_READ_EA or SYNCHRONIZE)
FILE_GENERIC_WRITE                              equ     (STANDARD_RIGHTS_WRITE or FILE_WRITE_DATA or \
                                                        FILE_WRITE_ATTRIBUTES or FILE_WRITE_EA or \
                                                        FILE_APPEND_DATA or SYNCHRONIZE)
FILE_GENERIC_EXECUTE                            equ     (STANDARD_RIGHTS_EXECUTE or FILE_READ_ATTRIBUTES or \
                                                        FILE_EXECUTE or SYNCHRONIZE)

FILE_SHARE_READ                                 equ     000000001H
FILE_SHARE_WRITE                                equ     000000002H
FILE_SHARE_DELETE                               equ     000000004H

FILE_ATTRIBUTE_READONLY                         equ     000000001H
FILE_ATTRIBUTE_HIDDEN                           equ     000000002H
FILE_ATTRIBUTE_SYSTEM                           equ     000000004H
FILE_ATTRIBUTE_DIRECTORY                        equ     000000010H
FILE_ATTRIBUTE_ARCHIVE                          equ     000000020H
FILE_ATTRIBUTE_DEVICE                           equ     000000040H
FILE_ATTRIBUTE_NORMAL                           equ     000000080H
FILE_ATTRIBUTE_TEMPORARY                        equ     000000100H
FILE_ATTRIBUTE_SPARSE_FILE                      equ     000000200H
FILE_ATTRIBUTE_REPARSE_POINT                    equ     000000400H
FILE_ATTRIBUTE_COMPRESSED                       equ     000000800H
FILE_ATTRIBUTE_OFFLINE                          equ     000001000H
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED              equ     000002000H
FILE_ATTRIBUTE_ENCRYPTED                        equ     000004000H
FILE_ATTRIBUTE_INTEGRITY_STREAM                 equ     000008000H
FILE_ATTRIBUTE_VIRTUAL                          equ     000010000H
FILE_ATTRIBUTE_NO_SCRUB_DATA                    equ     000020000H
FILE_ATTRIBUTE_EA                               equ     000040000H

FILE_NOTIFY_CHANGE_FILE_NAME                    equ     000000001H
FILE_NOTIFY_CHANGE_DIR_NAME                     equ     000000002H
FILE_NOTIFY_CHANGE_ATTRIBUTES                   equ     000000004H
FILE_NOTIFY_CHANGE_SIZE                         equ     000000008H
FILE_NOTIFY_CHANGE_LAST_WRITE                   equ     000000010H
FILE_NOTIFY_CHANGE_LAST_ACCESS                  equ     000000020H
FILE_NOTIFY_CHANGE_CREATION                     equ     000000040H
FILE_NOTIFY_CHANGE_SECURITY                     equ     000000100H

FILE_ACTION_ADDED                               equ     000000001H
FILE_ACTION_REMOVED                             equ     000000002H
FILE_ACTION_MODIFIED                            equ     000000003H
FILE_ACTION_RENAMED_OLD_NAME                    equ     000000004H
FILE_ACTION_RENAMED_NEW_NAME                    equ     000000005H

FILE_CASE_SENSITIVE_SEARCH                      equ     000000001H
FILE_CASE_PRESERVED_NAMES                       equ     000000002H
FILE_UNICODE_ON_DISK                            equ     000000004H
FILE_PERSISTENT_ACLS                            equ     000000008H
FILE_FILE_COMPRESSION                           equ     000000010H
FILE_VOLUME_QUOTAS                              equ     000000020H
FILE_SUPPORTS_SPARSE_FILES                      equ     000000040H
FILE_SUPPORTS_REPARSE_POINTS                    equ     000000080H
FILE_SUPPORTS_REMOTE_STORAGE                    equ     000000100H
FILE_VOLUME_IS_COMPRESSED                       equ     000008000H
FILE_SUPPORTS_OBJECT_IDS                        equ     000010000H
FILE_SUPPORTS_ENCRYPTION                        equ     000020000H
FILE_NAMED_STREAMS                              equ     000040000H
FILE_READ_ONLY_VOLUME                           equ     000080000H
FILE_SEQUENTIAL_WRITE_ONCE                      equ     000100000H
FILE_SUPPORTS_TRANSACTIONS                      equ     000200000H
FILE_SUPPORTS_HARD_LINKS                        equ     000400000H
FILE_SUPPORTS_EXTENDED_ATTRIBUTES               equ     000800000H
FILE_SUPPORTS_OPEN_BY_FILE_ID                   equ     001000000H
FILE_SUPPORTS_USN_JOURNAL                       equ     002000000H
FILE_SUPPORTS_INTEGRITY_STREAMS                 equ     004000000H
FILE_INVALID_FILE_ID                            equ     (-1)

MAILSLOT_NO_MESSAGE                             equ     (-1)
MAILSLOT_WAIT_FOREVER                           equ     (-1)

MAXIMUM_REPARSE_DATA_BUFFER_SIZE                equ     (16 * 1024)

IO_REPARSE_TAG_RESERVED_ZERO                    equ     0
IO_REPARSE_TAG_RESERVED_ONE                     equ     1
IO_REPARSE_TAG_RESERVED_RANGE                   equ     IO_REPARSE_TAG_RESERVED_ONE

IO_REPARSE_TAG_MOUNT_POINT                      equ     0A0000003H
IO_REPARSE_TAG_HSM                              equ     0C0000004H
IO_REPARSE_TAG_HSM2                             equ     080000006H
IO_REPARSE_TAG_SIS                              equ     080000007H
IO_REPARSE_TAG_WIM                              equ     080000008H
IO_REPARSE_TAG_CSV                              equ     080000009H
IO_REPARSE_TAG_DFS                              equ     08000000AH
IO_REPARSE_TAG_SYMLINK                          equ     0A000000CH
IO_REPARSE_TAG_DFSR                             equ     080000012H
IO_REPARSE_TAG_DEDUP                            equ     080000013H
IO_REPARSE_TAG_NFS                              equ     080000014H
IO_REPARSE_TAG_FILE_PLACEHOLDER                 equ     080000015H
IO_REPARSE_TAG_WOF                              equ     080000017H

IO_COMPLETION_MODIFY_STATE                      equ     00002H
IO_COMPLETION_ALL_ACCESS                        equ     (STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 03H)

DUPLICATE_CLOSE_SOURCE                          equ     000000001H
DUPLICATE_SAME_ACCESS                           equ     000000002H

POWER_SYSTEM_MAXIMUM                            equ     7

ES_SYSTEM_REQUIRED                              equ     000000001H
ES_DISPLAY_REQUIRED                             equ     000000002H
ES_USER_PRESENT                                 equ     000000004H
ES_AWAYMODE_REQUIRED                            equ     000000040H
ES_CONTINUOUS                                   equ     080000000H

IMAGE_DOS_SIGNATURE                             equ     05A4DH
IMAGE_OS2_SIGNATURE                             equ     0454EH
IMAGE_OS2_SIGNATURE_LE                          equ     0454CH
IMAGE_VXD_SIGNATURE                             equ     0454CH
IMAGE_NT_SIGNATURE                              equ     000004550H

IMAGE_SIZEOF_FILE_HEADER                        equ     20

IMAGE_FILE_RELOCS_STRIPPED                      equ     00001H
IMAGE_FILE_EXECUTABLE_IMAGE                     equ     00002H
IMAGE_FILE_LINE_NUMS_STRIPPED                   equ     00004H
IMAGE_FILE_LOCAL_SYMS_STRIPPED                  equ     00008H
IMAGE_FILE_AGGRESIVE_WS_TRIM                    equ     00010H
IMAGE_FILE_LARGE_ADDRESS_AWARE                  equ     00020H
IMAGE_FILE_BYTES_REVERSED_LO                    equ     00080H
IMAGE_FILE_32BIT_MACHINE                        equ     00100H
IMAGE_FILE_DEBUG_STRIPPED                       equ     00200H
IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP              equ     00400H
IMAGE_FILE_NET_RUN_FROM_SWAP                    equ     00800H
IMAGE_FILE_SYSTEM                               equ     01000H
IMAGE_FILE_DLL                                  equ     02000H
IMAGE_FILE_UP_SYSTEM_ONLY                       equ     04000H
IMAGE_FILE_BYTES_REVERSED_HI                    equ     08000H

IMAGE_FILE_MACHINE_UNKNOWN                      equ     0
IMAGE_FILE_MACHINE_I386                         equ     014cH
IMAGE_FILE_MACHINE_R3000                        equ     0162H
IMAGE_FILE_MACHINE_R4000                        equ     0166H
IMAGE_FILE_MACHINE_R10000                       equ     0168H
IMAGE_FILE_MACHINE_WCEMIPSV2                    equ     0169H
IMAGE_FILE_MACHINE_ALPHA                        equ     0184H
IMAGE_FILE_MACHINE_POWERPC                      equ     01F0H
IMAGE_FILE_MACHINE_SH3                          equ     01a2H
IMAGE_FILE_MACHINE_SH3E                         equ     01a4H
IMAGE_FILE_MACHINE_SH4                          equ     01a6H
IMAGE_FILE_MACHINE_ARM                          equ     01c0H
IMAGE_FILE_MACHINE_THUMB                        equ     01c2H
IMAGE_FILE_MACHINE_IA64                         equ     0200H
IMAGE_FILE_MACHINE_MIPS16                       equ     0266H
IMAGE_FILE_MACHINE_MIPSFPU                      equ     0366H
IMAGE_FILE_MACHINE_MIPSFPU16                    equ     0466H
IMAGE_FILE_MACHINE_ALPHA64                      equ     0284H
IMAGE_FILE_MACHINE_AXP64                        equ     IMAGE_FILE_MACHINE_ALPHA64
IMAGE_FILE_MACHINE_CEF                          equ     0C0EFH
IMAGE_FILE_MACHINE_EBC                          equ     0EBCH
IMAGE_FILE_MACHINE_AMD64                        equ     8664H
IMAGE_FILE_MACHINE_M32R                         equ     9041H
IMAGE_FILE_MACHINE_CEE                          equ     0C0EEH

IMAGE_SIZEOF_ROM_OPTIONAL_HEADER                equ     56
IMAGE_SIZEOF_STD_OPTIONAL_HEADER                equ     28
IMAGE_SIZEOF_NT_OPTIONAL32_HEADER               equ     224
IMAGE_SIZEOF_NT_OPTIONAL64_HEADER               equ     240

IMAGE_NT_OPTIONAL_HDR32_MAGIC                   equ     10bH
IMAGE_NT_OPTIONAL_HDR64_MAGIC                   equ     20bH
IMAGE_ROM_OPTIONAL_HDR_MAGIC                    equ     107H

IMAGE_SUBSYSTEM_UNKNOWN                         equ     0
IMAGE_SUBSYSTEM_NATIVE                          equ     1
IMAGE_SUBSYSTEM_WINDOWS_GUI                     equ     2
IMAGE_SUBSYSTEM_WINDOWS_CUI                     equ     3
IMAGE_SUBSYSTEM_OS2_CUI                         equ     5
IMAGE_SUBSYSTEM_POSIX_CUI                       equ     7
IMAGE_SUBSYSTEM_NATIVE_WINDOWS                  equ     8
IMAGE_SUBSYSTEM_WINDOWS_CE_GUI                  equ     9
IMAGE_SUBSYSTEM_EFI_APPLICATION                 equ     10
IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER         equ     11
IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER              equ     12
IMAGE_SUBSYSTEM_EFI_ROM                         equ     13
IMAGE_SUBSYSTEM_XBOX                            equ     14
IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION        equ     16

IMAGE_DLLCHARACTERISTICS_NO_BIND                equ     0800H
IMAGE_DLLCHARACTERISTICS_WDM_DRIVER             equ     2000H
IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE  equ     8000H
IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE           equ     0040H
IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY        equ     0080H
IMAGE_DLLCHARACTERISTICS_NX_COMPAT              equ     0100H
IMAGE_DLLCHARACTERISTICS_NO_ISOLATION           equ     0200H
IMAGE_DLLCHARACTERISTICS_NO_SEH                 equ     0400H

IMAGE_DIRECTORY_ENTRY_EXPORT                    equ     0
IMAGE_DIRECTORY_ENTRY_IMPORT                    equ     1
IMAGE_DIRECTORY_ENTRY_RESOURCE                  equ     2
IMAGE_DIRECTORY_ENTRY_EXCEPTION                 equ     3
IMAGE_DIRECTORY_ENTRY_SECURITY                  equ     4
IMAGE_DIRECTORY_ENTRY_BASERELOC                 equ     5
IMAGE_DIRECTORY_ENTRY_DEBUG                     equ     6
IMAGE_DIRECTORY_ENTRY_COPYRIGHT                 equ     7
IMAGE_DIRECTORY_ENTRY_ARCHITECTURE              equ     7
IMAGE_DIRECTORY_ENTRY_GLOBALPTR                 equ     8
IMAGE_DIRECTORY_ENTRY_TLS                       equ     9
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG               equ     10
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT              equ     11
IMAGE_DIRECTORY_ENTRY_IAT                       equ     12
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT              equ     13
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR            equ     14

IMAGE_SIZEOF_SHORT_NAME                         equ     8
IMAGE_SIZEOF_SECTION_HEADER                     equ     40

IMAGE_SIZEOF_SYMBOL                             equ     18

IMAGE_SYM_UNDEFINED                             equ     0
IMAGE_SYM_ABSOLUTE                              equ     (-1)
IMAGE_SYM_DEBUG                                 equ     (-2)

IMAGE_SYM_TYPE_NULL                             equ     0000H
IMAGE_SYM_TYPE_VOID                             equ     0001H
IMAGE_SYM_TYPE_CHAR                             equ     0002H
IMAGE_SYM_TYPE_SHORT                            equ     0003H
IMAGE_SYM_TYPE_INT                              equ     0004H
IMAGE_SYM_TYPE_LONG                             equ     0005H
IMAGE_SYM_TYPE_FLOAT                            equ     0006H
IMAGE_SYM_TYPE_DOUBLE                           equ     0007H
IMAGE_SYM_TYPE_STRUCT                           equ     0008H
IMAGE_SYM_TYPE_UNION                            equ     0009H
IMAGE_SYM_TYPE_ENUM                             equ     000AH
IMAGE_SYM_TYPE_MOE                              equ     000BH
IMAGE_SYM_TYPE_BYTE                             equ     000CH
IMAGE_SYM_TYPE_WORD                             equ     000DH
IMAGE_SYM_TYPE_UINT                             equ     000EH
IMAGE_SYM_TYPE_DWORD                            equ     000FH
IMAGE_SYM_TYPE_PCODE                            equ     8000H

IMAGE_SYM_DTYPE_NULL                            equ     0
IMAGE_SYM_DTYPE_POINTER                         equ     1
IMAGE_SYM_DTYPE_FUNCTION                        equ     2
IMAGE_SYM_DTYPE_ARRAY                           equ     3

IMAGE_SYM_CLASS_END_OF_FUNCTION                 equ     (-1)
IMAGE_SYM_CLASS_NULL                            equ     0000H
IMAGE_SYM_CLASS_AUTOMATIC                       equ     0001H
IMAGE_SYM_CLASS_EXTERNAL                        equ     0002H
IMAGE_SYM_CLASS_STATIC                          equ     0003H
IMAGE_SYM_CLASS_REGISTER                        equ     0004H
IMAGE_SYM_CLASS_EXTERNAL_DEF                    equ     0005H
IMAGE_SYM_CLASS_LABEL                           equ     0006H
IMAGE_SYM_CLASS_UNDEFINED_LABEL                 equ     0007H
IMAGE_SYM_CLASS_MEMBER_OF_STRUCT                equ     0008H
IMAGE_SYM_CLASS_ARGUMENT                        equ     0009H
IMAGE_SYM_CLASS_STRUCT_TAG                      equ     000AH
IMAGE_SYM_CLASS_MEMBER_OF_UNION                 equ     000BH
IMAGE_SYM_CLASS_UNION_TAG                       equ     000CH
IMAGE_SYM_CLASS_TYPE_DEFINITION                 equ     000DH
IMAGE_SYM_CLASS_UNDEFINED_STATIC                equ     000EH
IMAGE_SYM_CLASS_ENUM_TAG                        equ     000FH
IMAGE_SYM_CLASS_MEMBER_OF_ENUM                  equ     0010H
IMAGE_SYM_CLASS_REGISTER_PARAM                  equ     0011H
IMAGE_SYM_CLASS_BIT_FIELD                       equ     0012H

IMAGE_SYM_CLASS_FAR_EXTERNAL                    equ     0044H

IMAGE_SYM_CLASS_BLOCK                           equ     0064H
IMAGE_SYM_CLASS_FUNCTION                        equ     0065H
IMAGE_SYM_CLASS_END_OF_STRUCT                   equ     0066H
IMAGE_SYM_CLASS_FILE                            equ     0067H
IMAGE_SYM_CLASS_SECTION                         equ     0068H
IMAGE_SYM_CLASS_WEAK_EXTERNAL                   equ     0069H

IMAGE_SIZEOF_AUX_SYMBOL                         equ     18

IMAGE_COMDAT_SELECT_NODUPLICATES                equ     1
IMAGE_COMDAT_SELECT_ANY                         equ     2
IMAGE_COMDAT_SELECT_SAME_SIZE                   equ     3
IMAGE_COMDAT_SELECT_EXACT_MATCH                 equ     4
IMAGE_COMDAT_SELECT_ASSOCIATIVE                 equ     5
IMAGE_COMDAT_SELECT_LARGEST                     equ     6
IMAGE_COMDAT_SELECT_NEWEST                      equ     7

IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY              equ     1
IMAGE_WEAK_EXTERN_SEARCH_LIBRARY                equ     2
IMAGE_WEAK_EXTERN_SEARCH_ALIAS                  equ     3

IMAGE_SIZEOF_RELOCATION                         equ     10

IMAGE_REL_I386_ABSOLUTE                         equ     0000H
IMAGE_REL_I386_DIR16                            equ     0001H
IMAGE_REL_I386_REL16                            equ     0002H
IMAGE_REL_I386_DIR32                            equ     0006H
IMAGE_REL_I386_DIR32NB                          equ     0007H
IMAGE_REL_I386_SEG12                            equ     0009H
IMAGE_REL_I386_SECTION                          equ     000AH
IMAGE_REL_I386_SECREL                           equ     000BH
IMAGE_REL_I386_REL32                            equ     0014H

IMAGE_REL_MIPS_ABSOLUTE                         equ     0000H
IMAGE_REL_MIPS_REFHALF                          equ     0001H
IMAGE_REL_MIPS_REFWORD                          equ     0002H
IMAGE_REL_MIPS_JMPADDR                          equ     0003H
IMAGE_REL_MIPS_REFHI                            equ     0004H
IMAGE_REL_MIPS_REFLO                            equ     0005H
IMAGE_REL_MIPS_GPREL                            equ     0006H
IMAGE_REL_MIPS_LITERAL                          equ     0007H
IMAGE_REL_MIPS_SECTION                          equ     000AH
IMAGE_REL_MIPS_SECREL                           equ     000BH
IMAGE_REL_MIPS_SECRELLO                         equ     000CH
IMAGE_REL_MIPS_SECRELHI                         equ     000DH
IMAGE_REL_MIPS_TOKEN                            equ     000EH
IMAGE_REL_MIPS_JMPADDR16                        equ     0010H
IMAGE_REL_MIPS_REFWORDNB                        equ     0022H
IMAGE_REL_MIPS_PAIR                             equ     0025H

IMAGE_REL_ALPHA_ABSOLUTE                        equ     0000H
IMAGE_REL_ALPHA_REFLONG                         equ     0001H
IMAGE_REL_ALPHA_REFQUAD                         equ     0002H
IMAGE_REL_ALPHA_GPREL32                         equ     0003H
IMAGE_REL_ALPHA_LITERAL                         equ     0004H
IMAGE_REL_ALPHA_LITUSE                          equ     0005H
IMAGE_REL_ALPHA_GPDISP                          equ     0006H
IMAGE_REL_ALPHA_BRADDR                          equ     0007H
IMAGE_REL_ALPHA_HINT                            equ     0008H
IMAGE_REL_ALPHA_INLINE_REFLONG                  equ     0009H
IMAGE_REL_ALPHA_REFHI                           equ     000AH
IMAGE_REL_ALPHA_REFLO                           equ     000BH
IMAGE_REL_ALPHA_PAIR                            equ     000CH
IMAGE_REL_ALPHA_MATCH                           equ     000DH
IMAGE_REL_ALPHA_SECTION                         equ     000EH
IMAGE_REL_ALPHA_SECREL                          equ     000FH
IMAGE_REL_ALPHA_REFLONGNB                       equ     0010H
IMAGE_REL_ALPHA_SECRELLO                        equ     0011H
IMAGE_REL_ALPHA_SECRELHI                        equ     0012H
IMAGE_REL_ALPHA_REFQ3                           equ     0013H
IMAGE_REL_ALPHA_REFQ2                           equ     0014H
IMAGE_REL_ALPHA_REFQ1                           equ     0015H
IMAGE_REL_ALPHA_GPRELLO                         equ     0016H
IMAGE_REL_ALPHA_GPRELHI                         equ     0017H

IMAGE_REL_PPC_ABSOLUTE                          equ     0000H
IMAGE_REL_PPC_ADDR64                            equ     0001H
IMAGE_REL_PPC_ADDR32                            equ     0002H
IMAGE_REL_PPC_ADDR24                            equ     0003H
IMAGE_REL_PPC_ADDR16                            equ     0004H
IMAGE_REL_PPC_ADDR14                            equ     0005H
IMAGE_REL_PPC_REL24                             equ     0006H
IMAGE_REL_PPC_REL14                             equ     0007H
IMAGE_REL_PPC_TOCREL16                          equ     0008H
IMAGE_REL_PPC_TOCREL14                          equ     0009H

IMAGE_REL_PPC_ADDR32NB                          equ     000AH
IMAGE_REL_PPC_SECREL                            equ     000BH
IMAGE_REL_PPC_SECTION                           equ     000CH
IMAGE_REL_PPC_IFGLUE                            equ     000DH
IMAGE_REL_PPC_IMGLUE                            equ     000EH
IMAGE_REL_PPC_SECREL16                          equ     000FH
IMAGE_REL_PPC_REFHI                             equ     0010H
IMAGE_REL_PPC_REFLO                             equ     0011H
IMAGE_REL_PPC_PAIR                              equ     0012H
IMAGE_REL_PPC_SECRELLO                          equ     0013H
IMAGE_REL_PPC_SECRELHI                          equ     0014H
IMAGE_REL_PPC_GPREL                             equ     0015H
IMAGE_REL_PPC_TOKEN                             equ     0016H

IMAGE_REL_PPC_TYPEMASK                          equ     00FFH

IMAGE_REL_PPC_NEG                               equ     0100H
IMAGE_REL_PPC_BRTAKEN                           equ     0200H
IMAGE_REL_PPC_BRNTAKEN                          equ     0400H
IMAGE_REL_PPC_TOCDEFN                           equ     0800H

IMAGE_REL_SH3_ABSOLUTE                          equ     0000H
IMAGE_REL_SH3_DIRECT16                          equ     0001H
IMAGE_REL_SH3_DIRECT32                          equ     0002H
IMAGE_REL_SH3_DIRECT8                           equ     0003H
IMAGE_REL_SH3_DIRECT8_WORD                      equ     0004H
IMAGE_REL_SH3_DIRECT8_LONG                      equ     0005H
IMAGE_REL_SH3_DIRECT4                           equ     0006H
IMAGE_REL_SH3_DIRECT4_WORD                      equ     0007H
IMAGE_REL_SH3_DIRECT4_LONG                      equ     0008H
IMAGE_REL_SH3_PCREL8_WORD                       equ     0009H
IMAGE_REL_SH3_PCREL8_LONG                       equ     000AH
IMAGE_REL_SH3_PCREL12_WORD                      equ     000BH
IMAGE_REL_SH3_STARTOF_SECTION                   equ     000CH
IMAGE_REL_SH3_SIZEOF_SECTION                    equ     000DH
IMAGE_REL_SH3_SECTION                           equ     000EH
IMAGE_REL_SH3_SECREL                            equ     000FH
IMAGE_REL_SH3_DIRECT32_NB                       equ     0010H
IMAGE_REL_SH3_GPREL4_LONG                       equ     0011H
IMAGE_REL_SH3_TOKEN                             equ     0012H
IMAGE_REL_SHM_PCRELPT                           equ     0013H
IMAGE_REL_SHM_REFLO                             equ     0014H
IMAGE_REL_SHM_REFHALF                           equ     0015H
IMAGE_REL_SHM_RELLO                             equ     0016H
IMAGE_REL_SHM_RELHALF                           equ     0017H
IMAGE_REL_SHM_PAIR                              equ     0018H

IMAGE_REL_SH_NOMODE                             equ     8000H

IMAGE_REL_ARM_ABSOLUTE                          equ     0000H
IMAGE_REL_ARM_ADDR32                            equ     0001H
IMAGE_REL_ARM_ADDR32NB                          equ     0002H
IMAGE_REL_ARM_BRANCH24                          equ     0003H
IMAGE_REL_ARM_BRANCH11                          equ     0004H
IMAGE_REL_ARM_TOKEN                             equ     0005H
IMAGE_REL_ARM_GPREL12                           equ     0006H
IMAGE_REL_ARM_GPREL7                            equ     0007H
IMAGE_REL_ARM_BLX24                             equ     0008H
IMAGE_REL_ARM_BLX11                             equ     0009H
IMAGE_REL_ARM_SECTION                           equ     000EH
IMAGE_REL_ARM_SECREL                            equ     000FH

IMAGE_REL_AM_ABSOLUTE                           equ     0000H
IMAGE_REL_AM_ADDR32                             equ     0001H
IMAGE_REL_AM_ADDR32NB                           equ     0002H
IMAGE_REL_AM_CALL32                             equ     0003H
IMAGE_REL_AM_FUNCINFO                           equ     0004H
IMAGE_REL_AM_REL32_1                            equ     0005H
IMAGE_REL_AM_REL32_2                            equ     0006H
IMAGE_REL_AM_SECREL                             equ     0007H
IMAGE_REL_AM_SECTION                            equ     0008H
IMAGE_REL_AM_TOKEN                              equ     0009H

IMAGE_REL_AMD64_ABSOLUTE                        equ     0000H
IMAGE_REL_AMD64_ADDR64                          equ     0001H
IMAGE_REL_AMD64_ADDR32                          equ     0002H
IMAGE_REL_AMD64_ADDR32NB                        equ     0003H
IMAGE_REL_AMD64_REL32                           equ     0004H
IMAGE_REL_AMD64_REL32_1                         equ     0005H
IMAGE_REL_AMD64_REL32_2                         equ     0006H
IMAGE_REL_AMD64_REL32_3                         equ     0007H
IMAGE_REL_AMD64_REL32_4                         equ     0008H
IMAGE_REL_AMD64_REL32_5                         equ     0009H
IMAGE_REL_AMD64_SECTION                         equ     000AH
IMAGE_REL_AMD64_SECREL                          equ     000BH
IMAGE_REL_AMD64_SECREL7                         equ     000CH
IMAGE_REL_AMD64_TOKEN                           equ     000DH
IMAGE_REL_AMD64_SREL32                          equ     000EH
IMAGE_REL_AMD64_PAIR                            equ     000FH
IMAGE_REL_AMD64_SSPAN32                         equ     0010H

IMAGE_REL_IA64_ABSOLUTE                         equ     0000H
IMAGE_REL_IA64_IMM14                            equ     0001H
IMAGE_REL_IA64_IMM22                            equ     0002H
IMAGE_REL_IA64_IMM64                            equ     0003H
IMAGE_REL_IA64_DIR32                            equ     0004H
IMAGE_REL_IA64_DIR64                            equ     0005H
IMAGE_REL_IA64_PCREL21B                         equ     0006H
IMAGE_REL_IA64_PCREL21M                         equ     0007H
IMAGE_REL_IA64_PCREL21F                         equ     0008H
IMAGE_REL_IA64_GPREL22                          equ     0009H
IMAGE_REL_IA64_LTOFF22                          equ     000AH
IMAGE_REL_IA64_SECTION                          equ     000BH
IMAGE_REL_IA64_SECREL22                         equ     000CH
IMAGE_REL_IA64_SECREL64I                        equ     000DH
IMAGE_REL_IA64_SECREL32                         equ     000EH
IMAGE_REL_IA64_LTOFF64                          equ     000FH
IMAGE_REL_IA64_DIR32NB                          equ     0010H
IMAGE_REL_IA64_SREL22                           equ     0011H
IMAGE_REL_IA64_UREL22                           equ     0012H
IMAGE_REL_IA64_SREL32                           equ     0013H
IMAGE_REL_IA64_UREL32                           equ     0014H
IMAGE_REL_IA64_ADDEND                           equ     001FH

IMAGE_REL_CEF_ABSOLUTE                          equ     0000H
IMAGE_REL_CEF_ADDR32                            equ     0001H
IMAGE_REL_CEF_ADDR64                            equ     0002H
IMAGE_REL_CEF_ADDR32NB                          equ     0003H
IMAGE_REL_CEF_SECTION                           equ     0004H
IMAGE_REL_CEF_SECREL                            equ     0005H
IMAGE_REL_CEF_TOKEN                             equ     0006H

IMAGE_REL_CEE_ABSOLUTE                          equ     0000H
IMAGE_REL_CEE_ADDR32                            equ     0001H
IMAGE_REL_CEE_ADDR64                            equ     0002H
IMAGE_REL_CEE_ADDR32NB                          equ     0003H
IMAGE_REL_CEE_SECTION                           equ     0004H
IMAGE_REL_CEE_SECREL                            equ     0005H
IMAGE_REL_CEE_TOKEN                             equ     0006H

IMAGE_REL_M32R_ABSOLUTE                         equ     0000H
IMAGE_REL_M32R_ADDR32                           equ     0001H
IMAGE_REL_M32R_ADDR32NB                         equ     0002H
IMAGE_REL_M32R_ADDR24                           equ     0003H
IMAGE_REL_M32R_GPREL16                          equ     0004H
IMAGE_REL_M32R_PCREL24                          equ     0005H
IMAGE_REL_M32R_PCREL16                          equ     0006H
IMAGE_REL_M32R_PCREL8                           equ     0007H
IMAGE_REL_M32R_REFHALF                          equ     0008H
IMAGE_REL_M32R_REFHI                            equ     0009H
IMAGE_REL_M32R_REFLO                            equ     000AH
IMAGE_REL_M32R_PAIR                             equ     000BH
IMAGE_REL_M32R_SECTION                          equ     000CH
IMAGE_REL_M32R_SECREL32                         equ     000DH
IMAGE_REL_M32R_TOKEN                            equ     000EH

IMAGE_REL_EBC_ABSOLUTE                          equ     0000H
IMAGE_REL_EBC_ADDR32NB                          equ     0001H
IMAGE_REL_EBC_REL32                             equ     0002H
IMAGE_REL_EBC_SECTION                           equ     0003H
IMAGE_REL_EBC_SECREL                            equ     0004H

IMAGE_SIZEOF_LINENUMBER                         equ     6
IMAGE_SIZEOF_BASE_RELOCATION                    equ     8

IMAGE_REL_BASED_ABSOLUTE                        equ     0
IMAGE_REL_BASED_HIGH                            equ     1
IMAGE_REL_BASED_LOW                             equ     2
IMAGE_REL_BASED_HIGHLOW                         equ     3
IMAGE_REL_BASED_HIGHADJ                         equ     4
IMAGE_REL_BASED_MIPS_JMPADDR                    equ     5
IMAGE_REL_BASED_SECTION                         equ     6
IMAGE_REL_BASED_REL32                           equ     7

IMAGE_REL_BASED_MIPS_JMPADDR16                  equ     9
IMAGE_REL_BASED_IA64_IMM64                      equ     9
IMAGE_REL_BASED_DIR64                           equ     10
IMAGE_REL_BASED_HIGH3ADJ                        equ     11

IMAGE_ARCHIVE_START_SIZE                        equ     8
IMAGE_ARCHIVE_START                             equ     A("!<arch>", 10)
IMAGE_ARCHIVE_END                               equ     A("`", 10)
IMAGE_ARCHIVE_PAD                               equ     10
IMAGE_ARCHIVE_LINKER_MEMBER                     equ     </               >
IMAGE_ARCHIVE_LONGNAMES_MEMBER                  equ     <//              >

IMAGE_ORDINAL_FLAG64                            equ     8000000000000000H
IMAGE_ORDINAL_FLAG32                            equ     80000000H

IMAGE_RESOURCE_NAME_IS_STRING                   equ     80000000H
IMAGE_RESOURCE_DATA_IS_DIRECTORY                equ     80000000H

IMAGE_DEBUG_TYPE_UNKNOWN                        equ     0
IMAGE_DEBUG_TYPE_COFF                           equ     1
IMAGE_DEBUG_TYPE_CODEVIEW                       equ     2
IMAGE_DEBUG_TYPE_FPO                            equ     3
IMAGE_DEBUG_TYPE_MISC                           equ     4
IMAGE_DEBUG_TYPE_EXCEPTION                      equ     5
IMAGE_DEBUG_TYPE_FIXUP                          equ     6
IMAGE_DEBUG_TYPE_OMAP_TO_SRC                    equ     7
IMAGE_DEBUG_TYPE_OMAP_FROM_SRC                  equ     8
IMAGE_DEBUG_TYPE_BORLAND                        equ     9
IMAGE_DEBUG_TYPE_RESERVED10                     equ     10
IMAGE_DEBUG_TYPE_CLSID                          equ     11

FRAME_FPO                                       equ     0
FRAME_TRAP                                      equ     1
FRAME_TSS                                       equ     2
FRAME_NONFPO                                    equ     3

SIZEOF_RFPO_DATA                                equ     16

IMAGE_DEBUG_MISC_EXENAME                        equ     1

IMAGE_SEPARATE_DEBUG_SIGNATURE                  equ     4944H
IMAGE_SEPARATE_DEBUG_FLAGS_MASK                 equ     8000H
IMAGE_SEPARATE_DEBUG_MISMATCH                   equ     8000H

IMPORT_OBJECT_HDR_SIG2                          equ     0FFFFH

N_BTMASK                                        equ     000FH
N_TMASK                                         equ     0030H
N_TMASK1                                        equ     00C0H
N_TMASK2                                        equ     00F0H
N_BTSHFT                                        equ     4
N_TSHIFT                                        equ     2

FAST_FAIL_LEGACY_GS_VIOLATION                   equ     0
FAST_FAIL_VTGUARD_CHECK_FAILURE                 equ     1
FAST_FAIL_STACK_COOKIE_CHECK_FAILURE            equ     2
FAST_FAIL_CORRUPT_LIST_ENTRY                    equ     3
FAST_FAIL_INCORRECT_STACK                       equ     4
FAST_FAIL_INVALID_ARG                           equ     5
FAST_FAIL_GS_COOKIE_INIT                        equ     6
FAST_FAIL_FATAL_APP_EXIT                        equ     7
FAST_FAIL_RANGE_CHECK_FAILURE                   equ     8
FAST_FAIL_UNSAFE_REGISTRY_ACCESS                equ     9
FAST_FAIL_GUARD_ICALL_CHECK_FAILURE             equ     10
FAST_FAIL_GUARD_WRITE_CHECK_FAILURE             equ     11
FAST_FAIL_INVALID_FIBER_SWITCH                  equ     12
FAST_FAIL_INVALID_SET_OF_CONTEXT                equ     13
FAST_FAIL_INVALID_REFERENCE_COUNT               equ     14
FAST_FAIL_INVALID_JUMP_BUFFER                   equ     18
FAST_FAIL_MRDATA_MODIFIED                       equ     19
FAST_FAIL_CERTIFICATION_FAILURE                 equ     20
FAST_FAIL_INVALID_EXCEPTION_CHAIN               equ     21
FAST_FAIL_CRYPTO_LIBRARY                        equ     22
FAST_FAIL_INVALID_CALL_IN_DLL_CALLOUT           equ     23
FAST_FAIL_INVALID_IMAGE_BASE                    equ     24
FAST_FAIL_DLOAD_PROTECTION_FAILURE              equ     25
FAST_FAIL_UNSAFE_EXTENSION_CALL                 equ     26
FAST_FAIL_INVALID_FAST_FAIL_CODE                equ     0FFFFFFFFH

HEAP_NO_SERIALIZE                               equ     00000001H
HEAP_GROWABLE                                   equ     00000002H
HEAP_GENERATE_EXCEPTIONS                        equ     00000004H
HEAP_ZERO_MEMORY                                equ     00000008H
HEAP_REALLOC_IN_PLACE_ONLY                      equ     00000010H
HEAP_TAIL_CHECKING_ENABLED                      equ     00000020H
HEAP_FREE_CHECKING_ENABLED                      equ     00000040H
HEAP_DISABLE_COALESCE_ON_FREE                   equ     00000080H
HEAP_CREATE_ALIGN_16                            equ     00010000H
HEAP_CREATE_ENABLE_TRACING                      equ     00020000H
HEAP_MAXIMUM_TAG                                equ     0FFFH
HEAP_PSEUDO_TAG_FLAG                            equ     8000H
HEAP_TAG_SHIFT                                  equ     18

IS_TEXT_UNICODE_ASCII16                         equ     0001H
IS_TEXT_UNICODE_REVERSE_ASCII16                 equ     0010H
IS_TEXT_UNICODE_STATISTICS                      equ     0002H
IS_TEXT_UNICODE_REVERSE_STATISTICS              equ     0020H
IS_TEXT_UNICODE_CONTROLS                        equ     0004H
IS_TEXT_UNICODE_REVERSE_CONTROLS                equ     0040H
IS_TEXT_UNICODE_SIGNATURE                       equ     0008H
IS_TEXT_UNICODE_REVERSE_SIGNATURE               equ     0080H
IS_TEXT_UNICODE_ILLEGAL_CHARS                   equ     0100H
IS_TEXT_UNICODE_ODD_LENGTH                      equ     0200H
IS_TEXT_UNICODE_DBCS_LEADBYTE                   equ     0400H
IS_TEXT_UNICODE_NULL_BYTES                      equ     1000H
IS_TEXT_UNICODE_UNICODE_MASK                    equ     000FH
IS_TEXT_UNICODE_REVERSE_MASK                    equ     00F0H
IS_TEXT_UNICODE_NOT_UNICODE_MASK                equ     0F00H
IS_TEXT_UNICODE_NOT_ASCII_MASK                  equ     0F000H

COMPRESSION_FORMAT_NONE                         equ     0000H
COMPRESSION_FORMAT_DEFAULT                      equ     0001H
COMPRESSION_FORMAT_LZNT1                        equ     0002H
COMPRESSION_FORMAT_XPRESS                       equ     0003H
COMPRESSION_FORMAT_XPRESS_HUFF                  equ     0004H
COMPRESSION_ENGINE_STANDARD                     equ     0000H
COMPRESSION_ENGINE_MAXIMUM                      equ     0100H
COMPRESSION_ENGINE_HIBER                        equ     0200H

MESSAGE_RESOURCE_UNICODE                        equ     0001H

VER_EQUAL                                       equ     1
VER_GREATER                                     equ     2
VER_GREATER_EQUAL                               equ     3
VER_LESS                                        equ     4
VER_LESS_EQUAL                                  equ     5
VER_AND                                         equ     6
VER_OR                                          equ     7

VER_CONDITION_MASK                              equ     7
VER_NUM_BITS_PER_CONDITION_MASK                 equ     3

VER_MINORVERSION                                equ     0000001H
VER_MAJORVERSION                                equ     0000002H
VER_BUILDNUMBER                                 equ     0000004H
VER_PLATFORMID                                  equ     0000008H
VER_SERVICEPACKMINOR                            equ     0000010H
VER_SERVICEPACKMAJOR                            equ     0000020H
VER_SUITENAME                                   equ     0000040H
VER_PRODUCT_TYPE                                equ     0000080H

VER_NT_WORKSTATION                              equ     0000001H
VER_NT_DOMAIN_CONTROLLER                        equ     0000002H
VER_NT_SERVER                                   equ     0000003H

VER_PLATFORM_WIN32s                             equ     0
VER_PLATFORM_WIN32_WINDOWS                      equ     1
VER_PLATFORM_WIN32_NT                           equ     2
VER_PLATFORM_WIN32_CE                           equ     3

RTL_CRITSECT_TYPE                               equ     0
RTL_RESOURCE_TYPE                               equ     1

SEF_DACL_AUTO_INHERIT                           equ     01H
SEF_SACL_AUTO_INHERIT                           equ     02H
SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT               equ     04H
SEF_AVOID_PRIVILEGE_CHECK                       equ     08H
SEF_AVOID_OWNER_CHECK                           equ     10H
SEF_DEFAULT_OWNER_FROM_PARENT                   equ     20H
SEF_DEFAULT_GROUP_FROM_PARENT                   equ     40H
SEF_MACL_NO_WRITE_UP                            equ     100H
SEF_MACL_NO_READ_UP                             equ     200H
SEF_MACL_NO_EXECUTE_UP                          equ     0400H
SEF_AI_USE_EXTRA_PARAMS                         equ     0800H
SEF_AVOID_OWNER_RESTRICTION                     equ     01000H
SEF_MACL_VALID_FLAGS                            equ     (SEF_MACL_NO_WRITE_UP or SEF_MACL_NO_READ_UP or SEF_MACL_NO_EXECUTE_UP)

WT_EXECUTEDEFAULT                               equ     00000000H
WT_EXECUTEINIOTHREAD                            equ     00000001H
WT_EXECUTEINUITHREAD                            equ     00000002H
WT_EXECUTEINWAITTHREAD                          equ     00000004H
WT_EXECUTEONLYONCE                              equ     00000008H
WT_EXECUTEINTIMERTHREAD                         equ     00000020H
WT_EXECUTELONGFUNCTION                          equ     00000010H
WT_EXECUTEINPERSISTENTIOTHREAD                  equ     00000040H
WT_EXECUTEINPERSISTENTTHREAD                    equ     00000080H
WT_TRANSFER_IMPERSONATION                       equ     00000100H

WT_EXECUTEINLONGTHREAD                          equ     00000010H
WT_EXECUTEDELETEWAIT                            equ     00000008H

DLL_PROCESS_ATTACH                              equ     1
DLL_THREAD_ATTACH                               equ     2
DLL_THREAD_DETACH                               equ     3
DLL_PROCESS_DETACH                              equ     0

EVENTLOG_SEQUENTIAL_READ                        equ     0001H
EVENTLOG_SEEK_READ                              equ     0002H
EVENTLOG_FORWARDS_READ                          equ     0004H
EVENTLOG_BACKWARDS_READ                         equ     0008H

EVENTLOG_SUCCESS                                equ     0000H
EVENTLOG_ERROR_TYPE                             equ     0001H
EVENTLOG_WARNING_TYPE                           equ     0002H
EVENTLOG_INFORMATION_TYPE                       equ     0004H
EVENTLOG_AUDIT_SUCCESS                          equ     0008H
EVENTLOG_AUDIT_FAILURE                          equ     0010H

EVENTLOG_START_PAIRED_EVENT                     equ     0001H
EVENTLOG_END_PAIRED_EVENT                       equ     0002H
EVENTLOG_END_ALL_PAIRED_EVENTS                  equ     0004H
EVENTLOG_PAIRED_EVENT_ACTIVE                    equ     0008H
EVENTLOG_PAIRED_EVENT_INACTIVE                  equ     0010H

MAXLOGICALLOGNAMESIZE                           equ     256

KEY_QUERY_VALUE                                 equ     0001H
KEY_SET_VALUE                                   equ     0002H
KEY_CREATE_SUB_KEY                              equ     0004H
KEY_ENUMERATE_SUB_KEYS                          equ     0008H
KEY_NOTIFY                                      equ     0010H
KEY_CREATE_LINK                                 equ     0020H
KEY_WOW64_32KEY                                 equ     0200H
KEY_WOW64_64KEY                                 equ     0100H
KEY_WOW64_RES                                   equ     0300H

KEY_READ                                        equ     ((STANDARD_RIGHTS_READ or KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY) and (NOT SYNCHRONIZE))
KEY_WRITE                                       equ     ((STANDARD_RIGHTS_WRITE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY) and (NOT SYNCHRONIZE))
KEY_ALL_ACCESS                                  equ     ((STANDARD_RIGHTS_ALL or KEY_QUERY_VALUE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY or KEY_CREATE_LINK) and (NOT SYNCHRONIZE))
KEY_EXECUTE                                     equ     KEY_READ

REG_OPTION_RESERVED                             equ     00000000H
REG_LEGAL_OPTION                                equ     (REG_OPTION_RESERVED or REG_OPTION_NON_VOLATILE or REG_OPTION_VOLATILE or REG_OPTION_CREATE_LINK or REG_OPTION_BACKUP_RESTORE or REG_OPTION_OPEN_LINK)
REG_LEGAL_CHANGE_FILTER                         equ     (REG_NOTIFY_CHANGE_NAME or REG_NOTIFY_CHANGE_ATTRIBUTES or REG_NOTIFY_CHANGE_LAST_SET or REG_NOTIFY_CHANGE_SECURITY)

REG_STANDARD_FORMAT                             equ     1
REG_LATEST_FORMAT                               equ     2
REG_NO_COMPRESSION                              equ     4

REG_WHOLE_HIVE_VOLATILE                         equ     00000001H
REG_REFRESH_HIVE                                equ     00000002H
REG_NO_LAZY_FLUSH                               equ     00000004H
REG_FORCE_RESTORE                               equ     00000008H
REG_APP_HIVE                                    equ     00000010H
REG_PROCESS_PRIVATE                             equ     00000020H
REG_START_JOURNAL                               equ     00000040H
REG_HIVE_EXACT_FILE_GROWTH                      equ     00000080H
REG_HIVE_NO_RM                                  equ     00000100H
REG_HIVE_SINGLE_LOG                             equ     00000200H
REG_BOOT_HIVE                                   equ     00000400H
REG_LOAD_HIVE_OPEN_HANDLE                       equ     00000800H
REG_FLUSH_HIVE_FILE_GROWTH                      equ     00001000H

REG_FORCE_UNLOAD                                equ     1

SERVICE_KERNEL_DRIVER                           equ     00000001H
SERVICE_FILE_SYSTEM_DRIVER                      equ     00000002H
SERVICE_ADAPTER                                 equ     00000004H
SERVICE_RECOGNIZER_DRIVER                       equ     00000008H
SERVICE_DRIVER                                  equ     (SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER or SERVICE_RECOGNIZER_DRIVER)

SERVICE_WIN32_OWN_PROCESS                       equ     00000010H
SERVICE_WIN32_SHARE_PROCESS                     equ     00000020H
SERVICE_WIN32                                   equ     (SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS)

SERVICE_INTERACTIVE_PROCESS                     equ     00000100H

SERVICE_TYPE_ALL                                equ     (SERVICE_WIN32 or SERVICE_ADAPTER or SERVICE_DRIVER or SERVICE_INTERACTIVE_PROCESS)

SERVICE_BOOT_START                              equ     00000000H
SERVICE_SYSTEM_START                            equ     00000001H
SERVICE_AUTO_START                              equ     00000002H
SERVICE_DEMAND_START                            equ     00000003H
SERVICE_DISABLED                                equ     00000004H

SERVICE_ERROR_IGNORE                            equ     00000000H
SERVICE_ERROR_NORMAL                            equ     00000001H
SERVICE_ERROR_SEVERE                            equ     00000002H
SERVICE_ERROR_CRITICAL                          equ     00000003H

CM_SERVICE_NETWORK_BOOT_LOAD                    equ     00000001H
CM_SERVICE_VIRTUAL_DISK_BOOT_LOAD               equ     00000002H
CM_SERVICE_USB_DISK_BOOT_LOAD                   equ     00000004H
CM_SERVICE_SD_DISK_BOOT_LOAD                    equ     00000008H
CM_SERVICE_USB3_DISK_BOOT_LOAD                  equ     00000010H
CM_SERVICE_MEASURED_BOOT_LOAD                   equ     00000020H
CM_SERVICE_VERIFIER_BOOT_LOAD                   equ     00000040H
CM_SERVICE_WINPE_BOOT_LOAD                      equ     00000080H

CM_SERVICE_VALID_PROMOTION_MASKA                equ     (CM_SERVICE_NETWORK_BOOT_LOAD or CM_SERVICE_VIRTUAL_DISK_BOOT_LOAD or \
                                                        CM_SERVICE_USB_DISK_BOOT_LOAD or CM_SERVICE_SD_DISK_BOOT_LOAD or \
                                                        CM_SERVICE_USB3_DISK_BOOT_LOAD or CM_SERVICE_MEASURED_BOOT_LOAD)
CM_SERVICE_VALID_PROMOTION_MASKB                equ     (CM_SERVICE_VERIFIER_BOOT_LOAD or CM_SERVICE_WINPE_BOOT_LOAD)
CM_SERVICE_VALID_PROMOTION_MASK                 equ     (CM_SERVICE_VALID_PROMOTION_MASKA or CM_SERVICE_VALID_PROMOTION_MASKB)

TAPE_ERASE_SHORT                                equ     0
TAPE_ERASE_LONG                                 equ     1

TAPE_LOAD                                       equ     0
TAPE_UNLOAD                                     equ     1
TAPE_TENSION                                    equ     2
TAPE_LOCK                                       equ     3
TAPE_UNLOCK                                     equ     4
TAPE_FORMAT                                     equ     5

TAPE_SETMARKS                                   equ     0
TAPE_FILEMARKS                                  equ     1
TAPE_SHORT_FILEMARKS                            equ     2
TAPE_LONG_FILEMARKS                             equ     3

TAPE_ABSOLUTE_POSITION                          equ     0
TAPE_LOGICAL_POSITION                           equ     1
TAPE_PSEUDO_LOGICAL_POSITION                    equ     2

TAPE_REWIND                                     equ     0
TAPE_ABSOLUTE_BLOCK                             equ     1
TAPE_LOGICAL_BLOCK                              equ     2
TAPE_PSEUDO_LOGICAL_BLOCK                       equ     3
TAPE_SPACE_END_OF_DATA                          equ     4
TAPE_SPACE_RELATIVE_BLOCKS                      equ     5
TAPE_SPACE_FILEMARKS                            equ     6
TAPE_SPACE_SEQUENTIAL_FMKS                      equ     7
TAPE_SPACE_SETMARKS                             equ     8
TAPE_SPACE_SEQUENTIAL_SMKS                      equ     9

TAPE_DRIVE_FIXED                                equ     00000001H
TAPE_DRIVE_SELECT                               equ     00000002H
TAPE_DRIVE_INITIATOR                            equ     00000004H
TAPE_DRIVE_ERASE_SHORT                          equ     00000010H
TAPE_DRIVE_ERASE_LONG                           equ     00000020H
TAPE_DRIVE_ERASE_BOP_ONLY                       equ     00000040H
TAPE_DRIVE_ERASE_IMMEDIATE                      equ     00000080H
TAPE_DRIVE_TAPE_CAPACITY                        equ     00000100H
TAPE_DRIVE_TAPE_REMAINING                       equ     00000200H
TAPE_DRIVE_FIXED_BLOCK                          equ     00000400H
TAPE_DRIVE_VARIABLE_BLOCK                       equ     00000800H
TAPE_DRIVE_WRITE_PROTECT                        equ     00001000H
TAPE_DRIVE_EOT_WZ_SIZE                          equ     00002000H
TAPE_DRIVE_ECC                                  equ     00010000H
TAPE_DRIVE_COMPRESSION                          equ     00020000H
TAPE_DRIVE_PADDING                              equ     00040000H
TAPE_DRIVE_REPORT_SMKS                          equ     00080000H
TAPE_DRIVE_GET_ABSOLUTE_BLK                     equ     00100000H
TAPE_DRIVE_GET_LOGICAL_BLK                      equ     00200000H
TAPE_DRIVE_SET_EOT_WZ_SIZE                      equ     00400000H
TAPE_DRIVE_EJECT_MEDIA                          equ     01000000H
TAPE_DRIVE_CLEAN_REQUESTS                       equ     02000000H
TAPE_DRIVE_SET_CMP_BOP_ONLY                     equ     04000000H
TAPE_DRIVE_RESERVED_BIT                         equ     80000000H
TAPE_DRIVE_LOAD_UNLOAD                          equ     80000001H
TAPE_DRIVE_TENSION                              equ     80000002H
TAPE_DRIVE_LOCK_UNLOCK                          equ     80000004H
TAPE_DRIVE_REWIND_IMMEDIATE                     equ     80000008H
TAPE_DRIVE_SET_BLOCK_SIZE                       equ     80000010H
TAPE_DRIVE_LOAD_UNLD_IMMED                      equ     80000020H
TAPE_DRIVE_TENSION_IMMED                        equ     80000040H
TAPE_DRIVE_LOCK_UNLK_IMMED                      equ     80000080H
TAPE_DRIVE_SET_ECC                              equ     80000100H
TAPE_DRIVE_SET_COMPRESSION                      equ     80000200H
TAPE_DRIVE_SET_PADDING                          equ     80000400H
TAPE_DRIVE_SET_REPORT_SMKS                      equ     80000800H
TAPE_DRIVE_ABSOLUTE_BLK                         equ     80001000H
TAPE_DRIVE_ABS_BLK_IMMED                        equ     80002000H
TAPE_DRIVE_LOGICAL_BLK                          equ     80004000H
TAPE_DRIVE_LOG_BLK_IMMED                        equ     80008000H
TAPE_DRIVE_END_OF_DATA                          equ     80010000H
TAPE_DRIVE_RELATIVE_BLKS                        equ     80020000H
TAPE_DRIVE_FILEMARKS                            equ     80040000H
TAPE_DRIVE_SEQUENTIAL_FMKS                      equ     80080000H
TAPE_DRIVE_SETMARKS                             equ     80100000H
TAPE_DRIVE_SEQUENTIAL_SMKS                      equ     80200000H
TAPE_DRIVE_REVERSE_POSITION                     equ     80400000H
TAPE_DRIVE_SPACE_IMMEDIATE                      equ     80800000H
TAPE_DRIVE_WRITE_SETMARKS                       equ     81000000H
TAPE_DRIVE_WRITE_FILEMARKS                      equ     82000000H
TAPE_DRIVE_WRITE_SHORT_FMKS                     equ     84000000H
TAPE_DRIVE_WRITE_LONG_FMKS                      equ     88000000H
TAPE_DRIVE_WRITE_MARK_IMMED                     equ     90000000H
TAPE_DRIVE_FORMAT                               equ     0A0000000H
TAPE_DRIVE_FORMAT_IMMEDIATE                     equ     0C0000000H
TAPE_DRIVE_HIGH_FEATURES                        equ     80000000H

TAPE_FIXED_PARTITIONS                           equ     0
TAPE_SELECT_PARTITIONS                          equ     1
TAPE_INITIATOR_PARTITIONS                       equ     2

TAPE_QUERY_DRIVE_PARAMETERS                     equ     0
TAPE_QUERY_MEDIA_CAPACITY                       equ     1
TAPE_CHECK_FOR_DRIVE_PROBLEM                    equ     2
TAPE_QUERY_IO_ERROR_DATA                        equ     3
TAPE_QUERY_DEVICE_ERROR_DATA                    equ     4

CONTEXT_i386                                    equ     00010000H
CONTEXT_i486                                    equ     00010000H
CONTEXT_AMD64                                   equ     100000H
CONTEXT_IA64                                    equ     00080000H

LEGACY_SAVE_AREA_LENGTH                         equ     SIZEOF XMM_SAVE_AREA32

EXCEPTION_READ_FAULT                            equ     0
EXCEPTION_WRITE_FAULT                           equ     1
EXCEPTION_EXECUTE_FAULT                         equ     8

UNWIND_HISTORY_TABLE_SIZE                       equ     12

SidTypeUser                                     equ     1
SidTypeGroup                                    equ     2
SidTypeDomain                                   equ     3
SidTypeAlias                                    equ     4
SidTypeWellKnownGroup                           equ     5
SidTypeDeletedAccount                           equ     6
SidTypeInvalid                                  equ     7
SidTypeUnknown                                  equ     8
SidTypeComputer                                 equ     9

AclRevisionInformation                          equ     1
AclSizeInformation                              equ     2

AuditEventObjectAccess                          equ     0
AuditEventDirectoryServiceAccess                equ     1

SecurityAnonymous                               equ     0
SecurityIdentification                          equ     1
SecurityImpersonation                           equ     2
SecurityDelegation                              equ     3

SECURITY_MAX_IMPERSONATION_LEVEL                equ     SecurityDelegation
SECURITY_MIN_IMPERSONATION_LEVEL                equ     SecurityAnonymous
DEFAULT_IMPERSONATION_LEVEL                     equ     SecurityImpersonation

TokenPrimary                                    equ     1
TokenImpersonation                              equ     2

TokenElevationTypeDefault                       equ     1
TokenElevationTypeFull                          equ     2
TokenElevationTypeLimited                       equ     3

TokenUser                                       equ     1
TokenGroups                                     equ     2
TokenPrivileges                                 equ     3
TokenOwner                                      equ     4
TokenPrimaryGroup                               equ     5
TokenDefaultDacl                                equ     6
TokenSource                                     equ     7
TokenType                                       equ     8
TokenImpersonationLevel                         equ     9
TokenStatistics                                 equ     10
TokenRestrictedSids                             equ     11
TokenSessionId                                  equ     12
TokenGroupsAndPrivileges                        equ     13
TokenSessionReference                           equ     14
TokenSandBoxInert                               equ     15
TokenAuditPolicy                                equ     16
TokenOrigin                                     equ     17
TokenElevationType                              equ     18
TokenLinkedToken                                equ     19
TokenElevation                                  equ     20
TokenHasRestrictions                            equ     21
TokenAccessInformation                          equ     22
TokenVirtualizationAllowed                      equ     23
TokenVirtualizationEnabled                      equ     24
TokenIntegrityLevel                             equ     25
TokenUIAccess                                   equ     26
TokenMandatoryPolicy                            equ     27
TokenLogonSid                                   equ     28
MaxTokenInfoClass                               equ     29

MandatoryLevelUntrusted                         equ     0
MandatoryLevelLow                               equ     1
MandatoryLevelMedium                            equ     2
MandatoryLevelHigh                              equ     3
MandatoryLevelSystem                            equ     4
MandatoryLevelSecureProcess                     equ     5
MandatoryLevelCount                             equ     6

JobObjectBasicAccountingInformation             equ     1
JobObjectBasicLimitInformation                  equ     2
JobObjectBasicProcessIdList                     equ     3
JobObjectBasicUIRestrictions                    equ     4
JobObjectSecurityLimitInformation               equ     5
JobObjectEndOfJobTimeInformation                equ     6
JobObjectAssociateCompletionPortInformation     equ     7
JobObjectBasicAndIoAccountingInformation        equ     8
JobObjectExtendedLimitInformation               equ     9
JobObjectJobSetInformation                      equ     10
MaxJobObjectInfoClass                           equ     11

RelationProcessorCore                           equ     0
RelationNumaNode                                equ     1
RelationCache                                   equ     2
RelationProcessorPackage                        equ     3

CacheUnified                                    equ     0
CacheInstruction                                equ     1
CacheData                                       equ     2
CacheTrace                                      equ     3

LTP_PC_SMT                                      equ     01H
CACHE_FULLY_ASSOCIATIVE                         equ     0FFH

FLUSH_FLAGS_FILE_DATA_ONLY                      equ     00000001H

LT_DONT_CARE                                    equ     0
LT_LOWEST_LATENCY                               equ     1

DIAGNOSTIC_REASON_VERSION                       equ     0

DIAGNOSTIC_REASON_SIMPLE_STRING                 equ     00000001H
DIAGNOSTIC_REASON_DETAILED_STRING               equ     00000002H
DIAGNOSTIC_REASON_NOT_SPECIFIED                 equ     80000000H
DIAGNOSTIC_REASON_INVALID_FLAGS                 equ     (NOT 80000003H)

POWER_REQUEST_CONTEXT_VERSION                   equ     0

POWER_REQUEST_CONTEXT_SIMPLE_STRING             equ     00000001H
POWER_REQUEST_CONTEXT_DETAILED_STRING           equ     00000002H

PowerRequestDisplayRequired                     equ     0
PowerRequestSystemRequired                      equ     1
PowerRequestAwayModeRequired                    equ     2
PowerRequestMaximum                             equ     3

PowerSystemUnspecified                          equ     0
PowerSystemWorking                              equ     1
PowerSystemSleeping1                            equ     2
PowerSystemSleeping2                            equ     3
PowerSystemSleeping3                            equ     4
PowerSystemHibernate                            equ     5
PowerSystemShutdown                             equ     6
PowerSystemMaximum                              equ     7

PowerActionNone                                 equ     0
PowerActionReserved                             equ     1
PowerActionSleep                                equ     2
PowerActionHibernate                            equ     3
PowerActionShutdown                             equ     4
PowerActionShutdownReset                        equ     5
PowerActionShutdownOff                          equ     6
PowerActionWarmEject                            equ     7

PowerDeviceUnspecified                          equ     0
PowerDeviceD0                                   equ     1
PowerDeviceD1                                   equ     2
PowerDeviceD2                                   equ     3
PowerDeviceD3                                   equ     4
PowerDeviceMaximum                              equ     5

PDCAP_D0_SUPPORTED                              equ     00000001H
PDCAP_D1_SUPPORTED                              equ     00000002H
PDCAP_D2_SUPPORTED                              equ     00000004H
PDCAP_D3_SUPPORTED                              equ     00000008H
PDCAP_WAKE_FROM_D0_SUPPORTED                    equ     00000010H
PDCAP_WAKE_FROM_D1_SUPPORTED                    equ     00000020H
PDCAP_WAKE_FROM_D2_SUPPORTED                    equ     00000040H
PDCAP_WAKE_FROM_D3_SUPPORTED                    equ     00000080H
PDCAP_WARM_EJECT_SUPPORTED                      equ     00000100H

SystemPowerPolicyAc                             equ     0
SystemPowerPolicyDc                             equ     1
VerifySystemPolicyAc                            equ     2
VerifySystemPolicyDc                            equ     3
SystemPowerCapabilities                         equ     4
SystemBatteryState                              equ     5
SystemPowerStateHandler                         equ     6
ProcessorStateHandler                           equ     7
SystemPowerPolicyCurrent                        equ     8
AdministratorPowerPolicy                        equ     9
SystemReserveHiberFile                          equ     10
ProcessorInformation                            equ     11
SystemPowerInformation                          equ     12
ProcessorStateHandler2                          equ     13
LastWakeTime                                    equ     14
LastSleepTime                                   equ     15
SystemExecutionState                            equ     16
SystemPowerStateNotifyHandler                   equ     17
ProcessorPowerPolicyAc                          equ     18
ProcessorPowerPolicyDc                          equ     19
VerifyProcessorPowerPolicyAc                    equ     20
VerifyProcessorPowerPolicyDc                    equ     21
ProcessorPowerPolicyCurrent                     equ     22
SystemPowerStateLogging                         equ     23
SystemPowerLoggingEntry                         equ     24
SetPowerSettingValue                            equ     25
NotifyUserPowerSetting                          equ     26
PowerInformationLevelUnused0                    equ     27
PowerInformationLevelUnused1                    equ     28
SystemVideoState                                equ     29
TraceApplicationPowerMessage                    equ     30
TraceApplicationPowerMessageEnd                 equ     31
ProcessorPerfStates                             equ     32
ProcessorIdleStates                             equ     33
ProcessorCap                                    equ     34
SystemWakeSource                                equ     35
SystemHiberFileInformation                      equ     36
TraceServicePowerMessage                        equ     37
ProcessorLoad                                   equ     38
PowerShutdownNotification                       equ     39
MonitorCapabilities                             equ     40
SessionPowerInit                                equ     41
SessionDisplayState                             equ     42
PowerRequestCreate                              equ     43
PowerRequestAction                              equ     44
GetPowerRequestList                             equ     45
ProcessorInformationEx                          equ     46
NotifyUserModeLegacyPowerEvent                  equ     47
GroupPark                                       equ     48
ProcessorIdleDomains                            equ     49
WakeTimerList                                   equ     50
SystemHiberFileSize                             equ     51
PowerInformationLevelMaximum                    equ     52

PO_TRANSITION_VETO_TYPE_WINDOW                  equ     00000001H
PO_TRANSITION_VETO_TYPE_SERVICE                 equ     00000002H
PO_TRANSITION_VETO_TYPE_DRIVER                  equ     00000004H

PO_TRANSITION_VETO_TYPE_ALL                     equ     (PO_TRANSITION_VETO_TYPE_WINDOW or PO_TRANSITION_VETO_TYPE_SERVICE)

PoAc                                            equ     0
PoDc                                            equ     1
PoHot                                           equ     2
PoConditionMaximum                              equ     3

POWER_SETTING_VALUE_VERSION                     equ     01H

PlatformRoleUnspecified                         equ     0
PlatformRoleDesktop                             equ     1
PlatformRoleMobile                              equ     2
PlatformRoleWorkstation                         equ     3
PlatformRoleEnterpriseServer                    equ     4
PlatformRoleSOHOServer                          equ     5
PlatformRoleAppliancePC                         equ     6
PlatformRolePerformanceServer                   equ     7
PlatformRoleSlate                               equ     8
PlatformRoleMaximum                             equ     9

POWER_PLATFORM_ROLE_V1                          equ     1
POWER_PLATFORM_ROLE_V1_MAX                      equ     8

POWER_PLATFORM_ROLE_V2                          equ     2
POWER_PLATFORM_ROLE_V2_MAX                      equ     9

if (NTDDI_VERSION >= NTDDI_WIN8)
    POWER_PLATFORM_ROLE_VERSION                 equ     POWER_PLATFORM_ROLE_V2
    POWER_PLATFORM_ROLE_VERSION_MAX             equ     POWER_PLATFORM_ROLE_V2_MAX
else
    POWER_PLATFORM_ROLE_VERSION                 equ     POWER_PLATFORM_ROLE_V1
    POWER_PLATFORM_ROLE_VERSION_MAX             equ     POWER_PLATFORM_ROLE_V1_MAX
end if

DeviceWakeSourceType                            equ     0
FixedWakeSourceType                             equ     1

FixedWakeSourcePowerButton                      equ     0
FixedWakeSourceSleepButton                      equ     1
FixedWakeSourceRtc                              equ     2

PROC_IDLE_BUCKET_COUNT                          equ     6

ACPI_PPM_SOFTWARE_ALL                           equ     0FCH
ACPI_PPM_SOFTWARE_ANY                           equ     0FDH
ACPI_PPM_HARDWARE_ALL                           equ     0FEH
MS_PPM_SOFTWARE_ALL                             equ     01H

POWER_ACTION_QUERY_ALLOWED                      equ     00000001H
POWER_ACTION_UI_ALLOWED                         equ     00000002H
POWER_ACTION_OVERRIDE_APPS                      equ     00000004H
POWER_ACTION_PSEUDO_TRANSITION                  equ     08000000H
POWER_ACTION_LIGHTEST_FIRST                     equ     10000000H
POWER_ACTION_LOCK_CONSOLE                       equ     20000000H
POWER_ACTION_DISABLE_WAKES                      equ     40000000H
POWER_ACTION_CRITICAL                           equ     80000000H

POWER_LEVEL_USER_NOTIFY_TEXT                    equ     00000001H
POWER_LEVEL_USER_NOTIFY_SOUND                   equ     00000002H
POWER_LEVEL_USER_NOTIFY_EXEC                    equ     00000004H
POWER_USER_NOTIFY_BUTTON                        equ     00000008H
POWER_USER_NOTIFY_SHUTDOWN                      equ     00000010H
POWER_FORCE_TRIGGER_RESET                       equ     80000000H

BATTERY_DISCHARGE_FLAGS_EVENTCODE_MASK          equ     00000007H
BATTERY_DISCHARGE_FLAGS_ENABLE                  equ     80000000H

NUM_DISCHARGE_POLICIES                          equ     4
DISCHARGE_POLICY_CRITICAL                       equ     0
DISCHARGE_POLICY_LOW                            equ     1

PROCESSOR_IDLESTATE_POLICY_COUNT                equ     03H

PO_THROTTLE_NONE                                equ     0
PO_THROTTLE_CONSTANT                            equ     1
PO_THROTTLE_DEGRADE                             equ     2
PO_THROTTLE_ADAPTIVE                            equ     3
PO_THROTTLE_MAXIMUM                             equ     4

PERFSTATE_POLICY_CHANGE_IDEAL                   equ     00H
PERFSTATE_POLICY_CHANGE_SINGLE                  equ     01H
PERFSTATE_POLICY_CHANGE_ROCKET                  equ     02H
PERFSTATE_POLICY_CHANGE_MAX                     equ     PERFSTATE_POLICY_CHANGE_ROCKET

ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION equ     1
ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION      equ     2
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION equ 3
ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION equ   4
ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION equ 5
ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION equ 6
ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION equ   7
ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE equ 8
ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES       equ     9
ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS equ     10
ACTIVATION_CONTEXT_SECTION_COMPATIBILITY_INFO   equ     11

IMAGE_SCN_TYPE_REG                              equ     00000000H
IMAGE_SCN_TYPE_DSECT                            equ     00000001H
IMAGE_SCN_TYPE_NOLOAD                           equ     00000002H
IMAGE_SCN_TYPE_GROUP                            equ     00000004H
IMAGE_SCN_TYPE_NO_PAD                           equ     00000008H
IMAGE_SCN_TYPE_COPY                             equ     00000010H

IMAGE_SCN_CNT_CODE                              equ     00000020H
IMAGE_SCN_CNT_INITIALIZED_DATA                  equ     00000040H
IMAGE_SCN_CNT_UNINITIALIZED_DATA                equ     00000080H

IMAGE_SCN_LNK_OTHER                             equ     00000100H
IMAGE_SCN_LNK_INFO                              equ     00000200H
IMAGE_SCN_TYPE_OVER                             equ     00000400H
IMAGE_SCN_LNK_REMOVE                            equ     00000800H
IMAGE_SCN_LNK_COMDAT                            equ     00001000H

IMAGE_SCN_NO_DEFER_SPEC_EXC                     equ     00004000H
IMAGE_SCN_GPREL                                 equ     00008000H
IMAGE_SCN_MEM_FARDATA                           equ     00008000H
IMAGE_SCN_MEM_PURGEABLE                         equ     00020000H
IMAGE_SCN_MEM_16BIT                             equ     00020000H
IMAGE_SCN_MEM_LOCKED                            equ     00040000H
IMAGE_SCN_MEM_PRELOAD                           equ     00080000H

IMAGE_SCN_ALIGN_1BYTES                          equ     00100000H
IMAGE_SCN_ALIGN_2BYTES                          equ     00200000H
IMAGE_SCN_ALIGN_4BYTES                          equ     00300000H
IMAGE_SCN_ALIGN_8BYTES                          equ     00400000H
IMAGE_SCN_ALIGN_16BYTES                         equ     00500000H
IMAGE_SCN_ALIGN_32BYTES                         equ     00600000H
IMAGE_SCN_ALIGN_64BYTES                         equ     00700000H
IMAGE_SCN_ALIGN_128BYTES                        equ     00800000H
IMAGE_SCN_ALIGN_256BYTES                        equ     00900000H
IMAGE_SCN_ALIGN_512BYTES                        equ     00A00000H
IMAGE_SCN_ALIGN_1024BYTES                       equ     00B00000H
IMAGE_SCN_ALIGN_2048BYTES                       equ     00C00000H
IMAGE_SCN_ALIGN_4096BYTES                       equ     00D00000H
IMAGE_SCN_ALIGN_8192BYTES                       equ     00E00000H
IMAGE_SCN_ALIGN_MASK                            equ     00F00000H

IMAGE_SCN_LNK_NRELOC_OVFL                       equ     01000000H
IMAGE_SCN_MEM_DISCARDABLE                       equ     02000000H
IMAGE_SCN_MEM_NOT_CACHED                        equ     04000000H
IMAGE_SCN_MEM_NOT_PAGED                         equ     08000000H
IMAGE_SCN_MEM_SHARED                            equ     10000000H
IMAGE_SCN_MEM_EXECUTE                           equ     20000000H
IMAGE_SCN_MEM_READ                              equ     40000000H
IMAGE_SCN_MEM_WRITE                             equ     80000000H

IMAGE_SCN_SCALE_INDEX                           equ     00000001H

IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF                 equ     1

IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR                 equ     60

IMPORT_OBJECT_CODE                              equ     0
IMPORT_OBJECT_DATA                              equ     1
IMPORT_OBJECT_CONST                             equ     2

IMPORT_OBJECT_ORDINAL                           equ     0
IMPORT_OBJECT_NAME                              equ     1
IMPORT_OBJECT_NAME_NO_PREFIX                    equ     2
IMPORT_OBJECT_NAME_UNDECORATE                   equ     3

RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO         equ     001000000H
RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN          equ     002000000H
RTL_CRITICAL_SECTION_FLAG_STATIC_INIT           equ     004000000H
RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE         equ     008000000H
RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO      equ     010000000H
RTL_CRITICAL_SECTION_ALL_FLAG_BITS              equ     0FF000000H
RTL_CRITICAL_SECTION_FLAG_RESERVED              equ     RTL_CRITICAL_SECTION_ALL_FLAG_BITS and (NOT (RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO or RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN or RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE or RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO))
RTL_CRITICAL_SECTION_DEBUG_FLAG_STATIC_INIT     equ     000000001H

RTL_SRWLOCK_INIT                                equ     0

RTL_CONDITION_VARIABLE_INIT                     equ     00H
RTL_CONDITION_VARIABLE_LOCKMODE_SHARED          equ     01H

ACTIVATION_CONTEXT_PATH_TYPE_NONE               equ     1
ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE         equ     2
ACTIVATION_CONTEXT_PATH_TYPE_URL                equ     3
ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF        equ     4

ACTCTX_RUN_LEVEL_UNSPECIFIED                    equ     0
ACTCTX_RUN_LEVEL_AS_INVOKER                     equ     1
ACTCTX_RUN_LEVEL_HIGHEST_AVAILABLE              equ     2
ACTCTX_RUN_LEVEL_REQUIRE_ADMIN                  equ     3
ACTCTX_RUN_LEVEL_NUMBERS                        equ     4

MAX_SUPPORTED_OS_NUM                            equ     4

TRANSACTION_MANAGER_VOLATILE                    equ     000000001H
TRANSACTION_MANAGER_COMMIT_DEFAULT              equ     000000000H
TRANSACTION_MANAGER_COMMIT_SYSTEM_VOLUME        equ     000000002H
TRANSACTION_MANAGER_COMMIT_SYSTEM_HIVES         equ     000000004H
TRANSACTION_MANAGER_COMMIT_LOWEST               equ     000000008H
TRANSACTION_MANAGER_CORRUPT_FOR_RECOVERY        equ     000000010H
TRANSACTION_MANAGER_CORRUPT_FOR_PROGRESS        equ     000000020H
TRANSACTION_MANAGER_MAXIMUM_OPTION              equ     00000003FH

TRANSACTION_DO_NOT_PROMOTE                      equ     000000001H
TRANSACTION_MAXIMUM_OPTION                      equ     000000001H

TRANSACTION_NOTIFY_MASK                         equ     03FFFFFFFH
TRANSACTION_NOTIFY_PREPREPARE                   equ     000000001H
TRANSACTION_NOTIFY_PREPARE                      equ     000000002H
TRANSACTION_NOTIFY_COMMIT                       equ     000000004H
TRANSACTION_NOTIFY_ROLLBACK                     equ     000000008H
TRANSACTION_NOTIFY_PREPREPARE_COMPLETE          equ     000000010H
TRANSACTION_NOTIFY_PREPARE_COMPLETE             equ     000000020H
TRANSACTION_NOTIFY_COMMIT_COMPLETE              equ     000000040H
TRANSACTION_NOTIFY_ROLLBACK_COMPLETE            equ     000000080H
TRANSACTION_NOTIFY_RECOVER                      equ     000000100H
TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT          equ     000000200H
TRANSACTION_NOTIFY_DELEGATE_COMMIT              equ     000000400H
TRANSACTION_NOTIFY_RECOVER_QUERY                equ     000000800H
TRANSACTION_NOTIFY_ENLIST_PREPREPARE            equ     000001000H
TRANSACTION_NOTIFY_LAST_RECOVER                 equ     000002000H
TRANSACTION_NOTIFY_INDOUBT                      equ     000004000H
TRANSACTION_NOTIFY_PROPAGATE_PULL               equ     000008000H
TRANSACTION_NOTIFY_PROPAGATE_PUSH               equ     000010000H
TRANSACTION_NOTIFY_MARSHAL                      equ     000020000H
TRANSACTION_NOTIFY_ENLIST_MASK                  equ     000040000H
TRANSACTION_NOTIFY_RM_DISCONNECTED              equ     001000000H
TRANSACTION_NOTIFY_TM_ONLINE                    equ     002000000H
TRANSACTION_NOTIFY_COMMIT_REQUEST               equ     004000000H
TRANSACTION_NOTIFY_PROMOTE                      equ     008000000H
TRANSACTION_NOTIFY_PROMOTE_NEW                  equ     010000000H
TRANSACTION_NOTIFY_REQUEST_OUTCOME              equ     020000000H
TRANSACTION_NOTIFY_COMMIT_FINALIZE              equ     040000000H

TRANSACTIONMANAGER_QUERY_INFORMATION            equ     00001H
TRANSACTIONMANAGER_SET_INFORMATION              equ     00002H
TRANSACTIONMANAGER_RECOVER                      equ     00004H
TRANSACTIONMANAGER_RENAME                       equ     00008H
TRANSACTIONMANAGER_CREATE_RM                    equ     00010H
TRANSACTIONMANAGER_BIND_TRANSACTION             equ     00020H
TRANSACTIONMANAGER_GENERIC_READ                 equ     (STANDARD_RIGHTS_READ or TRANSACTIONMANAGER_QUERY_INFORMATION)
TRANSACTIONMANAGER_GENERIC_WRITE                equ     (STANDARD_RIGHTS_WRITE or TRANSACTIONMANAGER_SET_INFORMATION or \
                                                        TRANSACTIONMANAGER_RECOVER or TRANSACTIONMANAGER_RENAME or \
                                                        TRANSACTIONMANAGER_CREATE_RM)
TRANSACTIONMANAGER_GENERIC_EXECUTE              equ     STANDARD_RIGHTS_EXECUTE
TRANSACTIONMANAGER_ALL_ACCESS                   equ     (STANDARD_RIGHTS_REQUIRED or TRANSACTIONMANAGER_GENERIC_READ or \
                                                        TRANSACTIONMANAGER_GENERIC_WRITE or TRANSACTIONMANAGER_GENERIC_EXECUTE or \
                                                        TRANSACTIONMANAGER_BIND_TRANSACTION)

TRANSACTION_QUERY_INFORMATION                   equ     00001H
TRANSACTION_SET_INFORMATION                     equ     00002H
TRANSACTION_ENLIST                              equ     00004H
TRANSACTION_COMMIT                              equ     00008H
TRANSACTION_ROLLBACK                            equ     00010H
TRANSACTION_PROPAGATE                           equ     00020H
TRANSACTION_RIGHT_RESERVED1                     equ     00040H

TRANSACTION_GENERIC_READ                        equ     (STANDARD_RIGHTS_READ or TRANSACTION_QUERY_INFORMATION or SYNCHRONIZE)
TRANSACTION_GENERIC_WRITE                       equ     (STANDARD_RIGHTS_WRITE or TRANSACTION_SET_INFORMATION or \
                                                        TRANSACTION_COMMIT or TRANSACTION_ENLIST or TRANSACTION_ROLLBACK or \
                                                        TRANSACTION_PROPAGATE or SYNCHRONIZE)
TRANSACTION_GENERIC_EXECUTE                     equ     (STANDARD_RIGHTS_EXECUTE or TRANSACTION_COMMIT or \
                                                        TRANSACTION_ROLLBACK or SYNCHRONIZE)
TRANSACTION_ALL_ACCESS                          equ     (STANDARD_RIGHTS_REQUIRED or TRANSACTION_GENERIC_READ or \
                                                        TRANSACTION_GENERIC_WRITE or TRANSACTION_GENERIC_EXECUTE)
TRANSACTION_RESOURCE_MANAGER_RIGHTS             equ     (TRANSACTION_GENERIC_READ or STANDARD_RIGHTS_WRITE or \
                                                        TRANSACTION_SET_INFORMATION or TRANSACTION_ENLIST or \
                                                        TRANSACTION_ROLLBACK or TRANSACTION_PROPAGATE or SYNCHRONIZE)

RESOURCEMANAGER_QUERY_INFORMATION               equ     00001H
RESOURCEMANAGER_SET_INFORMATION                 equ     00002H
RESOURCEMANAGER_RECOVER                         equ     00004H
RESOURCEMANAGER_ENLIST                          equ     00008H
RESOURCEMANAGER_GET_NOTIFICATION                equ     00010H
RESOURCEMANAGER_REGISTER_PROTOCOL               equ     00020H
RESOURCEMANAGER_COMPLETE_PROPAGATION            equ     00040H

RESOURCEMANAGER_GENERIC_READ                    equ     (STANDARD_RIGHTS_READ or RESOURCEMANAGER_QUERY_INFORMATION or SYNCHRONIZE)
RESOURCEMANAGER_GENERIC_WRITEA                  equ     (STANDARD_RIGHTS_WRITE or RESOURCEMANAGER_SET_INFORMATION or \
                                                        RESOURCEMANAGER_RECOVER or RESOURCEMANAGER_ENLIST or \
                                                        RESOURCEMANAGER_GET_NOTIFICATION or RESOURCEMANAGER_REGISTER_PROTOCOL)
RESOURCEMANAGER_GENERIC_WRITEB                  equ     (RESOURCEMANAGER_COMPLETE_PROPAGATION or SYNCHRONIZE)
RESOURCEMANAGER_GENERIC_WRITE                   equ     (RESOURCEMANAGER_GENERIC_WRITEA or RESOURCEMANAGER_GENERIC_WRITEB)
RESOURCEMANAGER_GENERIC_EXECUTE                 equ     (STANDARD_RIGHTS_EXECUTE or RESOURCEMANAGER_RECOVER or \
                                                        RESOURCEMANAGER_ENLIST or RESOURCEMANAGER_GET_NOTIFICATION or \
                                                        RESOURCEMANAGER_COMPLETE_PROPAGATION or SYNCHRONIZE)
RESOURCEMANAGER_ALL_ACCESS                      equ     (STANDARD_RIGHTS_REQUIRED or RESOURCEMANAGER_GENERIC_READ or \
                                                        RESOURCEMANAGER_GENERIC_WRITE or RESOURCEMANAGER_GENERIC_EXECUTE)

RESOURCE_MANAGER_VOLATILE                       equ     000000001H
RESOURCE_MANAGER_COMMUNICATION                  equ     000000002H
RESOURCE_MANAGER_MAXIMUM_OPTION                 equ     000000003H

ENLISTMENT_QUERY_INFORMATION                    equ     00001H
ENLISTMENT_SET_INFORMATION                      equ     00002H
ENLISTMENT_RECOVER                              equ     00004H
ENLISTMENT_SUBORDINATE_RIGHTS                   equ     00008H
ENLISTMENT_SUPERIOR_RIGHTS                      equ     00010H
ENLISTMENT_GENERIC_READ                         equ     (STANDARD_RIGHTS_READ or ENLISTMENT_QUERY_INFORMATION)
ENLISTMENT_GENERIC_WRITE                        equ     (STANDARD_RIGHTS_WRITE or ENLISTMENT_SET_INFORMATION or \
                                                        ENLISTMENT_RECOVER or ENLISTMENT_SUBORDINATE_RIGHTS or \
                                                        ENLISTMENT_SUPERIOR_RIGHTS)
ENLISTMENT_GENERIC_EXECUTE                      equ     (STANDARD_RIGHTS_EXECUTE or ENLISTMENT_RECOVER or \
                                                        ENLISTMENT_SUBORDINATE_RIGHTS or ENLISTMENT_SUPERIOR_RIGHTS)
ENLISTMENT_ALL_ACCESS                           equ     (STANDARD_RIGHTS_REQUIRED or ENLISTMENT_GENERIC_READ or \
                                                        ENLISTMENT_GENERIC_WRITE or ENLISTMENT_GENERIC_EXECUTE)

CRM_PROTOCOL_EXPLICIT_MARSHAL_ONLY              equ     000000001H
CRM_PROTOCOL_DYNAMIC_MARSHAL_INFO               equ     000000002H
CRM_PROTOCOL_MAXIMUM_OPTION                     equ     000000003H

ENLISTMENT_SUPERIOR equ     000000001H
ENLISTMENT_MAXIMUM_OPTION                       equ     000000001H

KTM_MARSHAL_BLOB_VERSION_MAJOR                  equ     1
KTM_MARSHAL_BLOB_VERSION_MINOR                  equ     1
MAX_TRANSACTION_DESCRIPTION_LENGTH              equ     64
MAX_RESOURCEMANAGER_DESCRIPTION_LENGTH          equ     64

COMIMAGE_FLAGS_ILONLY                           equ     00000001H
COMIMAGE_FLAGS_32BITREQUIRED                    equ     00000002H
COMIMAGE_FLAGS_IL_LIBRARY                       equ     00000004H
COMIMAGE_FLAGS_STRONGNAMESIGNED                 equ     00000008H
COMIMAGE_FLAGS_NATIVE_ENTRYPOINT                equ     00000010H
COMIMAGE_FLAGS_TRACKDEBUGDATA                   equ     00010000H
COR_VERSION_MAJOR_V2                            equ     2
COR_VERSION_MAJOR                               equ     2
COR_VERSION_MINOR                               equ     5
COR_DELETED_NAME_LENGTH                         equ     8
COR_VTABLEGAP_NAME_LENGTH                       equ     8
NATIVE_TYPE_MAX_CB                              equ     1
COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE            equ     0FFH
IMAGE_COR_MIH_METHODRVA                         equ     01H
IMAGE_COR_MIH_EHRVA                             equ     02H
IMAGE_COR_MIH_BASICBLOCK                        equ     08H
COR_VTABLE_32BIT                                equ     01H
COR_VTABLE_64BIT                                equ     02H
COR_VTABLE_FROM_UNMANAGED                       equ     04H
COR_VTABLE_FROM_UNMANAGED_RETAIN_APPDOMAIN      equ     08H
COR_VTABLE_CALL_MOST_DERIVED                    equ     10H
IMAGE_COR_EATJ_THUNK_SIZE                       equ     20H
MAX_CLASS_NAME                                  equ     1024
MAX_PACKAGE_NAME                                equ     1024

if (NTDDI_VERSION >= NTDDI_WIN8)
    VRL_PREDEFINED_CLASS_BEGIN                  equ     (1 shl 0)
    VRL_CUSTOM_CLASS_BEGIN                      equ     (1 shl 8)
    VRL_CLASS_CONSISTENCY                       equ     (VRL_PREDEFINED_CLASS_BEGIN shl 0)
    VRL_ENABLE_KERNEL_BREAKS                    equ     (1 shl 31)

    CTMF_INCLUDE_APPCONTAINER                   equ     000000001H
    CTMF_VALID_FLAGS                            equ     CTMF_INCLUDE_APPCONTAINER
end if

if (NTDDI_VERSION > NTDDI_WIN8)
    HEAP_OPTIMIZE_RESOURCES_CURRENT_VERSION     equ     1

    struct HEAP_OPTIMIZE_RESOURCES_INFORMATION
        Version dd ?
        Flags   dd ?
    ends
end if

RTL_RUN_ONCE_INIT                               equ     0
RTL_RUN_ONCE_CHECK_ONLY                         equ     000000001H
RTL_RUN_ONCE_ASYNC                              equ     000000002H
RTL_RUN_ONCE_INIT_FAILED                        equ     000000004H

RTL_RUN_ONCE_CTX_RESERVED_BITS                  equ     2

IMAGE_BASE                                      equ     400000H

;========================================  Functions ======================================;
if defined APP_WIN64
    if (NTDDI_VERSION >= NTDDI_WINXP)
        extrn '__imp___C_specific_handler' as __C_specific_handler:qword
        extrn '__imp___chkstk' as __chkstk:qword
    end if
    extrn '__imp__hread' as _hread:qword
    extrn '__imp__hwrite' as _hwrite:qword
    extrn '__imp__lclose' as _lclose:qword
    extrn '__imp__lcreat' as _lcreat:qword
    extrn '__imp__llseek' as _llseek:qword
    extrn '__imp__lopen' as _lopen:qword
    extrn '__imp__lread' as _lread:qword
    extrn '__imp__lwrite' as _lwrite:qword
    extrn '__imp_AddAtomA' as AddAtomA:qword
    extrn '__imp_AddAtomW' as AddAtomW:qword
    extrn '__imp_AllocConsole' as AllocConsole:qword
    extrn '__imp_AreFileApisANSI' as AreFileApisANSI:qword
    extrn '__imp_BackupRead' as BackupRead:qword
    extrn '__imp_BackupSeek' as BackupSeek:qword
    extrn '__imp_BackupWrite' as BackupWrite:qword
    extrn '__imp_Beep' as Beep:qword
    extrn '__imp_BeginUpdateResourceA' as BeginUpdateResourceA:qword
    extrn '__imp_BeginUpdateResourceW' as BeginUpdateResourceW:qword
    extrn '__imp_BuildCommDCBA' as BuildCommDCBA:qword
    extrn '__imp_BuildCommDCBAndTimeoutsA' as BuildCommDCBAndTimeoutsA:qword
    extrn '__imp_BuildCommDCBAndTimeoutsW' as BuildCommDCBAndTimeoutsW:qword
    extrn '__imp_BuildCommDCBW' as BuildCommDCBW:qword
    extrn '__imp_CallNamedPipeA' as CallNamedPipeA:qword
    extrn '__imp_CallNamedPipeW' as CallNamedPipeW:qword
    extrn '__imp_ClearCommBreak' as ClearCommBreak:qword
    extrn '__imp_ClearCommError' as ClearCommError:qword
    extrn '__imp_CloseHandle' as CloseHandle:qword
    extrn '__imp_CloseProfileUserMapping' as CloseProfileUserMapping:qword
    extrn '__imp_CommConfigDialogA' as CommConfigDialogA:qword
    extrn '__imp_CommConfigDialogW' as CommConfigDialogW:qword
    extrn '__imp_CompareFileTime' as CompareFileTime:qword
    extrn '__imp_CompareStringA' as CompareStringA:qword
    extrn '__imp_CompareStringW' as CompareStringW:qword
    extrn '__imp_ConnectNamedPipe' as ConnectNamedPipe:qword
    extrn '__imp_ContinueDebugEvent' as ContinueDebugEvent:qword
    extrn '__imp_ConvertDefaultLocale' as ConvertDefaultLocale:qword
    extrn '__imp_CopyFileA' as CopyFileA:qword
    extrn '__imp_CopyFileW' as CopyFileW:qword
    extrn '__imp_CreateConsoleScreenBuffer' as CreateConsoleScreenBuffer:qword
    extrn '__imp_CreateDirectoryA' as CreateDirectoryA:qword
    extrn '__imp_CreateDirectoryExA' as CreateDirectoryExA:qword
    extrn '__imp_CreateDirectoryExW' as CreateDirectoryExW:qword
    extrn '__imp_CreateDirectoryW' as CreateDirectoryW:qword
    extrn '__imp_CreateEventA' as CreateEventA:qword
    extrn '__imp_CreateEventW' as CreateEventW:qword
    extrn '__imp_CreateFileA' as CreateFileA:qword
    extrn '__imp_CreateFileMappingA' as CreateFileMappingA:qword
    extrn '__imp_CreateFileMappingW' as CreateFileMappingW:qword
    extrn '__imp_CreateFileW' as CreateFileW:qword
    extrn '__imp_CreateIoCompletionPort' as CreateIoCompletionPort:qword
    extrn '__imp_CreateMailslotA' as CreateMailslotA:qword
    extrn '__imp_CreateMailslotW' as CreateMailslotW:qword
    extrn '__imp_CreateMutexA' as CreateMutexA:qword
    extrn '__imp_CreateMutexW' as CreateMutexW:qword
    extrn '__imp_CreateNamedPipeA' as CreateNamedPipeA:qword
    extrn '__imp_CreateNamedPipeW' as CreateNamedPipeW:qword
    extrn '__imp_CreatePipe' as CreatePipe:qword
    extrn '__imp_CreateProcessA' as CreateProcessA:qword
    extrn '__imp_CreateProcessW' as CreateProcessW:qword
    extrn '__imp_CreateRemoteThread' as CreateRemoteThread:qword
    extrn '__imp_CreateSemaphoreA' as CreateSemaphoreA:qword
    extrn '__imp_CreateSemaphoreW' as CreateSemaphoreW:qword
    extrn '__imp_CreateTapePartition' as CreateTapePartition:qword
    extrn '__imp_CreateThread' as CreateThread:qword
    extrn '__imp_CreateToolhelp32Snapshot' as CreateToolhelp32Snapshot:qword
    extrn '__imp_DebugActiveProcess' as DebugActiveProcess:qword
    extrn '__imp_DebugBreak' as DebugBreak:qword
    extrn '__imp_DefineDosDeviceA' as DefineDosDeviceA:qword
    extrn '__imp_DefineDosDeviceW' as DefineDosDeviceW:qword
    extrn '__imp_DeleteAtom' as DeleteAtom:qword
    extrn '__imp_DeleteCriticalSection' as DeleteCriticalSection:qword
    extrn '__imp_DeleteFileA' as DeleteFileA:qword
    extrn '__imp_DeleteFileW' as DeleteFileW:qword
    extrn '__imp_DeviceIoControl' as DeviceIoControl:qword
    extrn '__imp_DisableThreadLibraryCalls' as DisableThreadLibraryCalls:qword
    extrn '__imp_DisconnectNamedPipe' as DisconnectNamedPipe:qword
    extrn '__imp_DosDateTimeToFileTime' as DosDateTimeToFileTime:qword
    extrn '__imp_DuplicateHandle' as DuplicateHandle:qword
    extrn '__imp_EndUpdateResourceA' as EndUpdateResourceA:qword
    extrn '__imp_EndUpdateResourceW' as EndUpdateResourceW:qword
    extrn '__imp_EnterCriticalSection' as EnterCriticalSection:qword
    extrn '__imp_EnumCalendarInfoA' as EnumCalendarInfoA:qword
    extrn '__imp_EnumCalendarInfoW' as EnumCalendarInfoW:qword
    extrn '__imp_EnumDateFormatsA' as EnumDateFormatsA:qword
    extrn '__imp_EnumDateFormatsW' as EnumDateFormatsW:qword
    extrn '__imp_EnumResourceLanguagesA' as EnumResourceLanguagesA:qword
    extrn '__imp_EnumResourceLanguagesW' as EnumResourceLanguagesW:qword
    extrn '__imp_EnumResourceNamesA' as EnumResourceNamesA:qword
    extrn '__imp_EnumResourceNamesW' as EnumResourceNamesW:qword
    extrn '__imp_EnumResourceTypesA' as EnumResourceTypesA:qword
    extrn '__imp_EnumResourceTypesW' as EnumResourceTypesW:qword
    extrn '__imp_EnumSystemCodePagesA' as EnumSystemCodePagesA:qword
    extrn '__imp_EnumSystemCodePagesW' as EnumSystemCodePagesW:qword
    extrn '__imp_EnumSystemLocalesA' as EnumSystemLocalesA:qword
    extrn '__imp_EnumSystemLocalesW' as EnumSystemLocalesW:qword
    extrn '__imp_EnumTimeFormatsA' as EnumTimeFormatsA:qword
    extrn '__imp_EnumTimeFormatsW' as EnumTimeFormatsW:qword
    extrn '__imp_EraseTape' as EraseTape:qword
    extrn '__imp_EscapeCommFunction' as EscapeCommFunction:qword
    extrn '__imp_ExitProcess' as ExitProcess:qword
    extrn '__imp_ExitThread' as ExitThread:qword
    extrn '__imp_ExpandEnvironmentStringsA' as ExpandEnvironmentStringsA:qword
    extrn '__imp_ExpandEnvironmentStringsW' as ExpandEnvironmentStringsW:qword
    extrn '__imp_FatalAppExitA' as FatalAppExitA:qword
    extrn '__imp_FatalAppExitW' as FatalAppExitW:qword
    extrn '__imp_FatalExit' as FatalExit:qword
    extrn '__imp_FileTimeToDosDateTime' as FileTimeToDosDateTime:qword
    extrn '__imp_FileTimeToLocalFileTime' as FileTimeToLocalFileTime:qword
    extrn '__imp_FileTimeToSystemTime' as FileTimeToSystemTime:qword
    extrn '__imp_FillConsoleOutputAttribute' as FillConsoleOutputAttribute:qword
    extrn '__imp_FillConsoleOutputCharacterA' as FillConsoleOutputCharacterA:qword
    extrn '__imp_FillConsoleOutputCharacterW' as FillConsoleOutputCharacterW:qword
    extrn '__imp_FindAtomA' as FindAtomA:qword
    extrn '__imp_FindAtomW' as FindAtomW:qword
    extrn '__imp_FindClose' as FindClose:qword
    extrn '__imp_FindCloseChangeNotification' as FindCloseChangeNotification:qword
    extrn '__imp_FindFirstChangeNotificationA' as FindFirstChangeNotificationA:qword
    extrn '__imp_FindFirstChangeNotificationW' as FindFirstChangeNotificationW:qword
    extrn '__imp_FindFirstFileA' as FindFirstFileA:qword
    extrn '__imp_FindFirstFileW' as FindFirstFileW:qword
    extrn '__imp_FindNextChangeNotification' as FindNextChangeNotification:qword
    extrn '__imp_FindNextFileA' as FindNextFileA:qword
    extrn '__imp_FindNextFileW' as FindNextFileW:qword
    extrn '__imp_FindResourceA' as FindResourceA:qword
    extrn '__imp_FindResourceExA' as FindResourceExA:qword
    extrn '__imp_FindResourceExW' as FindResourceExW:qword
    extrn '__imp_FindResourceW' as FindResourceW:qword
    extrn '__imp_FlushConsoleInputBuffer' as FlushConsoleInputBuffer:qword
    extrn '__imp_FlushFileBuffers' as FlushFileBuffers:qword
    extrn '__imp_FlushInstructionCache' as FlushInstructionCache:qword
    extrn '__imp_FlushViewOfFile' as FlushViewOfFile:qword
    extrn '__imp_FoldStringA' as FoldStringA:qword
    extrn '__imp_FoldStringW' as FoldStringW:qword
    extrn '__imp_FormatMessageA' as FormatMessageA:qword
    extrn '__imp_FormatMessageW' as FormatMessageW:qword
    extrn '__imp_FreeConsole' as FreeConsole:qword
    extrn '__imp_FreeEnvironmentStringsA' as FreeEnvironmentStringsA:qword
    extrn '__imp_FreeEnvironmentStringsW' as FreeEnvironmentStringsW:qword
    extrn '__imp_FreeLibrary' as FreeLibrary:qword
    extrn '__imp_FreeLibraryAndExitThread' as FreeLibraryAndExitThread:qword
    extrn '__imp_FreeResource' as FreeResource:qword
    extrn '__imp_GenerateConsoleCtrlEvent' as GenerateConsoleCtrlEvent:qword
    extrn '__imp_GetACP' as GetACP:qword
    extrn '__imp_GetAtomNameA' as GetAtomNameA:qword
    extrn '__imp_GetAtomNameW' as GetAtomNameW:qword
    extrn '__imp_GetBinaryTypeA' as GetBinaryTypeA:qword
    extrn '__imp_GetBinaryTypeW' as GetBinaryTypeW:qword
    extrn '__imp_GetCommandLineA' as GetCommandLineA:qword
    extrn '__imp_GetCommandLineW' as GetCommandLineW:qword
    extrn '__imp_GetCommConfig' as GetCommConfig:qword
    extrn '__imp_GetCommMask' as GetCommMask:qword
    extrn '__imp_GetCommModemStatus' as GetCommModemStatus:qword
    extrn '__imp_GetCommProperties' as GetCommProperties:qword
    extrn '__imp_GetCommState' as GetCommState:qword
    extrn '__imp_GetCommTimeouts' as GetCommTimeouts:qword
    extrn '__imp_GetCompressedFileSizeA' as GetCompressedFileSizeA:qword
    extrn '__imp_GetCompressedFileSizeW' as GetCompressedFileSizeW:qword
    extrn '__imp_GetComputerNameA' as GetComputerNameA:qword
    extrn '__imp_GetComputerNameW' as GetComputerNameW:qword
    extrn '__imp_GetConsoleCP' as GetConsoleCP:qword
    extrn '__imp_GetConsoleCursorInfo' as GetConsoleCursorInfo:qword
    extrn '__imp_GetConsoleMode' as GetConsoleMode:qword
    extrn '__imp_GetConsoleOutputCP' as GetConsoleOutputCP:qword
    extrn '__imp_GetConsoleScreenBufferInfo' as GetConsoleScreenBufferInfo:qword
    extrn '__imp_GetConsoleTitleA' as GetConsoleTitleA:qword
    extrn '__imp_GetConsoleTitleW' as GetConsoleTitleW:qword
    extrn '__imp_GetCPInfo' as GetCPInfo:qword
    extrn '__imp_GetCurrencyFormatA' as GetCurrencyFormatA:qword
    extrn '__imp_GetCurrencyFormatW' as GetCurrencyFormatW:qword
    extrn '__imp_GetCurrentDirectoryA' as GetCurrentDirectoryA:qword
    extrn '__imp_GetCurrentDirectoryW' as GetCurrentDirectoryW:qword
    extrn '__imp_GetCurrentProcess' as GetCurrentProcess:qword
    extrn '__imp_GetCurrentProcessId' as GetCurrentProcessId:qword
    extrn '__imp_GetCurrentThread' as GetCurrentThread:qword
    extrn '__imp_GetCurrentThreadId' as GetCurrentThreadId:qword
    extrn '__imp_GetDateFormatA' as GetDateFormatA:qword
    extrn '__imp_GetDateFormatW' as GetDateFormatW:qword
    extrn '__imp_GetDefaultCommConfigA' as GetDefaultCommConfigA:qword
    extrn '__imp_GetDefaultCommConfigW' as GetDefaultCommConfigW:qword
    extrn '__imp_GetDiskFreeSpaceA' as GetDiskFreeSpaceA:qword
    extrn '__imp_GetDiskFreeSpaceExA' as GetDiskFreeSpaceExA:qword
    extrn '__imp_GetDiskFreeSpaceExW' as GetDiskFreeSpaceExW:qword
    extrn '__imp_GetDiskFreeSpaceW' as GetDiskFreeSpaceW:qword
    extrn '__imp_GetDriveTypeA' as GetDriveTypeA:qword
    extrn '__imp_GetDriveTypeW' as GetDriveTypeW:qword
    extrn '__imp_GetEnvironmentStringsA' as GetEnvironmentStringsA:qword
    extrn '__imp_GetEnvironmentStringsW' as GetEnvironmentStringsW:qword
    extrn '__imp_GetEnvironmentVariableA' as GetEnvironmentVariableA:qword
    extrn '__imp_GetEnvironmentVariableW' as GetEnvironmentVariableW:qword
    if (NTDDI_VERSION = NTDDI_WIN95 | NTDDI_VERSION = NTDDI_WIN98_ME | NTDDI_VERSION >= NTDDI_VISTA)
        extrn '__imp_GetErrorMode' as GetErrorMode:qword
    end if
    extrn '__imp_GetExitCodeProcess' as GetExitCodeProcess:qword
    extrn '__imp_GetExitCodeThread' as GetExitCodeThread:qword
    extrn '__imp_GetFileAttributesA' as GetFileAttributesA:qword
    extrn '__imp_GetFileAttributesW' as GetFileAttributesW:qword
    extrn '__imp_GetFileInformationByHandle' as GetFileInformationByHandle:qword
    extrn '__imp_GetFileSize' as GetFileSize:qword
    extrn '__imp_GetFileTime' as GetFileTime:qword
    extrn '__imp_GetFileType' as GetFileType:qword
    extrn '__imp_GetFullPathNameA' as GetFullPathNameA:qword
    extrn '__imp_GetFullPathNameW' as GetFullPathNameW:qword
    extrn '__imp_GetHandleInformation' as GetHandleInformation:qword
    extrn '__imp_GetLargestConsoleWindowSize' as GetLargestConsoleWindowSize:qword
    extrn '__imp_GetLastError' as GetLastError:qword
    extrn '__imp_GetLocaleInfoA' as GetLocaleInfoA:qword
    extrn '__imp_GetLocaleInfoW' as GetLocaleInfoW:qword
    extrn '__imp_GetLocalTime' as GetLocalTime:qword
    extrn '__imp_GetLogicalDrives' as GetLogicalDrives:qword
    extrn '__imp_GetLogicalDriveStringsA' as GetLogicalDriveStringsA:qword
    extrn '__imp_GetLogicalDriveStringsW' as GetLogicalDriveStringsW:qword
    extrn '__imp_GetMailslotInfo' as GetMailslotInfo:qword
    extrn '__imp_GetModuleFileNameA' as GetModuleFileNameA:qword
    extrn '__imp_GetModuleFileNameW' as GetModuleFileNameW:qword
    extrn '__imp_GetModuleHandleA' as GetModuleHandleA:qword
    extrn '__imp_GetModuleHandleW' as GetModuleHandleW:qword
    extrn '__imp_GetNamedPipeHandleStateA' as GetNamedPipeHandleStateA:qword
    extrn '__imp_GetNamedPipeHandleStateW' as GetNamedPipeHandleStateW:qword
    extrn '__imp_GetNamedPipeInfo' as GetNamedPipeInfo:qword
    extrn '__imp_GetNumberFormatA' as GetNumberFormatA:qword
    extrn '__imp_GetNumberFormatW' as GetNumberFormatW:qword
    extrn '__imp_GetNumberOfConsoleInputEvents' as GetNumberOfConsoleInputEvents:qword
    extrn '__imp_GetNumberOfConsoleMouseButtons' as GetNumberOfConsoleMouseButtons:qword
    extrn '__imp_GetOEMCP' as GetOEMCP:qword
    extrn '__imp_GetOverlappedResult' as GetOverlappedResult:qword
    extrn '__imp_GetPriorityClass' as GetPriorityClass:qword
    extrn '__imp_GetPrivateProfileIntA' as GetPrivateProfileIntA:qword
    extrn '__imp_GetPrivateProfileIntW' as GetPrivateProfileIntW:qword
    extrn '__imp_GetPrivateProfileSectionA' as GetPrivateProfileSectionA:qword
    extrn '__imp_GetPrivateProfileSectionNamesA' as GetPrivateProfileSectionNamesA:qword
    extrn '__imp_GetPrivateProfileSectionNamesW' as GetPrivateProfileSectionNamesW:qword
    extrn '__imp_GetPrivateProfileSectionW' as GetPrivateProfileSectionW:qword
    extrn '__imp_GetPrivateProfileStringA' as GetPrivateProfileStringA:qword
    extrn '__imp_GetPrivateProfileStringW' as GetPrivateProfileStringW:qword
    extrn '__imp_GetPrivateProfileStructA' as GetPrivateProfileStructA:qword
    extrn '__imp_GetPrivateProfileStructW' as GetPrivateProfileStructW:qword
    extrn '__imp_GetProcAddress' as GetProcAddress:qword
    extrn '__imp_GetProcessAffinityMask' as GetProcessAffinityMask:qword
    extrn '__imp_GetProcessHeap' as GetProcessHeap:qword
    extrn '__imp_GetProcessHeaps' as GetProcessHeaps:qword
    extrn '__imp_GetProcessShutdownParameters' as GetProcessShutdownParameters:qword
    extrn '__imp_GetProcessTimes' as GetProcessTimes:qword
    extrn '__imp_GetProcessVersion' as GetProcessVersion:qword
    extrn '__imp_GetProcessWorkingSetSize' as GetProcessWorkingSetSize:qword
    extrn '__imp_GetProfileIntA' as GetProfileIntA:qword
    extrn '__imp_GetProfileIntW' as GetProfileIntW:qword
    extrn '__imp_GetProfileSectionA' as GetProfileSectionA:qword
    extrn '__imp_GetProfileSectionW' as GetProfileSectionW:qword
    extrn '__imp_GetProfileStringA' as GetProfileStringA:qword
    extrn '__imp_GetProfileStringW' as GetProfileStringW:qword
    extrn '__imp_GetQueuedCompletionStatus' as GetQueuedCompletionStatus:qword
    extrn '__imp_GetShortPathNameA' as GetShortPathNameA:qword
    extrn '__imp_GetShortPathNameW' as GetShortPathNameW:qword
    extrn '__imp_GetStartupInfoA' as GetStartupInfoA:qword
    extrn '__imp_GetStartupInfoW' as GetStartupInfoW:qword
    extrn '__imp_GetStdHandle' as GetStdHandle:qword
    extrn '__imp_GetStringTypeA' as GetStringTypeA:qword
    extrn '__imp_GetStringTypeExA' as GetStringTypeExA:qword
    extrn '__imp_GetStringTypeExW' as GetStringTypeExW:qword
    extrn '__imp_GetStringTypeW' as GetStringTypeW:qword
    extrn '__imp_GetSystemDefaultLangID' as GetSystemDefaultLangID:qword
    extrn '__imp_GetSystemDefaultLCID' as GetSystemDefaultLCID:qword
    extrn '__imp_GetSystemDirectoryA' as GetSystemDirectoryA:qword
    extrn '__imp_GetSystemDirectoryW' as GetSystemDirectoryW:qword
    extrn '__imp_GetSystemInfo' as GetSystemInfo:qword
    extrn '__imp_GetSystemPowerStatus' as GetSystemPowerStatus:qword
    extrn '__imp_GetSystemTime' as GetSystemTime:qword
    extrn '__imp_GetSystemTimeAdjustment' as GetSystemTimeAdjustment:qword
    extrn '__imp_GetSystemTimeAsFileTime' as GetSystemTimeAsFileTime:qword
    extrn '__imp_GetTapeParameters' as GetTapeParameters:qword
    extrn '__imp_GetTapePosition' as GetTapePosition:qword
    extrn '__imp_GetTapeStatus' as GetTapeStatus:qword
    extrn '__imp_GetTempFileNameA' as GetTempFileNameA:qword
    extrn '__imp_GetTempFileNameW' as GetTempFileNameW:qword
    extrn '__imp_GetTempPathA' as GetTempPathA:qword
    extrn '__imp_GetTempPathW' as GetTempPathW:qword
    extrn '__imp_GetThreadContext' as GetThreadContext:qword
    extrn '__imp_GetThreadLocale' as GetThreadLocale:qword
    extrn '__imp_GetThreadPriority' as GetThreadPriority:qword
    extrn '__imp_GetThreadSelectorEntry' as GetThreadSelectorEntry:qword
    extrn '__imp_GetThreadTimes' as GetThreadTimes:qword
    extrn '__imp_GetTickCount' as GetTickCount:qword
    extrn '__imp_GetTimeFormatA' as GetTimeFormatA:qword
    extrn '__imp_GetTimeFormatW' as GetTimeFormatW:qword
    extrn '__imp_GetTimeZoneInformation' as GetTimeZoneInformation:qword
    extrn '__imp_GetUserDefaultLangID' as GetUserDefaultLangID:qword
    extrn '__imp_GetUserDefaultLCID' as GetUserDefaultLCID:qword
    extrn '__imp_GetVersion' as GetVersion:qword
    extrn '__imp_GetVersionExA' as GetVersionExA:qword
    extrn '__imp_GetVersionExW' as GetVersionExW:qword
    extrn '__imp_GetVolumeInformationA' as GetVolumeInformationA:qword
    extrn '__imp_GetVolumeInformationW' as GetVolumeInformationW:qword
    extrn '__imp_GetWindowsDirectoryA' as GetWindowsDirectoryA:qword
    extrn '__imp_GetWindowsDirectoryW' as GetWindowsDirectoryW:qword
    extrn '__imp_GlobalAddAtomA' as GlobalAddAtomA:qword
    extrn '__imp_GlobalAddAtomW' as GlobalAddAtomW:qword
    extrn '__imp_GlobalAlloc' as GlobalAlloc:qword
    extrn '__imp_GlobalCompact' as GlobalCompact:qword
    extrn '__imp_GlobalDeleteAtom' as GlobalDeleteAtom:qword
    extrn '__imp_GlobalFindAtomA' as GlobalFindAtomA:qword
    extrn '__imp_GlobalFindAtomW' as GlobalFindAtomW:qword
    extrn '__imp_GlobalFix' as GlobalFix:qword
    extrn '__imp_GlobalFlags' as GlobalFlags:qword
    extrn '__imp_GlobalFree' as GlobalFree:qword
    extrn '__imp_GlobalGetAtomNameA' as GlobalGetAtomNameA:qword
    extrn '__imp_GlobalGetAtomNameW' as GlobalGetAtomNameW:qword
    extrn '__imp_GlobalHandle' as GlobalHandle:qword
    extrn '__imp_GlobalLock' as GlobalLock:qword
    extrn '__imp_GlobalMemoryStatus' as GlobalMemoryStatus:qword
    extrn '__imp_GlobalReAlloc' as GlobalReAlloc:qword
    extrn '__imp_GlobalSize' as GlobalSize:qword
    extrn '__imp_GlobalUnfix' as GlobalUnfix:qword
    extrn '__imp_GlobalUnlock' as GlobalUnlock:qword
    extrn '__imp_GlobalUnWire' as GlobalUnWire:qword
    extrn '__imp_GlobalWire' as GlobalWire:qword
    extrn '__imp_Heap32First' as Heap32First:qword
    extrn '__imp_Heap32ListFirst' as Heap32ListFirst:qword
    extrn '__imp_Heap32ListNext' as Heap32ListNext:qword
    extrn '__imp_Heap32Next' as Heap32Next:qword
    extrn '__imp_HeapAlloc' as HeapAlloc:qword
    extrn '__imp_HeapCompact' as HeapCompact:qword
    extrn '__imp_HeapCreate' as HeapCreate:qword
    extrn '__imp_HeapDestroy' as HeapDestroy:qword
    extrn '__imp_HeapFree' as HeapFree:qword
    extrn '__imp_HeapLock' as HeapLock:qword
    extrn '__imp_HeapReAlloc' as HeapReAlloc:qword
    extrn '__imp_HeapSize' as HeapSize:qword
    extrn '__imp_HeapUnlock' as HeapUnlock:qword
    extrn '__imp_HeapValidate' as HeapValidate:qword
    extrn '__imp_HeapWalk' as HeapWalk:qword
    extrn '__imp_InitAtomTable' as InitAtomTable:qword
    extrn '__imp_InitializeCriticalSection' as InitializeCriticalSection:qword
    extrn '__imp_IsBadCodePtr' as IsBadCodePtr:qword
    extrn '__imp_IsBadHugeReadPtr' as IsBadHugeReadPtr:qword
    extrn '__imp_IsBadHugeWritePtr' as IsBadHugeWritePtr:qword
    extrn '__imp_IsBadReadPtr' as IsBadReadPtr:qword
    extrn '__imp_IsBadStringPtrA' as IsBadStringPtrA:qword
    extrn '__imp_IsBadStringPtrW' as IsBadStringPtrW:qword
    extrn '__imp_IsBadWritePtr' as IsBadWritePtr:qword
    extrn '__imp_IsDBCSLeadByte' as IsDBCSLeadByte:qword
    extrn '__imp_IsDBCSLeadByteEx' as IsDBCSLeadByteEx:qword
    extrn '__imp_IsValidCodePage' as IsValidCodePage:qword
    extrn '__imp_IsValidLocale' as IsValidLocale:qword
    extrn '__imp_LCMapStringA' as LCMapStringA:qword
    extrn '__imp_LCMapStringW' as LCMapStringW:qword
    extrn '__imp_LeaveCriticalSection' as LeaveCriticalSection:qword
    extrn '__imp_LoadLibraryA' as LoadLibraryA:qword
    extrn '__imp_LoadLibraryExA' as LoadLibraryExA:qword
    extrn '__imp_LoadLibraryExW' as LoadLibraryExW:qword
    extrn '__imp_LoadLibraryW' as LoadLibraryW:qword
    extrn '__imp_LoadModule' as LoadModule:qword
    extrn '__imp_LoadResource' as LoadResource:qword
    extrn '__imp_LocalAlloc' as LocalAlloc:qword
    extrn '__imp_LocalCompact' as LocalCompact:qword
    extrn '__imp_LocalFileTimeToFileTime' as LocalFileTimeToFileTime:qword
    extrn '__imp_LocalFlags' as LocalFlags:qword
    extrn '__imp_LocalFree' as LocalFree:qword
    extrn '__imp_LocalHandle' as LocalHandle:qword
    extrn '__imp_LocalLock' as LocalLock:qword
    extrn '__imp_LocalReAlloc' as LocalReAlloc:qword
    extrn '__imp_LocalShrink' as LocalShrink:qword
    extrn '__imp_LocalSize' as LocalSize:qword
    extrn '__imp_LocalUnlock' as LocalUnlock:qword
    extrn '__imp_LockFile' as LockFile:qword
    extrn '__imp_LockFileEx' as LockFileEx:qword
    extrn '__imp_LockResource' as LockResource:qword
    extrn '__imp_lstrcatA' as lstrcatA:qword
    extrn '__imp_lstrcatW' as lstrcatW:qword
    extrn '__imp_lstrcmpA' as lstrcmpA:qword
    extrn '__imp_lstrcmpiA' as lstrcmpiA:qword
    extrn '__imp_lstrcmpiW' as lstrcmpiW:qword
    extrn '__imp_lstrcmpW' as lstrcmpW:qword
    extrn '__imp_lstrcpyA' as lstrcpyA:qword
    extrn '__imp_lstrcpynA' as lstrcpynA:qword
    extrn '__imp_lstrcpynW' as lstrcpynW:qword
    extrn '__imp_lstrcpyW' as lstrcpyW:qword
    extrn '__imp_lstrlenA' as lstrlenA:qword
    extrn '__imp_lstrlenW' as lstrlenW:qword
    extrn '__imp_MapViewOfFile' as MapViewOfFile:qword
    extrn '__imp_MapViewOfFileEx' as MapViewOfFileEx:qword
    extrn '__imp_MoveFileA' as MoveFileA:qword
    extrn '__imp_MoveFileExA' as MoveFileExA:qword
    extrn '__imp_MoveFileExW' as MoveFileExW:qword
    extrn '__imp_MoveFileW' as MoveFileW:qword
    extrn '__imp_MulDiv' as MulDiv:qword
    extrn '__imp_MultiByteToWideChar' as MultiByteToWideChar:qword
    extrn '__imp_OpenEventA' as OpenEventA:qword
    extrn '__imp_OpenEventW' as OpenEventW:qword
    extrn '__imp_OpenFile' as OpenFile:qword
    extrn '__imp_OpenFileMappingA' as OpenFileMappingA:qword
    extrn '__imp_OpenFileMappingW' as OpenFileMappingW:qword
    extrn '__imp_OpenMutexA' as OpenMutexA:qword
    extrn '__imp_OpenMutexW' as OpenMutexW:qword
    extrn '__imp_OpenProcess' as OpenProcess:qword
    extrn '__imp_OpenProfileUserMapping' as OpenProfileUserMapping:qword
    extrn '__imp_OpenSemaphoreA' as OpenSemaphoreA:qword
    extrn '__imp_OpenSemaphoreW' as OpenSemaphoreW:qword
    extrn '__imp_OutputDebugStringA' as OutputDebugStringA:qword
    extrn '__imp_OutputDebugStringW' as OutputDebugStringW:qword
    extrn '__imp_PeekConsoleInputA' as PeekConsoleInputA:qword
    extrn '__imp_PeekConsoleInputW' as PeekConsoleInputW:qword
    extrn '__imp_PeekNamedPipe' as PeekNamedPipe:qword
    extrn '__imp_PostQueuedCompletionStatus' as PostQueuedCompletionStatus:qword
    extrn '__imp_PrepareTape' as PrepareTape:qword
    extrn '__imp_PulseEvent' as PulseEvent:qword
    extrn '__imp_PurgeComm' as PurgeComm:qword
    extrn '__imp_QueryDosDeviceA' as QueryDosDeviceA:qword
    extrn '__imp_QueryDosDeviceW' as QueryDosDeviceW:qword
    extrn '__imp_QueryPerformanceCounter' as QueryPerformanceCounter:qword
    extrn '__imp_QueryPerformanceFrequency' as QueryPerformanceFrequency:qword
    extrn '__imp_QueueUserAPC' as QueueUserAPC:qword
    extrn '__imp_RaiseException' as RaiseException:qword
    extrn '__imp_ReadConsoleA' as ReadConsoleA:qword
    extrn '__imp_ReadConsoleInputA' as ReadConsoleInputA:qword
    extrn '__imp_ReadConsoleInputW' as ReadConsoleInputW:qword
    extrn '__imp_ReadConsoleOutputA' as ReadConsoleOutputA:qword
    extrn '__imp_ReadConsoleOutputAttribute' as ReadConsoleOutputAttribute:qword
    extrn '__imp_ReadConsoleOutputCharacterA' as ReadConsoleOutputCharacterA:qword
    extrn '__imp_ReadConsoleOutputCharacterW' as ReadConsoleOutputCharacterW:qword
    extrn '__imp_ReadConsoleOutputW' as ReadConsoleOutputW:qword
    extrn '__imp_ReadConsoleW' as ReadConsoleW:qword
    extrn '__imp_ReadFile' as ReadFile:qword
    extrn '__imp_ReadFileEx' as ReadFileEx:qword
    extrn '__imp_ReadProcessMemory' as ReadProcessMemory:qword
    extrn '__imp_ReleaseMutex' as ReleaseMutex:qword
    extrn '__imp_ReleaseSemaphore' as ReleaseSemaphore:qword
    extrn '__imp_RemoveDirectoryA' as RemoveDirectoryA:qword
    extrn '__imp_RemoveDirectoryW' as RemoveDirectoryW:qword
    extrn '__imp_ResetEvent' as ResetEvent:qword
    extrn '__imp_ResumeThread' as ResumeThread:qword
    extrn '__imp_RtlFillMemory' as RtlFillMemory:qword
    extrn '__imp_RtlMoveMemory' as RtlMoveMemory:qword
    extrn '__imp_RtlUnwind' as RtlUnwind:qword
    extrn '__imp_RtlZeroMemory' as RtlZeroMemory:qword
    extrn '__imp_ScrollConsoleScreenBufferA' as ScrollConsoleScreenBufferA:qword
    extrn '__imp_ScrollConsoleScreenBufferW' as ScrollConsoleScreenBufferW:qword
    extrn '__imp_SearchPathA' as SearchPathA:qword
    extrn '__imp_SearchPathW' as SearchPathW:qword
    extrn '__imp_SetCommBreak' as SetCommBreak:qword
    extrn '__imp_SetCommConfig' as SetCommConfig:qword
    extrn '__imp_SetCommMask' as SetCommMask:qword
    extrn '__imp_SetCommState' as SetCommState:qword
    extrn '__imp_SetCommTimeouts' as SetCommTimeouts:qword
    extrn '__imp_SetComputerNameA' as SetComputerNameA:qword
    extrn '__imp_SetComputerNameW' as SetComputerNameW:qword
    extrn '__imp_SetConsoleActiveScreenBuffer' as SetConsoleActiveScreenBuffer:qword
    extrn '__imp_SetConsoleCP' as SetConsoleCP:qword
    extrn '__imp_SetConsoleCtrlHandler' as SetConsoleCtrlHandler:qword
    extrn '__imp_SetConsoleCursorInfo' as SetConsoleCursorInfo:qword
    extrn '__imp_SetConsoleCursorPosition' as SetConsoleCursorPosition:qword
    extrn '__imp_SetConsoleMode' as SetConsoleMode:qword
    extrn '__imp_SetConsoleOutputCP' as SetConsoleOutputCP:qword
    extrn '__imp_SetConsoleScreenBufferSize' as SetConsoleScreenBufferSize:qword
    extrn '__imp_SetConsoleTextAttribute' as SetConsoleTextAttribute:qword
    extrn '__imp_SetConsoleTitleA' as SetConsoleTitleA:qword
    extrn '__imp_SetConsoleTitleW' as SetConsoleTitleW:qword
    extrn '__imp_SetConsoleWindowInfo' as SetConsoleWindowInfo:qword
    extrn '__imp_SetCurrentDirectoryA' as SetCurrentDirectoryA:qword
    extrn '__imp_SetCurrentDirectoryW' as SetCurrentDirectoryW:qword
    extrn '__imp_SetDefaultCommConfigA' as SetDefaultCommConfigA:qword
    extrn '__imp_SetDefaultCommConfigW' as SetDefaultCommConfigW:qword
    extrn '__imp_SetEndOfFile' as SetEndOfFile:qword
    extrn '__imp_SetEnvironmentVariableA' as SetEnvironmentVariableA:qword
    extrn '__imp_SetEnvironmentVariableW' as SetEnvironmentVariableW:qword
    extrn '__imp_SetErrorMode' as SetErrorMode:qword
    extrn '__imp_SetEvent' as SetEvent:qword
    extrn '__imp_SetFileApisToANSI' as SetFileApisToANSI:qword
    extrn '__imp_SetFileApisToOEM' as SetFileApisToOEM:qword
    extrn '__imp_SetFileAttributesA' as SetFileAttributesA:qword
    extrn '__imp_SetFileAttributesW' as SetFileAttributesW:qword
    extrn '__imp_SetFilePointer' as SetFilePointer:qword
    extrn '__imp_SetFileTime' as SetFileTime:qword
    extrn '__imp_SetHandleCount' as SetHandleCount:qword
    extrn '__imp_SetHandleInformation' as SetHandleInformation:qword
    extrn '__imp_SetLastError' as SetLastError:qword
    extrn '__imp_SetLocaleInfoA' as SetLocaleInfoA:qword
    extrn '__imp_SetLocaleInfoW' as SetLocaleInfoW:qword
    extrn '__imp_SetLocalTime' as SetLocalTime:qword
    extrn '__imp_SetMailslotInfo' as SetMailslotInfo:qword
    extrn '__imp_SetNamedPipeHandleState' as SetNamedPipeHandleState:qword
    extrn '__imp_SetPriorityClass' as SetPriorityClass:qword
    extrn '__imp_SetProcessShutdownParameters' as SetProcessShutdownParameters:qword
    extrn '__imp_SetProcessWorkingSetSize' as SetProcessWorkingSetSize:qword
    extrn '__imp_SetStdHandle' as SetStdHandle:qword
    extrn '__imp_SetSystemPowerState' as SetSystemPowerState:qword
    extrn '__imp_SetSystemTime' as SetSystemTime:qword
    extrn '__imp_SetSystemTimeAdjustment' as SetSystemTimeAdjustment:qword
    extrn '__imp_SetTapeParameters' as SetTapeParameters:qword
    extrn '__imp_SetTapePosition' as SetTapePosition:qword
    extrn '__imp_SetThreadAffinityMask' as SetThreadAffinityMask:qword
    extrn '__imp_SetThreadContext' as SetThreadContext:qword
    extrn '__imp_SetThreadLocale' as SetThreadLocale:qword
    extrn '__imp_SetThreadPriority' as SetThreadPriority:qword
    extrn '__imp_SetTimeZoneInformation' as SetTimeZoneInformation:qword
    extrn '__imp_SetUnhandledExceptionFilter' as SetUnhandledExceptionFilter:qword
    extrn '__imp_SetupComm' as SetupComm:qword
    extrn '__imp_SetVolumeLabelA' as SetVolumeLabelA:qword
    extrn '__imp_SetVolumeLabelW' as SetVolumeLabelW:qword
    extrn '__imp_SizeofResource' as SizeofResource:qword
    extrn '__imp_Sleep' as Sleep:qword
    extrn '__imp_SleepEx' as SleepEx:qword
    extrn '__imp_SuspendThread' as SuspendThread:qword
    extrn '__imp_SystemTimeToFileTime' as SystemTimeToFileTime:qword
    extrn '__imp_SystemTimeToTzSpecificLocalTime' as SystemTimeToTzSpecificLocalTime:qword
    extrn '__imp_TerminateProcess' as TerminateProcess:qword
    extrn '__imp_TerminateThread' as TerminateThread:qword
    extrn '__imp_Thread32First' as Thread32First:qword
    extrn '__imp_Thread32Next' as Thread32Next:qword
    extrn '__imp_TlsAlloc' as TlsAlloc:qword
    extrn '__imp_TlsFree' as TlsFree:qword
    extrn '__imp_TlsGetValue' as TlsGetValue:qword
    extrn '__imp_TlsSetValue' as TlsSetValue:qword
    extrn '__imp_Toolhelp32ReadProcessMemory' as Toolhelp32ReadProcessMemory:qword
    extrn '__imp_TransactNamedPipe' as TransactNamedPipe:qword
    extrn '__imp_TransmitCommChar' as TransmitCommChar:qword
    extrn '__imp_UnhandledExceptionFilter' as UnhandledExceptionFilter:qword
    extrn '__imp_UnlockFile' as UnlockFile:qword
    extrn '__imp_UnlockFileEx' as UnlockFileEx:qword
    extrn '__imp_UnmapViewOfFile' as UnmapViewOfFile:qword
    extrn '__imp_UpdateResourceA' as UpdateResourceA:qword
    extrn '__imp_UpdateResourceW' as UpdateResourceW:qword
    extrn '__imp_VirtualAlloc' as VirtualAlloc:qword
    extrn '__imp_VirtualFree' as VirtualFree:qword
    extrn '__imp_VirtualLock' as VirtualLock:qword
    extrn '__imp_VirtualProtect' as VirtualProtect:qword
    extrn '__imp_VirtualProtectEx' as VirtualProtectEx:qword
    extrn '__imp_VirtualQuery' as VirtualQuery:qword
    extrn '__imp_VirtualQueryEx' as VirtualQueryEx:qword
    extrn '__imp_VirtualUnlock' as VirtualUnlock:qword
    extrn '__imp_WaitCommEvent' as WaitCommEvent:qword
    extrn '__imp_WaitForDebugEvent' as WaitForDebugEvent:qword
    extrn '__imp_WaitForMultipleObjects' as WaitForMultipleObjects:qword
    extrn '__imp_WaitForMultipleObjectsEx' as WaitForMultipleObjectsEx:qword
    extrn '__imp_WaitForSingleObject' as WaitForSingleObject:qword
    extrn '__imp_WaitForSingleObjectEx' as WaitForSingleObjectEx:qword
    extrn '__imp_WaitNamedPipeA' as WaitNamedPipeA:qword
    extrn '__imp_WaitNamedPipeW' as WaitNamedPipeW:qword
    extrn '__imp_WideCharToMultiByte' as WideCharToMultiByte:qword
    extrn '__imp_WinExec' as WinExec:qword
    extrn '__imp_WriteConsoleA' as WriteConsoleA:qword
    extrn '__imp_WriteConsoleInputA' as WriteConsoleInputA:qword
    extrn '__imp_WriteConsoleInputW' as WriteConsoleInputW:qword
    extrn '__imp_WriteConsoleOutputA' as WriteConsoleOutputA:qword
    extrn '__imp_WriteConsoleOutputAttribute' as WriteConsoleOutputAttribute:qword
    extrn '__imp_WriteConsoleOutputCharacterA' as WriteConsoleOutputCharacterA:qword
    extrn '__imp_WriteConsoleOutputCharacterW' as WriteConsoleOutputCharacterW:qword
    extrn '__imp_WriteConsoleOutputW' as WriteConsoleOutputW:qword
    extrn '__imp_WriteConsoleW' as WriteConsoleW:qword
    extrn '__imp_WriteFile' as WriteFile:qword
    extrn '__imp_WriteFileEx' as WriteFileEx:qword
    extrn '__imp_WritePrivateProfileSectionA' as WritePrivateProfileSectionA:qword
    extrn '__imp_WritePrivateProfileSectionW' as WritePrivateProfileSectionW:qword
    extrn '__imp_WritePrivateProfileStringA' as WritePrivateProfileStringA:qword
    extrn '__imp_WritePrivateProfileStringW' as WritePrivateProfileStringW:qword
    extrn '__imp_WritePrivateProfileStructA' as WritePrivateProfileStructA:qword
    extrn '__imp_WritePrivateProfileStructW' as WritePrivateProfileStructW:qword
    extrn '__imp_WriteProcessMemory' as WriteProcessMemory:qword
    extrn '__imp_WriteProfileSectionA' as WriteProfileSectionA:qword
    extrn '__imp_WriteProfileSectionW' as WriteProfileSectionW:qword
    extrn '__imp_WriteProfileStringA' as WriteProfileStringA:qword
    extrn '__imp_WriteProfileStringW' as WriteProfileStringW:qword
    extrn '__imp_WriteTapemark' as WriteTapemark:qword

    GetFreeSpace equ GlobalMemoryStatus

    LockSegment equ GlobalFix
    UnlockSegment equ GlobalUnfix
    GetCurrentTime equ GetTickCount
    MoveMemory equ RtlMoveMemory
    FillMemory equ RtlFillMemory
    ZeroMemory equ RtlZeroMemory

    if (NTDDI_VERSION >= NTDDI_WIN98_ME)
        extrn '__imp_CancelDeviceWakeupRequest' as CancelDeviceWakeupRequest:qword
        extrn '__imp_CancelIo' as CancelIo:qword
        extrn '__imp_ConvertThreadToFiber' as ConvertThreadToFiber:qword
        extrn '__imp_CopyFileExA' as CopyFileExA:qword
        extrn '__imp_CopyFileExW' as CopyFileExW:qword
        extrn '__imp_CreateFiber' as CreateFiber:qword
        extrn '__imp_CreateWaitableTimerA' as CreateWaitableTimerA:qword
        extrn '__imp_CreateWaitableTimerW' as CreateWaitableTimerW:qword
        extrn '__imp_DeleteFiber' as DeleteFiber:qword
        extrn '__imp_EnumCalendarInfoExA' as EnumCalendarInfoExA:qword
        extrn '__imp_EnumCalendarInfoExW' as EnumCalendarInfoExW:qword
        extrn '__imp_EnumDateFormatsExA' as EnumDateFormatsExA:qword
        extrn '__imp_EnumDateFormatsExW' as EnumDateFormatsExW:qword
        extrn '__imp_FindFirstFileExA' as FindFirstFileExA:qword
        extrn '__imp_FindFirstFileExW' as FindFirstFileExW:qword
        extrn '__imp_GetCalendarInfoA' as GetCalendarInfoA:qword
        extrn '__imp_GetCalendarInfoW' as GetCalendarInfoW:qword
        extrn '__imp_GetCPInfoExA' as GetCPInfoExA:qword
        extrn '__imp_GetCPInfoExW' as GetCPInfoExW:qword
        extrn '__imp_GetDevicePowerState' as GetDevicePowerState:qword
        extrn '__imp_GetFileAttributesExA' as GetFileAttributesExA:qword
        extrn '__imp_GetFileAttributesExW' as GetFileAttributesExW:qword
        if (NTDDI_VERSION >= NTDDI_WINNT4)
            extrn '__imp_GetLongPathNameA' as GetLongPathNameA:qword
            extrn '__imp_GetLongPathNameW' as GetLongPathNameW:qword
            extrn '__imp_RequestDeviceWakeup' as RequestDeviceWakeup:qword
            extrn '__imp_RequestWakeupLatency' as RequestWakeupLatency:qword
            extrn '__imp_ResetWriteWatch' as ResetWriteWatch:qword
            extrn '__imp_SetCalendarInfoA' as SetCalendarInfoA:qword
            extrn '__imp_SetCalendarInfoW' as SetCalendarInfoW:qword
            extrn '__imp_SetMessageWaitingIndicator' as SetMessageWaitingIndicator:qword
            api GetLongPathName,\
                SetCalendarInfo
        end if
        extrn '__imp_GetProcessPriorityBoost' as GetProcessPriorityBoost:qword
        extrn '__imp_GetThreadPriorityBoost' as GetThreadPriorityBoost:qword
        extrn '__imp_IsDebuggerPresent' as IsDebuggerPresent:qword
        extrn '__imp_IsProcessorFeaturePresent' as IsProcessorFeaturePresent:qword
        extrn '__imp_IsSystemResumeAutomatic' as IsSystemResumeAutomatic:qword
        extrn '__imp_OpenWaitableTimerA' as OpenWaitableTimerA:qword
        extrn '__imp_OpenWaitableTimerW' as OpenWaitableTimerW:qword
        extrn '__imp_ReadDirectoryChangesW' as ReadDirectoryChangesW:qword
        extrn '__imp_ReadFileScatter' as ReadFileScatter:qword
        extrn '__imp_SetCriticalSectionSpinCount' as SetCriticalSectionSpinCount:qword
        extrn '__imp_SetProcessAffinityMask' as SetProcessAffinityMask:qword
        extrn '__imp_SetProcessPriorityBoost' as SetProcessPriorityBoost:qword
        extrn '__imp_SetThreadExecutionState' as SetThreadExecutionState:qword
        extrn '__imp_SetThreadIdealProcessor' as SetThreadIdealProcessor:qword
        extrn '__imp_SetThreadPriorityBoost' as SetThreadPriorityBoost:qword
        extrn '__imp_SetWaitableTimer' as SetWaitableTimer:qword
        extrn '__imp_SignalObjectAndWait' as SignalObjectAndWait:qword
        extrn '__imp_SwitchToFiber' as SwitchToFiber:qword
        extrn '__imp_SwitchToThread' as SwitchToThread:qword
        extrn '__imp_VirtualAllocEx' as VirtualAllocEx:qword
        extrn '__imp_VirtualFreeEx' as VirtualFreeEx:qword
        extrn '__imp_WriteFileGather' as WriteFileGather:qword
        api CopyFileEx,\
            CreateWaitableTimer,\
            EnumCalendarInfoEx,\
            EnumDateFormatsEx,\
            FindFirstFileEx,\
            GetCalendarInfo,\
            GetCPInfoEx,\
            GetFileAttributesEx,\
            OpenWaitableTimer
    end if

    if (NTDDI_VERSION >= NTDDI_WINNT4)
        extrn '__imp_AddConsoleAliasA' as AddConsoleAliasA:qword
        extrn '__imp_AddConsoleAliasW' as AddConsoleAliasW:qword
        extrn '__imp_ConsoleMenuControl' as ConsoleMenuControl:qword
        extrn '__imp_CreateTimerQueue' as CreateTimerQueue:qword
        extrn '__imp_DuplicateConsoleHandle' as DuplicateConsoleHandle:qword
        extrn '__imp_ExitVDM' as ExitVDM:qword
        extrn '__imp_ExpungeConsoleCommandHistoryA' as ExpungeConsoleCommandHistoryA:qword
        extrn '__imp_ExpungeConsoleCommandHistoryW' as ExpungeConsoleCommandHistoryW:qword
        extrn '__imp_GetConsoleAliasA' as GetConsoleAliasA:qword
        extrn '__imp_GetConsoleAliasesA' as GetConsoleAliasesA:qword
        extrn '__imp_GetConsoleAliasesW' as GetConsoleAliasesW:qword
        extrn '__imp_GetConsoleAliasesLengthA' as GetConsoleAliasesLengthA:qword
        extrn '__imp_GetConsoleAliasesLengthW' as GetConsoleAliasesLengthW:qword
        extrn '__imp_GetConsoleAliasExesA' as GetConsoleAliasExesA:qword
        extrn '__imp_GetConsoleAliasExesW' as GetConsoleAliasExesW:qword
        extrn '__imp_GetConsoleAliasExesLengthA' as GetConsoleAliasExesLengthA:qword
        extrn '__imp_GetConsoleAliasExesLengthW' as GetConsoleAliasExesLengthW:qword
        extrn '__imp_GetConsoleAliasW' as GetConsoleAliasW:qword
        extrn '__imp_GetModuleHandleExA' as GetModuleHandleExA:qword
        extrn '__imp_GetModuleHandleExW' as GetModuleHandleExW:qword
        extrn '__imp_GetNextVDMCommand' as GetNextVDMCommand:qword
        extrn '__imp_GetNumberOfConsoleFonts' as GetNumberOfConsoleFonts:qword
        extrn '__imp_GetProcessIoCounters' as GetProcessIoCounters:qword
        extrn '__imp_GetVDMCurrentDirectories' as GetVDMCurrentDirectories:qword
        extrn '__imp_InvalidateConsoleDIBits' as InvalidateConsoleDIBits:qword
        extrn '__imp_OpenConsoleW' as OpenConsoleW:qword
        extrn '__imp_ReadConsoleInputExA' as ReadConsoleInputExA:qword
        extrn '__imp_ReadConsoleInputExW' as ReadConsoleInputExW:qword
        extrn '__imp_SetConsoleCursor' as SetConsoleCursor:qword
        extrn '__imp_SetConsoleHardwareState' as SetConsoleHardwareState:qword
        extrn '__imp_SetConsoleIcon' as SetConsoleIcon:qword
        extrn '__imp_SetConsoleMaximumWindowSize' as SetConsoleMaximumWindowSize:qword
        extrn '__imp_SetConsoleNumberOfCommandsA' as SetConsoleNumberOfCommandsA:qword
        extrn '__imp_SetConsoleNumberOfCommandsW' as SetConsoleNumberOfCommandsW:qword
        extrn '__imp_SetConsolePalette' as SetConsolePalette:qword
        extrn '__imp_SetLastConsoleEventActive' as SetLastConsoleEventActive:qword
        extrn '__imp_SetVDMCurrentDirectories' as SetVDMCurrentDirectories:qword
        extrn '__imp_ShowConsoleCursor' as ShowConsoleCursor:qword
        extrn '__imp_VerifyVersionInfoA' as VerifyVersionInfoA:qword
        extrn '__imp_VerifyVersionInfoW' as VerifyVersionInfoW:qword
        api AddConsoleAlias,\
            ExpungeConsoleCommandHistory,\
            GetConsoleAlias,\
            GetConsoleAliasExes,\
            GetConsoleAliasExesLength,\
            GetConsoleAliases,\
            GetConsoleAliasesLength,\
            GetModuleHandleEx,\
            ReadConsoleInputEx,\
            SetConsoleNumberOfCommands,\
            VerifyVersionInfo
    end if

    if (NTDDI_VERSION >= NTDDI_WIN2K)
        extrn '__imp_AllocateUserPhysicalPages' as AllocateUserPhysicalPages:qword
        extrn '__imp_AssignProcessToJobObject' as AssignProcessToJobObject:qword
        extrn '__imp_BindIoCompletionCallback' as BindIoCompletionCallback:qword
        extrn '__imp_ChangeTimerQueueTimer' as ChangeTimerQueueTimer:qword
        extrn '__imp_CreateHardLinkA' as CreateHardLinkA:qword
        extrn '__imp_CreateHardLinkW' as CreateHardLinkW:qword
        extrn '__imp_CreateJobObjectA' as CreateJobObjectA:qword
        extrn '__imp_CreateJobObjectW' as CreateJobObjectW:qword
        extrn '__imp_CreateTimerQueueTimer' as CreateTimerQueueTimer:qword
        extrn '__imp_DelayLoadFailureHook' as DelayLoadFailureHook:qword
        extrn '__imp_DeleteTimerQueue' as DeleteTimerQueue:qword
        extrn '__imp_DeleteVolumeMountPointA' as DeleteVolumeMountPointA:qword
        extrn '__imp_DeleteVolumeMountPointW' as DeleteVolumeMountPointW:qword
        extrn '__imp_DnsHostnameToComputerNameA' as DnsHostnameToComputerNameA:qword
        extrn '__imp_DnsHostnameToComputerNameW' as DnsHostnameToComputerNameW:qword
        extrn '__imp_DosPathToSessionPathA' as DosPathToSessionPathA:qword
        extrn '__imp_DosPathToSessionPathW' as DosPathToSessionPathW:qword
        extrn '__imp_EnumLanguageGroupLocalesA' as EnumLanguageGroupLocalesA:qword
        extrn '__imp_EnumLanguageGroupLocalesW' as EnumLanguageGroupLocalesW:qword
        extrn '__imp_EnumSystemLanguageGroupsA' as EnumSystemLanguageGroupsA:qword
        extrn '__imp_EnumSystemLanguageGroupsW' as EnumSystemLanguageGroupsW:qword
        extrn '__imp_EnumUILanguagesA' as EnumUILanguagesA:qword
        extrn '__imp_EnumUILanguagesW' as EnumUILanguagesW:qword
        extrn '__imp_FindFirstVolumeA' as FindFirstVolumeA:qword
        extrn '__imp_FindFirstVolumeMountPointA' as FindFirstVolumeMountPointA:qword
        extrn '__imp_FindFirstVolumeMountPointW' as FindFirstVolumeMountPointW:qword
        extrn '__imp_FindFirstVolumeW' as FindFirstVolumeW:qword
        extrn '__imp_FindNextVolumeA' as FindNextVolumeA:qword
        extrn '__imp_FindNextVolumeMountPointA' as FindNextVolumeMountPointA:qword
        extrn '__imp_FindNextVolumeMountPointW' as FindNextVolumeMountPointW:qword
        extrn '__imp_FindNextVolumeW' as FindNextVolumeW:qword
        extrn '__imp_FindVolumeClose' as FindVolumeClose:qword
        extrn '__imp_FindVolumeMountPointClose' as FindVolumeMountPointClose:qword
        extrn '__imp_FreeUserPhysicalPages' as FreeUserPhysicalPages:qword
        extrn '__imp_GetComputerNameExA' as GetComputerNameExA:qword
        extrn '__imp_GetComputerNameExW' as GetComputerNameExW:qword
        extrn '__imp_GetConsoleNlsMode' as GetConsoleNlsMode:qword
        extrn '__imp_GetConsoleWindow' as GetConsoleWindow:qword
        extrn '__imp_GetFileSizeEx' as GetFileSizeEx:qword
        extrn '__imp_GetSystemDefaultUILanguage' as GetSystemDefaultUILanguage:qword
        extrn '__imp_GetSystemWindowsDirectoryA' as GetSystemWindowsDirectoryA:qword
        extrn '__imp_GetSystemWindowsDirectoryW' as GetSystemWindowsDirectoryW:qword
        extrn '__imp_GetUserDefaultUILanguage' as GetUserDefaultUILanguage:qword
        extrn '__imp_GetVolumeNameForVolumeMountPointA' as GetVolumeNameForVolumeMountPointA:qword
        extrn '__imp_GetVolumeNameForVolumeMountPointW' as GetVolumeNameForVolumeMountPointW:qword
        extrn '__imp_GetVolumePathNameA' as GetVolumePathNameA:qword
        extrn '__imp_GetVolumePathNameW' as GetVolumePathNameW:qword
        extrn '__imp_GlobalMemoryStatusEx' as GlobalMemoryStatusEx:qword
        extrn '__imp_IsValidLanguageGroup' as IsValidLanguageGroup:qword
        extrn '__imp_MapUserPhysicalPages' as MapUserPhysicalPages:qword
        extrn '__imp_MapUserPhysicalPagesScatter' as MapUserPhysicalPagesScatter:qword
        extrn '__imp_MoveFileWithProgressA' as MoveFileWithProgressA:qword
        extrn '__imp_MoveFileWithProgressW' as MoveFileWithProgressW:qword
        extrn '__imp_OpenJobObjectA' as OpenJobObjectA:qword
        extrn '__imp_OpenJobObjectW' as OpenJobObjectW:qword
        extrn '__imp_OpenThread' as OpenThread:qword
        extrn '__imp_PrivCopyFileExW' as PrivCopyFileExW:qword
        extrn '__imp_ProcessIdToSessionId' as ProcessIdToSessionId:qword
        extrn '__imp_QueryInformationJobObject' as QueryInformationJobObject:qword
        extrn '__imp_RegisterWaitForSingleObject' as RegisterWaitForSingleObject:qword
        extrn '__imp_ReplaceFileA' as ReplaceFileA:qword
        extrn '__imp_ReplaceFileW' as ReplaceFileW:qword
        extrn '__imp_SetComputerNameExA' as SetComputerNameExA:qword
        extrn '__imp_SetComputerNameExW' as SetComputerNameExW:qword
        extrn '__imp_SetConsoleNlsMode' as SetConsoleNlsMode:qword
        extrn '__imp_SetConsoleOS2OemFormat' as SetConsoleOS2OemFormat:qword
        extrn '__imp_SetFilePointerEx' as SetFilePointerEx:qword
        extrn '__imp_SetInformationJobObject' as SetInformationJobObject:qword
        extrn '__imp_SetTermsrvAppInstallMode' as SetTermsrvAppInstallMode:qword
        extrn '__imp_SetTimerQueueTimer' as SetTimerQueueTimer:qword
        extrn '__imp_SetVolumeMountPointA' as SetVolumeMountPointA:qword
        extrn '__imp_SetVolumeMountPointW' as SetVolumeMountPointW:qword
        extrn '__imp_TerminateJobObject' as TerminateJobObject:qword
        extrn '__imp_UnregisterWait' as UnregisterWait:qword
        extrn '__imp_VerSetConditionMask' as VerSetConditionMask:qword
        api CreateHardLink,\
            CreateJobObject,\
            DeleteVolumeMountPoint,\
            DnsHostnameToComputerName,\
            DosPathToSessionPath,\
            EnumLanguageGroupLocales,\
            EnumSystemLanguageGroups,\
            EnumUILanguages,\
            FindActCtxSectionString,\
            FindFirstVolume,\
            FindFirstVolumeMountPoint,\
            FindNextVolume,\
            FindNextVolumeMountPoint,\
            GetComputerNameEx,\
            GetSystemWindowsDirectory,\
            GetVolumeNameForVolumeMountPoint,\
            GetVolumePathName,\
            MoveFileWithProgress,\
            OpenJobObject,\
            ReplaceFile,\
            SetComputerNameEx,\
            SetVolumeMountPoint
    end if

    if (NTDDI_VERSION >= NTDDI_WINXP)
        extrn '__imp_ActivateActCtx' as ActivateActCtx:qword
        extrn '__imp_AddLocalAlternateComputerNameA' as AddLocalAlternateComputerNameA:qword
        extrn '__imp_AddLocalAlternateComputerNameW' as AddLocalAlternateComputerNameW:qword
        extrn '__imp_AddRefActCtx' as AddRefActCtx:qword
        extrn '__imp_AddVectoredExceptionHandler' as AddVectoredExceptionHandler:qword
        extrn '__imp_AttachConsole' as AttachConsole:qword
        extrn '__imp_CancelWaitableTimer' as CancelWaitableTimer:qword
        extrn '__imp_ConvertFiberToThread' as ConvertFiberToThread:qword
        extrn '__imp_CreateActCtxA' as CreateActCtxA:qword
        extrn '__imp_CreateActCtxW' as CreateActCtxW:qword
        extrn '__imp_CreateFiberEx' as CreateFiberEx:qword
        extrn '__imp_CreateJobSet' as CreateJobSet:qword
        extrn '__imp_CreateMemoryResourceNotification' as CreateMemoryResourceNotification:qword
        extrn '__imp_CreateProcessInternalA' as CreateProcessInternalA:qword
        extrn '__imp_CreateProcessInternalW' as CreateProcessInternalW:qword
        extrn '__imp_DeactivateActCtx' as DeactivateActCtx:qword
        extrn '__imp_DebugActiveProcessStop' as DebugActiveProcessStop:qword
        extrn '__imp_DebugBreakProcess' as DebugBreakProcess:qword
        extrn '__imp_DebugSetProcessKillOnExit' as DebugSetProcessKillOnExit:qword
        extrn '__imp_DeleteTimerQueueEx' as DeleteTimerQueueEx:qword
        extrn '__imp_DeleteTimerQueueTimer' as DeleteTimerQueueTimer:qword
        extrn '__imp_EnumerateLocalComputerNamesA' as EnumerateLocalComputerNamesA:qword
        extrn '__imp_EnumerateLocalComputerNamesW' as EnumerateLocalComputerNamesW:qword
        extrn '__imp_EnumSystemGeoID' as EnumSystemGeoID:qword
        extrn '__imp_FindActCtxSectionGuid' as FindActCtxSectionGuid:qword
        extrn '__imp_FindActCtxSectionStringA' as FindActCtxSectionStringA:qword
        extrn '__imp_FindActCtxSectionStringW' as FindActCtxSectionStringW:qword
        extrn '__imp_FlsAlloc' as FlsAlloc:qword
        extrn '__imp_FlsFree' as FlsFree:qword
        extrn '__imp_FlsGetValue' as FlsGetValue:qword
        extrn '__imp_FlsSetValue' as FlsSetValue:qword
        extrn '__imp_GetConsoleDisplayMode' as GetConsoleDisplayMode:qword
        extrn '__imp_GetConsoleFontInfo' as GetConsoleFontInfo:qword
        extrn '__imp_GetConsoleFontSize' as GetConsoleFontSize:qword
        extrn '__imp_GetConsoleProcessList' as GetConsoleProcessList:qword
        extrn '__imp_GetConsoleSelectionInfo' as GetConsoleSelectionInfo:qword
        extrn '__imp_GetCurrentActCtx' as GetCurrentActCtx:qword
        extrn '__imp_GetCurrentConsoleFont' as GetCurrentConsoleFont:qword
        extrn '__imp_GetDllDirectoryA' as GetDllDirectoryA:qword
        extrn '__imp_GetDllDirectoryW' as GetDllDirectoryW:qword
        extrn '__imp_GetGeoInfoA' as GetGeoInfoA:qword
        extrn '__imp_GetGeoInfoW' as GetGeoInfoW:qword
        extrn '__imp_GetNativeSystemInfo' as GetNativeSystemInfo:qword
        extrn '__imp_GetProcessId' as GetProcessId:qword
        extrn '__imp_GetSystemWow64DirectoryA' as GetSystemWow64DirectoryA:qword
        extrn '__imp_GetSystemWow64DirectoryW' as GetSystemWow64DirectoryW:qword
        extrn '__imp_GetThreadId' as GetThreadId:qword
        extrn '__imp_GetUserGeoID' as GetUserGeoID:qword
        extrn '__imp_GetVolumePathNamesForVolumeNameA' as GetVolumePathNamesForVolumeNameA:qword
        extrn '__imp_GetVolumePathNamesForVolumeNameW' as GetVolumePathNamesForVolumeNameW:qword
        extrn '__imp_GetWriteWatch' as GetWriteWatch:qword
        extrn '__imp_HeapQueryInformation' as HeapQueryInformation:qword
        extrn '__imp_HeapSetInformation' as HeapSetInformation:qword
        extrn '__imp_InitializeCriticalSectionAndSpinCount' as InitializeCriticalSectionAndSpinCount:qword
        extrn '__imp_InitializeSListHead' as InitializeSListHead:qword
        extrn '__imp_InterlockedFlushSList' as InterlockedFlushSList:qword
        extrn '__imp_InterlockedPopEntrySList' as InterlockedPopEntrySList:qword
        extrn '__imp_InterlockedPushEntrySList' as InterlockedPushEntrySList:qword
        extrn '__imp_IsProcessInJob' as IsProcessInJob:qword
        extrn '__imp_Module32First' as Module32First:qword
        extrn '__imp_Module32FirstW' as Module32FirstW:qword
        extrn '__imp_Module32Next' as Module32Next:qword
        extrn '__imp_Module32NextW' as Module32NextW:qword
        extrn '__imp_Process32First' as Process32First:qword
        extrn '__imp_Process32FirstW' as Process32FirstW:qword
        extrn '__imp_Process32Next' as Process32Next:qword
        extrn '__imp_Process32NextW' as Process32NextW:qword
        extrn '__imp_QueryActCtxW' as QueryActCtxW:qword
        extrn '__imp_QueryDepthSList' as QueryDepthSList:qword
        extrn '__imp_QueryMemoryResourceNotification' as QueryMemoryResourceNotification:qword
        extrn '__imp_QueueUserWorkItem' as QueueUserWorkItem:qword
        extrn '__imp_ReleaseActCtx' as ReleaseActCtx:qword
        extrn '__imp_RemoveVectoredExceptionHandler' as RemoveVectoredExceptionHandler:qword
        if (NTDDI_VERSION >= NTDDI_WIN8)
            extrn '__imp_ResolveDelayLoadedAPI' as ResolveDelayLoadedAPI:qword
            extrn '__imp_ResolveDelayLoadsFromDll' as ResolveDelayLoadsFromDll:qword
        end if
        extrn '__imp_RtlCaptureContext' as RtlCaptureContext:qword
        extrn '__imp_RtlCaptureStackBackTrace' as RtlCaptureStackBackTrace:qword
        extrn '__imp_RtlRaiseException' as RtlRaiseException:qword
        extrn '__imp_SetConsoleDisplayMode' as SetConsoleDisplayMode:qword
        extrn '__imp_SetConsoleFont' as SetConsoleFont:qword
        extrn '__imp_SetFileShortNameA' as SetFileShortNameA:qword
        extrn '__imp_SetFileShortNameW' as SetFileShortNameW:qword
        extrn '__imp_SetFileValidData' as SetFileValidData:qword
        extrn '__imp_SetLocalPrimaryComputerNameA' as SetLocalPrimaryComputerNameA:qword
        extrn '__imp_SetLocalPrimaryComputerNameW' as SetLocalPrimaryComputerNameW:qword
        extrn '__imp_SetThreadUILanguage' as SetThreadUILanguage:qword
        extrn '__imp_SetUserGeoID' as SetUserGeoID:qword
        extrn '__imp_TryEnterCriticalSection' as TryEnterCriticalSection:qword
        extrn '__imp_TzSpecificLocalTimeToSystemTime' as TzSpecificLocalTimeToSystemTime:qword
        extrn '__imp_uaw_lstrcmpiW' as uaw_lstrcmpiW:qword
        extrn '__imp_uaw_lstrcmpW' as uaw_lstrcmpW:qword
        extrn '__imp_uaw_lstrlenW' as uaw_lstrlenW:qword
        extrn '__imp_uaw_wcschr' as uaw_wcschr:qword
        extrn '__imp_uaw_wcscpy' as uaw_wcscpy:qword
        extrn '__imp_uaw_wcsicmp' as uaw_wcsicmp:qword
        extrn '__imp_uaw_wcslen' as uaw_wcslen:qword
        extrn '__imp_uaw_wcsrchr' as uaw_wcsrchr:qword
        extrn '__imp_UnregisterWaitEx' as UnregisterWaitEx:qword
        extrn '__imp_ZombifyActCtx' as ZombifyActCtx:qword

        CaptureStackBackTrace equ RtlCaptureStackBackTrace

        if defined APP_WIN64 | NTDDI_VERSION >= NTDDI_WINXPSP3 | NTDDI_VERSION >= NTDDI_WS03SP1
            extrn '__imp_EnumSystemFirmwareTables' as EnumSystemFirmwareTables:qword
            extrn '__imp_GetLogicalProcessorInformation' as GetLogicalProcessorInformation:qword
            extrn '__imp_GetNumaHighestNodeNumber' as GetNumaHighestNodeNumber:qword
            extrn '__imp_GetSystemFileCacheSize' as GetSystemFileCacheSize:qword
            extrn '__imp_GetSystemFirmwareTable' as GetSystemFirmwareTable:qword
            extrn '__imp_RemoveVectoredContinueHandler' as RemoveVectoredContinueHandler:qword
            extrn '__imp_SetSystemFileCacheSize' as SetSystemFileCacheSize:qword
            extrn '__imp_SetThreadStackGuarantee' as SetThreadStackGuarantee:qword
            extrn '__imp_Wow64DisableWow64FsRedirection' as Wow64DisableWow64FsRedirection:qword
            extrn '__imp_Wow64RevertWow64FsRedirection' as Wow64RevertWow64FsRedirection:qword
        end if

        if defined APP_WIN64
            extrn '__imp_RtlAddFunctionTable' as RtlAddFunctionTable:qword
            extrn '__imp_RtlDeleteFunctionTable' as RtlDeleteFunctionTable:qword
            extrn '__imp_RtlInstallFunctionTableCallback' as RtlInstallFunctionTableCallback:qword
            extrn '__imp_RtlLookupFunctionEntry' as RtlLookupFunctionEntry:qword
            extrn '__imp_RtlPcToFileHeader' as RtlPcToFileHeader:qword
            extrn '__imp_RtlRestoreContext' as RtlRestoreContext:qword
            extrn '__imp_RtlUnwindEx' as RtlUnwindEx:qword
            extrn '__imp_RtlVirtualUnwind' as RtlVirtualUnwind:qword
        else
            extrn '__imp_RtlVirtualUnwind' as RtlVirtualUnwind:qword
        end if

        api AddLocalAlternateComputerName,\
            CreateActCtx,\
            CreateProcessInternal,\
            EnumerateLocalComputerNames,\
            GetDllDirectory,\
            GetGeoInfo,\
            GetSystemWow64Directory,\
            GetVolumePathNamesForVolumeName,\
            SetFileShortName,\
            SetLocalPrimaryComputerName
    end if

    if (NTDDI_VERSION >= NTDDI_WINXPSP1)
        extrn '__imp_CheckNameLegalDOS8Dot3A' as CheckNameLegalDOS8Dot3A:qword
        extrn '__imp_CheckNameLegalDOS8Dot3W' as CheckNameLegalDOS8Dot3W:qword
        extrn '__imp_CheckRemoteDebuggerPresent' as CheckRemoteDebuggerPresent:qword
        extrn '__imp_ConvertThreadToFiberEx' as ConvertThreadToFiberEx:qword
        extrn '__imp_GetFirmwareEnvironmentVariableA' as GetFirmwareEnvironmentVariableA:qword
        extrn '__imp_GetFirmwareEnvironmentVariableW' as GetFirmwareEnvironmentVariableW:qword
        extrn '__imp_GetProcessHandleCount' as GetProcessHandleCount:qword
        extrn '__imp_GetSystemRegistryQuota' as GetSystemRegistryQuota:qword
        extrn '__imp_GetSystemTimes' as GetSystemTimes:qword
        extrn '__imp_GetThreadIOPendingFlag' as GetThreadIOPendingFlag:qword
        extrn '__imp_SetFirmwareEnvironmentVariableA' as SetFirmwareEnvironmentVariableA:qword
        extrn '__imp_SetFirmwareEnvironmentVariableW' as SetFirmwareEnvironmentVariableW:qword
        api CheckNameLegalDOS8Dot3,\
            GetFirmwareEnvironmentVariable,\
            SetFirmwareEnvironmentVariable
    end if

    if (NTDDI_VERSION >= NTDDI_WINXPSP2)
        extrn '__imp_GetNumaAvailableMemoryNode' as GetNumaAvailableMemoryNode:qword
        extrn '__imp_GetNumaNodeProcessorMask' as GetNumaNodeProcessorMask:qword
        extrn '__imp_GetNumaProcessorNode' as GetNumaProcessorNode:qword
    end if

    if (NTDDI_VERSION >= NTDDI_WINXPSP2 | NTDDI_VERSION >= NTDDI_WS03SP1)
        extrn '__imp_DecodePointer' as DecodePointer:qword
        extrn '__imp_DecodeSystemPointer' as DecodeSystemPointer:qword
        extrn '__imp_EncodePointer' as EncodePointer:qword
        extrn '__imp_EncodeSystemPointer' as EncodeSystemPointer:qword
        extrn '__imp_IsWow64Process' as IsWow64Process:qword
    end if

    if (NTDDI_VERSION >= NTDDI_WINXPSP3)
        extrn '__imp_GetSystemDEPPolicy' as GetSystemDEPPolicy:qword
        extrn '__imp_GetProcessDEPPolicy' as GetProcessDEPPolicy:qword
        extrn '__imp_SetProcessDEPPolicy' as SetProcessDEPPolicy:qword
    end if

    if (NTDDI_VERSION >= NTDDI_WS03)
        extrn '__imp_FindFirstStreamW' as FindFirstStreamW:qword
        extrn '__imp_FindNextStreamW' as FindNextStreamW:qword
        extrn '__imp_GetLargePageMinimum' as GetLargePageMinimum:qword
        extrn '__imp_GetProcessIdOfThread' as GetProcessIdOfThread:qword
        extrn '__imp_GetProcessWorkingSetSizeEx' as GetProcessWorkingSetSizeEx:qword
        extrn '__imp_ReOpenFile' as ReOpenFile:qword
        extrn '__imp_SetDllDirectoryA' as SetDllDirectoryA:qword
        extrn '__imp_SetDllDirectoryW' as SetDllDirectoryW:qword
        extrn '__imp_SetEnvironmentStringsA' as SetEnvironmentStringsA:qword
        extrn '__imp_SetEnvironmentStringsW' as SetEnvironmentStringsW:qword
        extrn '__imp_SetProcessWorkingSetSizeEx' as SetProcessWorkingSetSizeEx:qword
        extrn '__imp_Wow64EnableWow64FsRedirection' as Wow64EnableWow64FsRedirection:qword
        extrn '__imp_WTSGetActiveConsoleSessionId' as WTSGetActiveConsoleSessionId:qword
        api SetDllDirectory,\
            SetEnvironmentStrings
    end if

    if (NTDDI_VERSION >= NTDDI_VISTA)
        extrn '__imp_AcquireSRWLockExclusive' as AcquireSRWLockExclusive:qword
        extrn '__imp_AcquireSRWLockShared' as AcquireSRWLockShared:qword
        extrn '__imp_AddDllDirectory' as AddDllDirectory:qword
        extrn '__imp_AddSIDToBoundaryDescriptor' as AddSIDToBoundaryDescriptor:qword
        extrn '__imp_AddVectoredContinueHandler' as AddVectoredContinueHandler:qword
        extrn '__imp_AdjustCalendarDate' as AdjustCalendarDate:qword
        extrn '__imp_AllocateUserPhysicalPagesNuma' as AllocateUserPhysicalPagesNuma:qword
        extrn '__imp_ApplicationRecoveryFinished' as ApplicationRecoveryFinished:qword
        extrn '__imp_ApplicationRecoveryInProgress' as ApplicationRecoveryInProgress:qword
        extrn '__imp_CallbackMayRunLong' as CallbackMayRunLong:qword
        extrn '__imp_CancelIoEx' as CancelIoEx:qword
        extrn '__imp_CancelSynchronousIo' as CancelSynchronousIo:qword
        extrn '__imp_CancelThreadpoolIo' as CancelThreadpoolIo:qword
        extrn '__imp_CheckElevationEnabled' as CheckElevationEnabled:qword
        extrn '__imp_ClosePrivateNamespace' as ClosePrivateNamespace:qword
        extrn '__imp_CloseThreadpool' as CloseThreadpool:qword
        extrn '__imp_CloseThreadpoolCleanupGroup' as CloseThreadpoolCleanupGroup:qword
        extrn '__imp_CloseThreadpoolCleanupGroupMembers' as CloseThreadpoolCleanupGroupMembers:qword
        extrn '__imp_CloseThreadpoolIo' as CloseThreadpoolIo:qword
        extrn '__imp_CloseThreadpoolTimer' as CloseThreadpoolTimer:qword
        extrn '__imp_CloseThreadpoolWait' as CloseThreadpoolWait:qword
        extrn '__imp_CloseThreadpoolWork' as CloseThreadpoolWork:qword
        extrn '__imp_CompareStringEx' as CompareStringEx:qword
        extrn '__imp_CompareStringOrdinal' as CompareStringOrdinal:qword
        extrn '__imp_ConvertCalDateTimeToSystemTime' as ConvertCalDateTimeToSystemTime:qword
        extrn '__imp_ConvertSystemTimeToCalDateTime' as ConvertSystemTimeToCalDateTime:qword
        extrn '__imp_CopyFileTransactedA' as CopyFileTransactedA:qword
        extrn '__imp_CopyFileTransactedW' as CopyFileTransactedW:qword
        extrn '__imp_CreateBoundaryDescriptorA' as CreateBoundaryDescriptorA:qword
        extrn '__imp_CreateBoundaryDescriptorW' as CreateBoundaryDescriptorW:qword
        extrn '__imp_CreateDirectoryTransactedA' as CreateDirectoryTransactedA:qword
        extrn '__imp_CreateDirectoryTransactedW' as CreateDirectoryTransactedW:qword
        extrn '__imp_CreateEventExA' as CreateEventExA:qword
        extrn '__imp_CreateEventExW' as CreateEventExW:qword
        extrn '__imp_CreateFileMappingNumaA' as CreateFileMappingNumaA:qword
        extrn '__imp_CreateFileMappingNumaW' as CreateFileMappingNumaW:qword
        extrn '__imp_CreateFileTransactedA' as CreateFileTransactedA:qword
        extrn '__imp_CreateFileTransactedW' as CreateFileTransactedW:qword
        extrn '__imp_CreateHardLinkTransactedA' as CreateHardLinkTransactedA:qword
        extrn '__imp_CreateHardLinkTransactedW' as CreateHardLinkTransactedW:qword
        extrn '__imp_CreateMutexExA' as CreateMutexExA:qword
        extrn '__imp_CreateMutexExW' as CreateMutexExW:qword
        extrn '__imp_CreatePrivateNamespaceA' as CreatePrivateNamespaceA:qword
        extrn '__imp_CreatePrivateNamespaceW' as CreatePrivateNamespaceW:qword
        extrn '__imp_CreateSemaphoreExA' as CreateSemaphoreExA:qword
        extrn '__imp_CreateSemaphoreExW' as CreateSemaphoreExW:qword
        extrn '__imp_CreateSymbolicLinkA' as CreateSymbolicLinkA:qword
        extrn '__imp_CreateSymbolicLinkTransactedA' as CreateSymbolicLinkTransactedA:qword
        extrn '__imp_CreateSymbolicLinkTransactedW' as CreateSymbolicLinkTransactedW:qword
        extrn '__imp_CreateSymbolicLinkW' as CreateSymbolicLinkW:qword
        extrn '__imp_CreateThreadpool' as CreateThreadpool:qword
        extrn '__imp_CreateThreadpoolCleanupGroup' as CreateThreadpoolCleanupGroup:qword
        extrn '__imp_CreateThreadpoolIo' as CreateThreadpoolIo:qword
        extrn '__imp_CreateThreadpoolTimer' as CreateThreadpoolTimer:qword
        extrn '__imp_CreateThreadpoolWait' as CreateThreadpoolWait:qword
        extrn '__imp_CreateThreadpoolWork' as CreateThreadpoolWork:qword
        extrn '__imp_CreateWaitableTimerExA' as CreateWaitableTimerExA:qword
        extrn '__imp_CreateWaitableTimerExW' as CreateWaitableTimerExW:qword
        extrn '__imp_DeleteBoundaryDescriptor' as DeleteBoundaryDescriptor:qword
        extrn '__imp_DeleteFileTransactedA' as DeleteFileTransactedA:qword
        extrn '__imp_DeleteFileTransactedW' as DeleteFileTransactedW:qword
        extrn '__imp_DeleteProcThreadAttributeList' as DeleteProcThreadAttributeList:qword
        extrn '__imp_DisassociateCurrentThreadFromCallback' as DisassociateCurrentThreadFromCallback:qword
        extrn '__imp_EnumCalendarInfoExEx' as EnumCalendarInfoExEx:qword
        extrn '__imp_EnumDateFormatsExEx' as EnumDateFormatsExEx:qword
        extrn '__imp_EnumResourceLanguagesExA' as EnumResourceLanguagesExA:qword
        extrn '__imp_EnumResourceLanguagesExW' as EnumResourceLanguagesExW:qword
        extrn '__imp_EnumResourceNamesExA' as EnumResourceNamesExA:qword
        extrn '__imp_EnumResourceNamesExW' as EnumResourceNamesExW:qword
        extrn '__imp_EnumResourceTypesExA' as EnumResourceTypesExA:qword
        extrn '__imp_EnumResourceTypesExW' as EnumResourceTypesExW:qword
        extrn '__imp_EnumSystemLocalesEx' as EnumSystemLocalesEx:qword
        extrn '__imp_EnumTimeFormatsEx' as EnumTimeFormatsEx:qword
        extrn '__imp_FindFirstFileNameTransactedW' as FindFirstFileNameTransactedW:qword
        extrn '__imp_FindFirstFileNameW' as FindFirstFileNameW:qword
        extrn '__imp_FindFirstFileTransactedA' as FindFirstFileTransactedA:qword
        extrn '__imp_FindFirstFileTransactedW' as FindFirstFileTransactedW:qword
        extrn '__imp_FindFirstStreamTransactedW' as FindFirstStreamTransactedW:qword
        extrn '__imp_FindNextFileNameW' as FindNextFileNameW:qword
        extrn '__imp_FindNLSString' as FindNLSString:qword
        extrn '__imp_FindNLSStringEx' as FindNLSStringEx:qword
        extrn '__imp_FlushProcessWriteBuffers' as FlushProcessWriteBuffers:qword
        extrn '__imp_FreeLibraryWhenCallbackReturns' as FreeLibraryWhenCallbackReturns:qword
        extrn '__imp_GetApplicationRecoveryCallback' as GetApplicationRecoveryCallback:qword
        extrn '__imp_GetApplicationRestartSettings' as GetApplicationRestartSettings:qword
        extrn '__imp_GetCalendarDateFormatEx' as GetCalendarDateFormatEx:qword
        extrn '__imp_GetCalendarInfoEx' as GetCalendarInfoEx:qword
        extrn '__imp_GetCalendarSupportedDateRange' as GetCalendarSupportedDateRange:qword
        extrn '__imp_GetComPlusPackageInstallStatus' as GetComPlusPackageInstallStatus:qword
        extrn '__imp_GetCompressedFileSizeTransactedA' as GetCompressedFileSizeTransactedA:qword
        extrn '__imp_GetCompressedFileSizeTransactedW' as GetCompressedFileSizeTransactedW:qword
        extrn '__imp_GetConsoleHistoryInfo' as GetConsoleHistoryInfo:qword
        extrn '__imp_GetConsoleOriginalTitleA' as GetConsoleOriginalTitleA:qword
        extrn '__imp_GetConsoleOriginalTitleW' as GetConsoleOriginalTitleW:qword
        extrn '__imp_GetConsoleScreenBufferInfoEx' as GetConsoleScreenBufferInfoEx:qword
        extrn '__imp_GetCurrencyFormatEx' as GetCurrencyFormatEx:qword
        extrn '__imp_GetCurrentConsoleFontEx' as GetCurrentConsoleFontEx:qword
        extrn '__imp_GetCurrentProcessorNumber' as GetCurrentProcessorNumber:qword
        extrn '__imp_GetDateFormatEx' as GetDateFormatEx:qword
        extrn '__imp_GetDurationFormat' as GetDurationFormat:qword
        extrn '__imp_GetDurationFormatEx' as GetDurationFormatEx:qword
        extrn '__imp_GetDynamicTimeZoneInformation' as GetDynamicTimeZoneInformation:qword
        extrn '__imp_GetFileAttributesTransactedA' as GetFileAttributesTransactedA:qword
        extrn '__imp_GetFileAttributesTransactedW' as GetFileAttributesTransactedW:qword
        extrn '__imp_GetFileBandwidthReservation' as GetFileBandwidthReservation:qword
        extrn '__imp_GetFileInformationByHandleEx' as GetFileInformationByHandleEx:qword
        extrn '__imp_GetFileMUIInfo' as GetFileMUIInfo:qword
        extrn '__imp_GetFileMUIPath' as GetFileMUIPath:qword
        extrn '__imp_GetFinalPathNameByHandleA' as GetFinalPathNameByHandleA:qword
        extrn '__imp_GetFinalPathNameByHandleW' as GetFinalPathNameByHandleW:qword
        extrn '__imp_GetFullPathNameTransactedA' as GetFullPathNameTransactedA:qword
        extrn '__imp_GetFullPathNameTransactedW' as GetFullPathNameTransactedW:qword
        extrn '__imp_GetLocaleInfoEx' as GetLocaleInfoEx:qword
        extrn '__imp_GetLongPathNameTransactedA' as GetLongPathNameTransactedA:qword
        extrn '__imp_GetLongPathNameTransactedW' as GetLongPathNameTransactedW:qword
        extrn '__imp_GetNamedPipeAttribute' as GetNamedPipeAttribute:qword
        extrn '__imp_GetNamedPipeClientComputerNameA' as GetNamedPipeClientComputerNameA:qword
        extrn '__imp_GetNamedPipeClientComputerNameW' as GetNamedPipeClientComputerNameW:qword
        extrn '__imp_GetNamedPipeClientProcessId' as GetNamedPipeClientProcessId:qword
        extrn '__imp_GetNamedPipeClientSessionId' as GetNamedPipeClientSessionId:qword
        extrn '__imp_GetNamedPipeServerProcessId' as GetNamedPipeServerProcessId:qword
        extrn '__imp_GetNamedPipeServerSessionId' as GetNamedPipeServerSessionId:qword
        extrn '__imp_GetNLSVersion' as GetNLSVersion:qword
        extrn '__imp_GetNLSVersionEx' as GetNLSVersionEx:qword
        extrn '__imp_GetNumaProximityNode' as GetNumaProximityNode:qword
        extrn '__imp_GetNumberFormatEx' as GetNumberFormatEx:qword
        extrn '__imp_GetProductInfo' as GetProductInfo:qword
        extrn '__imp_GetQueuedCompletionStatusEx' as GetQueuedCompletionStatusEx:qword
        extrn '__imp_GetStringScripts' as GetStringScripts:qword
        extrn '__imp_GetSystemDefaultLocaleName' as GetSystemDefaultLocaleName:qword
        extrn '__imp_GetSystemPreferredUILanguages' as GetSystemPreferredUILanguages:qword
        extrn '__imp_GetThreadPreferredUILanguages' as GetThreadPreferredUILanguages:qword
        extrn '__imp_GetThreadUILanguage' as GetThreadUILanguage:qword
        extrn '__imp_GetTickCount64' as GetTickCount64:qword
        extrn '__imp_GetTimeFormatEx' as GetTimeFormatEx:qword
        extrn '__imp_GetUILanguageInfo' as GetUILanguageInfo:qword
        extrn '__imp_GetUserDefaultLocaleName' as GetUserDefaultLocaleName:qword
        extrn '__imp_GetUserPreferredUILanguages' as GetUserPreferredUILanguages:qword
        extrn '__imp_GetVolumeInformationByHandleW' as GetVolumeInformationByHandleW:qword
        extrn '__imp_IdnToAscii' as IdnToAscii:qword
        extrn '__imp_IdnToNameprepUnicode' as IdnToNameprepUnicode:qword
        extrn '__imp_IdnToUnicode' as IdnToUnicode:qword
        extrn '__imp_InitOnceBeginInitialize' as InitOnceBeginInitialize:qword
        extrn '__imp_InitOnceComplete' as InitOnceComplete:qword
        extrn '__imp_InitOnceExecuteOnce' as InitOnceExecuteOnce:qword
        extrn '__imp_InitOnceInitialize' as InitOnceInitialize:qword
        extrn '__imp_InitializeConditionVariable' as InitializeConditionVariable:qword
        extrn '__imp_InitializeCriticalSectionEx' as InitializeCriticalSectionEx:qword
        extrn '__imp_InitializeProcThreadAttributeList' as InitializeProcThreadAttributeList:qword
        extrn '__imp_InitializeSRWLock' as InitializeSRWLock:qword
        extrn '__imp_InterlockedPushListSList' as InterlockedPushListSList:qword
        extrn '__imp_IsCalendarLeapDay' as IsCalendarLeapDay:qword
        extrn '__imp_IsCalendarLeapMonth' as IsCalendarLeapMonth:qword
        extrn '__imp_IsCalendarLeapYear' as IsCalendarLeapYear:qword
        extrn '__imp_IsNLSDefinedString' as IsNLSDefinedString:qword
        extrn '__imp_IsNormalizedString' as IsNormalizedString:qword
        extrn '__imp_IsThreadAFiber' as IsThreadAFiber:qword
        extrn '__imp_IsThreadpoolTimerSet' as IsThreadpoolTimerSet:qword
        if (NTDDI_VERSION <> NTDDI_WIN81)
            extrn '__imp_IsTimeZoneRedirectionEnabled' as IsTimeZoneRedirectionEnabled:qword
        end if
        extrn '__imp_IsValidCalDateTime' as IsValidCalDateTime:qword
        extrn '__imp_IsValidLocaleName' as IsValidLocaleName:qword
        extrn '__imp_LCIDToLocaleName' as LCIDToLocaleName:qword
        extrn '__imp_LCMapStringEx' as LCMapStringEx:qword
        extrn '__imp_LeaveCriticalSectionWhenCallbackReturns' as LeaveCriticalSectionWhenCallbackReturns:qword
        extrn '__imp_LoadStringBaseExW' as LoadStringBaseExW:qword
        extrn '__imp_LoadStringBaseW' as LoadStringBaseW:qword
        extrn '__imp_LocaleNameToLCID' as LocaleNameToLCID:qword
        extrn '__imp_MapViewOfFileExNuma' as MapViewOfFileExNuma:qword
        extrn '__imp_MoveFileTransactedA' as MoveFileTransactedA:qword
        extrn '__imp_MoveFileTransactedW' as MoveFileTransactedW:qword
        extrn '__imp_NeedCurrentDirectoryForExePathA' as NeedCurrentDirectoryForExePathA:qword
        extrn '__imp_NeedCurrentDirectoryForExePathW' as NeedCurrentDirectoryForExePathW:qword
        extrn '__imp_NormalizeString' as NormalizeString:qword
        extrn '__imp_OpenFileById' as OpenFileById:qword
        extrn '__imp_OpenPrivateNamespaceA' as OpenPrivateNamespaceA:qword
        extrn '__imp_OpenPrivateNamespaceW' as OpenPrivateNamespaceW:qword
        extrn '__imp_QueryActCtxSettingsW' as QueryActCtxSettingsW:qword
        extrn '__imp_QueryFullProcessImageNameA' as QueryFullProcessImageNameA:qword
        extrn '__imp_QueryFullProcessImageNameW' as QueryFullProcessImageNameW:qword
        extrn '__imp_QueryIdleProcessorCycleTime' as QueryIdleProcessorCycleTime:qword
        extrn '__imp_QueryProcessCycleTime' as QueryProcessCycleTime:qword
        extrn '__imp_QueryThreadCycleTime' as QueryThreadCycleTime:qword
        extrn '__imp_RegisterApplicationRecoveryCallback' as RegisterApplicationRecoveryCallback:qword
        extrn '__imp_RegisterApplicationRestart' as RegisterApplicationRestart:qword
        extrn '__imp_ReleaseMutexWhenCallbackReturns' as ReleaseMutexWhenCallbackReturns:qword
        extrn '__imp_ReleaseSRWLockExclusive' as ReleaseSRWLockExclusive:qword
        extrn '__imp_ReleaseSRWLockShared' as ReleaseSRWLockShared:qword
        extrn '__imp_ReleaseSemaphoreWhenCallbackReturns' as ReleaseSemaphoreWhenCallbackReturns:qword
        extrn '__imp_RemoveDirectoryTransactedA' as RemoveDirectoryTransactedA:qword
        extrn '__imp_RemoveDirectoryTransactedW' as RemoveDirectoryTransactedW:qword
        extrn '__imp_RemoveDllDirectory' as RemoveDllDirectory:qword
        extrn '__imp_ReplacePartitionUnit' as ReplacePartitionUnit:qword
        extrn '__imp_SetConsoleHistoryInfo' as SetConsoleHistoryInfo:qword
        extrn '__imp_SetConsoleScreenBufferInfoEx' as SetConsoleScreenBufferInfoEx:qword
        extrn '__imp_SetCurrentConsoleFontEx' as SetCurrentConsoleFontEx:qword
        extrn '__imp_SetDefaultDllDirectories' as SetDefaultDllDirectories:qword
        extrn '__imp_SetDynamicTimeZoneInformation' as SetDynamicTimeZoneInformation:qword
        extrn '__imp_SetEventWhenCallbackReturns' as SetEventWhenCallbackReturns:qword
        extrn '__imp_SetFileAttributesTransactedA' as SetFileAttributesTransactedA:qword
        extrn '__imp_SetFileAttributesTransactedW' as SetFileAttributesTransactedW:qword
        extrn '__imp_SetFileBandwidthReservation' as SetFileBandwidthReservation:qword
        extrn '__imp_SetFileCompletionNotificationModes' as SetFileCompletionNotificationModes:qword
        extrn '__imp_SetFileInformationByHandle' as SetFileInformationByHandle:qword
        extrn '__imp_SetFileIoOverlappedRange' as SetFileIoOverlappedRange:qword
        extrn '__imp_SetNamedPipeAttribute' as SetNamedPipeAttribute:qword
        extrn '__imp_SetThreadpoolThreadMaximum' as SetThreadpoolThreadMaximum:qword
        extrn '__imp_SetThreadpoolThreadMinimum' as SetThreadpoolThreadMinimum:qword
        extrn '__imp_SetThreadpoolTimer' as SetThreadpoolTimer:qword
        extrn '__imp_SetThreadpoolWait' as SetThreadpoolWait:qword
        if (NTDDI_VERSION >= NTDDI_WIN8)
            extrn '__imp_SetThreadpoolWaitEx' as SetThreadpoolWaitEx:qword
        end if
        extrn '__imp_SetThreadPreferredUILanguages' as SetThreadPreferredUILanguages:qword
        extrn '__imp_SleepConditionVariableCS' as SleepConditionVariableCS:qword
        extrn '__imp_SleepConditionVariableSRW' as SleepConditionVariableSRW:qword
        extrn '__imp_StartThreadpoolIo' as StartThreadpoolIo:qword
        extrn '__imp_SubmitThreadpoolWork' as SubmitThreadpoolWork:qword
        extrn '__imp_TrySubmitThreadpoolCallback' as TrySubmitThreadpoolCallback:qword
        extrn '__imp_UnregisterApplicationRecoveryCallback' as UnregisterApplicationRecoveryCallback:qword
        extrn '__imp_UnregisterApplicationRestart' as UnregisterApplicationRestart:qword
        extrn '__imp_UpdateCalendarDayOfWeek' as UpdateCalendarDayOfWeek:qword
        extrn '__imp_UpdateProcThreadAttribute' as UpdateProcThreadAttribute:qword
        extrn '__imp_VerifyScripts' as VerifyScripts:qword
        extrn '__imp_VirtualAllocExNuma' as VirtualAllocExNuma:qword
        extrn '__imp_WaitForThreadpoolIoCallbacks' as WaitForThreadpoolIoCallbacks:qword
        extrn '__imp_WaitForThreadpoolTimerCallbacks' as WaitForThreadpoolTimerCallbacks:qword
        extrn '__imp_WaitForThreadpoolWaitCallbacks' as WaitForThreadpoolWaitCallbacks:qword
        extrn '__imp_WaitForThreadpoolWorkCallbacks' as WaitForThreadpoolWorkCallbacks:qword
        extrn '__imp_WakeAllConditionVariable' as WakeAllConditionVariable:qword
        extrn '__imp_WakeConditionVariable' as WakeConditionVariable:qword
        extrn '__imp_WerGetFlags' as WerGetFlags:qword
        extrn '__imp_WerRegisterFile' as WerRegisterFile:qword
        extrn '__imp_WerRegisterMemoryBlock' as WerRegisterMemoryBlock:qword
        extrn '__imp_WerSetFlags' as WerSetFlags:qword
        extrn '__imp_WerUnregisterFile' as WerUnregisterFile:qword
        extrn '__imp_WerUnregisterMemoryBlock' as WerUnregisterMemoryBlock:qword
        extrn '__imp_Wow64GetThreadContext' as Wow64GetThreadContext:qword
        extrn '__imp_Wow64SetThreadContext' as Wow64SetThreadContext:qword
        extrn '__imp_Wow64SuspendThread' as Wow64SuspendThread:qword
        api CopyFileTransacted,\
            CreateBoundaryDescriptor,\
            CreateDirectoryTransacted,\
            CreateEventEx,\
            CreateFileMappingNuma,\
            CreateFileTransacted,\
            CreateHardLinkTransacted,\
            CreateMutexEx,\
            CreatePrivateNamespace,\
            CreateSemaphoreEx,\
            CreateSymbolicLink,\
            CreateSymbolicLinkTransacted,\
            CreateWaitableTimerEx,\
            DeleteFileTransacted,\
            EnumResourceLanguagesEx,\
            EnumResourceNamesEx,\
            EnumResourceTypesEx,\
            FindFirstFileTransacted,\
            GetCompressedFileSizeTransacted,\
            GetConsoleOriginalTitle,\
            GetFileAttributesTransacted,\
            GetFinalPathNameByHandle,\
            GetFullPathNameTransacted,\
            GetLongPathNameTransacted,\
            GetNamedPipeClientComputerName,\
            MoveFileTransacted,\
            NeedCurrentDirectoryForExePath,\
            OpenPrivateNamespace,\
            QueryFullProcessImageName,\
            RemoveDirectoryTransacted,\
            SetFileAttributesTransacted
    end if

    if (NTDDI_VERSION >= NTDDI_VISTASP1)
        extrn '__imp_AddSecureMemoryCacheCallback' as AddSecureMemoryCacheCallback:qword
        extrn '__imp_GetPhysicallyInstalledSystemMemory' as GetPhysicallyInstalledSystemMemory:qword
        extrn '__imp_GetTimeZoneInformationForYear' as GetTimeZoneInformationForYear:qword
        extrn '__imp_QueryProcessAffinityUpdateMode' as QueryProcessAffinityUpdateMode:qword
        extrn '__imp_RemoveSecureMemoryCacheCallback' as RemoveSecureMemoryCacheCallback:qword
        extrn '__imp_SetProcessAffinityUpdateMode' as SetProcessAffinityUpdateMode:qword
    end if

    if (NTDDI_VERSION >= NTDDI_WIN7)
        extrn '__imp_AddIntegrityLabelToBoundaryDescriptor' as AddIntegrityLabelToBoundaryDescriptor:qword
        extrn '__imp_BaseFormatTimeOut' as BaseFormatTimeOut:qword
        extrn '__imp_BaseGetNamedObjectDirectory' as BaseGetNamedObjectDirectory:qword
        extrn '__imp_Basep8BitStringToDynamicUnicodeString' as Basep8BitStringToDynamicUnicodeString:qword
        extrn '__imp_CreateRemoteThreadEx' as CreateRemoteThreadEx:qword
        extrn '__imp_DisableThreadProfiling' as DisableThreadProfiling:qword
        extrn '__imp_EnableThreadProfiling' as EnableThreadProfiling:qword
        extrn '__imp_FindStringOrdinal' as FindStringOrdinal:qword
        extrn '__imp_GetActiveProcessorCount' as GetActiveProcessorCount:qword
        extrn '__imp_GetActiveProcessorGroupCount' as GetActiveProcessorGroupCount:qword
        extrn '__imp_GetCurrentProcessorNumberEx' as GetCurrentProcessorNumberEx:qword
        extrn '__imp_GetLogicalProcessorInformationEx' as GetLogicalProcessorInformationEx:qword
        extrn '__imp_GetMaximumProcessorCount' as GetMaximumProcessorCount:qword
        extrn '__imp_GetMaximumProcessorGroupCount' as GetMaximumProcessorGroupCount:qword
        extrn '__imp_GetNumaAvailableMemoryNodeEx' as GetNumaAvailableMemoryNodeEx:qword
        extrn '__imp_GetNumaNodeNumberFromHandle' as GetNumaNodeNumberFromHandle:qword
        extrn '__imp_GetNumaNodeProcessorMaskEx' as GetNumaNodeProcessorMaskEx:qword
        extrn '__imp_GetNumaProcessorNodeEx' as GetNumaProcessorNodeEx:qword
        extrn '__imp_GetNumaProximityNodeEx' as GetNumaProximityNodeEx:qword
        extrn '__imp_GetProcessGroupAffinity' as GetProcessGroupAffinity:qword
        extrn '__imp_GetProcessorSystemCycleTime' as GetProcessorSystemCycleTime:qword
        extrn '__imp_GetProcessPreferredUILanguages' as GetProcessPreferredUILanguages:qword
        extrn '__imp_GetProcessUserModeExceptionPolicy' as GetProcessUserModeExceptionPolicy:qword
        extrn '__imp_GetThreadErrorMode' as GetThreadErrorMode:qword
        extrn '__imp_GetThreadGroupAffinity' as GetThreadGroupAffinity:qword
        extrn '__imp_GetThreadIdealProcessorEx' as GetThreadIdealProcessorEx:qword
        extrn '__imp_K32EmptyWorkingSet' as K32EmptyWorkingSet:qword
        extrn '__imp_K32EnumDeviceDrivers' as K32EnumDeviceDrivers:qword
        extrn '__imp_K32EnumPageFilesA' as K32EnumPageFilesA:qword
        extrn '__imp_K32EnumPageFilesW' as K32EnumPageFilesW:qword
        extrn '__imp_K32EnumProcessModules' as K32EnumProcessModules:qword
        extrn '__imp_K32EnumProcessModulesEx' as K32EnumProcessModulesEx:qword
        extrn '__imp_K32EnumProcesses' as K32EnumProcesses:qword
        extrn '__imp_K32GetDeviceDriverBaseNameA' as K32GetDeviceDriverBaseNameA:qword
        extrn '__imp_K32GetDeviceDriverBaseNameW' as K32GetDeviceDriverBaseNameW:qword
        extrn '__imp_K32GetDeviceDriverFileNameA' as K32GetDeviceDriverFileNameA:qword
        extrn '__imp_K32GetDeviceDriverFileNameW' as K32GetDeviceDriverFileNameW:qword
        extrn '__imp_K32GetMappedFileNameA' as K32GetMappedFileNameA:qword
        extrn '__imp_K32GetMappedFileNameW' as K32GetMappedFileNameW:qword
        extrn '__imp_K32GetModuleBaseNameA' as K32GetModuleBaseNameA:qword
        extrn '__imp_K32GetModuleBaseNameW' as K32GetModuleBaseNameW:qword
        extrn '__imp_K32GetModuleFileNameExA' as K32GetModuleFileNameExA:qword
        extrn '__imp_K32GetModuleFileNameExW' as K32GetModuleFileNameExW:qword
        extrn '__imp_K32GetModuleInformation' as K32GetModuleInformation:qword
        extrn '__imp_K32GetPerformanceInfo' as K32GetPerformanceInfo:qword
        extrn '__imp_K32GetProcessImageFileNameA' as K32GetProcessImageFileNameA:qword
        extrn '__imp_K32GetProcessImageFileNameW' as K32GetProcessImageFileNameW:qword
        extrn '__imp_K32GetProcessMemoryInfo' as K32GetProcessMemoryInfo:qword
        extrn '__imp_K32GetWsChanges' as K32GetWsChanges:qword
        extrn '__imp_K32GetWsChangesEx' as K32GetWsChangesEx:qword
        extrn '__imp_K32InitializeProcessForWsWatch' as K32InitializeProcessForWsWatch:qword
        extrn '__imp_K32QueryWorkingSet' as K32QueryWorkingSet:qword
        extrn '__imp_K32QueryWorkingSetEx' as K32QueryWorkingSetEx:qword
        extrn '__imp_LoadAppInitDlls' as LoadAppInitDlls:qword
        extrn '__imp_NotifyUILanguageChange' as NotifyUILanguageChange:qword
        extrn '__imp_PowerClearRequest' as PowerClearRequest:qword
        extrn '__imp_PowerCreateRequest' as PowerCreateRequest:qword
        extrn '__imp_PowerSetRequest' as PowerSetRequest:qword
        extrn '__imp_QueryIdleProcessorCycleTimeEx' as QueryIdleProcessorCycleTimeEx:qword
        extrn '__imp_QueryThreadProfiling' as QueryThreadProfiling:qword
        extrn '__imp_QueryThreadpoolStackInformation' as QueryThreadpoolStackInformation:qword
        extrn '__imp_QueryUnbiasedInterruptTime' as QueryUnbiasedInterruptTime:qword
        extrn '__imp_RaiseFailFastException' as RaiseFailFastException:qword
        extrn '__imp_ReadThreadProfilingData' as ReadThreadProfilingData:qword
        extrn '__imp_ResolveLocaleName' as ResolveLocaleName:qword
        extrn '__imp_RtlCompareMemory' as RtlCompareMemory:qword
        extrn '__imp_RtlCopyMemory' as RtlCopyMemory:qword
        extrn '__imp_SetProcessPreferredUILanguages' as SetProcessPreferredUILanguages:qword
        if (NTDDI_VERSION < NTDDI_WIN8)
            extrn '__imp_SetProcessUserModeExceptionPolicy' as SetProcessUserModeExceptionPolicy:qword
        end if
        extrn '__imp_SetSearchPathMode' as SetSearchPathMode:qword
        extrn '__imp_SetStdHandleEx' as SetStdHandleEx:qword
        extrn '__imp_SetThreadErrorMode' as SetThreadErrorMode:qword
        extrn '__imp_SetThreadGroupAffinity' as SetThreadGroupAffinity:qword
        extrn '__imp_SetThreadIdealProcessorEx' as SetThreadIdealProcessorEx:qword
        extrn '__imp_SetThreadpoolStackInformation' as SetThreadpoolStackInformation:qword
        extrn '__imp_SystemTimeToTzSpecificLocalTimeEx' as SystemTimeToTzSpecificLocalTimeEx:qword
        extrn '__imp_TryAcquireSRWLockExclusive' as TryAcquireSRWLockExclusive:qword
        extrn '__imp_TryAcquireSRWLockShared' as TryAcquireSRWLockShared:qword
        extrn '__imp_TzSpecificLocalTimeToSystemTimeEx' as TzSpecificLocalTimeToSystemTimeEx:qword
        extrn '__imp_WerRegisterRuntimeExceptionModule' as WerRegisterRuntimeExceptionModule:qword
        extrn '__imp_WerUnregisterRuntimeExceptionModule' as WerUnregisterRuntimeExceptionModule:qword
        extrn '__imp_Wow64GetThreadSelectorEntry' as Wow64GetThreadSelectorEntry:qword
        CopyMemory equ RtlCopyMemory
        extrn '__imp_CreateUmsCompletionList' as CreateUmsCompletionList:qword
        extrn '__imp_CreateUmsThreadContext' as CreateUmsThreadContext:qword
        extrn '__imp_DeleteUmsCompletionList' as DeleteUmsCompletionList:qword
        extrn '__imp_DeleteUmsThreadContext' as DeleteUmsThreadContext:qword
        extrn '__imp_DequeueUmsCompletionListItems' as DequeueUmsCompletionListItems:qword
        extrn '__imp_EnterUmsSchedulingMode' as EnterUmsSchedulingMode:qword
        extrn '__imp_ExecuteUmsThread' as ExecuteUmsThread:qword
        extrn '__imp_GetCurrentUmsThread' as GetCurrentUmsThread:qword
        extrn '__imp_GetNextUmsListItem' as GetNextUmsListItem:qword
        extrn '__imp_GetUmsCompletionListEvent' as GetUmsCompletionListEvent:qword
        extrn '__imp_GetUmsSystemThreadInformation' as GetUmsSystemThreadInformation:qword
        extrn '__imp_QueryUmsThreadInformation' as QueryUmsThreadInformation:qword
        extrn '__imp_SetUmsThreadInformation' as SetUmsThreadInformation:qword
        extrn '__imp_UmsThreadYield' as UmsThreadYield:qword

        api K32EnumPageFiles,\
            K32GetDeviceDriverBaseName,\
            K32GetDeviceDriverFileName,\
            K32GetMappedFileName,\
            K32GetModuleBaseName,\
            K32GetModuleFileNameEx,\
            K32GetProcessImageFileName
    end if

    if (NTDDI_VERSION >= NTDDI_WIN7SP1)
        extrn '__imp_CopyContext' as CopyContext:qword
        extrn '__imp_GetEnabledXStateFeatures' as GetEnabledXStateFeatures:qword
        extrn '__imp_GetXStateFeaturesMask' as GetXStateFeaturesMask:qword
        extrn '__imp_InitializeContext' as InitializeContext:qword
        extrn '__imp_LocateXStateFeature' as LocateXStateFeature:qword
        extrn '__imp_SetXStateFeaturesMask' as SetXStateFeaturesMask:qword
    end if

    if (NTDDI_VERSION >= NTDDI_WIN8)
        if (NTDDI_VERSION = NTDDI_WIN8)
            extrn '__imp_AcquireStateLock' as AcquireStateLock:qword
        end if
        extrn '__imp_AddResourceAttributeAce' as AddResourceAttributeAce:qword
        extrn '__imp_AddScopedPolicyIDAce' as AddScopedPolicyIDAce:qword
        if (NTDDI_VERSION = NTDDI_WIN8)
            extrn '__imp_CalloutOnFiberStack' as CalloutOnFiberStack:qword
            extrn '__imp_CopyExtendedContext' as CopyExtendedContext:qword
        end if
        extrn '__imp_CeipIsOptedIn' as CeipIsOptedIn:qword
        extrn '__imp_CheckTokenCapability' as CheckTokenCapability:qword
        extrn '__imp_CheckTokenMembershipEx' as CheckTokenMembershipEx:qword
        extrn '__imp_ClosePackageInfo' as ClosePackageInfo:qword
        extrn '__imp_CopyFile2' as CopyFile2:qword
        extrn '__imp_CreateFile2' as CreateFile2:qword
        extrn '__imp_CreateFileMappingFromApp' as CreateFileMappingFromApp:qword
        extrn '__imp_GetAppContainerNamedObjectPath' as GetAppContainerNamedObjectPath:qword
        extrn '__imp_GetApplicationUserModelId' as GetApplicationUserModelId:qword
        extrn '__imp_GetCachedSigningLevel' as GetCachedSigningLevel:qword
        extrn '__imp_GetCurrentApplicationUserModelId' as GetCurrentApplicationUserModelId:qword
        extrn '__imp_GetCurrentPackageFamilyName' as GetCurrentPackageFamilyName:qword
        extrn '__imp_GetCurrentPackageFullName' as GetCurrentPackageFullName:qword
        extrn '__imp_GetCurrentPackageId' as GetCurrentPackageId:qword
        extrn '__imp_GetCurrentPackageInfo' as GetCurrentPackageInfo:qword
        extrn '__imp_GetCurrentPackagePath' as GetCurrentPackagePath:qword
        extrn '__imp_GetCurrentThreadStackLimits' as GetCurrentThreadStackLimits:qword
        extrn '__imp_GetFirmwareEnvironmentVariableExA' as GetFirmwareEnvironmentVariableExA:qword
        extrn '__imp_GetFirmwareEnvironmentVariableExW' as GetFirmwareEnvironmentVariableExW:qword
        extrn '__imp_GetFirmwareType' as GetFirmwareType:qword
        extrn '__imp_GetMemoryErrorHandlingCapabilities' as GetMemoryErrorHandlingCapabilities:qword
        extrn '__imp_GetOverlappedResultEx' as GetOverlappedResultEx:qword
        extrn '__imp_GetPackageFamilyName' as GetPackageFamilyName:qword
        extrn '__imp_GetPackageFullName' as GetPackageFullName:qword
        extrn '__imp_GetPackageId' as GetPackageId:qword
        extrn '__imp_GetPackageInfo' as GetPackageInfo:qword
        extrn '__imp_GetPackagePath' as GetPackagePath:qword
        extrn '__imp_GetPackagesByPackageFamily' as GetPackagesByPackageFamily:qword
        extrn '__imp_GetProcessInformation' as GetProcessInformation:qword
        extrn '__imp_GetProcessMitigationPolicy' as GetProcessMitigationPolicy:qword
        extrn '__imp_GetSystemTimePreciseAsFileTime' as GetSystemTimePreciseAsFileTime:qword
        extrn '__imp_GetThreadInformation' as GetThreadInformation:qword
        extrn '__imp_GlobalAddAtomExA' as GlobalAddAtomExA:qword
        extrn '__imp_GlobalAddAtomExW' as GlobalAddAtomExW:qword
        extrn '__imp_InterlockedPushListSListEx' as InterlockedPushListSListEx:qword
        extrn '__imp_IsNativeVhdBoot' as IsNativeVhdBoot:qword
        extrn '__imp_IsValidNLSVersion' as IsValidNLSVersion:qword
        extrn '__imp_LoadPackagedLibrary' as LoadPackagedLibrary:qword
        extrn '__imp_MapViewOfFileFromApp' as MapViewOfFileFromApp:qword
        extrn '__imp_OpenPackageInfoByFullName' as OpenPackageInfoByFullName:qword
        extrn '__imp_PackageFamilyNameFromFullName' as PackageFamilyNameFromFullName:qword
        extrn '__imp_PackageFamilyNameFromId' as PackageFamilyNameFromId:qword
        extrn '__imp_PackageFullNameFromId' as PackageFullNameFromId:qword
        extrn '__imp_PackageIdFromFullName' as PackageIdFromFullName:qword
        extrn '__imp_PackageNameAndPublisherIdFromFamilyName' as PackageNameAndPublisherIdFromFamilyName:qword
        extrn '__imp_PrefetchVirtualMemory' as PrefetchVirtualMemory:qword
        extrn '__imp_RegCopyTreeW' as RegCopyTreeW:qword
        extrn '__imp_RegisterBadMemoryNotification' as RegisterBadMemoryNotification:qword
        extrn '__imp_RestoreLastError' as RestoreLastError:qword
        extrn '__imp_SetCachedSigningLevel' as SetCachedSigningLevel:qword
        extrn '__imp_SetFirmwareEnvironmentVariableExA' as SetFirmwareEnvironmentVariableExA:qword
        extrn '__imp_SetFirmwareEnvironmentVariableExW' as SetFirmwareEnvironmentVariableExW:qword
        extrn '__imp_SetProcessInformation' as SetProcessInformation:qword
        extrn '__imp_SetProcessMitigationPolicy' as SetProcessMitigationPolicy:qword
        extrn '__imp_SetThreadInformation' as SetThreadInformation:qword
        extrn '__imp_UnregisterBadMemoryNotification' as UnregisterBadMemoryNotification:qword
        api GetFirmwareEnvironmentVariableEx,\
            GlobalAddAtomEx,\
            SetFirmwareEnvironmentVariableEx
    end if

    if (NTDDI_VERSION >= NTDDI_WIN81)
        extrn '__imp_DeleteSynchronizationBarrier' as DeleteSynchronizationBarrier:qword
        extrn '__imp_EnterSynchronizationBarrier' as EnterSynchronizationBarrier:qword
        extrn '__imp_FindPackagesByPackageFamily' as FindPackagesByPackageFamily:qword
        extrn '__imp_FormatApplicationUserModelId' as FormatApplicationUserModelId:qword
        extrn '__imp_GetPackageApplicationIds' as GetPackageApplicationIds:qword
        extrn '__imp_GetPackagePathByFullName' as GetPackagePathByFullName:qword
        extrn '__imp_GetStagedPackagePathByFullName' as GetStagedPackagePathByFullName:qword
        extrn '__imp_InitializeSynchronizationBarrier' as InitializeSynchronizationBarrier:qword
        extrn '__imp_InstallELAMCertificateInfo' as InstallELAMCertificateInfo:qword
        extrn '__imp_IsProcessCritical' as IsProcessCritical:qword
        extrn '__imp_OOBEComplete' as OOBEComplete:qword
        extrn '__imp_ParseApplicationUserModelId' as ParseApplicationUserModelId:qword
        extrn '__imp_PssCaptureSnapshot' as PssCaptureSnapshot:qword
        extrn '__imp_PssDuplicateSnapshot' as PssDuplicateSnapshot:qword
        extrn '__imp_PssFreeSnapshot' as PssFreeSnapshot:qword
        extrn '__imp_PssQuerySnapshot' as PssQuerySnapshot:qword
        extrn '__imp_PssWalkMarkerCreate' as PssWalkMarkerCreate:qword
        extrn '__imp_PssWalkMarkerFree' as PssWalkMarkerFree:qword
        extrn '__imp_PssWalkMarkerGetPosition' as PssWalkMarkerGetPosition:qword
        extrn '__imp_PssWalkMarkerSeekToBeginning' as PssWalkMarkerSeekToBeginning:qword
        extrn '__imp_PssWalkMarkerSetPosition' as PssWalkMarkerSetPosition:qword
        extrn '__imp_PssWalkSnapshot' as PssWalkSnapshot:qword
        extrn '__imp_RegisterWaitUntilOOBECompleted' as RegisterWaitUntilOOBECompleted:qword
        extrn '__imp_UnregisterWaitUntilOOBECompleted' as UnregisterWaitUntilOOBECompleted:qword
    end if

    if (NTDDI_VERSION >= NTDDI_WIN10)
        extrn '__imp_CreateEnclave' as CreateEnclave:qword
        extrn '__imp_DiscardVirtualMemory' as DiscardVirtualMemory:qword
        extrn '__imp_FreeMemoryJobObject' as FreeMemoryJobObject:qword
        extrn '__imp_GetProcessDefaultCpuSets' as GetProcessDefaultCpuSets:qword
        extrn '__imp_GetSystemCpuSetInformation' as GetSystemCpuSetInformation:qword
        extrn '__imp_GetThreadSelectedCpuSets' as GetThreadSelectedCpuSets:qword
        extrn '__imp_InitializeEnclave' as InitializeEnclave:qword
        extrn '__imp_IsEnclaveTypeSupported' as IsEnclaveTypeSupported:qword
        extrn '__imp_LoadEnclaveData' as LoadEnclaveData:qword
        extrn '__imp_OfferVirtualMemory' as OfferVirtualMemory:qword
        extrn '__imp_QueryIoRateControlInformationJobObject' as QueryIoRateControlInformationJobObject:qword
        extrn '__imp_QueryProtectedPolicy' as QueryProtectedPolicy:qword
        extrn '__imp_ReclaimVirtualMemory' as ReclaimVirtualMemory:qword
        extrn '__imp_SetIoRateControlInformationJobObject' as SetIoRateControlInformationJobObject:qword
        extrn '__imp_SetProcessDefaultCpuSets' as SetProcessDefaultCpuSets:qword
        extrn '__imp_SetProtectedPolicy' as SetProtectedPolicy:qword
        extrn '__imp_SetThreadSelectedCpuSets' as SetThreadSelectedCpuSets:qword
        extrn '__imp_WaitForDebugEventEx' as WaitForDebugEventEx:qword
    end if

    api AddAtom,\
        BeginUpdateResource,\
        BuildCommDCB,\
        BuildCommDCBAndTimeouts,\
        CallNamedPipe,\
        CommConfigDialog,\
        CompareString,\
        CopyFile,\
        CreateDirectory,\
        CreateDirectoryEx,\
        CreateEvent,\
        CreateFile,\
        CreateFileMapping,\
        CreateMailslot,\
        CreateMutex,\
        CreateNamedPipe,\
        CreateProcess,\
        CreateSemaphore,\
        DefineDosDevice,\
        DeleteFile,\
        EndUpdateResource,\
        EnumCalendarInfo,\
        EnumDateFormats,\
        EnumResourceLanguages,\
        EnumResourceNames,\
        EnumResourceTypes,\
        EnumSystemCodePages,\
        EnumSystemLocales,\
        EnumTimeFormats,\
        ExpandEnvironmentStrings,\
        FatalAppExit,\
        FillConsoleOutputCharacter,\
        FindAtom,\
        FindFirstChangeNotification,\
        FindFirstFile,\
        FindNextFile,\
        FindResource,\
        FindResourceEx,\
        FoldString,\
        FormatMessage,\
        FreeEnvironmentStrings,\
        GetAtomName,\
        GetBinaryType,\
        GetCommandLine,\
        GetCompressedFileSize,\
        GetComputerName,\
        GetConsoleTitle,\
        GetCurrencyFormat,\
        GetCurrentDirectory,\
        GetDateFormat,\
        GetDefaultCommConfig,\
        GetDiskFreeSpace,\
        GetDiskFreeSpaceEx,\
        GetDriveType,\
        GetEnvironmentStrings,\
        GetEnvironmentVariable,\
        GetFileAttributes,\
        GetFullPathName,\
        GetLocaleInfo,\
        GetLogicalDriveStrings,\
        GetModuleFileName,\
        GetModuleHandle,\
        GetNamedPipeHandleState,\
        GetNumberFormat,\
        GetPrivateProfileInt,\
        GetPrivateProfileSection,\
        GetPrivateProfileSectionNames,\
        GetPrivateProfileString,\
        GetPrivateProfileStruct,\
        GetProfileInt,\
        GetProfileSection,\
        GetProfileString,\
        GetShortPathName,\
        GetStartupInfo,\
        GetStringType,\
        GetStringTypeEx,\
        GetSystemDirectory,\
        GetTempFileName,\
        GetTempPath,\
        GetTimeFormat,\
        GetVersionEx,\
        GetVolumeInformation,\
        GetWindowsDirectory,\
        GlobalAddAtom,\
        GlobalFindAtom,\
        GlobalGetAtomName,\
        IsBadStringPtr,\
        LCMapString,\
        LoadLibrary,\
        LoadLibraryEx,\
        lstrcat,\
        lstrcmp,\
        lstrcmpi,\
        lstrcpy,\
        lstrcpyn,\
        lstrlen,\
        MoveFile,\
        MoveFileEx,\
        OpenEvent,\
        OpenFileMapping,\
        OpenMutex,\
        OpenSemaphore,\
        OutputDebugString,\
        PeekConsoleInput,\
        QueryDosDevice,\
        ReadConsole,\
        ReadConsoleInput,\
        ReadConsoleOutput,\
        ReadConsoleOutputCharacter,\
        RemoveDirectory,\
        ScrollConsoleScreenBuffer,\
        SearchPath,\
        SetComputerName,\
        SetConsoleTitle,\
        SetCurrentDirectory,\
        SetDefaultCommConfig,\
        SetEnvironmentVariable,\
        SetFileAttributes,\
        SetLocaleInfo,\
        SetVolumeLabel,\
        UpdateResource,\
        WaitNamedPipe,\
        WriteConsole,\
        WriteConsoleInput,\
        WriteConsoleOutput,\
        WriteConsoleOutputCharacter,\
        WritePrivateProfileSection,\
        WritePrivateProfileString,\
        WritePrivateProfileStruct,\
        WriteProfileSection,\
        WriteProfileString
else
    extrn '__imp___hread@12' as _hread:dword
    extrn '__imp___hwrite@12' as _hwrite:dword
    extrn '__imp___lclose@4' as _lclose:dword
    extrn '__imp___lcreat@8' as _lcreat:dword
    extrn '__imp___llseek@12' as _llseek:dword
    extrn '__imp___lopen@8' as _lopen:dword
    extrn '__imp___lread@12' as _lread:dword
    extrn '__imp___lwrite@12' as _lwrite:dword
    extrn '__imp__AddAtomA@4' as AddAtomA:dword
    extrn '__imp__AddAtomW@4' as AddAtomW:dword
    extrn '__imp__AllocConsole@0' as AllocConsole:dword
    extrn '__imp__AreFileApisANSI@0' as AreFileApisANSI:dword
    extrn '__imp__BackupRead@28' as BackupRead:dword
    extrn '__imp__BackupSeek@24' as BackupSeek:dword
    extrn '__imp__BackupWrite@28' as BackupWrite:dword
    extrn '__imp__Beep@8' as Beep:dword
    extrn '__imp__BeginUpdateResourceA@8' as BeginUpdateResourceA:dword
    extrn '__imp__BeginUpdateResourceW@8' as BeginUpdateResourceW:dword
    extrn '__imp__BuildCommDCBA@8' as BuildCommDCBA:dword
    extrn '__imp__BuildCommDCBAndTimeoutsA@12' as BuildCommDCBAndTimeoutsA:dword
    extrn '__imp__BuildCommDCBAndTimeoutsW@12' as BuildCommDCBAndTimeoutsW:dword
    extrn '__imp__BuildCommDCBW@8' as BuildCommDCBW:dword
    extrn '__imp__CallNamedPipeA@28' as CallNamedPipeA:dword
    extrn '__imp__CallNamedPipeW@28' as CallNamedPipeW:dword
    extrn '__imp__ClearCommBreak@4' as ClearCommBreak:dword
    extrn '__imp__ClearCommError@12' as ClearCommError:dword
    extrn '__imp__CloseHandle@4' as CloseHandle:dword
    ;extrn '__imp__CloseProfileUserMapping@0' as CloseProfileUserMapping:dword ;Not present in MASM32 kernel32.lib
    extrn '__imp__CommConfigDialogA@12' as CommConfigDialogA:dword
    extrn '__imp__CommConfigDialogW@12' as CommConfigDialogW:dword
    extrn '__imp__CompareFileTime@8' as CompareFileTime:dword
    extrn '__imp__CompareStringA@24' as CompareStringA:dword
    extrn '__imp__CompareStringW@24' as CompareStringW:dword
    extrn '__imp__ConnectNamedPipe@8' as ConnectNamedPipe:dword
    extrn '__imp__ContinueDebugEvent@12' as ContinueDebugEvent:dword
    extrn '__imp__ConvertDefaultLocale@4' as ConvertDefaultLocale:dword
    extrn '__imp__CopyFileA@12' as CopyFileA:dword
    extrn '__imp__CopyFileW@12' as CopyFileW:dword
    extrn '__imp__CreateConsoleScreenBuffer@20' as CreateConsoleScreenBuffer:dword
    extrn '__imp__CreateDirectoryA@8' as CreateDirectoryA:dword
    extrn '__imp__CreateDirectoryExA@12' as CreateDirectoryExA:dword
    extrn '__imp__CreateDirectoryExW@12' as CreateDirectoryExW:dword
    extrn '__imp__CreateDirectoryW@8' as CreateDirectoryW:dword
    extrn '__imp__CreateEventA@16' as CreateEventA:dword
    extrn '__imp__CreateEventW@16' as CreateEventW:dword
    extrn '__imp__CreateFileA@28' as CreateFileA:dword
    extrn '__imp__CreateFileMappingA@24' as CreateFileMappingA:dword
    extrn '__imp__CreateFileMappingW@24' as CreateFileMappingW:dword
    extrn '__imp__CreateFileW@28' as CreateFileW:dword
    extrn '__imp__CreateIoCompletionPort@16' as CreateIoCompletionPort:dword
    extrn '__imp__CreateMailslotA@16' as CreateMailslotA:dword
    extrn '__imp__CreateMailslotW@16' as CreateMailslotW:dword
    extrn '__imp__CreateMutexA@12' as CreateMutexA:dword
    extrn '__imp__CreateMutexW@12' as CreateMutexW:dword
    extrn '__imp__CreateNamedPipeA@32' as CreateNamedPipeA:dword
    extrn '__imp__CreateNamedPipeW@32' as CreateNamedPipeW:dword
    extrn '__imp__CreatePipe@16' as CreatePipe:dword
    extrn '__imp__CreateProcessA@40' as CreateProcessA:dword
    extrn '__imp__CreateProcessW@40' as CreateProcessW:dword
    extrn '__imp__CreateRemoteThread@28' as CreateRemoteThread:dword
    extrn '__imp__CreateSemaphoreA@16' as CreateSemaphoreA:dword
    extrn '__imp__CreateSemaphoreW@16' as CreateSemaphoreW:dword
    extrn '__imp__CreateTapePartition@16' as CreateTapePartition:dword
    extrn '__imp__CreateThread@24' as CreateThread:dword
    extrn '__imp__CreateToolhelp32Snapshot@8' as CreateToolhelp32Snapshot:dword
    extrn '__imp__DebugActiveProcess@4' as DebugActiveProcess:dword
    extrn '__imp__DebugBreak@0' as DebugBreak:dword
    extrn '__imp__DefineDosDeviceA@12' as DefineDosDeviceA:dword
    extrn '__imp__DefineDosDeviceW@12' as DefineDosDeviceW:dword
    extrn '__imp__DeleteAtom@4' as DeleteAtom:dword
    extrn '__imp__DeleteCriticalSection@4' as DeleteCriticalSection:dword
    extrn '__imp__DeleteFileA@4' as DeleteFileA:dword
    extrn '__imp__DeleteFileW@4' as DeleteFileW:dword
    extrn '__imp__DeviceIoControl@32' as DeviceIoControl:dword
    extrn '__imp__DisableThreadLibraryCalls@4' as DisableThreadLibraryCalls:dword
    extrn '__imp__DisconnectNamedPipe@4' as DisconnectNamedPipe:dword
    extrn '__imp__DosDateTimeToFileTime@12' as DosDateTimeToFileTime:dword
    extrn '__imp__DuplicateHandle@28' as DuplicateHandle:dword
    extrn '__imp__EndUpdateResourceA@8' as EndUpdateResourceA:dword
    extrn '__imp__EndUpdateResourceW@8' as EndUpdateResourceW:dword
    extrn '__imp__EnterCriticalSection@4' as EnterCriticalSection:dword
    extrn '__imp__EnumCalendarInfoA@16' as EnumCalendarInfoA:dword
    extrn '__imp__EnumCalendarInfoW@16' as EnumCalendarInfoW:dword
    extrn '__imp__EnumDateFormatsA@12' as EnumDateFormatsA:dword
    extrn '__imp__EnumDateFormatsW@12' as EnumDateFormatsW:dword
    extrn '__imp__EnumResourceLanguagesA@20' as EnumResourceLanguagesA:dword
    extrn '__imp__EnumResourceLanguagesW@20' as EnumResourceLanguagesW:dword
    extrn '__imp__EnumResourceNamesA@16' as EnumResourceNamesA:dword
    extrn '__imp__EnumResourceNamesW@16' as EnumResourceNamesW:dword
    extrn '__imp__EnumResourceTypesA@12' as EnumResourceTypesA:dword
    extrn '__imp__EnumResourceTypesW@12' as EnumResourceTypesW:dword
    extrn '__imp__EnumSystemCodePagesA@8' as EnumSystemCodePagesA:dword
    extrn '__imp__EnumSystemCodePagesW@8' as EnumSystemCodePagesW:dword
    extrn '__imp__EnumSystemLocalesA@8' as EnumSystemLocalesA:dword
    extrn '__imp__EnumSystemLocalesW@8' as EnumSystemLocalesW:dword
    extrn '__imp__EnumTimeFormatsA@12' as EnumTimeFormatsA:dword
    extrn '__imp__EnumTimeFormatsW@12' as EnumTimeFormatsW:dword
    extrn '__imp__EraseTape@12' as EraseTape:dword
    extrn '__imp__EscapeCommFunction@8' as EscapeCommFunction:dword
    extrn '__imp__ExitProcess@4' as ExitProcess:dword
    extrn '__imp__ExitThread@4' as ExitThread:dword
    extrn '__imp__ExpandEnvironmentStringsA@12' as ExpandEnvironmentStringsA:dword
    extrn '__imp__ExpandEnvironmentStringsW@12' as ExpandEnvironmentStringsW:dword
    extrn '__imp__FatalAppExitA@8' as FatalAppExitA:dword
    extrn '__imp__FatalAppExitW@8' as FatalAppExitW:dword
    extrn '__imp__FatalExit@4' as FatalExit:dword
    extrn '__imp__FileTimeToDosDateTime@12' as FileTimeToDosDateTime:dword
    extrn '__imp__FileTimeToLocalFileTime@8' as FileTimeToLocalFileTime:dword
    extrn '__imp__FileTimeToSystemTime@8' as FileTimeToSystemTime:dword
    extrn '__imp__FillConsoleOutputAttribute@20' as FillConsoleOutputAttribute:dword
    extrn '__imp__FillConsoleOutputCharacterA@20' as FillConsoleOutputCharacterA:dword
    extrn '__imp__FillConsoleOutputCharacterW@20' as FillConsoleOutputCharacterW:dword
    extrn '__imp__FindAtomA@4' as FindAtomA:dword
    extrn '__imp__FindAtomW@4' as FindAtomW:dword
    extrn '__imp__FindClose@4' as FindClose:dword
    extrn '__imp__FindCloseChangeNotification@4' as FindCloseChangeNotification:dword
    extrn '__imp__FindFirstChangeNotificationA@12' as FindFirstChangeNotificationA:dword
    extrn '__imp__FindFirstChangeNotificationW@12' as FindFirstChangeNotificationW:dword
    extrn '__imp__FindFirstFileA@8' as FindFirstFileA:dword
    extrn '__imp__FindFirstFileW@8' as FindFirstFileW:dword
    extrn '__imp__FindNextChangeNotification@4' as FindNextChangeNotification:dword
    extrn '__imp__FindNextFileA@8' as FindNextFileA:dword
    extrn '__imp__FindNextFileW@8' as FindNextFileW:dword
    extrn '__imp__FindResourceA@12' as FindResourceA:dword
    extrn '__imp__FindResourceExA@16' as FindResourceExA:dword
    extrn '__imp__FindResourceExW@16' as FindResourceExW:dword
    extrn '__imp__FindResourceW@12' as FindResourceW:dword
    extrn '__imp__FlushConsoleInputBuffer@4' as FlushConsoleInputBuffer:dword
    extrn '__imp__FlushFileBuffers@4' as FlushFileBuffers:dword
    extrn '__imp__FlushInstructionCache@12' as FlushInstructionCache:dword
    extrn '__imp__FlushViewOfFile@8' as FlushViewOfFile:dword
    extrn '__imp__FoldStringA@20' as FoldStringA:dword
    extrn '__imp__FoldStringW@20' as FoldStringW:dword
    extrn '__imp__FormatMessageA@28' as FormatMessageA:dword
    extrn '__imp__FormatMessageW@28' as FormatMessageW:dword
    extrn '__imp__FreeConsole@0' as FreeConsole:dword
    extrn '__imp__FreeEnvironmentStringsA@4' as FreeEnvironmentStringsA:dword
    extrn '__imp__FreeEnvironmentStringsW@4' as FreeEnvironmentStringsW:dword
    extrn '__imp__FreeLibrary@4' as FreeLibrary:dword
    extrn '__imp__FreeLibraryAndExitThread@8' as FreeLibraryAndExitThread:dword
    extrn '__imp__FreeResource@4' as FreeResource:dword
    extrn '__imp__GenerateConsoleCtrlEvent@8' as GenerateConsoleCtrlEvent:dword
    extrn '__imp__GetACP@0' as GetACP:dword
    extrn '__imp__GetAtomNameA@12' as GetAtomNameA:dword
    extrn '__imp__GetAtomNameW@12' as GetAtomNameW:dword
    extrn '__imp__GetBinaryTypeA@8' as GetBinaryTypeA:dword
    extrn '__imp__GetBinaryTypeW@8' as GetBinaryTypeW:dword
    extrn '__imp__GetCommandLineA@0' as GetCommandLineA:dword
    extrn '__imp__GetCommandLineW@0' as GetCommandLineW:dword
    extrn '__imp__GetCommConfig@12' as GetCommConfig:dword
    extrn '__imp__GetCommMask@8' as GetCommMask:dword
    extrn '__imp__GetCommModemStatus@8' as GetCommModemStatus:dword
    extrn '__imp__GetCommProperties@8' as GetCommProperties:dword
    extrn '__imp__GetCommState@8' as GetCommState:dword
    extrn '__imp__GetCommTimeouts@8' as GetCommTimeouts:dword
    extrn '__imp__GetCompressedFileSizeA@8' as GetCompressedFileSizeA:dword
    extrn '__imp__GetCompressedFileSizeW@8' as GetCompressedFileSizeW:dword
    extrn '__imp__GetComputerNameA@8' as GetComputerNameA:dword
    extrn '__imp__GetComputerNameW@8' as GetComputerNameW:dword
    extrn '__imp__GetConsoleCP@0' as GetConsoleCP:dword
    extrn '__imp__GetConsoleCursorInfo@8' as GetConsoleCursorInfo:dword
    extrn '__imp__GetConsoleMode@8' as GetConsoleMode:dword
    extrn '__imp__GetConsoleOutputCP@0' as GetConsoleOutputCP:dword
    extrn '__imp__GetConsoleScreenBufferInfo@8' as GetConsoleScreenBufferInfo:dword
    extrn '__imp__GetConsoleTitleA@8' as GetConsoleTitleA:dword
    extrn '__imp__GetConsoleTitleW@8' as GetConsoleTitleW:dword
    extrn '__imp__GetCPInfo@8' as GetCPInfo:dword
    extrn '__imp__GetCurrencyFormatA@24' as GetCurrencyFormatA:dword
    extrn '__imp__GetCurrencyFormatW@24' as GetCurrencyFormatW:dword
    extrn '__imp__GetCurrentDirectoryA@8' as GetCurrentDirectoryA:dword
    extrn '__imp__GetCurrentDirectoryW@8' as GetCurrentDirectoryW:dword
    extrn '__imp__GetCurrentProcess@0' as GetCurrentProcess:dword
    extrn '__imp__GetCurrentProcessId@0' as GetCurrentProcessId:dword
    extrn '__imp__GetCurrentThread@0' as GetCurrentThread:dword
    extrn '__imp__GetCurrentThreadId@0' as GetCurrentThreadId:dword
    extrn '__imp__GetDateFormatA@24' as GetDateFormatA:dword
    extrn '__imp__GetDateFormatW@24' as GetDateFormatW:dword
    extrn '__imp__GetDefaultCommConfigA@12' as GetDefaultCommConfigA:dword
    extrn '__imp__GetDefaultCommConfigW@12' as GetDefaultCommConfigW:dword
    extrn '__imp__GetDiskFreeSpaceA@20' as GetDiskFreeSpaceA:dword
    extrn '__imp__GetDiskFreeSpaceExA@16' as GetDiskFreeSpaceExA:dword
    extrn '__imp__GetDiskFreeSpaceExW@16' as GetDiskFreeSpaceExW:dword
    extrn '__imp__GetDiskFreeSpaceW@20' as GetDiskFreeSpaceW:dword
    extrn '__imp__GetDriveTypeA@4' as GetDriveTypeA:dword
    extrn '__imp__GetDriveTypeW@4' as GetDriveTypeW:dword
    extrn '__imp__GetEnvironmentStringsA@0' as GetEnvironmentStringsA:dword
    extrn '__imp__GetEnvironmentStringsW@0' as GetEnvironmentStringsW:dword
    extrn '__imp__GetEnvironmentVariableA@12' as GetEnvironmentVariableA:dword
    extrn '__imp__GetEnvironmentVariableW@12' as GetEnvironmentVariableW:dword
    ;   ------------------------------ Not present in MASM32 kernel32.lib -------------------------------
    ;    if (NTDDI_VERSION = NTDDI_WIN95 | NTDDI_VERSION = NTDDI_WIN98_ME | NTDDI_VERSION >= NTDDI_VISTA)
    ;        extrn '__imp__GetErrorMode@0' as GetErrorMode:dword
    ;    end if
    ;   -------------------------------------------------------------------------------------------------
    extrn '__imp__GetExitCodeProcess@8' as GetExitCodeProcess:dword
    extrn '__imp__GetExitCodeThread@8' as GetExitCodeThread:dword
    extrn '__imp__GetFileAttributesA@4' as GetFileAttributesA:dword
    extrn '__imp__GetFileAttributesW@4' as GetFileAttributesW:dword
    extrn '__imp__GetFileInformationByHandle@8' as GetFileInformationByHandle:dword
    extrn '__imp__GetFileSize@8' as GetFileSize:dword
    extrn '__imp__GetFileTime@16' as GetFileTime:dword
    extrn '__imp__GetFileType@4' as GetFileType:dword
    extrn '__imp__GetFullPathNameA@16' as GetFullPathNameA:dword
    extrn '__imp__GetFullPathNameW@16' as GetFullPathNameW:dword
    ;    if (NTDDI_VERSION = NTDDI_WIN95 | NTDDI_VERSION = NTDDI_WIN98_ME | NTDDI_VERSION = NTDDI_WINXP | NTDDI_VERSION = NTDDI_VISTA)
    ;        extrn '__imp__GetHandleContext@4' as GetHandleContext:dword ;Not present in MASM32 kernel32.lib
    ;        extrn '__imp__SetHandleContext@8' as SetHandleContext:dword ;Not present in MASM32 kernel32.lib
    ;    end if
    extrn '__imp__GetHandleInformation@8' as GetHandleInformation:dword
    extrn '__imp__GetLargestConsoleWindowSize@4' as GetLargestConsoleWindowSize:dword
    extrn '__imp__GetLastError@0' as GetLastError:dword
    extrn '__imp__GetLocaleInfoA@16' as GetLocaleInfoA:dword
    extrn '__imp__GetLocaleInfoW@16' as GetLocaleInfoW:dword
    extrn '__imp__GetLocalTime@4' as GetLocalTime:dword
    extrn '__imp__GetLogicalDrives@0' as GetLogicalDrives:dword
    extrn '__imp__GetLogicalDriveStringsA@8' as GetLogicalDriveStringsA:dword
    extrn '__imp__GetLogicalDriveStringsW@8' as GetLogicalDriveStringsW:dword
    extrn '__imp__GetMailslotInfo@20' as GetMailslotInfo:dword
    extrn '__imp__GetModuleFileNameA@12' as GetModuleFileNameA:dword
    extrn '__imp__GetModuleFileNameW@12' as GetModuleFileNameW:dword
    extrn '__imp__GetModuleHandleA@4' as GetModuleHandleA:dword
    extrn '__imp__GetModuleHandleW@4' as GetModuleHandleW:dword
    extrn '__imp__GetNamedPipeHandleStateA@28' as GetNamedPipeHandleStateA:dword
    extrn '__imp__GetNamedPipeHandleStateW@28' as GetNamedPipeHandleStateW:dword
    extrn '__imp__GetNamedPipeInfo@20' as GetNamedPipeInfo:dword
    extrn '__imp__GetNumberFormatA@24' as GetNumberFormatA:dword
    extrn '__imp__GetNumberFormatW@24' as GetNumberFormatW:dword
    extrn '__imp__GetNumberOfConsoleInputEvents@8' as GetNumberOfConsoleInputEvents:dword
    extrn '__imp__GetNumberOfConsoleMouseButtons@4' as GetNumberOfConsoleMouseButtons:dword
    extrn '__imp__GetOEMCP@0' as GetOEMCP:dword
    extrn '__imp__GetOverlappedResult@16' as GetOverlappedResult:dword
    extrn '__imp__GetPriorityClass@4' as GetPriorityClass:dword
    extrn '__imp__GetPrivateProfileIntA@16' as GetPrivateProfileIntA:dword
    extrn '__imp__GetPrivateProfileIntW@16' as GetPrivateProfileIntW:dword
    extrn '__imp__GetPrivateProfileSectionA@16' as GetPrivateProfileSectionA:dword
    extrn '__imp__GetPrivateProfileSectionNamesA@12' as GetPrivateProfileSectionNamesA:dword
    extrn '__imp__GetPrivateProfileSectionNamesW@12' as GetPrivateProfileSectionNamesW:dword
    extrn '__imp__GetPrivateProfileSectionW@16' as GetPrivateProfileSectionW:dword
    extrn '__imp__GetPrivateProfileStringA@24' as GetPrivateProfileStringA:dword
    extrn '__imp__GetPrivateProfileStringW@24' as GetPrivateProfileStringW:dword
    extrn '__imp__GetPrivateProfileStructA@20' as GetPrivateProfileStructA:dword
    extrn '__imp__GetPrivateProfileStructW@20' as GetPrivateProfileStructW:dword
    extrn '__imp__GetProcAddress@8' as GetProcAddress:dword
    extrn '__imp__GetProcessAffinityMask@12' as GetProcessAffinityMask:dword
    extrn '__imp__GetProcessHeap@0' as GetProcessHeap:dword
    extrn '__imp__GetProcessHeaps@8' as GetProcessHeaps:dword
    extrn '__imp__GetProcessShutdownParameters@8' as GetProcessShutdownParameters:dword
    extrn '__imp__GetProcessTimes@20' as GetProcessTimes:dword
    extrn '__imp__GetProcessVersion@4' as GetProcessVersion:dword
    extrn '__imp__GetProcessWorkingSetSize@12' as GetProcessWorkingSetSize:dword
    extrn '__imp__GetProfileIntA@12' as GetProfileIntA:dword
    extrn '__imp__GetProfileIntW@12' as GetProfileIntW:dword
    extrn '__imp__GetProfileSectionA@12' as GetProfileSectionA:dword
    extrn '__imp__GetProfileSectionW@12' as GetProfileSectionW:dword
    extrn '__imp__GetProfileStringA@20' as GetProfileStringA:dword
    extrn '__imp__GetProfileStringW@20' as GetProfileStringW:dword
    extrn '__imp__GetQueuedCompletionStatus@20' as GetQueuedCompletionStatus:dword
    extrn '__imp__GetShortPathNameA@12' as GetShortPathNameA:dword
    extrn '__imp__GetShortPathNameW@12' as GetShortPathNameW:dword
    extrn '__imp__GetStartupInfoA@4' as GetStartupInfoA:dword
    extrn '__imp__GetStartupInfoW@4' as GetStartupInfoW:dword
    extrn '__imp__GetStdHandle@4' as GetStdHandle:dword
    extrn '__imp__GetStringTypeA@20' as GetStringTypeA:dword
    extrn '__imp__GetStringTypeExA@20' as GetStringTypeExA:dword
    extrn '__imp__GetStringTypeExW@20' as GetStringTypeExW:dword
    extrn '__imp__GetStringTypeW@16' as GetStringTypeW:dword
    extrn '__imp__GetSystemDefaultLangID@0' as GetSystemDefaultLangID:dword
    extrn '__imp__GetSystemDefaultLCID@0' as GetSystemDefaultLCID:dword
    extrn '__imp__GetSystemDirectoryA@8' as GetSystemDirectoryA:dword
    extrn '__imp__GetSystemDirectoryW@8' as GetSystemDirectoryW:dword
    extrn '__imp__GetSystemInfo@4' as GetSystemInfo:dword
    extrn '__imp__GetSystemPowerStatus@4' as GetSystemPowerStatus:dword
    extrn '__imp__GetSystemTime@4' as GetSystemTime:dword
    extrn '__imp__GetSystemTimeAdjustment@12' as GetSystemTimeAdjustment:dword
    extrn '__imp__GetSystemTimeAsFileTime@4' as GetSystemTimeAsFileTime:dword
    extrn '__imp__GetTapeParameters@16' as GetTapeParameters:dword
    extrn '__imp__GetTapePosition@20' as GetTapePosition:dword
    extrn '__imp__GetTapeStatus@4' as GetTapeStatus:dword
    extrn '__imp__GetTempFileNameA@16' as GetTempFileNameA:dword
    extrn '__imp__GetTempFileNameW@16' as GetTempFileNameW:dword
    extrn '__imp__GetTempPathA@8' as GetTempPathA:dword
    extrn '__imp__GetTempPathW@8' as GetTempPathW:dword
    extrn '__imp__GetThreadContext@8' as GetThreadContext:dword
    extrn '__imp__GetThreadLocale@0' as GetThreadLocale:dword
    extrn '__imp__GetThreadPriority@4' as GetThreadPriority:dword
    extrn '__imp__GetThreadSelectorEntry@12' as GetThreadSelectorEntry:dword
    extrn '__imp__GetThreadTimes@20' as GetThreadTimes:dword
    extrn '__imp__GetTickCount@0' as GetTickCount:dword
    extrn '__imp__GetTimeFormatA@24' as GetTimeFormatA:dword
    extrn '__imp__GetTimeFormatW@24' as GetTimeFormatW:dword
    extrn '__imp__GetTimeZoneInformation@4' as GetTimeZoneInformation:dword
    extrn '__imp__GetUserDefaultLangID@0' as GetUserDefaultLangID:dword
    extrn '__imp__GetUserDefaultLCID@0' as GetUserDefaultLCID:dword
    extrn '__imp__GetVersion@0' as GetVersion:dword
    extrn '__imp__GetVersionExA@4' as GetVersionExA:dword
    extrn '__imp__GetVersionExW@4' as GetVersionExW:dword
    extrn '__imp__GetVolumeInformationA@32' as GetVolumeInformationA:dword
    extrn '__imp__GetVolumeInformationW@32' as GetVolumeInformationW:dword
    extrn '__imp__GetWindowsDirectoryA@8' as GetWindowsDirectoryA:dword
    extrn '__imp__GetWindowsDirectoryW@8' as GetWindowsDirectoryW:dword
    extrn '__imp__GlobalAddAtomA@4' as GlobalAddAtomA:dword
    extrn '__imp__GlobalAddAtomW@4' as GlobalAddAtomW:dword
    extrn '__imp__GlobalAlloc@8' as GlobalAlloc:dword
    extrn '__imp__GlobalCompact@4' as GlobalCompact:dword
    extrn '__imp__GlobalDeleteAtom@4' as GlobalDeleteAtom:dword
    extrn '__imp__GlobalFindAtomA@4' as GlobalFindAtomA:dword
    extrn '__imp__GlobalFindAtomW@4' as GlobalFindAtomW:dword
    extrn '__imp__GlobalFix@4' as GlobalFix:dword
    extrn '__imp__GlobalFlags@4' as GlobalFlags:dword
    extrn '__imp__GlobalFree@4' as GlobalFree:dword
    extrn '__imp__GlobalGetAtomNameA@12' as GlobalGetAtomNameA:dword
    extrn '__imp__GlobalGetAtomNameW@12' as GlobalGetAtomNameW:dword
    extrn '__imp__GlobalHandle@4' as GlobalHandle:dword
    extrn '__imp__GlobalLock@4' as GlobalLock:dword
    extrn '__imp__GlobalMemoryStatus@4' as GlobalMemoryStatus:dword
    extrn '__imp__GlobalReAlloc@12' as GlobalReAlloc:dword
    extrn '__imp__GlobalSize@4' as GlobalSize:dword
    extrn '__imp__GlobalUnfix@4' as GlobalUnfix:dword
    extrn '__imp__GlobalUnlock@4' as GlobalUnlock:dword
    extrn '__imp__GlobalUnWire@4' as GlobalUnWire:dword
    extrn '__imp__GlobalWire@4' as GlobalWire:dword
    extrn '__imp__Heap32First@12' as Heap32First:dword
    extrn '__imp__Heap32ListFirst@8' as Heap32ListFirst:dword
    extrn '__imp__Heap32ListNext@8' as Heap32ListNext:dword
    extrn '__imp__Heap32Next@4' as Heap32Next:dword
    extrn '__imp__HeapAlloc@12' as HeapAlloc:dword
    extrn '__imp__HeapCompact@8' as HeapCompact:dword
    extrn '__imp__HeapCreate@12' as HeapCreate:dword
    extrn '__imp__HeapDestroy@4' as HeapDestroy:dword
    extrn '__imp__HeapFree@12' as HeapFree:dword
    extrn '__imp__HeapLock@4' as HeapLock:dword
    extrn '__imp__HeapReAlloc@16' as HeapReAlloc:dword
    extrn '__imp__HeapSize@12' as HeapSize:dword
    extrn '__imp__HeapUnlock@4' as HeapUnlock:dword
    extrn '__imp__HeapValidate@12' as HeapValidate:dword
    extrn '__imp__HeapWalk@8' as HeapWalk:dword
    extrn '__imp__InitAtomTable@4' as InitAtomTable:dword
    extrn '__imp__InitializeCriticalSection@4' as InitializeCriticalSection:dword
    extrn '__imp__IsBadCodePtr@4' as IsBadCodePtr:dword
    extrn '__imp__IsBadHugeReadPtr@8' as IsBadHugeReadPtr:dword
    extrn '__imp__IsBadHugeWritePtr@8' as IsBadHugeWritePtr:dword
    extrn '__imp__IsBadReadPtr@8' as IsBadReadPtr:dword
    extrn '__imp__IsBadStringPtrA@8' as IsBadStringPtrA:dword
    extrn '__imp__IsBadStringPtrW@8' as IsBadStringPtrW:dword
    extrn '__imp__IsBadWritePtr@8' as IsBadWritePtr:dword
    extrn '__imp__IsDBCSLeadByte@4' as IsDBCSLeadByte:dword
    extrn '__imp__IsDBCSLeadByteEx@8' as IsDBCSLeadByteEx:dword
    extrn '__imp__IsValidCodePage@4' as IsValidCodePage:dword
    extrn '__imp__IsValidLocale@8' as IsValidLocale:dword
    extrn '__imp__LCMapStringA@24' as LCMapStringA:dword
    extrn '__imp__LCMapStringW@24' as LCMapStringW:dword
    extrn '__imp__LeaveCriticalSection@4' as LeaveCriticalSection:dword
    extrn '__imp__LoadLibraryA@4' as LoadLibraryA:dword
    extrn '__imp__LoadLibraryExA@12' as LoadLibraryExA:dword
    extrn '__imp__LoadLibraryExW@12' as LoadLibraryExW:dword
    extrn '__imp__LoadLibraryW@4' as LoadLibraryW:dword
    extrn '__imp__LoadModule@8' as LoadModule:dword
    extrn '__imp__LoadResource@8' as LoadResource:dword
    extrn '__imp__LocalAlloc@8' as LocalAlloc:dword
    extrn '__imp__LocalCompact@4' as LocalCompact:dword
    extrn '__imp__LocalFileTimeToFileTime@8' as LocalFileTimeToFileTime:dword
    extrn '__imp__LocalFlags@4' as LocalFlags:dword
    extrn '__imp__LocalFree@4' as LocalFree:dword
    extrn '__imp__LocalHandle@4' as LocalHandle:dword
    extrn '__imp__LocalLock@4' as LocalLock:dword
    extrn '__imp__LocalReAlloc@12' as LocalReAlloc:dword
    extrn '__imp__LocalShrink@8' as LocalShrink:dword
    extrn '__imp__LocalSize@4' as LocalSize:dword
    extrn '__imp__LocalUnlock@4' as LocalUnlock:dword
    extrn '__imp__LockFile@20' as LockFile:dword
    extrn '__imp__LockFileEx@24' as LockFileEx:dword
    extrn '__imp__LockResource@4' as LockResource:dword
    extrn '__imp__lstrcatA@8' as lstrcatA:dword
    extrn '__imp__lstrcatW@8' as lstrcatW:dword
    extrn '__imp__lstrcmpA@8' as lstrcmpA:dword
    extrn '__imp__lstrcmpiA@8' as lstrcmpiA:dword
    extrn '__imp__lstrcmpiW@8' as lstrcmpiW:dword
    extrn '__imp__lstrcmpW@8' as lstrcmpW:dword
    extrn '__imp__lstrcpyA@8' as lstrcpyA:dword
    extrn '__imp__lstrcpynA@12' as lstrcpynA:dword
    extrn '__imp__lstrcpynW@12' as lstrcpynW:dword
    extrn '__imp__lstrcpyW@8' as lstrcpyW:dword
    extrn '__imp__lstrlenA@4' as lstrlenA:dword
    extrn '__imp__lstrlenW@4' as lstrlenW:dword
    extrn '__imp__MapViewOfFile@20' as MapViewOfFile:dword
    extrn '__imp__MapViewOfFileEx@24' as MapViewOfFileEx:dword
    extrn '__imp__MoveFileA@8' as MoveFileA:dword
    extrn '__imp__MoveFileExA@12' as MoveFileExA:dword
    extrn '__imp__MoveFileExW@12' as MoveFileExW:dword
    extrn '__imp__MoveFileW@8' as MoveFileW:dword
    extrn '__imp__MulDiv@12' as MulDiv:dword
    extrn '__imp__MultiByteToWideChar@24' as MultiByteToWideChar:dword
    extrn '__imp__OpenEventA@12' as OpenEventA:dword
    extrn '__imp__OpenEventW@12' as OpenEventW:dword
    extrn '__imp__OpenFile@12' as OpenFile:dword
    extrn '__imp__OpenFileMappingA@12' as OpenFileMappingA:dword
    extrn '__imp__OpenFileMappingW@12' as OpenFileMappingW:dword
    extrn '__imp__OpenMutexA@12' as OpenMutexA:dword
    extrn '__imp__OpenMutexW@12' as OpenMutexW:dword
    extrn '__imp__OpenProcess@12' as OpenProcess:dword
    ;extrn '__imp__OpenProfileUserMapping@0' as OpenProfileUserMapping:dword ;Not present in MASM32 kernel32.lib
    extrn '__imp__OpenSemaphoreA@12' as OpenSemaphoreA:dword
    extrn '__imp__OpenSemaphoreW@12' as OpenSemaphoreW:dword
    extrn '__imp__OutputDebugStringA@4' as OutputDebugStringA:dword
    extrn '__imp__OutputDebugStringW@4' as OutputDebugStringW:dword
    extrn '__imp__PeekConsoleInputA@16' as PeekConsoleInputA:dword
    extrn '__imp__PeekConsoleInputW@16' as PeekConsoleInputW:dword
    extrn '__imp__PeekNamedPipe@24' as PeekNamedPipe:dword
    extrn '__imp__PostQueuedCompletionStatus@16' as PostQueuedCompletionStatus:dword
    extrn '__imp__PrepareTape@12' as PrepareTape:dword
    extrn '__imp__PulseEvent@4' as PulseEvent:dword
    extrn '__imp__PurgeComm@8' as PurgeComm:dword
    extrn '__imp__QueryDosDeviceA@12' as QueryDosDeviceA:dword
    extrn '__imp__QueryDosDeviceW@12' as QueryDosDeviceW:dword
    extrn '__imp__QueryPerformanceCounter@4' as QueryPerformanceCounter:dword
    extrn '__imp__QueryPerformanceFrequency@4' as QueryPerformanceFrequency:dword
    extrn '__imp__QueueUserAPC@12' as QueueUserAPC:dword
    extrn '__imp__RaiseException@16' as RaiseException:dword
    extrn '__imp__ReadConsoleA@20' as ReadConsoleA:dword
    extrn '__imp__ReadConsoleInputA@16' as ReadConsoleInputA:dword
    extrn '__imp__ReadConsoleInputW@16' as ReadConsoleInputW:dword
    extrn '__imp__ReadConsoleOutputA@20' as ReadConsoleOutputA:dword
    extrn '__imp__ReadConsoleOutputAttribute@20' as ReadConsoleOutputAttribute:dword
    extrn '__imp__ReadConsoleOutputCharacterA@20' as ReadConsoleOutputCharacterA:dword
    extrn '__imp__ReadConsoleOutputCharacterW@20' as ReadConsoleOutputCharacterW:dword
    extrn '__imp__ReadConsoleOutputW@20' as ReadConsoleOutputW:dword
    extrn '__imp__ReadConsoleW@20' as ReadConsoleW:dword
    extrn '__imp__ReadFile@20' as ReadFile:dword
    extrn '__imp__ReadFileEx@20' as ReadFileEx:dword
    extrn '__imp__ReadProcessMemory@20' as ReadProcessMemory:dword
    extrn '__imp__ReleaseMutex@4' as ReleaseMutex:dword
    extrn '__imp__ReleaseSemaphore@12' as ReleaseSemaphore:dword
    extrn '__imp__RemoveDirectoryA@4' as RemoveDirectoryA:dword
    extrn '__imp__RemoveDirectoryW@4' as RemoveDirectoryW:dword
    extrn '__imp__ResetEvent@4' as ResetEvent:dword
    extrn '__imp__ResumeThread@4' as ResumeThread:dword
    extrn '__imp__RtlFillMemory@12' as RtlFillMemory:dword
    extrn '__imp__RtlMoveMemory@12' as RtlMoveMemory:dword
    extrn '__imp__RtlZeroMemory@8' as RtlZeroMemory:dword
    extrn '__imp__RtlUnwind@16' as RtlUnwind:dword
    extrn '__imp__ScrollConsoleScreenBufferA@20' as ScrollConsoleScreenBufferA:dword
    extrn '__imp__ScrollConsoleScreenBufferW@20' as ScrollConsoleScreenBufferW:dword
    extrn '__imp__SearchPathA@24' as SearchPathA:dword
    extrn '__imp__SearchPathW@24' as SearchPathW:dword
    extrn '__imp__SetCommBreak@4' as SetCommBreak:dword
    extrn '__imp__SetCommConfig@12' as SetCommConfig:dword
    extrn '__imp__SetCommMask@8' as SetCommMask:dword
    extrn '__imp__SetCommState@8' as SetCommState:dword
    extrn '__imp__SetCommTimeouts@8' as SetCommTimeouts:dword
    extrn '__imp__SetComputerNameA@4' as SetComputerNameA:dword
    extrn '__imp__SetComputerNameW@4' as SetComputerNameW:dword
    extrn '__imp__SetConsoleActiveScreenBuffer@4' as SetConsoleActiveScreenBuffer:dword
    extrn '__imp__SetConsoleCP@4' as SetConsoleCP:dword
    extrn '__imp__SetConsoleCtrlHandler@8' as SetConsoleCtrlHandler:dword
    extrn '__imp__SetConsoleCursorInfo@8' as SetConsoleCursorInfo:dword
    extrn '__imp__SetConsoleCursorPosition@8' as SetConsoleCursorPosition:dword
    extrn '__imp__SetConsoleMode@8' as SetConsoleMode:dword
    extrn '__imp__SetConsoleOutputCP@4' as SetConsoleOutputCP:dword
    extrn '__imp__SetConsoleScreenBufferSize@8' as SetConsoleScreenBufferSize:dword
    extrn '__imp__SetConsoleTextAttribute@8' as SetConsoleTextAttribute:dword
    extrn '__imp__SetConsoleTitleA@4' as SetConsoleTitleA:dword
    extrn '__imp__SetConsoleTitleW@4' as SetConsoleTitleW:dword
    extrn '__imp__SetConsoleWindowInfo@12' as SetConsoleWindowInfo:dword
    extrn '__imp__SetCurrentDirectoryA@4' as SetCurrentDirectoryA:dword
    extrn '__imp__SetCurrentDirectoryW@4' as SetCurrentDirectoryW:dword
    extrn '__imp__SetDefaultCommConfigA@12' as SetDefaultCommConfigA:dword
    extrn '__imp__SetDefaultCommConfigW@12' as SetDefaultCommConfigW:dword
    extrn '__imp__SetEndOfFile@4' as SetEndOfFile:dword
    extrn '__imp__SetEnvironmentVariableA@8' as SetEnvironmentVariableA:dword
    extrn '__imp__SetEnvironmentVariableW@8' as SetEnvironmentVariableW:dword
    extrn '__imp__SetErrorMode@4' as SetErrorMode:dword
    extrn '__imp__SetEvent@4' as SetEvent:dword
    extrn '__imp__SetFileApisToANSI@0' as SetFileApisToANSI:dword
    extrn '__imp__SetFileApisToOEM@0' as SetFileApisToOEM:dword
    extrn '__imp__SetFileAttributesA@8' as SetFileAttributesA:dword
    extrn '__imp__SetFileAttributesW@8' as SetFileAttributesW:dword
    extrn '__imp__SetFilePointer@16' as SetFilePointer:dword
    extrn '__imp__SetFileTime@16' as SetFileTime:dword
    extrn '__imp__SetHandleCount@4' as SetHandleCount:dword
    extrn '__imp__SetHandleInformation@12' as SetHandleInformation:dword
    extrn '__imp__SetLastError@4' as SetLastError:dword
    extrn '__imp__SetLocaleInfoA@12' as SetLocaleInfoA:dword
    extrn '__imp__SetLocaleInfoW@12' as SetLocaleInfoW:dword
    extrn '__imp__SetLocalTime@4' as SetLocalTime:dword
    extrn '__imp__SetMailslotInfo@8' as SetMailslotInfo:dword
    extrn '__imp__SetNamedPipeHandleState@16' as SetNamedPipeHandleState:dword
    extrn '__imp__SetPriorityClass@8' as SetPriorityClass:dword
    extrn '__imp__SetProcessShutdownParameters@8' as SetProcessShutdownParameters:dword
    extrn '__imp__SetProcessWorkingSetSize@12' as SetProcessWorkingSetSize:dword
    extrn '__imp__SetStdHandle@8' as SetStdHandle:dword
    extrn '__imp__SetSystemPowerState@8' as SetSystemPowerState:dword
    extrn '__imp__SetSystemTime@4' as SetSystemTime:dword
    extrn '__imp__SetSystemTimeAdjustment@8' as SetSystemTimeAdjustment:dword
    extrn '__imp__SetTapeParameters@12' as SetTapeParameters:dword
    extrn '__imp__SetTapePosition@24' as SetTapePosition:dword
    extrn '__imp__SetThreadAffinityMask@8' as SetThreadAffinityMask:dword
    extrn '__imp__SetThreadContext@8' as SetThreadContext:dword
    extrn '__imp__SetThreadLocale@4' as SetThreadLocale:dword
    extrn '__imp__SetThreadPriority@8' as SetThreadPriority:dword
    extrn '__imp__SetTimeZoneInformation@4' as SetTimeZoneInformation:dword
    extrn '__imp__SetUnhandledExceptionFilter@4' as SetUnhandledExceptionFilter:dword
    extrn '__imp__SetupComm@12' as SetupComm:dword
    extrn '__imp__SetVolumeLabelA@8' as SetVolumeLabelA:dword
    extrn '__imp__SetVolumeLabelW@8' as SetVolumeLabelW:dword
    extrn '__imp__SizeofResource@8' as SizeofResource:dword
    extrn '__imp__Sleep@4' as Sleep:dword
    extrn '__imp__SleepEx@8' as SleepEx:dword
    extrn '__imp__SuspendThread@4' as SuspendThread:dword
    extrn '__imp__SystemTimeToFileTime@8' as SystemTimeToFileTime:dword
    extrn '__imp__SystemTimeToTzSpecificLocalTime@12' as SystemTimeToTzSpecificLocalTime:dword
    extrn '__imp__TerminateProcess@8' as TerminateProcess:dword
    extrn '__imp__TerminateThread@8' as TerminateThread:dword
    extrn '__imp__Thread32First@8' as Thread32First:dword
    extrn '__imp__Thread32Next@8' as Thread32Next:dword
    extrn '__imp__TlsAlloc@0' as TlsAlloc:dword
    extrn '__imp__TlsFree@4' as TlsFree:dword
    extrn '__imp__TlsGetValue@4' as TlsGetValue:dword
    extrn '__imp__TlsSetValue@8' as TlsSetValue:dword
    extrn '__imp__Toolhelp32ReadProcessMemory@20' as Toolhelp32ReadProcessMemory:dword
    extrn '__imp__TransactNamedPipe@28' as TransactNamedPipe:dword
    extrn '__imp__TransmitCommChar@8' as TransmitCommChar:dword
    extrn '__imp__UnhandledExceptionFilter@4' as UnhandledExceptionFilter:dword
    extrn '__imp__UnlockFile@20' as UnlockFile:dword
    extrn '__imp__UnlockFileEx@20' as UnlockFileEx:dword
    extrn '__imp__UnmapViewOfFile@4' as UnmapViewOfFile:dword
    extrn '__imp__UpdateResourceA@24' as UpdateResourceA:dword
    extrn '__imp__UpdateResourceW@24' as UpdateResourceW:dword
    extrn '__imp__VirtualAlloc@16' as VirtualAlloc:dword
    extrn '__imp__VirtualFree@12' as VirtualFree:dword
    extrn '__imp__VirtualLock@8' as VirtualLock:dword
    extrn '__imp__VirtualProtect@16' as VirtualProtect:dword
    extrn '__imp__VirtualProtectEx@20' as VirtualProtectEx:dword
    extrn '__imp__VirtualQuery@12' as VirtualQuery:dword
    extrn '__imp__VirtualQueryEx@16' as VirtualQueryEx:dword
    extrn '__imp__VirtualUnlock@8' as VirtualUnlock:dword
    extrn '__imp__WaitCommEvent@12' as WaitCommEvent:dword
    extrn '__imp__WaitForDebugEvent@8' as WaitForDebugEvent:dword
    extrn '__imp__WaitForMultipleObjects@16' as WaitForMultipleObjects:dword
    extrn '__imp__WaitForMultipleObjectsEx@20' as WaitForMultipleObjectsEx:dword
    extrn '__imp__WaitForSingleObject@8' as WaitForSingleObject:dword
    extrn '__imp__WaitForSingleObjectEx@12' as WaitForSingleObjectEx:dword
    extrn '__imp__WaitNamedPipeA@8' as WaitNamedPipeA:dword
    extrn '__imp__WaitNamedPipeW@8' as WaitNamedPipeW:dword
    extrn '__imp__WideCharToMultiByte@32' as WideCharToMultiByte:dword
    extrn '__imp__WinExec@8' as WinExec:dword
    extrn '__imp__WriteConsoleA@20' as WriteConsoleA:dword
    extrn '__imp__WriteConsoleInputA@16' as WriteConsoleInputA:dword
    extrn '__imp__WriteConsoleInputW@16' as WriteConsoleInputW:dword
    extrn '__imp__WriteConsoleOutputA@20' as WriteConsoleOutputA:dword
    extrn '__imp__WriteConsoleOutputAttribute@20' as WriteConsoleOutputAttribute:dword
    extrn '__imp__WriteConsoleOutputCharacterA@20' as WriteConsoleOutputCharacterA:dword
    extrn '__imp__WriteConsoleOutputCharacterW@20' as WriteConsoleOutputCharacterW:dword
    extrn '__imp__WriteConsoleOutputW@20' as WriteConsoleOutputW:dword
    extrn '__imp__WriteConsoleW@20' as WriteConsoleW:dword
    extrn '__imp__WriteFile@20' as WriteFile:dword
    extrn '__imp__WriteFileEx@20' as WriteFileEx:dword
    extrn '__imp__WritePrivateProfileSectionA@12' as WritePrivateProfileSectionA:dword
    extrn '__imp__WritePrivateProfileSectionW@12' as WritePrivateProfileSectionW:dword
    extrn '__imp__WritePrivateProfileStringA@16' as WritePrivateProfileStringA:dword
    extrn '__imp__WritePrivateProfileStringW@16' as WritePrivateProfileStringW:dword
    extrn '__imp__WritePrivateProfileStructA@20' as WritePrivateProfileStructA:dword
    extrn '__imp__WritePrivateProfileStructW@20' as WritePrivateProfileStructW:dword
    extrn '__imp__WriteProcessMemory@20' as WriteProcessMemory:dword
    extrn '__imp__WriteProfileSectionA@8' as WriteProfileSectionA:dword
    extrn '__imp__WriteProfileSectionW@8' as WriteProfileSectionW:dword
    extrn '__imp__WriteProfileStringA@12' as WriteProfileStringA:dword
    extrn '__imp__WriteProfileStringW@12' as WriteProfileStringW:dword
    extrn '__imp__WriteTapemark@16' as WriteTapemark:dword

    GetFreeSpace equ GlobalMemoryStatus

    LockSegment equ GlobalFix
    UnlockSegment equ GlobalUnfix
    GetCurrentTime equ GetTickCount
    MoveMemory equ RtlMoveMemory
    FillMemory equ RtlFillMemory
    ZeroMemory equ RtlZeroMemory

    if (NTDDI_VERSION >= NTDDI_WIN98_ME)
        extrn '__imp__CancelDeviceWakeupRequest@4' as CancelDeviceWakeupRequest:dword
        extrn '__imp__CancelIo@4' as CancelIo:dword
        extrn '__imp__ConvertThreadToFiber@4' as ConvertThreadToFiber:dword
        extrn '__imp__CopyFileExA@24' as CopyFileExA:dword
        extrn '__imp__CopyFileExW@24' as CopyFileExW:dword
        extrn '__imp__CreateFiber@12' as CreateFiber:dword
        extrn '__imp__CreateWaitableTimerA@12' as CreateWaitableTimerA:dword
        extrn '__imp__CreateWaitableTimerW@12' as CreateWaitableTimerW:dword
        extrn '__imp__DeleteFiber@4' as DeleteFiber:dword
        extrn '__imp__EnumCalendarInfoExA@16' as EnumCalendarInfoExA:dword
        extrn '__imp__EnumCalendarInfoExW@16' as EnumCalendarInfoExW:dword
        extrn '__imp__EnumDateFormatsExA@12' as EnumDateFormatsExA:dword
        extrn '__imp__EnumDateFormatsExW@12' as EnumDateFormatsExW:dword
        extrn '__imp__FindFirstFileExA@24' as FindFirstFileExA:dword
        extrn '__imp__FindFirstFileExW@24' as FindFirstFileExW:dword
        extrn '__imp__GetCalendarInfoA@24' as GetCalendarInfoA:dword
        extrn '__imp__GetCalendarInfoW@24' as GetCalendarInfoW:dword
        extrn '__imp__GetCPInfoExA@12' as GetCPInfoExA:dword
        extrn '__imp__GetCPInfoExW@12' as GetCPInfoExW:dword
        extrn '__imp__GetDevicePowerState@8' as GetDevicePowerState:dword
        extrn '__imp__GetFileAttributesExA@12' as GetFileAttributesExA:dword
        extrn '__imp__GetFileAttributesExW@12' as GetFileAttributesExW:dword
        if (NTDDI_VERSION >= NTDDI_WINNT4)
            extrn '__imp__GetLongPathNameA@12' as GetLongPathNameA:dword
            extrn '__imp__GetLongPathNameW@12' as GetLongPathNameW:dword
            extrn '__imp__RequestDeviceWakeup@4' as RequestDeviceWakeup:dword
            extrn '__imp__RequestWakeupLatency@4' as RequestWakeupLatency:dword
            extrn '__imp__ResetWriteWatch@8' as ResetWriteWatch:dword
            extrn '__imp__SetCalendarInfoA@16' as SetCalendarInfoA:dword
            extrn '__imp__SetCalendarInfoW@16' as SetCalendarInfoW:dword
            extrn '__imp__SetMessageWaitingIndicator@8' as SetMessageWaitingIndicator:dword
            api GetLongPathName,\
                SetCalendarInfo
        end if
        extrn '__imp__GetProcessPriorityBoost@8' as GetProcessPriorityBoost:dword
        extrn '__imp__GetThreadPriorityBoost@8' as GetThreadPriorityBoost:dword
        extrn '__imp__InterlockedExchangeAdd@8' as InterlockedExchangeAdd:dword
        extrn '__imp__IsDebuggerPresent@0' as IsDebuggerPresent:dword
        extrn '__imp__IsProcessorFeaturePresent@4' as IsProcessorFeaturePresent:dword
        extrn '__imp__IsSystemResumeAutomatic@0' as IsSystemResumeAutomatic:dword
        extrn '__imp__OpenWaitableTimerA@12' as OpenWaitableTimerA:dword
        extrn '__imp__OpenWaitableTimerW@12' as OpenWaitableTimerW:dword
        extrn '__imp__ReadDirectoryChangesW@32' as ReadDirectoryChangesW:dword
        extrn '__imp__ReadFileScatter@20' as ReadFileScatter:dword
        extrn '__imp__SetCriticalSectionSpinCount@8' as SetCriticalSectionSpinCount:dword
        extrn '__imp__SetProcessAffinityMask@8' as SetProcessAffinityMask:dword
        extrn '__imp__SetProcessPriorityBoost@8' as SetProcessPriorityBoost:dword
        extrn '__imp__SetThreadExecutionState@4' as SetThreadExecutionState:dword
        extrn '__imp__SetThreadIdealProcessor@8' as SetThreadIdealProcessor:dword
        extrn '__imp__SetThreadPriorityBoost@8' as SetThreadPriorityBoost:dword
        extrn '__imp__SetWaitableTimer@24' as SetWaitableTimer:dword
        extrn '__imp__SignalObjectAndWait@16' as SignalObjectAndWait:dword
        extrn '__imp__SwitchToFiber@4' as SwitchToFiber:dword
        extrn '__imp__SwitchToThread@0' as SwitchToThread:dword
        extrn '__imp__VirtualAllocEx@20' as VirtualAllocEx:dword
        extrn '__imp__VirtualFreeEx@16' as VirtualFreeEx:dword
        extrn '__imp__WriteFileGather@20' as WriteFileGather:dword
        api CopyFileEx,\
            CreateWaitableTimer,\
            EnumCalendarInfoEx,\
            EnumDateFormatsEx,\
            FindFirstFileEx,\
            GetCalendarInfo,\
            GetCPInfoEx,\
            GetFileAttributesEx,\
            OpenWaitableTimer
    end if

    if (NTDDI_VERSION >= NTDDI_WINNT4)
        extrn '__imp__AddConsoleAliasA@12' as AddConsoleAliasA:dword
        extrn '__imp__AddConsoleAliasW@12' as AddConsoleAliasW:dword
        extrn '__imp__ConsoleMenuControl@12' as ConsoleMenuControl:dword
        extrn '__imp__CreateTimerQueue@0' as CreateTimerQueue:dword
        extrn '__imp__DuplicateConsoleHandle@16' as DuplicateConsoleHandle:dword
        extrn '__imp__ExitVDM@8' as ExitVDM:dword
        extrn '__imp__ExpungeConsoleCommandHistoryA@4' as ExpungeConsoleCommandHistoryA:dword
        extrn '__imp__ExpungeConsoleCommandHistoryW@4' as ExpungeConsoleCommandHistoryW:dword
        extrn '__imp__GetConsoleAliasA@16' as GetConsoleAliasA:dword
        extrn '__imp__GetConsoleAliasesA@12' as GetConsoleAliasesA:dword
        extrn '__imp__GetConsoleAliasesW@12' as GetConsoleAliasesW:dword
        extrn '__imp__GetConsoleAliasesLengthA@4' as GetConsoleAliasesLengthA:dword
        extrn '__imp__GetConsoleAliasesLengthW@4' as GetConsoleAliasesLengthW:dword
        extrn '__imp__GetConsoleAliasExesA@8' as GetConsoleAliasExesA:dword
        extrn '__imp__GetConsoleAliasExesW@8' as GetConsoleAliasExesW:dword
        extrn '__imp__GetConsoleAliasExesLengthA@0' as GetConsoleAliasExesLengthA:dword
        extrn '__imp__GetConsoleAliasExesLengthW@0' as GetConsoleAliasExesLengthW:dword
        extrn '__imp__GetConsoleAliasW@16' as GetConsoleAliasW:dword
        extrn '__imp__GetModuleHandleExA@12' as GetModuleHandleExA:dword
        extrn '__imp__GetModuleHandleExW@12' as GetModuleHandleExW:dword
        extrn '__imp__GetNextVDMCommand@4' as GetNextVDMCommand:dword
        extrn '__imp__GetNumberOfConsoleFonts@0' as GetNumberOfConsoleFonts:dword
        extrn '__imp__GetProcessIoCounters@8' as GetProcessIoCounters:dword
        extrn '__imp__GetVDMCurrentDirectories@8' as GetVDMCurrentDirectories:dword
        extrn '__imp__InvalidateConsoleDIBits@8' as InvalidateConsoleDIBits:dword
        extrn '__imp__OpenConsoleW@16' as OpenConsoleW:dword
        extrn '__imp__ReadConsoleInputExA@20' as ReadConsoleInputExA:dword
        extrn '__imp__ReadConsoleInputExW@20' as ReadConsoleInputExW:dword
        extrn '__imp__SetConsoleCursor@8' as SetConsoleCursor:dword
        extrn '__imp__SetConsoleHardwareState@8' as SetConsoleHardwareState:dword
        extrn '__imp__SetConsoleIcon@4' as SetConsoleIcon:dword
        extrn '__imp__SetConsoleMaximumWindowSize@8' as SetConsoleMaximumWindowSize:dword
        extrn '__imp__SetConsoleNumberOfCommandsA@8' as SetConsoleNumberOfCommandsA:dword
        extrn '__imp__SetConsoleNumberOfCommandsW@8' as SetConsoleNumberOfCommandsW:dword
        extrn '__imp__SetConsolePalette@4' as SetConsolePalette:dword
        extrn '__imp__SetLastConsoleEventActive@0' as SetLastConsoleEventActive:dword
        extrn '__imp__SetVDMCurrentDirectories@8' as SetVDMCurrentDirectories:dword
        extrn '__imp__ShowConsoleCursor@8' as ShowConsoleCursor:dword
        extrn '__imp__VerifyVersionInfoA@12' as VerifyVersionInfoA:dword
        extrn '__imp__VerifyVersionInfoW@12' as VerifyVersionInfoW:dword
        api AddConsoleAlias,\
            ExpungeConsoleCommandHistory,\
            GetConsoleAlias,\
            GetConsoleAliasExes,\
            GetConsoleAliasExesLength,\
            GetConsoleAliases,\
            GetConsoleAliasesLength,\
            GetModuleHandleEx,\
            ReadConsoleInputEx,\
            SetConsoleNumberOfCommands,\
            VerifyVersionInfo
    end if

    if (NTDDI_VERSION >= NTDDI_WIN2K)
        extrn '__imp__AllocateUserPhysicalPages@12' as AllocateUserPhysicalPages:dword
        extrn '__imp__AssignProcessToJobObject@8' as AssignProcessToJobObject:dword
        extrn '__imp__BindIoCompletionCallback@12' as BindIoCompletionCallback:dword
        extrn '__imp__ChangeTimerQueueTimer@16' as ChangeTimerQueueTimer:dword
        extrn '__imp__CreateHardLinkA@12' as CreateHardLinkA:dword
        extrn '__imp__CreateHardLinkW@12' as CreateHardLinkW:dword
        extrn '__imp__CreateJobObjectA@8' as CreateJobObjectA:dword
        extrn '__imp__CreateJobObjectW@8' as CreateJobObjectW:dword
        extrn '__imp__CreateTimerQueueTimer@28' as CreateTimerQueueTimer:dword
        extrn '__imp__DelayLoadFailureHook@8' as DelayLoadFailureHook:dword
        extrn '__imp__DeleteTimerQueue@4' as DeleteTimerQueue:dword
        extrn '__imp__DeleteVolumeMountPointA@4' as DeleteVolumeMountPointA:dword
        extrn '__imp__DeleteVolumeMountPointW@4' as DeleteVolumeMountPointW:dword
        extrn '__imp__DnsHostnameToComputerNameA@12' as DnsHostnameToComputerNameA:dword
        extrn '__imp__DnsHostnameToComputerNameW@12' as DnsHostnameToComputerNameW:dword
        extrn '__imp__DosPathToSessionPathA@12' as DosPathToSessionPathA:dword
        extrn '__imp__DosPathToSessionPathW@12' as DosPathToSessionPathW:dword
        extrn '__imp__EnumLanguageGroupLocalesA@16' as EnumLanguageGroupLocalesA:dword
        extrn '__imp__EnumLanguageGroupLocalesW@16' as EnumLanguageGroupLocalesW:dword
        extrn '__imp__EnumSystemLanguageGroupsA@12' as EnumSystemLanguageGroupsA:dword
        extrn '__imp__EnumSystemLanguageGroupsW@12' as EnumSystemLanguageGroupsW:dword
        extrn '__imp__EnumUILanguagesA@12' as EnumUILanguagesA:dword
        extrn '__imp__EnumUILanguagesW@12' as EnumUILanguagesW:dword
        extrn '__imp__FindFirstVolumeA@8' as FindFirstVolumeA:dword
        extrn '__imp__FindFirstVolumeMountPointA@12' as FindFirstVolumeMountPointA:dword
        extrn '__imp__FindFirstVolumeMountPointW@12' as FindFirstVolumeMountPointW:dword
        extrn '__imp__FindFirstVolumeW@8' as FindFirstVolumeW:dword
        extrn '__imp__FindNextVolumeA@12' as FindNextVolumeA:dword
        extrn '__imp__FindNextVolumeMountPointA@12' as FindNextVolumeMountPointA:dword
        extrn '__imp__FindNextVolumeMountPointW@12' as FindNextVolumeMountPointW:dword
        extrn '__imp__FindNextVolumeW@12' as FindNextVolumeW:dword
        extrn '__imp__FindVolumeClose@4' as FindVolumeClose:dword
        extrn '__imp__FindVolumeMountPointClose@4' as FindVolumeMountPointClose:dword
        extrn '__imp__FreeUserPhysicalPages@12' as FreeUserPhysicalPages:dword
        extrn '__imp__GetComputerNameExA@12' as GetComputerNameExA:dword
        extrn '__imp__GetComputerNameExW@12' as GetComputerNameExW:dword
        extrn '__imp__GetConsoleNlsMode@0' as GetConsoleNlsMode:dword
        extrn '__imp__GetConsoleWindow@0' as GetConsoleWindow:dword
        extrn '__imp__GetFileSizeEx@8' as GetFileSizeEx:dword
        extrn '__imp__GetSystemDefaultUILanguage@0' as GetSystemDefaultUILanguage:dword
        extrn '__imp__GetSystemWindowsDirectoryA@8' as GetSystemWindowsDirectoryA:dword
        extrn '__imp__GetSystemWindowsDirectoryW@8' as GetSystemWindowsDirectoryW:dword
        extrn '__imp__GetUserDefaultUILanguage@0' as GetUserDefaultUILanguage:dword
        extrn '__imp__GetVolumeNameForVolumeMountPointA@12' as GetVolumeNameForVolumeMountPointA:dword
        extrn '__imp__GetVolumeNameForVolumeMountPointW@12' as GetVolumeNameForVolumeMountPointW:dword
        extrn '__imp__GetVolumePathNameA@12' as GetVolumePathNameA:dword
        extrn '__imp__GetVolumePathNameW@12' as GetVolumePathNameW:dword
        extrn '__imp__GlobalMemoryStatusEx@4' as GlobalMemoryStatusEx:dword
        extrn '__imp__IsValidLanguageGroup@8' as IsValidLanguageGroup:dword
        extrn '__imp__MapUserPhysicalPages@12' as MapUserPhysicalPages:dword
        extrn '__imp__MapUserPhysicalPagesScatter@12' as MapUserPhysicalPagesScatter:dword
        extrn '__imp__MoveFileWithProgressA@20' as MoveFileWithProgressA:dword
        extrn '__imp__MoveFileWithProgressW@20' as MoveFileWithProgressW:dword
        if (NTDDI_VERSION < NTDDI_VISTA)
            extrn '__imp__OpenDataFile@8' as OpenDataFile:dword
        end if
        extrn '__imp__OpenJobObjectA@12' as OpenJobObjectA:dword
        extrn '__imp__OpenJobObjectW@12' as OpenJobObjectW:dword
        extrn '__imp__OpenThread@12' as OpenThread:dword
        extrn '__imp__PrivCopyFileExW@24' as PrivCopyFileExW:dword
        extrn '__imp__ProcessIdToSessionId@8' as ProcessIdToSessionId:dword
        extrn '__imp__QueryInformationJobObject@20' as QueryInformationJobObject:dword
        extrn '__imp__RegisterWaitForSingleObject@24' as RegisterWaitForSingleObject:dword
        extrn '__imp__ReplaceFileA@24' as ReplaceFileA:dword
        extrn '__imp__ReplaceFileW@24' as ReplaceFileW:dword
        extrn '__imp__SetComputerNameExA@8' as SetComputerNameExA:dword
        extrn '__imp__SetComputerNameExW@8' as SetComputerNameExW:dword
        extrn '__imp__SetConsoleNlsMode@8' as SetConsoleNlsMode:dword
        extrn '__imp__SetConsoleOS2OemFormat@4' as SetConsoleOS2OemFormat:dword
        extrn '__imp__SetFilePointerEx@16' as SetFilePointerEx:dword
        extrn '__imp__SetInformationJobObject@16' as SetInformationJobObject:dword
        extrn '__imp__SetTermsrvAppInstallMode@4' as SetTermsrvAppInstallMode:dword
        extrn '__imp__SetTimerQueueTimer@24' as SetTimerQueueTimer:dword
        extrn '__imp__SetVolumeMountPointA@8' as SetVolumeMountPointA:dword
        extrn '__imp__SetVolumeMountPointW@8' as SetVolumeMountPointW:dword
        extrn '__imp__TerminateJobObject@8' as TerminateJobObject:dword
        extrn '__imp__UnregisterWait@4' as UnregisterWait:dword
        extrn '__imp__VerSetConditionMask@12' as VerSetConditionMask:dword
        api CreateHardLink,\
            CreateJobObject,\
            DeleteVolumeMountPoint,\
            DnsHostnameToComputerName,\
            DosPathToSessionPath,\
            EnumLanguageGroupLocales,\
            EnumSystemLanguageGroups,\
            EnumUILanguages,\
            FindActCtxSectionString,\
            FindFirstVolume,\
            FindFirstVolumeMountPoint,\
            FindNextVolume,\
            FindNextVolumeMountPoint,\
            GetComputerNameEx,\
            GetSystemWindowsDirectory,\
            GetVolumeNameForVolumeMountPoint,\
            GetVolumePathName,\
            MoveFileWithProgress,\
            OpenJobObject,\
            ReplaceFile,\
            SetComputerNameEx,\
            SetVolumeMountPoint
    end if

    if (NTDDI_VERSION >= NTDDI_WINXP)
        extrn '__imp__ActivateActCtx@8' as ActivateActCtx:dword
        extrn '__imp__AddLocalAlternateComputerNameA@8' as AddLocalAlternateComputerNameA:dword
        extrn '__imp__AddLocalAlternateComputerNameW@8' as AddLocalAlternateComputerNameW:dword
        extrn '__imp__AddRefActCtx@4' as AddRefActCtx:dword
        extrn '__imp__AddVectoredExceptionHandler@8' as AddVectoredExceptionHandler:dword
        extrn '__imp__AttachConsole@4' as AttachConsole:dword
        extrn '__imp__CancelWaitableTimer@4' as CancelWaitableTimer:dword
        extrn '__imp__ConvertFiberToThread@0' as ConvertFiberToThread:dword
        extrn '__imp__CreateActCtxA@4' as CreateActCtxA:dword
        extrn '__imp__CreateActCtxW@4' as CreateActCtxW:dword
        extrn '__imp__CreateFiberEx@20' as CreateFiberEx:dword
        extrn '__imp__CreateJobSet@12' as CreateJobSet:dword
        extrn '__imp__CreateMemoryResourceNotification@4' as CreateMemoryResourceNotification:dword
        extrn '__imp__CreateProcessInternalA@40' as CreateProcessInternalA:dword
        extrn '__imp__CreateProcessInternalW@40' as CreateProcessInternalW:dword
        extrn '__imp__DeactivateActCtx@8' as DeactivateActCtx:dword
        extrn '__imp__DebugActiveProcessStop@4' as DebugActiveProcessStop:dword
        extrn '__imp__DebugBreakProcess@4' as DebugBreakProcess:dword
        extrn '__imp__DebugSetProcessKillOnExit@4' as DebugSetProcessKillOnExit:dword
        extrn '__imp__DeleteTimerQueueEx@8' as DeleteTimerQueueEx:dword
        extrn '__imp__DeleteTimerQueueTimer@12' as DeleteTimerQueueTimer:dword
        extrn '__imp__EnumerateLocalComputerNamesA@16' as EnumerateLocalComputerNamesA:dword
        extrn '__imp__EnumerateLocalComputerNamesW@16' as EnumerateLocalComputerNamesW:dword
        extrn '__imp__EnumSystemGeoID@12' as EnumSystemGeoID:dword
        extrn '__imp__FindActCtxSectionGuid@20' as FindActCtxSectionGuid:dword
        extrn '__imp__FindActCtxSectionStringA@20' as FindActCtxSectionStringA:dword
        extrn '__imp__FindActCtxSectionStringW@20' as FindActCtxSectionStringW:dword
        extrn '__imp__FlsAlloc@4' as FlsAlloc:dword
        extrn '__imp__FlsFree@4' as FlsFree:dword
        extrn '__imp__FlsGetValue@4' as FlsGetValue:dword
        extrn '__imp__FlsSetValue@8' as FlsSetValue:dword
        extrn '__imp__GetConsoleDisplayMode@4' as GetConsoleDisplayMode:dword
        extrn '__imp__GetConsoleFontInfo@12' as GetConsoleFontInfo:dword
        extrn '__imp__GetConsoleFontSize@8' as GetConsoleFontSize:dword
        extrn '__imp__GetConsoleProcessList@8' as GetConsoleProcessList:dword
        extrn '__imp__GetConsoleSelectionInfo@4' as GetConsoleSelectionInfo:dword
        extrn '__imp__GetCurrentActCtx@4' as GetCurrentActCtx:dword
        extrn '__imp__GetCurrentConsoleFont@12' as GetCurrentConsoleFont:dword
        extrn '__imp__GetDllDirectoryA@8' as GetDllDirectoryA:dword
        extrn '__imp__GetDllDirectoryW@8' as GetDllDirectoryW:dword
        extrn '__imp__GetGeoInfoA@20' as GetGeoInfoA:dword
        extrn '__imp__GetGeoInfoW@20' as GetGeoInfoW:dword
        extrn '__imp__GetProcessId@4' as GetProcessId:dword
        extrn '__imp__GetNativeSystemInfo@4' as GetNativeSystemInfo:dword
        extrn '__imp__GetSystemWow64DirectoryA@8' as GetSystemWow64DirectoryA:dword
        extrn '__imp__GetSystemWow64DirectoryW@8' as GetSystemWow64DirectoryW:dword
        extrn '__imp__GetThreadId@4' as GetThreadId:dword
        extrn '__imp__GetUserGeoID@4' as GetUserGeoID:dword
        extrn '__imp__GetVolumePathNamesForVolumeNameA@16' as GetVolumePathNamesForVolumeNameA:dword
        extrn '__imp__GetVolumePathNamesForVolumeNameW@16' as GetVolumePathNamesForVolumeNameW:dword
        extrn '__imp__GetWriteWatch@24' as GetWriteWatch:dword
        extrn '__imp__HeapQueryInformation@20' as HeapQueryInformation:dword
        extrn '__imp__HeapSetInformation@16' as HeapSetInformation:dword
        extrn '__imp__InitializeCriticalSectionAndSpinCount@8' as InitializeCriticalSectionAndSpinCount:dword
        extrn '__imp__InitializeSListHead@4' as InitializeSListHead:dword
        extrn '__imp__InterlockedFlushSList@4' as InterlockedFlushSList:dword
        extrn '__imp__InterlockedPopEntrySList@4' as InterlockedPopEntrySList:dword
        extrn '__imp__InterlockedPushEntrySList@8' as InterlockedPushEntrySList:dword
        extrn '__imp__IsProcessInJob@12' as IsProcessInJob:dword
        extrn '__imp__Module32First@8' as Module32First:dword
        extrn '__imp__Module32FirstW@8' as Module32FirstW:dword
        extrn '__imp__Module32Next@8' as Module32Next:dword
        extrn '__imp__Module32NextW@8' as Module32NextW:dword
        extrn '__imp__Process32First@8' as Process32First:dword
        extrn '__imp__Process32FirstW@8' as Process32FirstW:dword
        extrn '__imp__Process32Next@8' as Process32Next:dword
        extrn '__imp__Process32NextW@8' as Process32NextW:dword
        extrn '__imp__QueryActCtxW@28' as QueryActCtxW:dword
        extrn '__imp__QueryDepthSList@4' as QueryDepthSList:dword
        extrn '__imp__QueryMemoryResourceNotification@8' as QueryMemoryResourceNotification:dword
        extrn '__imp__QueueUserWorkItem@12' as QueueUserWorkItem:dword
        extrn '__imp__ReleaseActCtx@4' as ReleaseActCtx:dword
        extrn '__imp__RemoveVectoredExceptionHandler@4' as RemoveVectoredExceptionHandler:dword
        if (NTDDI_VERSION >= NTDDI_WIN8)
            extrn '__imp__ResolveDelayLoadedAPI@24' as ResolveDelayLoadedAPI:dword
            extrn '__imp__ResolveDelayLoadsFromDll@12' as ResolveDelayLoadsFromDll:dword
        end if
        extrn '__imp__RtlCaptureContext@4' as RtlCaptureContext:dword
        extrn '__imp__RtlCaptureStackBackTrace@16' as RtlCaptureStackBackTrace:dword
        extrn '__imp__RtlRaiseException@4' as RtlRaiseException:dword
        extrn '__imp__SetConsoleDisplayMode@12' as SetConsoleDisplayMode:dword
        extrn '__imp__SetConsoleFont@8' as SetConsoleFont:dword
        extrn '__imp__SetFileShortNameA@8' as SetFileShortNameA:dword
        extrn '__imp__SetFileShortNameW@8' as SetFileShortNameW:dword
        extrn '__imp__SetFileValidData@8' as SetFileValidData:dword
        extrn '__imp__SetLocalPrimaryComputerNameA@8' as SetLocalPrimaryComputerNameA:dword
        extrn '__imp__SetLocalPrimaryComputerNameW@8' as SetLocalPrimaryComputerNameW:dword
        extrn '__imp__SetThreadUILanguage@4' as SetThreadUILanguage:dword
        extrn '__imp__SetUserGeoID@4' as SetUserGeoID:dword
        extrn '__imp__TryEnterCriticalSection@4' as TryEnterCriticalSection:dword
        extrn '__imp__TzSpecificLocalTimeToSystemTime@12' as TzSpecificLocalTimeToSystemTime:dword
        extrn '__imp__uaw_lstrcmpiW@8' as uaw_lstrcmpiW:dword
        extrn '__imp__uaw_lstrcmpW@8' as uaw_lstrcmpW:dword
        extrn '__imp__uaw_lstrlenW@4' as uaw_lstrlenW:dword
        extrn '__imp__uaw_wcschr@8' as uaw_wcschr:dword
        extrn '__imp__uaw_wcscpy@8' as uaw_wcscpy:dword
        extrn '__imp__uaw_wcsicmp@8' as uaw_wcsicmp:dword
        extrn '__imp__uaw_wcslen@4' as uaw_wcslen:dword
        extrn '__imp__uaw_wcsrchr@8' as uaw_wcsrchr:dword
        extrn '__imp__UnregisterWaitEx@8' as UnregisterWaitEx:dword
        extrn '__imp__ZombifyActCtx@4' as ZombifyActCtx:dword

        CaptureStackBackTrace equ RtlCaptureStackBackTrace

        api AddLocalAlternateComputerName,\
            CreateActCtx,\
            CreateProcessInternal,\
            EnumerateLocalComputerNames,\
            GetDllDirectory,\
            GetGeoInfo,\
            GetSystemWow64Directory,\
            GetVolumePathNamesForVolumeName,\
            SetFileShortName,\
            SetLocalPrimaryComputerName
    end if

    if (NTDDI_VERSION >= NTDDI_WINXPSP1)
        extrn '__imp__CheckNameLegalDOS8Dot3A@20' as CheckNameLegalDOS8Dot3A:dword
        extrn '__imp__CheckNameLegalDOS8Dot3W@20' as CheckNameLegalDOS8Dot3W:dword
        extrn '__imp__CheckRemoteDebuggerPresent@8' as CheckRemoteDebuggerPresent:dword
        extrn '__imp__ConvertThreadToFiberEx@8' as ConvertThreadToFiberEx:dword
        extrn '__imp__GetFirmwareEnvironmentVariableA@16' as GetFirmwareEnvironmentVariableA:dword
        extrn '__imp__GetFirmwareEnvironmentVariableW@16' as GetFirmwareEnvironmentVariableW:dword
        extrn '__imp__GetProcessHandleCount@8' as GetProcessHandleCount:dword
        extrn '__imp__GetSystemRegistryQuota@8' as GetSystemRegistryQuota:dword
        extrn '__imp__GetSystemTimes@12' as GetSystemTimes:dword
        extrn '__imp__GetThreadIOPendingFlag@8' as GetThreadIOPendingFlag:dword
        extrn '__imp__SetFirmwareEnvironmentVariableA@16' as SetFirmwareEnvironmentVariableA:dword
        extrn '__imp__SetFirmwareEnvironmentVariableW@16' as SetFirmwareEnvironmentVariableW:dword
        api CheckNameLegalDOS8Dot3,\
            GetFirmwareEnvironmentVariable,\
            SetFirmwareEnvironmentVariable
    end if

    if (NTDDI_VERSION >= NTDDI_WINXPSP2)
        extrn '__imp__GetNumaAvailableMemoryNode@8' as GetNumaAvailableMemoryNode:dword
        extrn '__imp__GetNumaNodeProcessorMask@8' as GetNumaNodeProcessorMask:dword
        extrn '__imp__GetNumaProcessorNode@8' as GetNumaProcessorNode:dword
    end if

    if (NTDDI_VERSION >= NTDDI_WINXPSP2 | NTDDI_VERSION >= NTDDI_WS03SP1)
        extrn '__imp__DecodePointer@4' as DecodePointer:dword
        extrn '__imp__DecodeSystemPointer@4' as DecodeSystemPointer:dword
        extrn '__imp__EncodePointer@4' as EncodePointer:dword
        extrn '__imp__EncodeSystemPointer@4' as EncodeSystemPointer:dword
        extrn '__imp__IsWow64Process@8' as IsWow64Process:dword
    end if

    if (NTDDI_VERSION >= NTDDI_WINXPSP3)
        extrn '__imp__GetSystemDEPPolicy@0' as GetSystemDEPPolicy:dword
        extrn '__imp__GetProcessDEPPolicy@12' as GetProcessDEPPolicy:dword
        extrn '__imp__SetProcessDEPPolicy@4' as SetProcessDEPPolicy:dword
    end if

    if (NTDDI_VERSION >= NTDDI_WS03)
        extrn '__imp__FindFirstStreamW@16' as FindFirstStreamW:dword
        extrn '__imp__FindNextStreamW@8' as FindNextStreamW:dword
        extrn '__imp__GetLargePageMinimum@0' as GetLargePageMinimum:dword
        extrn '__imp__GetProcessIdOfThread@4' as GetProcessIdOfThread:dword
        extrn '__imp__GetProcessWorkingSetSizeEx@16' as GetProcessWorkingSetSizeEx:dword
        extrn '__imp__ReOpenFile@16' as ReOpenFile:dword
        extrn '__imp__SetDllDirectoryA@4' as SetDllDirectoryA:dword
        extrn '__imp__SetDllDirectoryW@4' as SetDllDirectoryW:dword
        extrn '__imp__SetEnvironmentStringsA@4' as SetEnvironmentStringsA:dword
        extrn '__imp__SetEnvironmentStringsW@4' as SetEnvironmentStringsW:dword
        extrn '__imp__SetProcessWorkingSetSizeEx@16' as SetProcessWorkingSetSizeEx:dword
        extrn '__imp__Wow64EnableWow64FsRedirection@4' as Wow64EnableWow64FsRedirection:dword
        extrn '__imp__WTSGetActiveConsoleSessionId@0' as WTSGetActiveConsoleSessionId:dword
        api SetDllDirectory,\
            SetEnvironmentStrings
    end if

    if (NTDDI_VERSION <= NTDDI_VISTA)
        extrn '__imp__InterlockedCompareExchange@12' as InterlockedCompareExchange:dword
        ;extrn '__imp__InterlockedCompareExchange64@12' as InterlockedCompareExchange64:dword ;Not present in MASM32 kernel32.lib
        extrn '__imp__InterlockedDecrement@4' as InterlockedDecrement:dword
        extrn '__imp__InterlockedExchange@8' as InterlockedExchange:dword
        extrn '__imp__InterlockedIncrement@4' as InterlockedIncrement:dword
    end if

    if (NTDDI_VERSION >= NTDDI_VISTA)
        extrn '__imp__AcquireSRWLockExclusive@4' as AcquireSRWLockExclusive:dword
        extrn '__imp__AcquireSRWLockShared@4' as AcquireSRWLockShared:dword
        extrn '__imp__AddDllDirectory@4' as AddDllDirectory:dword
        extrn '__imp__AddSIDToBoundaryDescriptor@8' as AddSIDToBoundaryDescriptor:dword
        extrn '__imp__AddVectoredContinueHandler@8' as AddVectoredContinueHandler:dword
        extrn '__imp__AdjustCalendarDate@8' as AdjustCalendarDate:dword
        extrn '__imp__AllocateUserPhysicalPagesNuma@16' as AllocateUserPhysicalPagesNuma:dword
        extrn '__imp__ApplicationRecoveryFinished@4' as ApplicationRecoveryFinished:dword
        extrn '__imp__ApplicationRecoveryInProgress@4' as ApplicationRecoveryInProgress:dword
        extrn '__imp__CallbackMayRunLong@4' as CallbackMayRunLong:dword
        extrn '__imp__CancelIoEx@8' as CancelIoEx:dword
        extrn '__imp__CancelSynchronousIo@4' as CancelSynchronousIo:dword
        extrn '__imp__CancelThreadpoolIo@4' as CancelThreadpoolIo:dword
        extrn '__imp__CheckElevationEnabled@4' as CheckElevationEnabled:dword
        extrn '__imp__ClosePrivateNamespace@8' as ClosePrivateNamespace:dword
        extrn '__imp__CloseThreadpool@4' as CloseThreadpool:dword
        extrn '__imp__CloseThreadpoolCleanupGroup@4' as CloseThreadpoolCleanupGroup:dword
        extrn '__imp__CloseThreadpoolCleanupGroupMembers@12' as CloseThreadpoolCleanupGroupMembers:dword
        extrn '__imp__CloseThreadpoolIo@4' as CloseThreadpoolIo:dword
        extrn '__imp__CloseThreadpoolTimer@4' as CloseThreadpoolTimer:dword
        extrn '__imp__CloseThreadpoolWait@4' as CloseThreadpoolWait:dword
        extrn '__imp__CloseThreadpoolWork@4' as CloseThreadpoolWork:dword
        extrn '__imp__CompareStringEx@36' as CompareStringEx:dword
        extrn '__imp__CompareStringOrdinal@20' as CompareStringOrdinal:dword
        extrn '__imp__ConvertCalDateTimeToSystemTime@8' as ConvertCalDateTimeToSystemTime:dword
        extrn '__imp__ConvertSystemTimeToCalDateTime@12' as ConvertSystemTimeToCalDateTime:dword
        extrn '__imp__CopyFileTransactedA@28' as CopyFileTransactedA:dword
        extrn '__imp__CopyFileTransactedW@28' as CopyFileTransactedW:dword
        extrn '__imp__CreateBoundaryDescriptorA@8' as CreateBoundaryDescriptorA:dword
        extrn '__imp__CreateBoundaryDescriptorW@8' as CreateBoundaryDescriptorW:dword
        extrn '__imp__CreateDirectoryTransactedA@16' as CreateDirectoryTransactedA:dword
        extrn '__imp__CreateDirectoryTransactedW@16' as CreateDirectoryTransactedW:dword
        extrn '__imp__CreateEventExA@16' as CreateEventExA:dword
        extrn '__imp__CreateEventExW@16' as CreateEventExW:dword
        extrn '__imp__CreateFileMappingNumaA@28' as CreateFileMappingNumaA:dword
        extrn '__imp__CreateFileMappingNumaW@28' as CreateFileMappingNumaW:dword
        extrn '__imp__CreateFileTransactedA@40' as CreateFileTransactedA:dword
        extrn '__imp__CreateFileTransactedW@40' as CreateFileTransactedW:dword
        extrn '__imp__CreateHardLinkTransactedA@16' as CreateHardLinkTransactedA:dword
        extrn '__imp__CreateHardLinkTransactedW@16' as CreateHardLinkTransactedW:dword
        extrn '__imp__CreateMutexExA@16' as CreateMutexExA:dword
        extrn '__imp__CreateMutexExW@16' as CreateMutexExW:dword
        extrn '__imp__CreatePrivateNamespaceA@12' as CreatePrivateNamespaceA:dword
        extrn '__imp__CreatePrivateNamespaceW@12' as CreatePrivateNamespaceW:dword
        extrn '__imp__CreateSemaphoreExA@24' as CreateSemaphoreExA:dword
        extrn '__imp__CreateSemaphoreExW@24' as CreateSemaphoreExW:dword
        extrn '__imp__CreateSymbolicLinkA@12' as CreateSymbolicLinkA:dword
        extrn '__imp__CreateSymbolicLinkTransactedA@16' as CreateSymbolicLinkTransactedA:dword
        extrn '__imp__CreateSymbolicLinkTransactedW@16' as CreateSymbolicLinkTransactedW:dword
        extrn '__imp__CreateSymbolicLinkW@12' as CreateSymbolicLinkW:dword
        extrn '__imp__CreateThreadpool@4' as CreateThreadpool:dword
        extrn '__imp__CreateThreadpoolCleanupGroup@0' as CreateThreadpoolCleanupGroup:dword
        extrn '__imp__CreateThreadpoolIo@16' as CreateThreadpoolIo:dword
        extrn '__imp__CreateThreadpoolTimer@12' as CreateThreadpoolTimer:dword
        extrn '__imp__CreateThreadpoolWait@12' as CreateThreadpoolWait:dword
        extrn '__imp__CreateThreadpoolWork@12' as CreateThreadpoolWork:dword
        extrn '__imp__CreateWaitableTimerExA@16' as CreateWaitableTimerExA:dword
        extrn '__imp__CreateWaitableTimerExW@16' as CreateWaitableTimerExW:dword
        extrn '__imp__DeleteBoundaryDescriptor@4' as DeleteBoundaryDescriptor:dword
        extrn '__imp__DeleteFileTransactedA@8' as DeleteFileTransactedA:dword
        extrn '__imp__DeleteFileTransactedW@8' as DeleteFileTransactedW:dword
        extrn '__imp__DeleteProcThreadAttributeList@4' as DeleteProcThreadAttributeList:dword
        extrn '__imp__DisassociateCurrentThreadFromCallback@4' as DisassociateCurrentThreadFromCallback:dword
        extrn '__imp__EnumCalendarInfoExEx@24' as EnumCalendarInfoExEx:dword
        extrn '__imp__EnumDateFormatsExEx@16' as EnumDateFormatsExEx:dword
        extrn '__imp__EnumResourceLanguagesExA@28' as EnumResourceLanguagesExA:dword
        extrn '__imp__EnumResourceLanguagesExW@28' as EnumResourceLanguagesExW:dword
        extrn '__imp__EnumResourceNamesExA@24' as EnumResourceNamesExA:dword
        extrn '__imp__EnumResourceNamesExW@24' as EnumResourceNamesExW:dword
        extrn '__imp__EnumResourceTypesExA@20' as EnumResourceTypesExA:dword
        extrn '__imp__EnumResourceTypesExW@20' as EnumResourceTypesExW:dword
        extrn '__imp__EnumSystemLocalesEx@16' as EnumSystemLocalesEx:dword
        extrn '__imp__EnumTimeFormatsEx@16' as EnumTimeFormatsEx:dword
        extrn '__imp__FindFirstFileNameTransactedW@20' as FindFirstFileNameTransactedW:dword
        extrn '__imp__FindFirstFileNameW@16' as FindFirstFileNameW:dword
        extrn '__imp__FindFirstFileTransactedA@28' as FindFirstFileTransactedA:dword
        extrn '__imp__FindFirstFileTransactedW@28' as FindFirstFileTransactedW:dword
        extrn '__imp__FindFirstStreamTransactedW@20' as FindFirstStreamTransactedW:dword
        extrn '__imp__FindNextFileNameW@12' as FindNextFileNameW:dword
        extrn '__imp__FindNLSString@28' as FindNLSString:dword
        extrn '__imp__FindNLSStringEx@40' as FindNLSStringEx:dword
        extrn '__imp__FlushProcessWriteBuffers@0' as FlushProcessWriteBuffers:dword
        extrn '__imp__FreeLibraryWhenCallbackReturns@8' as FreeLibraryWhenCallbackReturns:dword
        extrn '__imp__GetApplicationRecoveryCallback@20' as GetApplicationRecoveryCallback:dword
        extrn '__imp__GetApplicationRestartSettings@16' as GetApplicationRestartSettings:dword
        extrn '__imp__GetCalendarDateFormatEx@24' as GetCalendarDateFormatEx:dword
        extrn '__imp__GetCalendarInfoEx@28' as GetCalendarInfoEx:dword
        extrn '__imp__GetCalendarSupportedDateRange@12' as GetCalendarSupportedDateRange:dword
        extrn '__imp__GetComPlusPackageInstallStatus@0' as GetComPlusPackageInstallStatus:dword
        extrn '__imp__GetCompressedFileSizeTransactedA@12' as GetCompressedFileSizeTransactedA:dword
        extrn '__imp__GetCompressedFileSizeTransactedW@12' as GetCompressedFileSizeTransactedW:dword
        extrn '__imp__GetConsoleHistoryInfo@4' as GetConsoleHistoryInfo:dword
        extrn '__imp__GetConsoleOriginalTitleA@8' as GetConsoleOriginalTitleA:dword
        extrn '__imp__GetConsoleOriginalTitleW@8' as GetConsoleOriginalTitleW:dword
        extrn '__imp__GetConsoleScreenBufferInfoEx@8' as GetConsoleScreenBufferInfoEx:dword
        extrn '__imp__GetCurrencyFormatEx@24' as GetCurrencyFormatEx:dword
        extrn '__imp__GetCurrentConsoleFontEx@12' as GetCurrentConsoleFontEx:dword
        extrn '__imp__GetCurrentProcessorNumber@0' as GetCurrentProcessorNumber:dword
        extrn '__imp__GetDateFormatEx@28' as GetDateFormatEx:dword
        extrn '__imp__GetDurationFormat@28' as GetDurationFormat:dword
        extrn '__imp__GetDurationFormatEx@28' as GetDurationFormatEx:dword
        extrn '__imp__GetDynamicTimeZoneInformation@4' as GetDynamicTimeZoneInformation:dword
        extrn '__imp__GetFileAttributesTransactedA@16' as GetFileAttributesTransactedA:dword
        extrn '__imp__GetFileAttributesTransactedW@16' as GetFileAttributesTransactedW:dword
        extrn '__imp__GetFileBandwidthReservation@24' as GetFileBandwidthReservation:dword
        extrn '__imp__GetFileInformationByHandleEx@16' as GetFileInformationByHandleEx:dword
        extrn '__imp__GetFileMUIInfo@16' as GetFileMUIInfo:dword
        extrn '__imp__GetFileMUIPath@28' as GetFileMUIPath:dword
        extrn '__imp__GetFinalPathNameByHandleA@16' as GetFinalPathNameByHandleA:dword
        extrn '__imp__GetFinalPathNameByHandleW@16' as GetFinalPathNameByHandleW:dword
        extrn '__imp__GetFullPathNameTransactedA@20' as GetFullPathNameTransactedA:dword
        extrn '__imp__GetFullPathNameTransactedW@20' as GetFullPathNameTransactedW:dword
        extrn '__imp__GetLocaleInfoEx@16' as GetLocaleInfoEx:dword
        extrn '__imp__GetLongPathNameTransactedA@16' as GetLongPathNameTransactedA:dword
        extrn '__imp__GetLongPathNameTransactedW@16' as GetLongPathNameTransactedW:dword
        extrn '__imp__GetNamedPipeAttribute@20' as GetNamedPipeAttribute:dword
        extrn '__imp__GetNamedPipeClientComputerNameA@12' as GetNamedPipeClientComputerNameA:dword
        extrn '__imp__GetNamedPipeClientComputerNameW@12' as GetNamedPipeClientComputerNameW:dword
        extrn '__imp__GetNamedPipeClientProcessId@8' as GetNamedPipeClientProcessId:dword
        extrn '__imp__GetNamedPipeClientSessionId@8' as GetNamedPipeClientSessionId:dword
        extrn '__imp__GetNamedPipeServerProcessId@8' as GetNamedPipeServerProcessId:dword
        extrn '__imp__GetNamedPipeServerSessionId@8' as GetNamedPipeServerSessionId:dword
        extrn '__imp__GetNLSVersion@12' as GetNLSVersion:dword
        extrn '__imp__GetNLSVersionEx@12' as GetNLSVersionEx:dword
        extrn '__imp__GetNumaProximityNode@8' as GetNumaProximityNode:dword
        extrn '__imp__GetNumberFormatEx@24' as GetNumberFormatEx:dword
        extrn '__imp__GetProductInfo@20' as GetProductInfo:dword
        extrn '__imp__GetQueuedCompletionStatusEx@24' as GetQueuedCompletionStatusEx:dword
        extrn '__imp__GetStringScripts@20' as GetStringScripts:dword
        extrn '__imp__GetSystemDefaultLocaleName@8' as GetSystemDefaultLocaleName:dword
        extrn '__imp__GetSystemPreferredUILanguages@16' as GetSystemPreferredUILanguages:dword
        extrn '__imp__GetThreadPreferredUILanguages@16' as GetThreadPreferredUILanguages:dword
        extrn '__imp__GetThreadUILanguage@0' as GetThreadUILanguage:dword
        extrn '__imp__GetTickCount64@0' as GetTickCount64:dword
        extrn '__imp__GetTimeFormatEx@24' as GetTimeFormatEx:dword
        extrn '__imp__GetUILanguageInfo@20' as GetUILanguageInfo:dword
        extrn '__imp__GetUserDefaultLocaleName@8' as GetUserDefaultLocaleName:dword
        extrn '__imp__GetUserPreferredUILanguages@16' as GetUserPreferredUILanguages:dword
        extrn '__imp__GetVolumeInformationByHandleW@32' as GetVolumeInformationByHandleW:dword
        extrn '__imp__IdnToAscii@20' as IdnToAscii:dword
        extrn '__imp__IdnToNameprepUnicode@20' as IdnToNameprepUnicode:dword
        extrn '__imp__IdnToUnicode@20' as IdnToUnicode:dword
        extrn '__imp__InitOnceBeginInitialize@16' as InitOnceBeginInitialize:dword
        extrn '__imp__InitOnceComplete@12' as InitOnceComplete:dword
        extrn '__imp__InitOnceExecuteOnce@16' as InitOnceExecuteOnce:dword
        extrn '__imp__InitOnceInitialize@4' as InitOnceInitialize:dword
        extrn '__imp__InitializeConditionVariable@4' as InitializeConditionVariable:dword
        extrn '__imp__InitializeCriticalSectionEx@12' as InitializeCriticalSectionEx:dword
        extrn '__imp__InitializeProcThreadAttributeList@16' as InitializeProcThreadAttributeList:dword
        extrn '__imp__InitializeSRWLock@4' as InitializeSRWLock:dword
        extrn '__imp__InterlockedPushListSList@16' as InterlockedPushListSList:dword
        extrn '__imp__IsCalendarLeapDay@20' as IsCalendarLeapDay:dword
        extrn '__imp__IsCalendarLeapMonth@16' as IsCalendarLeapMonth:dword
        extrn '__imp__IsCalendarLeapYear@12' as IsCalendarLeapYear:dword
        extrn '__imp__IsNLSDefinedString@20' as IsNLSDefinedString:dword
        extrn '__imp__IsNormalizedString@12' as IsNormalizedString:dword
        extrn '__imp__IsThreadAFiber@0' as IsThreadAFiber:dword
        extrn '__imp__IsThreadpoolTimerSet@4' as IsThreadpoolTimerSet:dword
        if (NTDDI_VERSION >= NTDDI_WIN81)
            extrn '__imp__IsTimeZoneRedirectionEnabled@0' as IsTimeZoneRedirectionEnabled:dword
        end if
        extrn '__imp__IsValidCalDateTime@8' as IsValidCalDateTime:dword
        extrn '__imp__IsValidLocaleName@4' as IsValidLocaleName:dword
        extrn '__imp__LCIDToLocaleName@16' as LCIDToLocaleName:dword
        extrn '__imp__LCMapStringEx@36' as LCMapStringEx:dword
        extrn '__imp__LeaveCriticalSectionWhenCallbackReturns@8' as LeaveCriticalSectionWhenCallbackReturns:dword
        extrn '__imp__LoadStringBaseExW@20' as LoadStringBaseExW:dword
        extrn '__imp__LoadStringBaseW@16' as LoadStringBaseW:dword
        extrn '__imp__LocaleNameToLCID@8' as LocaleNameToLCID:dword
        extrn '__imp__MapViewOfFileExNuma@28' as MapViewOfFileExNuma:dword
        extrn '__imp__MoveFileTransactedA@24' as MoveFileTransactedA:dword
        extrn '__imp__MoveFileTransactedW@24' as MoveFileTransactedW:dword
        extrn '__imp__NeedCurrentDirectoryForExePathA@4' as NeedCurrentDirectoryForExePathA:dword
        extrn '__imp__NeedCurrentDirectoryForExePathW@4' as NeedCurrentDirectoryForExePathW:dword
        extrn '__imp__NormalizeString@20' as NormalizeString:dword
        extrn '__imp__OpenFileById@24' as OpenFileById:dword
        extrn '__imp__OpenPrivateNamespaceA@8' as OpenPrivateNamespaceA:dword
        extrn '__imp__OpenPrivateNamespaceW@8' as OpenPrivateNamespaceW:dword
        extrn '__imp__QueryActCtxSettingsW@28' as QueryActCtxSettingsW:dword
        extrn '__imp__QueryFullProcessImageNameA@16' as QueryFullProcessImageNameA:dword
        extrn '__imp__QueryFullProcessImageNameW@16' as QueryFullProcessImageNameW:dword
        extrn '__imp__QueryIdleProcessorCycleTime@8' as QueryIdleProcessorCycleTime:dword
        extrn '__imp__QueryProcessCycleTime@8' as QueryProcessCycleTime:dword
        extrn '__imp__QueryThreadCycleTime@8' as QueryThreadCycleTime:dword
        extrn '__imp__RegisterApplicationRecoveryCallback@16' as RegisterApplicationRecoveryCallback:dword
        extrn '__imp__RegisterApplicationRestart@8' as RegisterApplicationRestart:dword
        extrn '__imp__ReleaseMutexWhenCallbackReturns@8' as ReleaseMutexWhenCallbackReturns:dword
        extrn '__imp__ReleaseSRWLockExclusive@4' as ReleaseSRWLockExclusive:dword
        extrn '__imp__ReleaseSRWLockShared@4' as ReleaseSRWLockShared:dword
        extrn '__imp__ReleaseSemaphoreWhenCallbackReturns@12' as ReleaseSemaphoreWhenCallbackReturns:dword
        extrn '__imp__RemoveDirectoryTransactedA@8' as RemoveDirectoryTransactedA:dword
        extrn '__imp__RemoveDirectoryTransactedW@8' as RemoveDirectoryTransactedW:dword
        extrn '__imp__RemoveDllDirectory@4' as RemoveDllDirectory:dword
        extrn '__imp__ReplacePartitionUnit@12' as ReplacePartitionUnit:dword
        extrn '__imp__SetConsoleHistoryInfo@4' as SetConsoleHistoryInfo:dword
        extrn '__imp__SetConsoleScreenBufferInfoEx@8' as SetConsoleScreenBufferInfoEx:dword
        extrn '__imp__SetCurrentConsoleFontEx@12' as SetCurrentConsoleFontEx:dword
        extrn '__imp__SetDefaultDllDirectories@4' as SetDefaultDllDirectories:dword
        extrn '__imp__SetDynamicTimeZoneInformation@4' as SetDynamicTimeZoneInformation:dword
        extrn '__imp__SetEventWhenCallbackReturns@8' as SetEventWhenCallbackReturns:dword
        extrn '__imp__SetFileAttributesTransactedA@12' as SetFileAttributesTransactedA:dword
        extrn '__imp__SetFileAttributesTransactedW@12' as SetFileAttributesTransactedW:dword
        extrn '__imp__SetFileBandwidthReservation@24' as SetFileBandwidthReservation:dword
        extrn '__imp__SetFileCompletionNotificationModes@8' as SetFileCompletionNotificationModes:dword
        extrn '__imp__SetFileInformationByHandle@16' as SetFileInformationByHandle:dword
        extrn '__imp__SetFileIoOverlappedRange@12' as SetFileIoOverlappedRange:dword
        extrn '__imp__SetNamedPipeAttribute@20' as SetNamedPipeAttribute:dword
        extrn '__imp__SetThreadpoolThreadMaximum@8' as SetThreadpoolThreadMaximum:dword
        extrn '__imp__SetThreadpoolThreadMinimum@8' as SetThreadpoolThreadMinimum:dword
        extrn '__imp__SetThreadpoolTimer@16' as SetThreadpoolTimer:dword
        extrn '__imp__SetThreadpoolWait@12' as SetThreadpoolWait:dword
        if (NTDDI_VERSION >= NTDDI_WIN8)
            extrn '__imp__SetThreadpoolWaitEx@12' as SetThreadpoolWaitEx:dword
        end if
        extrn '__imp__SetThreadPreferredUILanguages@12' as SetThreadPreferredUILanguages:dword
        extrn '__imp__SleepConditionVariableCS@12' as SleepConditionVariableCS:dword
        extrn '__imp__SleepConditionVariableSRW@16' as SleepConditionVariableSRW:dword
        extrn '__imp__StartThreadpoolIo@4' as StartThreadpoolIo:dword
        extrn '__imp__SubmitThreadpoolWork@4' as SubmitThreadpoolWork:dword
        extrn '__imp__TrySubmitThreadpoolCallback@12' as TrySubmitThreadpoolCallback:dword
        extrn '__imp__UnregisterApplicationRecoveryCallback@0' as UnregisterApplicationRecoveryCallback:dword
        extrn '__imp__UnregisterApplicationRestart@0' as UnregisterApplicationRestart:dword
        extrn '__imp__UpdateCalendarDayOfWeek@4' as UpdateCalendarDayOfWeek:dword
        extrn '__imp__UpdateProcThreadAttribute@28' as UpdateProcThreadAttribute:dword
        extrn '__imp__VerifyScripts@20' as VerifyScripts:dword
        extrn '__imp__VirtualAllocExNuma@24' as VirtualAllocExNuma:dword
        extrn '__imp__WaitForThreadpoolIoCallbacks@8' as WaitForThreadpoolIoCallbacks:dword
        extrn '__imp__WaitForThreadpoolTimerCallbacks@8' as WaitForThreadpoolTimerCallbacks:dword
        extrn '__imp__WaitForThreadpoolWaitCallbacks@8' as WaitForThreadpoolWaitCallbacks:dword
        extrn '__imp__WaitForThreadpoolWorkCallbacks@8' as WaitForThreadpoolWorkCallbacks:dword
        extrn '__imp__WakeAllConditionVariable@4' as WakeAllConditionVariable:dword
        extrn '__imp__WakeConditionVariable@4' as WakeConditionVariable:dword
        extrn '__imp__WerGetFlags@8' as WerGetFlags:dword
        extrn '__imp__WerRegisterFile@12' as WerRegisterFile:dword
        extrn '__imp__WerRegisterMemoryBlock@8' as WerRegisterMemoryBlock:dword
        extrn '__imp__WerSetFlags@4' as WerSetFlags:dword
        extrn '__imp__WerUnregisterFile@4' as WerUnregisterFile:dword
        extrn '__imp__WerUnregisterMemoryBlock@4' as WerUnregisterMemoryBlock:dword
        extrn '__imp__Wow64GetThreadContext@8' as Wow64GetThreadContext:dword
        extrn '__imp__Wow64SetThreadContext@8' as Wow64SetThreadContext:dword
        extrn '__imp__Wow64SuspendThread@4' as Wow64SuspendThread:dword
        api CopyFileTransacted,\
            CreateBoundaryDescriptor,\
            CreateDirectoryTransacted,\
            CreateEventEx,\
            CreateFileMappingNuma,\
            CreateFileTransacted,\
            CreateHardLinkTransacted,\
            CreateMutexEx,\
            CreatePrivateNamespace,\
            CreateSemaphoreEx,\
            CreateSymbolicLink,\
            CreateSymbolicLinkTransacted,\
            CreateWaitableTimerEx,\
            DeleteFileTransacted,\
            EnumResourceLanguagesEx,\
            EnumResourceNamesEx,\
            EnumResourceTypesEx,\
            FindFirstFileTransacted,\
            GetCompressedFileSizeTransacted,\
            GetConsoleOriginalTitle,\
            GetFileAttributesTransacted,\
            GetFinalPathNameByHandle,\
            GetFullPathNameTransacted,\
            GetLongPathNameTransacted,\
            GetNamedPipeClientComputerName,\
            MoveFileTransacted,\
            NeedCurrentDirectoryForExePath,\
            OpenPrivateNamespace,\
            QueryFullProcessImageName,\
            RemoveDirectoryTransacted,\
            SetFileAttributesTransacted
    end if

    if (NTDDI_VERSION >= NTDDI_VISTASP1)
        extrn '__imp__AddSecureMemoryCacheCallback@4' as AddSecureMemoryCacheCallback:dword
        extrn '__imp__GetPhysicallyInstalledSystemMemory@4' as GetPhysicallyInstalledSystemMemory:dword
        extrn '__imp__GetTimeZoneInformationForYear@12' as GetTimeZoneInformationForYear:dword
        extrn '__imp__QueryProcessAffinityUpdateMode@8' as QueryProcessAffinityUpdateMode:dword
        extrn '__imp__RemoveSecureMemoryCacheCallback@4' as RemoveSecureMemoryCacheCallback:dword
        extrn '__imp__SetProcessAffinityUpdateMode@8' as SetProcessAffinityUpdateMode:dword
    end if

    if (NTDDI_VERSION >= NTDDI_WIN7)
        extrn '__imp__AddIntegrityLabelToBoundaryDescriptor@8' as AddIntegrityLabelToBoundaryDescriptor:dword
        extrn '__imp__BaseFormatTimeOut@8' as BaseFormatTimeOut:dword
        extrn '__imp__BaseGetNamedObjectDirectory@4' as BaseGetNamedObjectDirectory:dword
        extrn '__imp__Basep8BitStringToDynamicUnicodeString@8' as Basep8BitStringToDynamicUnicodeString:dword
        extrn '__imp__CreateRemoteThreadEx@32' as CreateRemoteThreadEx:dword
        extrn '__imp__DisableThreadProfiling@4' as DisableThreadProfiling:dword
        extrn '__imp__EnableThreadProfiling@16' as EnableThreadProfiling:dword
        extrn '__imp__FindStringOrdinal@24' as FindStringOrdinal:dword
        extrn '__imp__GetActiveProcessorCount@4' as GetActiveProcessorCount:dword
        extrn '__imp__GetActiveProcessorGroupCount@0' as GetActiveProcessorGroupCount:dword
        extrn '__imp__GetCurrentProcessorNumberEx@4' as GetCurrentProcessorNumberEx:dword
        extrn '__imp__GetLogicalProcessorInformationEx@12' as GetLogicalProcessorInformationEx:dword
        extrn '__imp__GetMaximumProcessorCount@4' as GetMaximumProcessorCount:dword
        extrn '__imp__GetMaximumProcessorGroupCount@0' as GetMaximumProcessorGroupCount:dword
        extrn '__imp__GetNumaAvailableMemoryNodeEx@8' as GetNumaAvailableMemoryNodeEx:dword
        extrn '__imp__GetNumaNodeNumberFromHandle@8' as GetNumaNodeNumberFromHandle:dword
        extrn '__imp__GetNumaNodeProcessorMaskEx@8' as GetNumaNodeProcessorMaskEx:dword
        extrn '__imp__GetNumaProcessorNodeEx@8' as GetNumaProcessorNodeEx:dword
        extrn '__imp__GetNumaProximityNodeEx@8' as GetNumaProximityNodeEx:dword
        extrn '__imp__GetProcessGroupAffinity@12' as GetProcessGroupAffinity:dword
        extrn '__imp__GetProcessorSystemCycleTime@12' as GetProcessorSystemCycleTime:dword
        extrn '__imp__GetProcessPreferredUILanguages@16' as GetProcessPreferredUILanguages:dword
        extrn '__imp__GetProcessUserModeExceptionPolicy@4' as GetProcessUserModeExceptionPolicy:dword
        extrn '__imp__GetThreadErrorMode@0' as GetThreadErrorMode:dword
        extrn '__imp__GetThreadGroupAffinity@8' as GetThreadGroupAffinity:dword
        extrn '__imp__GetThreadIdealProcessorEx@8' as GetThreadIdealProcessorEx:dword
        extrn '__imp__K32EmptyWorkingSet@4' as K32EmptyWorkingSet:dword
        extrn '__imp__K32EnumDeviceDrivers@12' as K32EnumDeviceDrivers:dword
        extrn '__imp__K32EnumPageFilesA@8' as K32EnumPageFilesA:dword
        extrn '__imp__K32EnumPageFilesW@8' as K32EnumPageFilesW:dword
        extrn '__imp__K32EnumProcessModules@16' as K32EnumProcessModules:dword
        extrn '__imp__K32EnumProcessModulesEx@20' as K32EnumProcessModulesEx:dword
        extrn '__imp__K32EnumProcesses@12' as K32EnumProcesses:dword
        extrn '__imp__K32GetDeviceDriverBaseNameA@12' as K32GetDeviceDriverBaseNameA:dword
        extrn '__imp__K32GetDeviceDriverBaseNameW@12' as K32GetDeviceDriverBaseNameW:dword
        extrn '__imp__K32GetDeviceDriverFileNameA@12' as K32GetDeviceDriverFileNameA:dword
        extrn '__imp__K32GetDeviceDriverFileNameW@12' as K32GetDeviceDriverFileNameW:dword
        extrn '__imp__K32GetMappedFileNameA@16' as K32GetMappedFileNameA:dword
        extrn '__imp__K32GetMappedFileNameW@16' as K32GetMappedFileNameW:dword
        extrn '__imp__K32GetModuleBaseNameA@16' as K32GetModuleBaseNameA:dword
        extrn '__imp__K32GetModuleBaseNameW@16' as K32GetModuleBaseNameW:dword
        extrn '__imp__K32GetModuleFileNameExA@16' as K32GetModuleFileNameExA:dword
        extrn '__imp__K32GetModuleFileNameExW@16' as K32GetModuleFileNameExW:dword
        extrn '__imp__K32GetModuleInformation@16' as K32GetModuleInformation:dword
        extrn '__imp__K32GetPerformanceInfo@8' as K32GetPerformanceInfo:dword
        extrn '__imp__K32GetProcessImageFileNameA@12' as K32GetProcessImageFileNameA:dword
        extrn '__imp__K32GetProcessImageFileNameW@12' as K32GetProcessImageFileNameW:dword
        extrn '__imp__K32GetProcessMemoryInfo@12' as K32GetProcessMemoryInfo:dword
        extrn '__imp__K32GetWsChanges@12' as K32GetWsChanges:dword
        extrn '__imp__K32GetWsChangesEx@12' as K32GetWsChangesEx:dword
        extrn '__imp__K32InitializeProcessForWsWatch@4' as K32InitializeProcessForWsWatch:dword
        extrn '__imp__K32QueryWorkingSet@12' as K32QueryWorkingSet:dword
        extrn '__imp__K32QueryWorkingSetEx@12' as K32QueryWorkingSetEx:dword
        extrn '__imp__LoadAppInitDlls@0' as LoadAppInitDlls:dword
        extrn '__imp__NotifyUILanguageChange@20' as NotifyUILanguageChange:dword
        extrn '__imp__PowerClearRequest@8' as PowerClearRequest:dword
        extrn '__imp__PowerCreateRequest@4' as PowerCreateRequest:dword
        extrn '__imp__PowerSetRequest@8' as PowerSetRequest:dword
        extrn '__imp__QueryIdleProcessorCycleTimeEx@12' as QueryIdleProcessorCycleTimeEx:dword
        extrn '__imp__QueryThreadProfiling@8' as QueryThreadProfiling:dword
        extrn '__imp__QueryThreadpoolStackInformation@8' as QueryThreadpoolStackInformation:dword
        extrn '__imp__QueryUnbiasedInterruptTime@4' as QueryUnbiasedInterruptTime:dword
        extrn '__imp__RaiseFailFastException@12' as RaiseFailFastException:dword
        extrn '__imp__ReadThreadProfilingData@12' as ReadThreadProfilingData:dword
        extrn '__imp__RegCloseKey@4' as RegCloseKey:dword
        extrn '__imp__ResolveLocaleName@12' as ResolveLocaleName:dword
        extrn '__imp__RtlCompareMemory@12' as RtlCompareMemory:dword
        extrn '__imp__RtlCopyMemory@12' as RtlCopyMemory:dword
        extrn '__imp__SetProcessPreferredUILanguages@12' as SetProcessPreferredUILanguages:dword
        if (NTDDI_VERSION < NTDDI_WIN8)
            extrn '__imp__SetProcessUserModeExceptionPolicy@4' as SetProcessUserModeExceptionPolicy:dword
        end if
        extrn '__imp__SetSearchPathMode@4' as SetSearchPathMode:dword
        extrn '__imp__SetStdHandleEx@12' as SetStdHandleEx:dword
        extrn '__imp__SetThreadErrorMode@8' as SetThreadErrorMode:dword
        extrn '__imp__SetThreadGroupAffinity@12' as SetThreadGroupAffinity:dword
        extrn '__imp__SetThreadIdealProcessorEx@12' as SetThreadIdealProcessorEx:dword
        extrn '__imp__SetThreadpoolStackInformation@8' as SetThreadpoolStackInformation:dword
        extrn '__imp__SystemTimeToTzSpecificLocalTimeEx@12' as SystemTimeToTzSpecificLocalTimeEx:dword
        extrn '__imp__TryAcquireSRWLockExclusive@4' as TryAcquireSRWLockExclusive:dword
        extrn '__imp__TryAcquireSRWLockShared@4' as TryAcquireSRWLockShared:dword
        extrn '__imp__TzSpecificLocalTimeToSystemTimeEx@12' as TzSpecificLocalTimeToSystemTimeEx:dword
        extrn '__imp__WerRegisterRuntimeExceptionModule@8' as WerRegisterRuntimeExceptionModule:dword
        extrn '__imp__WerUnregisterRuntimeExceptionModule@8' as WerUnregisterRuntimeExceptionModule:dword
        extrn '__imp__Wow64GetThreadSelectorEntry@12' as Wow64GetThreadSelectorEntry:dword
        CopyMemory equ RtlCopyMemory

        api K32EnumPageFiles,\
            K32GetDeviceDriverBaseName,\
            K32GetDeviceDriverFileName,\
            K32GetMappedFileName,\
            K32GetModuleBaseName,\
            K32GetModuleFileNameEx,\
            K32GetProcessImageFileName
    end if

    if (NTDDI_VERSION >= NTDDI_WIN7SP1)
        extrn '__imp__CopyContext@12' as CopyContext:dword
        extrn '__imp__GetEnabledXStateFeatures@0' as GetEnabledXStateFeatures:dword
        extrn '__imp__GetXStateFeaturesMask@8' as GetXStateFeaturesMask:dword
        extrn '__imp__InitializeContext@16' as InitializeContext:dword
        extrn '__imp__LocateXStateFeature@12' as LocateXStateFeature:dword
        extrn '__imp__SetXStateFeaturesMask@8' as SetXStateFeaturesMask:dword
    end if

    if (NTDDI_VERSION >= NTDDI_WIN8)
        if (NTDDI_VERSION = NTDDI_WIN8)
            extrn '__imp__AcquireStateLock@4' as AcquireStateLock:dword
        end if
        extrn '__imp__AddResourceAttributeAce@28' as AddResourceAttributeAce:dword
        extrn '__imp__AddScopedPolicyIDAce@20' as AddScopedPolicyIDAce:dword
        if (NTDDI_VERSION = NTDDI_WIN8)
            extrn '__imp__CalloutOnFiberStack@12' as CalloutOnFiberStack:dword
            extrn '__imp__CopyExtendedContext@12' as CopyExtendedContext:dword
        end if
        extrn '__imp__CeipIsOptedIn@0' as CeipIsOptedIn:dword
        extrn '__imp__CheckTokenCapability@12' as CheckTokenCapability:dword
        extrn '__imp__CheckTokenMembershipEx@16' as CheckTokenMembershipEx:dword
        extrn '__imp__ClosePackageInfo@4' as ClosePackageInfo:dword
        extrn '__imp__CopyFile2@12' as CopyFile2:dword
        extrn '__imp__CreateFile2@20' as CreateFile2:dword
        extrn '__imp__CreateFileMappingFromApp@20' as CreateFileMappingFromApp:dword
        extrn '__imp__GetAppContainerNamedObjectPath@20' as GetAppContainerNamedObjectPath:dword
        extrn '__imp__GetApplicationUserModelId@12' as GetApplicationUserModelId:dword
        extrn '__imp__GetCachedSigningLevel@24' as GetCachedSigningLevel:dword
        extrn '__imp__GetCurrentApplicationUserModelId@8' as GetCurrentApplicationUserModelId:dword
        extrn '__imp__GetCurrentPackageFamilyName@8' as GetCurrentPackageFamilyName:dword
        extrn '__imp__GetCurrentPackageFullName@8' as GetCurrentPackageFullName:dword
        extrn '__imp__GetCurrentPackageId@8' as GetCurrentPackageId:dword
        extrn '__imp__GetCurrentPackageInfo@16' as GetCurrentPackageInfo:dword
        extrn '__imp__GetCurrentPackagePath@8' as GetCurrentPackagePath:dword
        extrn '__imp__GetCurrentThreadStackLimits@8' as GetCurrentThreadStackLimits:dword
        extrn '__imp__GetFirmwareEnvironmentVariableExA@20' as GetFirmwareEnvironmentVariableExA:dword
        extrn '__imp__GetFirmwareEnvironmentVariableExW@20' as GetFirmwareEnvironmentVariableExW:dword
        extrn '__imp__GetFirmwareType@4' as GetFirmwareType:dword
        extrn '__imp__GetMemoryErrorHandlingCapabilities@4' as GetMemoryErrorHandlingCapabilities:dword
        extrn '__imp__GetOverlappedResultEx@20' as GetOverlappedResultEx:dword
        extrn '__imp__GetPackageFamilyName@12' as GetPackageFamilyName:dword
        extrn '__imp__GetPackageFullName@12' as GetPackageFullName:dword
        extrn '__imp__GetPackageId@12' as GetPackageId:dword
        extrn '__imp__GetPackageInfo@20' as GetPackageInfo:dword
        extrn '__imp__GetPackagePath@16' as GetPackagePath:dword
        extrn '__imp__GetPackagesByPackageFamily@20' as GetPackagesByPackageFamily:dword
        extrn '__imp__GetProcessInformation@16' as GetProcessInformation:dword
        extrn '__imp__GetProcessMitigationPolicy@16' as GetProcessMitigationPolicy:dword
        extrn '__imp__GetSystemTimePreciseAsFileTime@4' as GetSystemTimePreciseAsFileTime:dword
        extrn '__imp__GetThreadInformation@16' as GetThreadInformation:dword
        extrn '__imp__GlobalAddAtomExA@8' as GlobalAddAtomExA:dword
        extrn '__imp__GlobalAddAtomExW@8' as GlobalAddAtomExW:dword
        extrn '__imp__InterlockedPushListSListEx@16' as InterlockedPushListSListEx:dword
        extrn '__imp__IsNativeVhdBoot@4' as IsNativeVhdBoot:dword
        extrn '__imp__IsValidNLSVersion@12' as IsValidNLSVersion:dword
        extrn '__imp__LoadPackagedLibrary@8' as LoadPackagedLibrary:dword
        extrn '__imp__MapViewOfFileFromApp@16' as MapViewOfFileFromApp:dword
        extrn '__imp__OpenPackageInfoByFullName@12' as OpenPackageInfoByFullName:dword
        extrn '__imp__PackageFamilyNameFromFullName@12' as PackageFamilyNameFromFullName:dword
        extrn '__imp__PackageFamilyNameFromId@12' as PackageFamilyNameFromId:dword
        extrn '__imp__PackageFullNameFromId@12' as PackageFullNameFromId:dword
        extrn '__imp__PackageIdFromFullName@16' as PackageIdFromFullName:dword
        extrn '__imp__PackageNameAndPublisherIdFromFamilyName@20' as PackageNameAndPublisherIdFromFamilyName:dword
        extrn '__imp__PrefetchVirtualMemory@16' as PrefetchVirtualMemory:dword
        extrn '__imp__RegCopyTreeW@12' as RegCopyTreeW:dword
        extrn '__imp__RegisterBadMemoryNotification@4' as RegisterBadMemoryNotification:dword
        extrn '__imp__RestoreLastError@4' as RestoreLastError:dword
        extrn '__imp__SetCachedSigningLevel@16' as SetCachedSigningLevel:dword
        extrn '__imp__SetFirmwareEnvironmentVariableExA@20' as SetFirmwareEnvironmentVariableExA:dword
        extrn '__imp__SetFirmwareEnvironmentVariableExW@20' as SetFirmwareEnvironmentVariableExW:dword
        extrn '__imp__SetProcessInformation@16' as SetProcessInformation:dword
        extrn '__imp__SetProcessMitigationPolicy@12' as SetProcessMitigationPolicy:dword
        extrn '__imp__SetThreadInformation@16' as SetThreadInformation:dword
        extrn '__imp__UnregisterBadMemoryNotification@4' as UnregisterBadMemoryNotification:dword
        api GetFirmwareEnvironmentVariableEx,\
            GlobalAddAtomEx,\
            SetFirmwareEnvironmentVariableEx
    end if

    if (NTDDI_VERSION >= NTDDI_WIN81)
        extrn '__imp__DeleteSynchronizationBarrier@4' as DeleteSynchronizationBarrier:dword
        extrn '__imp__EnterSynchronizationBarrier@8' as EnterSynchronizationBarrier:dword
        extrn '__imp__FindPackagesByPackageFamily@28' as FindPackagesByPackageFamily:dword
        extrn '__imp__FormatApplicationUserModelId@16' as FormatApplicationUserModelId:dword
        extrn '__imp__GetPackageApplicationIds@16' as GetPackageApplicationIds:dword
        extrn '__imp__GetPackagePathByFullName@12' as GetPackagePathByFullName:dword
        extrn '__imp__GetStagedPackagePathByFullName@12' as GetStagedPackagePathByFullName:dword
        extrn '__imp__InitializeSynchronizationBarrier@12' as InitializeSynchronizationBarrier:dword
        extrn '__imp__InstallELAMCertificateInfo@4' as InstallELAMCertificateInfo:dword
        extrn '__imp__IsProcessCritical@8' as IsProcessCritical:dword
        extrn '__imp__OOBEComplete@4' as OOBEComplete:dword
        extrn '__imp__ParseApplicationUserModelId@20' as ParseApplicationUserModelId:dword
        extrn '__imp__PssCaptureSnapshot@16' as PssCaptureSnapshot:dword
        extrn '__imp__PssDuplicateSnapshot@20' as PssDuplicateSnapshot:dword
        extrn '__imp__PssFreeSnapshot@8' as PssFreeSnapshot:dword
        extrn '__imp__PssQuerySnapshot@16' as PssQuerySnapshot:dword
        extrn '__imp__PssWalkMarkerCreate@8' as PssWalkMarkerCreate:dword
        extrn '__imp__PssWalkMarkerFree@4' as PssWalkMarkerFree:dword
        extrn '__imp__PssWalkMarkerGetPosition@8' as PssWalkMarkerGetPosition:dword
        extrn '__imp__PssWalkMarkerSeekToBeginning@4' as PssWalkMarkerSeekToBeginning:dword
        extrn '__imp__PssWalkMarkerSetPosition@8' as PssWalkMarkerSetPosition:dword
        extrn '__imp__PssWalkSnapshot@20' as PssWalkSnapshot:dword
        extrn '__imp__RegisterWaitUntilOOBECompleted@12' as RegisterWaitUntilOOBECompleted:dword
        extrn '__imp__UnregisterWaitUntilOOBECompleted@4' as UnregisterWaitUntilOOBECompleted:dword
    end if

    if (NTDDI_VERSION >= NTDDI_WIN10)
        extrn '__imp__CreateEnclave@32' as CreateEnclave:dword
        extrn '__imp__DiscardVirtualMemory@8' as DiscardVirtualMemory:dword
        extrn '__imp__FreeMemoryJobObject@4' as FreeMemoryJobObject:dword
        extrn '__imp__GetProcessDefaultCpuSets@16' as GetProcessDefaultCpuSets:dword
        extrn '__imp__GetSystemCpuSetInformation@20' as GetSystemCpuSetInformation:dword
        extrn '__imp__GetThreadSelectedCpuSets@16' as GetThreadSelectedCpuSets:dword
        extrn '__imp__InitializeEnclave@20' as InitializeEnclave:dword
        extrn '__imp__IsEnclaveTypeSupported@4' as IsEnclaveTypeSupported:dword
        extrn '__imp__LoadEnclaveData@36' as LoadEnclaveData:dword
        extrn '__imp__OfferVirtualMemory@12' as OfferVirtualMemory:dword
        extrn '__imp__QueryIoRateControlInformationJobObject@16' as QueryIoRateControlInformationJobObject:dword
        extrn '__imp__QueryProtectedPolicy@8' as QueryProtectedPolicy:dword
        extrn '__imp__ReclaimVirtualMemory@8' as ReclaimVirtualMemory:dword
        extrn '__imp__SetIoRateControlInformationJobObject@8' as SetIoRateControlInformationJobObject:dword
        extrn '__imp__SetProcessDefaultCpuSets@12' as SetProcessDefaultCpuSets:dword
        extrn '__imp__SetProtectedPolicy@12' as SetProtectedPolicy:dword
        extrn '__imp__SetThreadSelectedCpuSets@12' as SetThreadSelectedCpuSets:dword
        extrn '__imp__WaitForDebugEventEx@8' as WaitForDebugEventEx:dword
    end if

    api AddAtom,\
        BeginUpdateResource,\
        BuildCommDCB,\
        BuildCommDCBAndTimeouts,\
        CallNamedPipe,\
        CommConfigDialog,\
        CompareString,\
        CopyFile,\
        CreateDirectory,\
        CreateDirectoryEx,\
        CreateEvent,\
        CreateFile,\
        CreateFileMapping,\
        CreateMailslot,\
        CreateMutex,\
        CreateNamedPipe,\
        CreateProcess,\
        CreateSemaphore,\
        DefineDosDevice,\
        DeleteFile,\
        EndUpdateResource,\
        EnumCalendarInfo,\
        EnumDateFormats,\
        EnumResourceLanguages,\
        EnumResourceNames,\
        EnumResourceTypes,\
        EnumSystemCodePages,\
        EnumSystemLocales,\
        EnumTimeFormats,\
        ExpandEnvironmentStrings,\
        FatalAppExit,\
        FillConsoleOutputCharacter,\
        FindAtom,\
        FindFirstChangeNotification,\
        FindFirstFile,\
        FindNextFile,\
        FindResource,\
        FindResourceEx,\
        FoldString,\
        FormatMessage,\
        FreeEnvironmentStrings,\
        GetAtomName,\
        GetBinaryType,\
        GetCommandLine,\
        GetCompressedFileSize,\
        GetComputerName,\
        GetConsoleTitle,\
        GetCurrencyFormat,\
        GetCurrentDirectory,\
        GetDateFormat,\
        GetDefaultCommConfig,\
        GetDiskFreeSpace,\
        GetDiskFreeSpaceEx,\
        GetDriveType,\
        GetEnvironmentStrings,\
        GetEnvironmentVariable,\
        GetFileAttributes,\
        GetFullPathName,\
        GetLocaleInfo,\
        GetLogicalDriveStrings,\
        GetModuleFileName,\
        GetModuleHandle,\
        GetNamedPipeHandleState,\
        GetNumberFormat,\
        GetPrivateProfileInt,\
        GetPrivateProfileSection,\
        GetPrivateProfileSectionNames,\
        GetPrivateProfileString,\
        GetPrivateProfileStruct,\
        GetProfileInt,\
        GetProfileSection,\
        GetProfileString,\
        GetShortPathName,\
        GetStartupInfo,\
        GetStringType,\
        GetStringTypeEx,\
        GetSystemDirectory,\
        GetTempFileName,\
        GetTempPath,\
        GetTimeFormat,\
        GetVersionEx,\
        GetVolumeInformation,\
        GetWindowsDirectory,\
        GlobalAddAtom,\
        GlobalFindAtom,\
        GlobalGetAtomName,\
        IsBadStringPtr,\
        LCMapString,\
        LoadLibrary,\
        LoadLibraryEx,\
        lstrcat,\
        lstrcmp,\
        lstrcmpi,\
        lstrcpy,\
        lstrcpyn,\
        lstrlen,\
        MoveFile,\
        MoveFileEx,\
        OpenEvent,\
        OpenFileMapping,\
        OpenMutex,\
        OpenSemaphore,\
        OutputDebugString,\
        PeekConsoleInput,\
        QueryDosDevice,\
        ReadConsole,\
        ReadConsoleInput,\
        ReadConsoleOutput,\
        ReadConsoleOutputCharacter,\
        RemoveDirectory,\
        ScrollConsoleScreenBuffer,\
        SearchPath,\
        SetComputerName,\
        SetConsoleTitle,\
        SetCurrentDirectory,\
        SetDefaultCommConfig,\
        SetEnvironmentVariable,\
        SetFileAttributes,\
        SetLocaleInfo,\
        SetVolumeLabel,\
        UpdateResource,\
        WaitNamedPipe,\
        WriteConsole,\
        WriteConsoleInput,\
        WriteConsoleOutput,\
        WriteConsoleOutputCharacter,\
        WritePrivateProfileSection,\
        WritePrivateProfileString,\
        WritePrivateProfileStruct,\
        WriteProfileSection,\
        WriteProfileString
end if

;======================= Undocumented functions (unknown arguments) =======================;
;if defined APP_WIN64
;    if  ~defined __imp___misaligned_access
;        extrn '__imp___misaligned_access' as __misaligned_access:qword
;    end if
;    extrn '__imp_ActivateActCtxWorker' as ActivateActCtxWorker:qword
;    extrn '__imp_AddRefActCtxWorker' as AddRefActCtxWorker:qword
;    extrn '__imp_AppContainerDeriveSidFromMoniker' as AppContainerDeriveSidFromMoniker:qword
;    extrn '__imp_AppContainerFreeMemory' as AppContainerFreeMemory:qword
;    extrn '__imp_AppContainerLookupDisplayNameMrtReference' as AppContainerLookupDisplayNameMrtReference:qword
;    extrn '__imp_AppContainerLookupMoniker' as AppContainerLookupMoniker:qword
;    extrn '__imp_AppContainerRegisterSid' as AppContainerRegisterSid:qword
;    extrn '__imp_AppContainerUnregisterSid' as AppContainerUnregisterSid:qword
;    extrn '__imp_AppXFreeMemory' as AppXFreeMemory:qword
;    extrn '__imp_AppXGetApplicationData' as AppXGetApplicationData:qword
;    extrn '__imp_AppXGetDevelopmentMode' as AppXGetDevelopmentMode:qword
;    extrn '__imp_AppXGetOSMaxVersionTested' as AppXGetOSMaxVersionTested:qword
;    extrn '__imp_AppXGetOSMinVersion' as AppXGetOSMinVersion:qword
;    extrn '__imp_AppXGetPackageCapabilities' as AppXGetPackageCapabilities:qword
;    extrn '__imp_AppXGetPackageSid' as AppXGetPackageSid:qword
;    extrn '__imp_AppXGetPackageState' as AppXGetPackageState:qword
;    extrn '__imp_AppXLookupDisplayName' as AppXLookupDisplayName:qword
;    extrn '__imp_AppXLookupMoniker' as AppXLookupMoniker:qword
;    extrn '__imp_AppXSetPackageState' as AppXSetPackageState:qword
;    extrn '__imp_BaseCheckAppcompatCache' as BaseCheckAppcompatCache:qword
;    extrn '__imp_BaseCheckAppcompatCacheEx' as BaseCheckAppcompatCacheEx:qword
;    extrn '__imp_BaseCheckAppcompatCacheExWorker' as BaseCheckAppcompatCacheExWorker:qword
;    extrn '__imp_BaseCheckAppcompatCacheWorker' as BaseCheckAppcompatCacheWorker:qword
;    extrn '__imp_BaseCheckElevation' as BaseCheckElevation:qword
;    extrn '__imp_BaseCheckRunApp' as BaseCheckRunApp:qword
;    extrn '__imp_BaseCleanupAppcompatCacheSupport' as BaseCleanupAppcompatCacheSupport:qword
;    extrn '__imp_BaseCleanupAppcompatCacheSupportWorker' as BaseCleanupAppcompatCacheSupportWorker:qword
;    extrn '__imp_BaseDestroyVDMEnvironment' as BaseDestroyVDMEnvironment:qword
;    extrn '__imp_BaseDllReadWriteIniFile' as BaseDllReadWriteIniFile:qword
;    extrn '__imp_BaseDumpAppcompatCache' as BaseDumpAppcompatCache:qword
;    extrn '__imp_BaseDumpAppcompatCacheWorker' as BaseDumpAppcompatCacheWorker:qword
;    extrn '__imp_BaseElevationPostProcessing' as BaseElevationPostProcessing:qword
;    extrn '__imp_BaseFlushAppcompatCache' as BaseFlushAppcompatCache:qword
;    extrn '__imp_BaseFlushAppcompatCacheWorker' as BaseFlushAppcompatCacheWorker:qword
;    extrn '__imp_BaseFormatObjectAttributes' as BaseFormatObjectAttributes:qword
;    extrn '__imp_BaseFreeAppCompatDataForProcessWorker' as BaseFreeAppCompatDataForProcessWorker:qword
;    extrn '__imp_BaseGenerateAppCompatData' as BaseGenerateAppCompatData:qword
;    extrn '__imp_BaseInitAppcompatCacheSupport' as BaseInitAppcompatCacheSupport:qword
;    extrn '__imp_BaseInitAppcompatCacheSupportWorker' as BaseInitAppcompatCacheSupportWorker:qword
;    extrn '__imp_BaseIsAppcompatInfrastructureDisabled' as BaseIsAppcompatInfrastructureDisabled:qword
;    extrn '__imp_BaseIsAppcompatInfrastructureDisabledWorker' as BaseIsAppcompatInfrastructureDisabledWorker:qword
;    extrn '__imp_BaseIsDosApplication' as BaseIsDosApplication:qword
;    extrn '__imp_BaseProcessInitPostImport' as BaseProcessInitPostImport:qword
;    extrn '__imp_BaseProcessStart' as BaseProcessStart:qword
;    extrn '__imp_BaseQueryModuleData' as BaseQueryModuleData:qword
;    extrn '__imp_BaseReadAppCompatDataForProcessWorker' as BaseReadAppCompatDataForProcessWorker:qword
;    extrn '__imp_BaseSetLastNTError' as BaseSetLastNTError:qword
;    extrn '__imp_BaseThreadInitThunk' as BaseThreadInitThunk:qword
;    extrn '__imp_BaseThreadStart' as BaseThreadStart:qword
;    extrn '__imp_BaseUpdateAppcompatCache' as BaseUpdateAppcompatCache:qword
;    extrn '__imp_BaseUpdateAppcompatCacheWorker' as BaseUpdateAppcompatCacheWorker:qword
;    extrn '__imp_BaseUpdateVDMEntry' as BaseUpdateVDMEntry:qword
;    extrn '__imp_BaseVerifyUnicodeString' as BaseVerifyUnicodeString:qword
;    extrn '__imp_BaseWriteErrorElevationRequiredEvent' as BaseWriteErrorElevationRequiredEvent:qword
;    extrn '__imp_BasepAllocateActivationContextActivationBlock' as BasepAllocateActivationContextActivationBlock:qword
;    extrn '__imp_BasepAnsiStringToDynamicUnicodeString' as BasepAnsiStringToDynamicUnicodeString:qword
;    extrn '__imp_BasepAppCompatHookDLL' as BasepAppCompatHookDLL:qword
;    extrn '__imp_BasepAppContainerEnvironmentExtension' as BasepAppContainerEnvironmentExtension:qword
;    extrn '__imp_BasepAppXExtension' as BasepAppXExtension:qword
;    extrn '__imp_BasepCheckAppCompat' as BasepCheckAppCompat:qword
;    extrn '__imp_BasepCheckBadapp' as BasepCheckBadapp:qword
;    extrn '__imp_BasepCheckWebBladeHashes' as BasepCheckWebBladeHashes:qword
;    extrn '__imp_BasepCheckWinSaferRestrictions' as BasepCheckWinSaferRestrictions:qword
;    extrn '__imp_BasepConstructSxsCreateProcessMessage' as BasepConstructSxsCreateProcessMessage:qword
;    extrn '__imp_BasepCopyEncryption' as BasepCopyEncryption:qword
;    extrn '__imp_BasepFreeActivationContextActivationBlock' as BasepFreeActivationContextActivationBlock:qword
;    extrn '__imp_BasepFreeAppCompatData' as BasepFreeAppCompatData:qword
;    extrn '__imp_BasepGetAppCompatData' as BasepGetAppCompatData:qword
;    extrn '__imp_BasepGetComputerNameFromNtPath' as BasepGetComputerNameFromNtPath:qword
;    extrn '__imp_BasepGetExeArchType' as BasepGetExeArchType:qword
;    extrn '__imp_BasepIsProcessAllowed' as BasepIsProcessAllowed:qword
;    extrn '__imp_BasepMapModuleHandle' as BasepMapModuleHandle:qword
;    extrn '__imp_BasepNotifyLoadStringResource' as BasepNotifyLoadStringResource:qword
;    extrn '__imp_BasepPostSuccessAppXExtension' as BasepPostSuccessAppXExtension:qword
;    extrn '__imp_BasepProcessInvalidImage' as BasepProcessInvalidImage:qword
;    extrn '__imp_BasepQueryAppCompat' as BasepQueryAppCompat:qword
;    extrn '__imp_BasepReleaseAppXContext' as BasepReleaseAppXContext:qword
;    extrn '__imp_BasepReleaseSxsCreateProcessUtilityStruct' as BasepReleaseSxsCreateProcessUtilityStruct:qword
;    extrn '__imp_BasepReportFault' as BasepReportFault:qword
;    extrn '__imp_BasepSetFileEncryptionCompression' as BasepSetFileEncryptionCompression:qword
;    extrn '__imp_CancelTimerQueueTimer' as CancelTimerQueueTimer:qword
;    extrn '__imp_CheckAllowDecryptedRemoteDestinationPolicy' as CheckAllowDecryptedRemoteDestinationPolicy:qword
;    extrn '__imp_CheckElevation' as CheckElevation:qword
;    extrn '__imp_CheckForReadOnlyResource' as CheckForReadOnlyResource:qword
;    extrn '__imp_CheckForReadOnlyResourceFilter' as CheckForReadOnlyResourceFilter:qword
;    extrn '__imp_CloseConsoleHandle' as CloseConsoleHandle:qword
;    extrn '__imp_CloseState' as CloseState:qword
;    extrn '__imp_CloseStateAtom' as CloseStateAtom:qword
;    extrn '__imp_CloseStateChangeNotification' as CloseStateChangeNotification:qword
;    extrn '__imp_CloseStateContainer' as CloseStateContainer:qword
;    extrn '__imp_CloseStateLock' as CloseStateLock:qword
;    extrn '__imp_CmdBatNotification' as CmdBatNotification:qword
;    extrn '__imp_CommitStateAtom' as CommitStateAtom:qword
;    extrn '__imp_CompareCalendarDates' as CompareCalendarDates:qword
;    extrn '__imp_ConsoleIMERoutine' as ConsoleIMERoutine:qword
;    extrn '__imp_ConvertNLSDayOfWeekToWin32DayOfWeek' as ConvertNLSDayOfWeekToWin32DayOfWeek:qword
;    extrn '__imp_CreateActCtxWWorker' as CreateActCtxWWorkerqword
;    extrn '__imp_CreateNlsSecurityDescriptor' as CreateNlsSecurityDescriptor:qword
;    extrn '__imp_CreateSocketHandle' as CreateSocketHandle:qword
;    extrn '__imp_CreateStateAtom' as CreateStateAtom:qword
;    extrn '__imp_CreateStateChangeNotification' as CreateStateChangeNotification:qword
;    extrn '__imp_CreateStateContainer' as CreateStateContainer:qword
;    extrn '__imp_CreateStateLock' as CreateStateLock:qword
;    extrn '__imp_CreateStateSubcontainer' as CreateStateSubcontainer:qword
;    extrn '__imp_CtrlRoutine' as CtrlRoutine:qword
;    extrn '__imp_DeactivateActCtxWorker' as DeactivateActCtxWorker:qword
;    extrn '__imp_DeleteStateAtomValue' as DeleteStateAtomValue:qword
;    extrn '__imp_DeleteStateContainer' as DeleteStateContainer:qword
;    extrn '__imp_DeleteStateContainerValue' as DeleteStateContainerValue:qword
;    extrn '__imp_DnsHostnameToComputerNameExW' as DnsHostnameToComputerNameExW:qword
;    extrn '__imp_DuplicateEncryptionInfoFileExt' as DuplicateEncryptionInfoFileExt:qword
;    extrn '__imp_DuplicateStateContainerHandle' as DuplicateStateContainerHandle:qword
;    extrn '__imp_EnumerateStateAtomValues' as EnumerateStateAtomValues:qword
;    extrn '__imp_EnumerateStateContainerItems' as EnumerateStateContainerItems:qword
;    extrn '__imp_FindActCtxSectionGuidWorker' as FindActCtxSectionGuidWorker:qword
;    extrn '__imp_FindActCtxSectionStringWWorker' as FindActCtxSectionStringWWorker:qword
;    extrn '__imp_GetAppContainerAce' as GetAppContainerAceqword
;    extrn '__imp_GetApplicationRecoveryCallbackWorker' as GetApplicationRecoveryCallbackWorker:qword
;    extrn '__imp_GetApplicationRestartSettingsWorker' as GetApplicationRestartSettingsWorker:qword
;    extrn '__imp_GetCalendarDateFormat' as GetCalendarDateFormat:qword
;    extrn '__imp_GetCalendarDaysInMonth' as GetCalendarDaysInMonth:qword
;    extrn '__imp_GetCalendarDifferenceInDays' as GetCalendarDifferenceInDays:qword
;    extrn '__imp_GetCalendarMonthsInYear' as GetCalendarMonthsInYear:qword
;    extrn '__imp_GetCalendarWeekNumber' as GetCalendarWeekNumber:qword
;    extrn '__imp_GetConsoleCharType' as GetConsoleCharType:qword
;    extrn '__imp_GetConsoleCommandHistoryA' as GetConsoleCommandHistoryA:qword
;    extrn '__imp_GetConsoleCommandHistoryW' as GetConsoleCommandHistoryW:qword
;    extrn '__imp_GetConsoleCommandHistoryLengthA' as GetConsoleCommandHistoryLengthA:qword
;    extrn '__imp_GetConsoleCommandHistoryLengthW' as GetConsoleCommandHistoryLengthW:qword
;    extrn '__imp_GetConsoleCursorMode' as GetConsoleCursorMode:qword
;    extrn '__imp_GetConsoleHardwareState' as GetConsoleHardwareState:qword
;    extrn '__imp_GetConsoleInputExeNameA' as GetConsoleInputExeNameA:qword
;    extrn '__imp_GetConsoleInputExeNameW' as GetConsoleInputExeNameW:qword
;    extrn '__imp_GetConsoleInputWaitHandle' as GetConsoleInputWaitHandle:qword
;    extrn '__imp_GetConsoleKeyboardLayoutNameA' as GetConsoleKeyboardLayoutNameA:qword
;    extrn '__imp_GetConsoleKeyboardLayoutNameW' as GetConsoleKeyboardLayoutNameW:qword
;    extrn '__imp_GetCPFileNameFromRegistry' as GetCPFileNameFromRegistry:qword
;    extrn '__imp_GetCurrentActCtxWorker' as GetCurrentActCtxWorker:qword
;    extrn '__imp_GetDateFormatAWorker' as GetDateFormatAWorker:qword
;    extrn '__imp_GetDateFormatWWorker' as GetDateFormatWWorkerqword
;    extrn '__imp_GetDefaultSortkeySize' as GetDefaultSortkeySize:qword
;    extrn '__imp_GetEncryptedFileVersionExt' as GetEncryptedFileVersionExt:qword
;    extrn '__imp_GetEraNameCountedString' as GetEraNameCountedString:qword
;    extrn '__imp_GetHivePath' as GetHivePath:qword
;    extrn '__imp_GetLinguistLangSize' as GetLinguistLangSize:qword
;    extrn '__imp_GetNlsSectionName' as GetNlsSectionName:qword
;    extrn '__imp_GetRoamingLastObservedChangeTime' as GetRoamingLastObservedChangeTime:qword
;    extrn '__imp_GetSerializedAtomBytes' as GetSerializedAtomBytes:qword
;    extrn '__imp_GetStateContainerDepth' as GetStateContainerDepth:qword
;    extrn '__imp_GetStateFolder' as GetStateFolder:qword
;    extrn '__imp_GetStateRootFolder' as GetStateRootFolder:qword
;    extrn '__imp_GetStateSettingsFolder' as GetStateSettingsFolder:qword
;    extrn '__imp_GetStateVersion' as GetStateVersion:qword
;    extrn '__imp_GetSystemAppDataFolder' as GetSystemAppDataFolder:qword
;    extrn '__imp_GetSystemAppDataKey' as GetSystemAppDataKey:qword
;    extrn '__imp_GetTimeFormatAWorker' as GetTimeFormatAWorker:qword
;    extrn '__imp_GetTimeFormatWWorker' as GetTimeFormatWWorker:qword
;    extrn '__imp_HeapSummary' as HeapSummary:qword
;    extrn '__imp_HeapCreateTagsW' as HeapCreateTagsW:qword
;    extrn '__imp_HeapExtend' as HeapExtend:qword
;    extrn '__imp_HeapQueryTagW' as HeapQueryTagW:qword
;    extrn '__imp_HeapUsage' as HeapUsage:qword
;    extrn '__imp_IsValidUILanguage' as IsValidUILanguage:qword
;    extrn '__imp_NlsCheckPolicy' as NlsCheckPolicy:qword
;    extrn '__imp_NlsConvertIntegerToString' as NlsConvertIntegerToString:qword
;    extrn '__imp_NlsEventDataDescCreate' as NlsEventDataDescCreate:qword
;    extrn '__imp_NlsGetCacheUpdateCount' as NlsGetCacheUpdateCount:qword
;    extrn '__imp_NlsResetProcessLocale' as NlsResetProcessLocale:qword
;    extrn '__imp_NlsUpdateLocale' as NlsUpdateLocale:qword
;    extrn '__imp_NlsUpdateSystemLocale' as NlsUpdateSystemLocale:qword
;    extrn '__imp_NlsWriteEtwEvent' as NlsWriteEtwEvent:qword
;    extrn '__imp_NotifyMountMgr' as NotifyMountMgr:qword
;    extrn '__imp_NtVdm64CreateProcessInternalW' as NtVdm64CreateProcessInternalW:qword
;    extrn '__imp_OpenConsoleWStub' as OpenConsoleWStub:qword
;    extrn '__imp_OpenState' as OpenState:qword
;    extrn '__imp_OpenStateAtom' as OpenStateAtom:qword
;    extrn '__imp_OpenStateExplicit' as OpenStateExplicit:qword
;    extrn '__imp_OverrideRoamingDataModificationTimesInRange' as OverrideRoamingDataModificationTimesInRange:qword
;    extrn '__imp_PssWalkMarkerRewind' as PssWalkMarkerRewind:qword
;    extrn '__imp_PssWalkMarkerSeek' as PssWalkMarkerSeek:qword
;    extrn '__imp_PssWalkMarkerTell' as PssWalkMarkerTell:qword
;    extrn '__imp_PrivMoveFileIdentityW' as PrivMoveFileIdentityW:qword
;    extrn '__imp_PublishStateChangeNotification' as PublishStateChangeNotification:qword
;    extrn '__imp_QueryActCtxSettingsWWorker' as QueryActCtxSettingsWWorker:qword
;    extrn '__imp_QueryActCtxWWorker' as QueryActCtxWWorker:qword
;    extrn '__imp_QueryStateAtomValueInfo' as QueryStateAtomValueInfo:qword
;    extrn '__imp_QueryStateContainerItemInfo' as QueryStateContainerItemInfo:qword
;    extrn '__imp_QuirkGetData2Worker' as QuirkGetData2Worker:qword
;    extrn '__imp_QuirkGetDataWorker' as QuirkGetDataWorker:qword
;    extrn '__imp_QuirkIsEnabled2Worker' as QuirkIsEnabled2Worker:qword
;    extrn '__imp_QuirkIsEnabled3Worker' as QuirkIsEnabled3Worker:qword
;    extrn '__imp_QuirkIsEnabledForPackage2Worker' as QuirkIsEnabledForPackage2Worker:qword
;    extrn '__imp_QuirkIsEnabledForPackage3Worker' as QuirkIsEnabledForPackage3Worker:qword
;    extrn '__imp_QuirkIsEnabledForPackage4Worker' as QuirkIsEnabledForPackage4Worker:qword
;    extrn '__imp_QuirkIsEnabledForPackageWorker' as QuirkIsEnabledForPackageWorker:qword
;    extrn '__imp_QuirkIsEnabledForProcessWorker' as QuirkIsEnabledForProcessWorker:qword
;    extrn '__imp_QuirkIsEnabledWorker' as QuirkIsEnabledWorker:qword
;    extrn '__imp_RaiseInvalid16BitExeError' as RaiseInvalid16BitExeError:qword
;    extrn '__imp_ReadStateAtomValue' as ReadStateAtomValue:qword
;    extrn '__imp_ReadStateContainerValue' as ReadStateContainerValue:qword
;    extrn '__imp_RegisterConsoleIME' as RegisterConsoleIME:qword
;    extrn '__imp_RegisterConsoleOS2' as RegisterConsoleOS2:qword
;    extrn '__imp_RegisterConsoleVDM' as RegisterConsoleOS2:qword
;    extrn '__imp_RegisterStateChangeNotification' as RegisterStateChangeNotification:qword
;    extrn '__imp_RegisterStateLock' as RegisterStateLock:qword
;    extrn '__imp_RegisterWaitForInputIdle' as RegisterWaitForInputIdle:qword
;    extrn '__imp_RegisterWaitForSingleObjectEx' as RegisterWaitForSingleObjectEx:qword
;    extrn '__imp_RegisterWowBaseHandlers' as RegisterWowBaseHandlers:qword
;    extrn '__imp_RegisterWowExec' as RegisterWowExec:qword
;    extrn '__imp_RegKrnGetGlobalState' as RegKrnGetGlobalState:qword
;    extrn '__imp_RegKrnInitialize' as RegKrnInitialize:qword
;    extrn '__imp_ReleaseActCtxWorker' as ReleaseActCtxWorker:qword
;    extrn '__imp_ReleaseStateLock' as ReleaseStateLock:qword
;    extrn '__imp_RemoveLocalAlternateComputerNameA' as RemoveLocalAlternateComputerNameA:qword
;    extrn '__imp_RemoveLocalAlternateComputerNameW' as RemoveLocalAlternateComputerNameW:qword
;    extrn '__imp_ResetState' as ResetState:qword
;    extrn '__imp_SetClientDynamicTimeZoneInformation' as SetClientDynamicTimeZoneInformation:qword
;    extrn '__imp_SetClientTimeZoneInformation' as SetClientTimeZoneInformation:qword
;    extrn '__imp_SetComPlusPackageInstallStatus' as SetComPlusPackageInstallStatus:qword
;    extrn '__imp_SetComputerNameEx2W' as SetComputerNameEx2W:qword
;    extrn '__imp_SetConsoleCommandHistoryMode' as SetComputerNameEx2W:qword
;    extrn '__imp_SetConsoleCursorMode' as SetConsoleCursorMode:qword
;    extrn '__imp_SetConsoleInputExeNameA' as SetConsoleInputExeNameA:qword
;    extrn '__imp_SetConsoleInputExeNameW' as SetConsoleInputExeNameW:qword
;    extrn '__imp_SetConsoleKeyShortcuts' as SetConsoleKeyShortcuts:qword
;    extrn '__imp_SetConsoleLocalEUDC' as SetConsoleLocalEUDC:qword
;    extrn '__imp_SetConsoleMenuClose' as SetConsoleMenuClose:qword
;    extrn '__imp_SetCPGlobal' as SetCPGlobal:qword
;    extrn '__imp_SetRoamingLastObservedChangeTime' as SetRoamingLastObservedChangeTime:qword
;    extrn '__imp_SetStateVersion' as SetStateVersion:qword
;    extrn '__imp_SetThreadpoolTimerEx' as SetThreadpoolTimerEx:qword
;    extrn '__imp_SetVolumeMountPointWStub' as SetVolumeMountPointWStub:qword
;    extrn '__imp_SetWaitableTimerEx' as SetWaitableTimerEx:qword
;    extrn '__imp_SortCloseHandle' as SortCloseHandle:qword
;    extrn '__imp_SortGetHandle' as SortGetHandle:qword
;    extrn '__imp_SubscribeStateChangeNotification' as SubscribeStateChangeNotification:qword
;    extrn '__imp_TermsrvConvertSysRootToUserDir' as TermsrvConvertSysRootToUserDir:qword
;    extrn '__imp_TermsrvAppInstallMode' as TermsrvAppInstallMode:qword
;    extrn '__imp_TermsrvCreateRegEntry' as TermsrvCreateRegEntry:qword
;    extrn '__imp_TermsrvDeleteKey' as TermsrvDeleteKey:qword
;    extrn '__imp_TermsrvDeleteValue' as TermsrvDeleteValue:qword
;    extrn '__imp_TermsrvGetPreSetValue' as TermsrvGetPreSetValue:qword
;    extrn '__imp_TermsrvGetWindowsDirectoryA' as TermsrvGetWindowsDirectoryA:qword
;    extrn '__imp_TermsrvGetWindowsDirectoryW' as TermsrvGetWindowsDirectoryW:qword
;    extrn '__imp_TermsrvOpenRegEntry' as TermsrvOpenRegEntry:qword
;    extrn '__imp_TermsrvOpenUserClasses' as TermsrvOpenUserClasses:qword
;    extrn '__imp_TermsrvRestoreKey' as TermsrvRestoreKey:qword
;    extrn '__imp_TermsrvSetKeySecurity' as TermsrvSetKeySecurity:qword
;    extrn '__imp_TermsrvSetValueKey' as TermsrvSetValueKey:qword
;    extrn '__imp_TermsrvSyncUserIniFileExt' as TermsrvSyncUserIniFileExt:qword
;    extrn '__imp_UnmapViewOfFileEx' as UnmapViewOfFileEx:qword
;    extrn '__imp_UnregisterConsoleIME' as UnregisterConsoleIME:qword
;    extrn '__imp_UTRegister' as UTRegister:qword
;    extrn '__imp_UTUnRegister' as UTUnRegister:qword
;    extrn '__imp_UnregisterStateChangeNotification' as UnregisterStateChangeNotification:qword
;    extrn '__imp_UnregisterStateLock' as UnregisterStateLock:qword
;    extrn '__imp_UnsubscribeStateChangeNotification' as UnsubscribeStateChangeNotification:qword
;    extrn '__imp_ValidateLCType' as ValidateLCType:qword
;    extrn '__imp_ValidateLocale' as ValidateLocale:qword
;    extrn '__imp_VDMConsoleOperation' as VDMConsoleOperation:qword
;    extrn '__imp_VDMOperationStarted' as VDMOperationStarted:qword
;    extrn '__imp_VerifyConsoleIoHandle' as VerifyConsoleIoHandle:qword
;    extrn '__imp_WerGetFlagsWorker' as WerGetFlagsWorker:qword
;    extrn '__imp_WerRegisterFileWorker' as WerGetFlagsWorker:qword
;    extrn '__imp_WerRegisterMemoryBlockWorker' as WerRegisterMemoryBlockWorker:qword
;    extrn '__imp_WerRegisterRuntimeExceptionModuleWorker' as WerRegisterRuntimeExceptionModuleWorker:qword
;    extrn '__imp_WerSetFlagsWorker' as WerSetFlagsWorker:qword
;    extrn '__imp_WerUnregisterFileWorker' as WerUnregisterFileWorker:qword
;    extrn '__imp_WerUnregisterMemoryBlockWorker' as WerUnregisterMemoryBlockWorker:qword
;    extrn '__imp_WerUnregisterRuntimeExceptionModuleWorker' as WerUnregisterRuntimeExceptionModuleWorker:qword
;    extrn '__imp_WerpCleanupMessageMapping' as WerpCleanupMessageMapping:qword
;    extrn '__imp_WerpGetDebugger' as WerpGetDebugger:qword
;    extrn '__imp_WerpInitiateRemoteRecovery' as WerpInitiateRemoteRecovery:qword
;    extrn '__imp_WerpLaunchAeDebug' as WerpLaunchAeDebug:qword
;    extrn '__imp_WerpNotifyLoadStringResource' as WerpNotifyLoadStringResource:qword
;    extrn '__imp_WerpNotifyLoadStringResourceEx' as WerpNotifyLoadStringResourceEx:qword
;    extrn '__imp_WerpNotifyLoadStringResourceWorker' as WerpNotifyLoadStringResourceWorker:qword
;    extrn '__imp_WerpNotifyUseStringResource' as WerpNotifyUseStringResource:qword
;    extrn '__imp_WerpNotifyUseStringResourceWorker' as WerpNotifyUseStringResourceWorker:qword
;    extrn '__imp_WerpStringLookup' as WerpStringLookup:qword
;    extrn '__imp_WriteConsoleInputVDMA' as WriteConsoleInputVDMA:qword
;    extrn '__imp_WriteConsoleInputVDMW' as WriteConsoleInputVDMW:qword
;    extrn '__imp_WriteStateAtomValue' as WriteStateAtomValue:qword
;    extrn '__imp_WriteStateContainerValue' as WriteStateContainerValue:qword
;    extrn '__imp_ZombifyActCtxWorker' as ZombifyActCtxWorker:qword
;else
;    extrn '__imp__ActivateActCtxWorker@??' as ActivateActCtxWorker:dword
;    extrn '__imp__AddRefActCtxWorker@??' as AddRefActCtxWorker:dword
;    extrn '__imp__AppContainerDeriveSidFromMoniker@??' as AppContainerDeriveSidFromMoniker:dword
;    extrn '__imp__AppContainerFreeMemory@??' as AppContainerFreeMemory:dword
;    extrn '__imp__AppContainerLookupDisplayNameMrtReference@??' as AppContainerLookupDisplayNameMrtReference:dword
;    extrn '__imp__AppContainerLookupMoniker@??' as AppContainerLookupMoniker:dword
;    extrn '__imp__AppContainerRegisterSid@??' as AppContainerRegisterSid:dword
;    extrn '__imp__AppContainerUnregisterSid@??' as AppContainerUnregisterSid:dword
;    extrn '__imp__AppXFreeMemory@??' as AppXFreeMemory:dword
;    extrn '__imp__AppXGetApplicationData@??' as AppXGetApplicationData:dword
;    extrn '__imp__AppXGetDevelopmentMode@??' as AppXGetDevelopmentMode:dword
;    extrn '__imp__AppXGetOSMaxVersionTested@??' as AppXGetOSMaxVersionTested:dword
;    extrn '__imp__AppXGetOSMinVersion@??' as AppXGetOSMinVersion:dword
;    extrn '__imp__AppXGetPackageCapabilities@??' as AppXGetPackageCapabilities:dword
;    extrn '__imp__AppXGetPackageSid@??' as AppXGetPackageSid:dword
;    extrn '__imp__AppXGetPackageState@??' as AppXGetPackageState:dword
;    extrn '__imp__AppXLookupDisplayName@??' as AppXLookupDisplayName:dword
;    extrn '__imp__AppXLookupMoniker@??' as AppXLookupMoniker:dword
;    extrn '__imp__AppXSetPackageState@??' as AppXSetPackageState:dword
;    extrn '__imp__BaseCheckAppcompatCache@??' as BaseCheckAppcompatCache:dword
;    extrn '__imp__BaseCheckAppcompatCacheEx@??' as BaseCheckAppcompatCacheEx:dword
;    extrn '__imp__BaseCheckAppcompatCacheExWorker@??' as BaseCheckAppcompatCacheExWorker:dword
;    extrn '__imp__BaseCheckAppcompatCacheWorker@??' as BaseCheckAppcompatCacheWorker:dword
;    extrn '__imp__BaseCheckElevation@??' as BaseCheckElevation:dword
;    extrn '__imp__BaseCheckRunApp@??' as BaseCheckRunApp:dword
;    extrn '__imp__BaseCleanupAppcompatCacheSupport@??' as BaseCleanupAppcompatCacheSupport:dword
;    extrn '__imp__BaseCleanupAppcompatCacheSupportWorker@??' as BaseCleanupAppcompatCacheSupportWorker:dword
;    extrn '__imp__BaseDestroyVDMEnvironment@??' as BaseDestroyVDMEnvironment:dword
;    extrn '__imp__BaseDllReadWriteIniFile@??' as BaseDllReadWriteIniFile:dword
;    extrn '__imp__BaseDumpAppcompatCache@??' as BaseDumpAppcompatCache:dword
;    extrn '__imp__BaseDumpAppcompatCacheWorker@??' as BaseDumpAppcompatCacheWorker:dword
;    extrn '__imp__BaseElevationPostProcessing@??' as BaseElevationPostProcessing:dword
;    extrn '__imp__BaseFlushAppcompatCache@??' as BaseFlushAppcompatCache:dword
;    extrn '__imp__BaseFlushAppcompatCacheWorker@??' as BaseFlushAppcompatCacheWorker:dword
;    extrn '__imp__BaseFormatObjectAttributes@??' as BaseFormatObjectAttributes:dword
;    extrn '__imp__BasepFreeAppCompatData@??' as BasepFreeAppCompatData:dword
;    extrn '__imp__BaseGenerateAppCompatData@??' as BaseGenerateAppCompatData:dword
;    extrn '__imp__BaseInitAppcompatCacheSupport@??' as BaseInitAppcompatCacheSupport:dword
;    extrn '__imp__BaseInitAppcompatCacheSupportWorker@??' as BaseInitAppcompatCacheSupportWorker:dword
;    extrn '__imp__BaseIsAppcompatInfrastructureDisabled@??' as BaseIsAppcompatInfrastructureDisabled:dword
;    extrn '__imp__BaseIsAppcompatInfrastructureDisabledWorker@??' as BaseIsAppcompatInfrastructureDisabledWorker:dword
;    extrn '__imp__BaseIsDosApplication@??' as BaseIsDosApplication:dword
;    extrn '__imp__BaseProcessInitPostImport@??' as BaseProcessInitPostImport:dword
;    extrn '__imp__BaseProcessStart@??' as BaseProcessStart:dword
;    extrn '__imp__BaseQueryModuleData@??' as BaseQueryModuleData:dword
;    extrn '__imp__BaseReadAppCompatDataForProcessWorker@??' as BaseReadAppCompatDataForProcessWorker:dword
;    extrn '__imp__BaseSetLastNTError@??' as BaseSetLastNTError:dword
;    extrn '__imp__BaseThreadInitThunk@??' as BaseThreadInitThunk:dword
;    extrn '__imp__BaseThreadStart@??' as BaseThreadStart:dword
;    extrn '__imp__BaseUpdateAppcompatCache@??' as BaseUpdateAppcompatCache:dword
;    extrn '__imp__BaseUpdateAppcompatCacheWorker@??' as BaseUpdateAppcompatCacheWorker:dword
;    extrn '__imp__BaseUpdateVDMEntry@??' as BaseUpdateVDMEntry:dword
;    extrn '__imp__BaseVerifyUnicodeString@??' as BaseVerifyUnicodeString:dword
;    extrn '__imp__BaseWriteErrorElevationRequiredEvent@??' as BaseWriteErrorElevationRequiredEvent:dword
;    extrn '__imp__BasepAllocateActivationContextActivationBlock@??' as BasepAllocateActivationContextActivationBlock:dword
;    extrn '__imp__BasepAnsiStringToDynamicUnicodeString@??' as BasepAnsiStringToDynamicUnicodeString:dword
;    extrn '__imp__BasepAppCompatHookDLL@??' as BasepAppCompatHookDLL:dword
;    extrn '__imp__BasepAppContainerEnvironmentExtension@??' as BasepAppContainerEnvironmentExtension:dword
;    extrn '__imp__BasepAppXExtension@??' as BasepAppXExtension:dword
;    extrn '__imp__BasepCheckAppCompat@??' as BasepCheckAppCompat:dword
;    extrn '__imp__BasepCheckBadapp@??' as BasepCheckBadapp:dword
;    extrn '__imp__BasepCheckWebBladeHashes@??' as BasepCheckWebBladeHashes:dword
;    extrn '__imp__BasepCheckWinSaferRestrictions@??' as BasepCheckWinSaferRestrictions:dword
;    extrn '__imp__BasepConstructSxsCreateProcessMessage@??' as BasepConstructSxsCreateProcessMessage:dword
;    extrn '__imp__BasepCopyEncryption@??' as BasepCopyEncryption:dword
;    extrn '__imp__BasepFreeActivationContextActivationBlock@??' as BasepFreeActivationContextActivationBlock:dword
;    extrn '__imp__BaseFreeAppCompatDataForProcessWorker@??' as BaseFreeAppCompatDataForProcessWorker:dword
;    extrn '__imp__BasepGetAppCompatData@??' as BasepGetAppCompatData:dword
;    extrn '__imp__BasepGetComputerNameFromNtPath@??' as BasepGetComputerNameFromNtPath:dword
;    extrn '__imp__BasepGetExeArchType@??' as BasepGetExeArchType:dword
;    extrn '__imp__BasepIsProcessAllowed@??' as BasepIsProcessAllowed:dword
;    extrn '__imp__BasepMapModuleHandle@??' as BasepMapModuleHandle:dword
;    extrn '__imp__BasepNotifyLoadStringResource@??' as BasepNotifyLoadStringResource:dword
;    extrn '__imp__BasepPostSuccessAppXExtension@??' as BasepPostSuccessAppXExtension:dword
;    extrn '__imp__BasepProcessInvalidImage@??' as BasepProcessInvalidImage:dword
;    extrn '__imp__BasepQueryAppCompat@??' as BasepQueryAppCompat:dword
;    extrn '__imp__BasepReleaseAppXContext@??' as BasepReleaseAppXContext:dword
;    extrn '__imp__BasepReleaseSxsCreateProcessUtilityStruct@??' as BasepReleaseSxsCreateProcessUtilityStruct:dword
;    extrn '__imp__BasepReportFault@??' as BasepReportFault:dword
;    extrn '__imp__BasepSetFileEncryptionCompression@??' as BasepSetFileEncryptionCompression:dword
;    extrn '__imp__CancelTimerQueueTimer@??' as CancelTimerQueueTimer:dword
;    extrn '__imp__CheckAllowDecryptedRemoteDestinationPolicy@??' as CheckAllowDecryptedRemoteDestinationPolicy:dword
;    extrn '__imp__CheckElevation@??' as CheckElevation:dword
;    extrn '__imp__CheckForReadOnlyResource@??' as CheckForReadOnlyResource:dword
;    extrn '__imp__CheckForReadOnlyResourceFilter@??' as CheckForReadOnlyResourceFilter:dword
;    extrn '__imp__CloseConsoleHandle@??' as CloseConsoleHandle:dword
;    extrn '__imp__CloseState@??' as CloseState:dword
;    extrn '__imp__CloseStateAtom@??' as CloseStateAtom:dword
;    extrn '__imp__CloseStateChangeNotification@??' as CloseStateChangeNotification:dword
;    extrn '__imp__CloseStateContainer@??' as CloseStateContainer:dword
;    extrn '__imp__CloseStateLock@??' as CloseStateLock:dword
;    extrn '__imp__CmdBatNotification@??' as CmdBatNotification:dword
;    extrn '__imp__CommitStateAtom@??' as CommitStateAtom:dword
;    extrn '__imp__CompareCalendarDates@??' as CompareCalendarDates:dword
;    extrn '__imp__ConsoleIMERoutine@??' as ConsoleIMERoutine:dword
;    extrn '__imp__ConvertNLSDayOfWeekToWin32DayOfWeek@??' as ConvertNLSDayOfWeekToWin32DayOfWeek:dword
;    extrn '__imp__CreateActCtxWWorker@??' as CreateActCtxWWorkerqword
;    extrn '__imp__CreateNlsSecurityDescriptor@??' as CreateNlsSecurityDescriptor:dword
;    extrn '__imp__CreateSocketHandle@??' as CreateSocketHandle:dword
;    extrn '__imp__CreateStateAtom@??' as CreateStateAtom:dword
;    extrn '__imp__CreateStateChangeNotification@??' as CreateStateChangeNotification:dword
;    extrn '__imp__CreateStateContainer@??' as CreateStateContainer:dword
;    extrn '__imp__CreateStateLock@??' as CreateStateLock:dword
;    extrn '__imp__CreateStateSubcontainer@??' as CreateStateSubcontainer:dword
;    extrn '__imp__CtrlRoutine@??' as CtrlRoutine:dword
;    extrn '__imp__DeactivateActCtxWorker@??' as DeactivateActCtxWorker:dword
;    extrn '__imp__DeleteStateAtomValue@??' as DeleteStateAtomValue:dword
;    extrn '__imp__DeleteStateContainer@??' as DeleteStateContainer:dword
;    extrn '__imp__DeleteStateContainerValue@??' as DeleteStateContainerValue:dword
;    extrn '__imp__DnsHostnameToComputerNameExW@??' as DnsHostnameToComputerNameExW:dword
;    extrn '__imp__DuplicateEncryptionInfoFileExt@??' as DuplicateEncryptionInfoFileExt:dword
;    extrn '__imp__DuplicateStateContainerHandle@??' as DuplicateStateContainerHandle:dword
;    extrn '__imp__EnumerateStateAtomValues@??' as EnumerateStateAtomValues:dword
;    extrn '__imp__EnumerateStateContainerItems@??' as EnumerateStateContainerItems:dword
;    extrn '__imp__FindActCtxSectionGuidWorker@??' as FindActCtxSectionGuidWorker:dword
;    extrn '__imp__FindActCtxSectionStringWWorker@??' as FindActCtxSectionStringWWorker:dword
;    extrn '__imp__GetAppContainerAce@??' as GetAppContainerAceqword
;    extrn '__imp__GetApplicationRecoveryCallbackWorker@??' as GetApplicationRecoveryCallbackWorker:dword
;    extrn '__imp__GetApplicationRestartSettingsWorker@??' as GetApplicationRestartSettingsWorker:dword
;    extrn '__imp__GetCalendarDateFormat@??' as GetCalendarDateFormat:dword
;    extrn '__imp__GetCalendarDaysInMonth@??' as GetCalendarDaysInMonth:dword
;    extrn '__imp__GetCalendarDifferenceInDays@??' as GetCalendarDifferenceInDays:dword
;    extrn '__imp__GetCalendarMonthsInYear@??' as GetCalendarMonthsInYear:dword
;    extrn '__imp__GetCalendarWeekNumber@??' as GetCalendarWeekNumber:dword
;    extrn '__imp__GetConsoleCharType@??' as GetConsoleCharType:dword
;    extrn '__imp__GetConsoleCommandHistoryA@??' as GetConsoleCommandHistoryA:dword
;    extrn '__imp__GetConsoleCommandHistoryW@??' as GetConsoleCommandHistoryW:dword
;    extrn '__imp__GetConsoleCommandHistoryLengthA@??' as GetConsoleCommandHistoryLengthA:dword
;    extrn '__imp__GetConsoleCommandHistoryLengthW@??' as GetConsoleCommandHistoryLengthW:dword
;    extrn '__imp__GetConsoleCursorMode@??' as GetConsoleCursorMode:dword
;    extrn '__imp__GetConsoleHardwareState@??' as GetConsoleHardwareState:dword
;    extrn '__imp__GetConsoleInputExeNameA@??' as GetConsoleInputExeNameA:dword
;    extrn '__imp__GetConsoleInputExeNameW@??' as GetConsoleInputExeNameW:dword
;    extrn '__imp__GetConsoleInputWaitHandle@??' as GetConsoleInputWaitHandle:dword
;    extrn '__imp__GetConsoleKeyboardLayoutNameA@??' as GetConsoleKeyboardLayoutNameA:dword
;    extrn '__imp__GetConsoleKeyboardLayoutNameW@??' as GetConsoleKeyboardLayoutNameW:dword
;    extrn '__imp__GetCPFileNameFromRegistry@??' as GetCPFileNameFromRegistry:dword
;    extrn '__imp__GetCurrentActCtxWorker@??' as GetCurrentActCtxWorker:dword
;    extrn '__imp__GetDateFormatAWorker@??' as GetDateFormatAWorker:dword
;    extrn '__imp__GetDateFormatWWorker@??' as GetDateFormatWWorkerqword
;    extrn '__imp__GetDefaultSortkeySize@??' as GetDefaultSortkeySize:dword
;    extrn '__imp__GetEncryptedFileVersionExt@??' as GetEncryptedFileVersionExt:dword
;    extrn '__imp__GetEraNameCountedString@??' as GetEraNameCountedString:dword
;    extrn '__imp__GetHivePath@??' as GetHivePath:dword
;    extrn '__imp__GetLinguistLangSize@??' as GetLinguistLangSize:dword
;    extrn '__imp__GetNlsSectionName@??' as GetNlsSectionName:dword
;    extrn '__imp__GetRoamingLastObservedChangeTime@??' as GetRoamingLastObservedChangeTime:dword
;    extrn '__imp__GetSerializedAtomBytes@??' as GetSerializedAtomBytes:dword
;    extrn '__imp__GetStateContainerDepth@??' as GetStateContainerDepth:dword
;    extrn '__imp__GetStateFolder@??' as GetStateFolder:dword
;    extrn '__imp__GetStateRootFolder@??' as GetStateRootFolder:dword
;    extrn '__imp__GetStateSettingsFolder@??' as GetStateSettingsFolder:dword
;    extrn '__imp__GetStateVersion@??' as GetStateVersion:dword
;    extrn '__imp__GetSystemAppDataFolder@??' as GetSystemAppDataFolder:dword
;    extrn '__imp__GetSystemAppDataKey@??' as GetSystemAppDataKey:dword
;    extrn '__imp__GetTimeFormatAWorker@??' as GetTimeFormatAWorker:dword
;    extrn '__imp__GetTimeFormatWWorker@??' as GetTimeFormatWWorker:dword
;    extrn '__imp__HeapSummary@??' as HeapSummary:dword
;    extrn '__imp__HeapCreateTagsW@??' as HeapCreateTagsW:dword
;    extrn '__imp__HeapExtend@??' as HeapExtend:dword
;    extrn '__imp__HeapQueryTagW@??' as HeapQueryTagW:dword
;    extrn '__imp__HeapUsage@??' as HeapUsage:dword
;    extrn '__imp__IsValidUILanguage@??' as IsValidUILanguage:dword
;    extrn '__imp__NlsCheckPolicy@??' as NlsCheckPolicy:dword
;    extrn '__imp__NlsConvertIntegerToString@??' as NlsConvertIntegerToString:dword
;    extrn '__imp__NlsEventDataDescCreate@??' as NlsEventDataDescCreate:dword
;    extrn '__imp__NlsGetCacheUpdateCount@??' as NlsGetCacheUpdateCount:dword
;    extrn '__imp__NlsResetProcessLocale@??' as NlsResetProcessLocale:dword
;    extrn '__imp__NlsUpdateLocale@??' as NlsUpdateLocale:dword
;    extrn '__imp__NlsUpdateSystemLocale@??' as NlsUpdateSystemLocale:dword
;    extrn '__imp__NlsWriteEtwEvent@??' as NlsWriteEtwEvent:dword
;    extrn '__imp__NotifyMountMgr@??' as NotifyMountMgr:dword
;    extrn '__imp__NtVdm64CreateProcessInternalW@??' as NtVdm64CreateProcessInternalW:dword
;    extrn '__imp__OpenConsoleWStub@??' as OpenConsoleWStub:dword
;    extrn '__imp__OpenState@??' as OpenState:dword
;    extrn '__imp__OpenStateAtom@??' as OpenStateAtom:dword
;    extrn '__imp__OpenStateExplicit@??' as OpenStateExplicit:dword
;    extrn '__imp__OverrideRoamingDataModificationTimesInRange@??' as OverrideRoamingDataModificationTimesInRange:dword
;    extrn '__imp__PssWalkMarkerRewind@??' as PssWalkMarkerRewind:dword
;    extrn '__imp__PssWalkMarkerSeek@??' as PssWalkMarkerSeek:dword
;    extrn '__imp__PssWalkMarkerTell@??' as PssWalkMarkerTell:dword
;    extrn '__imp__PrivMoveFileIdentityW@??' as PrivMoveFileIdentityW:dword
;    extrn '__imp__PublishStateChangeNotification@??' as PublishStateChangeNotification:dword
;    extrn '__imp__QueryActCtxSettingsWWorker@??' as QueryActCtxSettingsWWorker:dword
;    extrn '__imp__QueryActCtxWWorker@??' as QueryActCtxWWorker:dword
;    extrn '__imp__QueryStateAtomValueInfo@??' as QueryStateAtomValueInfo:dword
;    extrn '__imp__QueryStateContainerItemInfo@??' as QueryStateContainerItemInfo:dword
;    extrn '__imp__QuirkGetData2Worker@??' as QuirkGetData2Worker:dword
;    extrn '__imp__QuirkGetDataWorker@??' as QuirkGetDataWorker:dword
;    extrn '__imp__QuirkIsEnabled2Worker@??' as QuirkIsEnabled2Worker:dword
;    extrn '__imp__QuirkIsEnabled3Worker@??' as QuirkIsEnabled3Worker:dword
;    extrn '__imp__QuirkIsEnabledForPackage2Worker@??' as QuirkIsEnabledForPackage2Worker:dword
;    extrn '__imp__QuirkIsEnabledForPackage3Worker@??' as QuirkIsEnabledForPackage3Worker:dword
;    extrn '__imp__QuirkIsEnabledForPackage4Worker@??' as QuirkIsEnabledForPackage4Worker:dword
;    extrn '__imp__QuirkIsEnabledForPackageWorker@??' as QuirkIsEnabledForPackageWorker:dword
;    extrn '__imp__QuirkIsEnabledForProcessWorker@??' as QuirkIsEnabledForProcessWorker:dword
;    extrn '__imp__QuirkIsEnabledWorker@??' as QuirkIsEnabledWorker:dword
;    extrn '__imp__RaiseInvalid16BitExeError@??' as RaiseInvalid16BitExeError:dword
;    extrn '__imp__ReadStateAtomValue@??' as ReadStateAtomValue:dword
;    extrn '__imp__ReadStateContainerValue@??' as ReadStateContainerValue:dword
;    extrn '__imp__RegisterConsoleIME@??' as RegisterConsoleIME:dword
;    extrn '__imp__RegisterConsoleOS2@??' as RegisterConsoleOS2:dword
;    extrn '__imp__RegisterConsoleVDM@??' as RegisterConsoleOS2:dword
;    extrn '__imp__RegisterStateChangeNotification@??' as RegisterStateChangeNotification:dword
;    extrn '__imp__RegisterStateLock@??' as RegisterStateLock:dword
;    extrn '__imp__RegisterWaitForInputIdle@??' as RegisterWaitForInputIdle:dword
;    extrn '__imp__RegisterWaitForSingleObjectEx@??' as RegisterWaitForSingleObjectEx:dword
;    extrn '__imp__RegisterWowBaseHandlers@??' as RegisterWowBaseHandlers:dword
;    extrn '__imp__RegisterWowExec@??' as RegisterWowExec:dword
;    extrn '__imp__RegKrnGetGlobalState@??' as RegKrnGetGlobalState:dword
;    extrn '__imp__RegKrnInitialize@??' as RegKrnInitialize:dword
;    extrn '__imp__ReleaseActCtxWorker@??' as ReleaseActCtxWorker:dword
;    extrn '__imp__ReleaseStateLock@??' as ReleaseStateLock:dword
;    extrn '__imp__RemoveLocalAlternateComputerNameA@??' as RemoveLocalAlternateComputerNameA:dword
;    extrn '__imp__RemoveLocalAlternateComputerNameW@??' as RemoveLocalAlternateComputerNameW:dword
;    extrn '__imp__ResetState@??' as ResetState:dword
;    extrn '__imp__SetClientDynamicTimeZoneInformation@??' as SetClientDynamicTimeZoneInformation:dword
;    extrn '__imp__SetClientTimeZoneInformation@??' as SetClientTimeZoneInformation:dword
;    extrn '__imp__SetComPlusPackageInstallStatus@??' as SetComPlusPackageInstallStatus:dword
;    extrn '__imp__SetComputerNameEx2W@??' as SetComputerNameEx2W:dword
;    extrn '__imp__SetConsoleCommandHistoryMode@??' as SetComputerNameEx2W:dword
;    extrn '__imp__SetConsoleCursorMode@??' as SetConsoleCursorMode:dword
;    extrn '__imp__SetConsoleInputExeNameA@??' as SetConsoleInputExeNameA:dword
;    extrn '__imp__SetConsoleInputExeNameW@??' as SetConsoleInputExeNameW:dword
;    extrn '__imp__SetConsoleKeyShortcuts@??' as SetConsoleKeyShortcuts:dword
;    extrn '__imp__SetConsoleLocalEUDC@??' as SetConsoleLocalEUDC:dword
;    extrn '__imp__SetConsoleMenuClose@??' as SetConsoleMenuClose:dword
;    extrn '__imp__SetCPGlobal@??' as SetCPGlobal:dword
;    extrn '__imp__SetRoamingLastObservedChangeTime@??' as SetRoamingLastObservedChangeTime:dword
;    extrn '__imp__SetStateVersion@??' as SetStateVersion:dword
;    extrn '__imp__SetThreadpoolTimerEx@??' as SetThreadpoolTimerEx:dword
;    extrn '__imp__SetVolumeMountPointWStub@??' as SetVolumeMountPointWStub:dword
;    extrn '__imp__SetWaitableTimerEx@??' as SetWaitableTimerEx:dword
;    extrn '__imp__SortCloseHandle@??' as SortCloseHandle:dword
;    extrn '__imp__SortGetHandle@??' as SortGetHandle:dword
;    extrn '__imp__SubscribeStateChangeNotification@??' as SubscribeStateChangeNotification:dword
;    extrn '__imp__TermsrvConvertSysRootToUserDir@??' as TermsrvConvertSysRootToUserDir:dword
;    extrn '__imp__TermsrvAppInstallMode@??' as TermsrvAppInstallMode:dword
;    extrn '__imp__TermsrvCreateRegEntry@??' as TermsrvCreateRegEntry:dword
;    extrn '__imp__TermsrvDeleteKey@??' as TermsrvDeleteKey:dword
;    extrn '__imp__TermsrvDeleteValue@??' as TermsrvDeleteValue:dword
;    extrn '__imp__TermsrvGetPreSetValue@??' as TermsrvGetPreSetValue:dword
;    extrn '__imp__TermsrvGetWindowsDirectoryA@??' as TermsrvGetWindowsDirectoryA:dword
;    extrn '__imp__TermsrvGetWindowsDirectoryW@??' as TermsrvGetWindowsDirectoryW:dword
;    extrn '__imp__TermsrvOpenRegEntry@??' as TermsrvOpenRegEntry:dword
;    extrn '__imp__TermsrvOpenUserClasses@??' as TermsrvOpenUserClasses:dword
;    extrn '__imp__TermsrvRestoreKey@??' as TermsrvRestoreKey:dword
;    extrn '__imp__TermsrvSetKeySecurity@??' as TermsrvSetKeySecurity:dword
;    extrn '__imp__TermsrvSetValueKey@??' as TermsrvSetValueKey:dword
;    extrn '__imp__TermsrvSyncUserIniFileExt@??' as TermsrvSyncUserIniFileExt:dword
;    extrn '__imp__UnmapViewOfFileEx@??' as UnmapViewOfFileEx:dword
;    extrn '__imp__UnregisterConsoleIME@??' as UnregisterConsoleIME:dword
;    extrn '__imp__UTRegister@??' as UTRegister:dword
;    extrn '__imp__UTUnRegister@??' as UTUnRegister:dword
;    extrn '__imp__UnregisterStateChangeNotification@??' as UnregisterStateChangeNotification:dword
;    extrn '__imp__UnregisterStateLock@??' as UnregisterStateLock:dword
;    extrn '__imp__UnsubscribeStateChangeNotification@??' as UnsubscribeStateChangeNotification:dword
;    extrn '__imp__ValidateLCType@??' as ValidateLCType:dword
;    extrn '__imp__ValidateLocale@??' as ValidateLocale:dword
;    extrn '__imp__VDMConsoleOperation@??' as VDMConsoleOperation:dword
;    extrn '__imp__VDMOperationStarted@??' as VDMOperationStarted:dword
;    extrn '__imp__VerifyConsoleIoHandle@??' as VerifyConsoleIoHandle:dword
;    extrn '__imp__WerGetFlagsWorker@??' as WerGetFlagsWorker:dword
;    extrn '__imp__WerRegisterFileWorker@??' as WerGetFlagsWorker:dword
;    extrn '__imp__WerRegisterMemoryBlockWorker@??' as WerRegisterMemoryBlockWorker:dword
;    extrn '__imp__WerRegisterRuntimeExceptionModuleWorker@??' as WerRegisterRuntimeExceptionModuleWorker:dword
;    extrn '__imp__WerSetFlagsWorker@??' as WerSetFlagsWorker:dword
;    extrn '__imp__WerUnregisterFileWorker@??' as WerUnregisterFileWorker:dword
;    extrn '__imp__WerUnregisterMemoryBlockWorker@??' as WerUnregisterMemoryBlockWorker:dword
;    extrn '__imp__WerUnregisterRuntimeExceptionModuleWorker@??' as WerUnregisterRuntimeExceptionModuleWorker:dword
;    extrn '__imp__WerpCleanupMessageMapping@??' as WerpCleanupMessageMapping:dword
;    extrn '__imp__WerpGetDebugger@??' as WerpGetDebugger:dword
;    extrn '__imp__WerpInitiateRemoteRecovery@??' as WerpInitiateRemoteRecovery:dword
;    extrn '__imp__WerpLaunchAeDebug@??' as WerpLaunchAeDebug:dword
;    extrn '__imp__WerpNotifyLoadStringResource@??' as WerpNotifyLoadStringResource:dword
;    extrn '__imp__WerpNotifyLoadStringResourceEx@??' as WerpNotifyLoadStringResourceEx:dword
;    extrn '__imp__WerpNotifyLoadStringResourceWorker@??' as WerpNotifyLoadStringResourceWorker:dword
;    extrn '__imp__WerpNotifyUseStringResource@??' as WerpNotifyUseStringResource:dword
;    extrn '__imp__WerpNotifyUseStringResourceWorker@??' as WerpNotifyUseStringResourceWorker:dword
;    extrn '__imp__WerpStringLookup@??' as WerpStringLookup:dword
;    extrn '__imp__WriteConsoleInputVDMA@??' as WriteConsoleInputVDMA:dword
;    extrn '__imp__WriteConsoleInputVDMW@??' as WriteConsoleInputVDMW:dword
;    extrn '__imp__WriteStateAtomValue@??' as WriteStateAtomValue:dword
;    extrn '__imp__WriteStateContainerValue@??' as WriteStateContainerValue:dword
;    extrn '__imp__ZombifyActCtxWorker@??' as ZombifyActCtxWorker:dword
;end if

;api GetConsoleCommandHistory,\
;    GetConsoleCommandHistoryLength,\
;    GetConsoleInputExeName,\
;    GetConsoleKeyboardLayoutName,\
;    RemoveLocalAlternateComputerName,\
;    SetConsoleInputExeName,\
;    TermsrvGetWindowsDirectory,\
;    WriteConsoleInputVDM

end if ;KERNEL32_INC
