Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

224 lines
5.1 KiB

4 years ago
  1. ;
  2. ; takernel.asm
  3. ;
  4. ; Copyright(C) 1993,1994 Microsoft Corporation.
  5. ; All Rights Reserved.
  6. ;
  7. ; HISTORY:
  8. ; Created: 01/27/94 - MarkRi
  9. ;
  10. ;
  11. ;
  12. ;
  13. ;
  14. ; This file contains assembly language functions for the APIs which do not
  15. ; have known prototypes, or are un-loggable due to calling convention problems.
  16. ;
  17. .386
  18. _DATA SEGMENT DWORD USE32 PUBLIC 'DATA'
  19. Module dd 0
  20. ModName db 'KERNEL32',0
  21. _DATA ENDS
  22. _TEXT SEGMENT DWORD USE32 PUBLIC 'CODE'
  23. ASSUME CS:FLAT, DS:NOTHING, ES:NOTHING, SS:FLAT, FS:NOTHING, GS:NOTHING
  24. extrn _LogData:Near
  25. extrn _GetModuleHandleA@4:Near
  26. extrn _GetProcAddress@8:Near
  27. LogNote PROC
  28. pop edx ; Get Address of Address
  29. cmp dword ptr [edx],0 ; Do we already have the routines address?
  30. jnz Found ; Yes! Just jump to it.
  31. cmp Module,0 ; Do we have our module handle?
  32. jnz Search ; Yes! We can just do GetProcAddress
  33. push edx ; Save our address
  34. push offset ModName
  35. call _GetModuleHandleA@4 ; Get out module handle
  36. mov Module,eax
  37. pop edx ; Get our address
  38. Search:
  39. pop eax ; Get ordinal number
  40. push eax ; Leave it on the stack
  41. push edx ; Save our address
  42. push eax
  43. push Module
  44. call _GetProcAddress@8
  45. pop edx ; Get our address
  46. mov [edx],eax ; Save the proc's address
  47. Found:
  48. pop eax ; Get Ordinal number and throw it away
  49. pop eax ; Get message to log
  50. push edx ; Save address
  51. push eax
  52. call _LogData
  53. add sp,+4
  54. pop edx ; Get address of address
  55. jmp [edx]
  56. LogNote ENDP
  57. _TEXT ENDS
  58. ZJMP MACRO argName
  59. _DATA SEGMENT
  60. m&argName db 'NOTE:&argName ',0
  61. a&argName db '&argName',0
  62. x&argName dd 0
  63. _DATA ENDS
  64. _TEXT SEGMENT
  65. PUBLIC z&argName
  66. z&argName PROC
  67. push offset m&argName
  68. push offset a&argName
  69. push offset x&argName
  70. jmp LogNote
  71. z&argName ENDP
  72. _TEXT ENDS
  73. ENDM
  74. ZJMP AddConsoleAliasA
  75. ZJMP AddConsoleAliasW
  76. ZJMP BaseAttachCompleteThunk
  77. ZJMP BasepDebugDump
  78. ZJMP CloseConsoleHandle
  79. ZJMP CloseProfileUserMapping
  80. ZJMP CmdBatNotification
  81. ZJMP ConsoleMenuControl
  82. ZJMP ConsoleSubst
  83. ZJMP CreateVirtualBuffer
  84. ZJMP DuplicateConsoleHandle
  85. ZJMP ExitVDM
  86. ZJMP ExpungeConsoleCommandHistoryA
  87. ZJMP ExpungeConsoleCommandHistoryW
  88. ZJMP ExtendVirtualBuffer
  89. ZJMP FreeVirtualBuffer
  90. ZJMP GetBinaryType
  91. ZJMP GetConsoleAliasA
  92. ZJMP GetConsoleAliasExesA
  93. ZJMP GetConsoleAliasExesLengthA
  94. ZJMP GetConsoleAliasExesLengthW
  95. ZJMP GetConsoleAliasExesW
  96. ZJMP GetConsoleAliasW
  97. ZJMP GetConsoleAliasesA
  98. ZJMP GetConsoleAliasesLengthA
  99. ZJMP GetConsoleAliasesLengthW
  100. ZJMP GetConsoleAliasesW
  101. ZJMP GetConsoleCommandHistoryA
  102. ZJMP GetConsoleCommandHistoryLengthA
  103. ZJMP GetConsoleCommandHistoryLengthW
  104. ZJMP GetConsoleCommandHistoryW
  105. ZJMP GetConsoleDisplayMode
  106. ZJMP GetConsoleFontInfo
  107. ZJMP GetConsoleFontSize
  108. ZJMP GetConsoleHardwareState
  109. ZJMP GetConsoleInputWaitHandle
  110. ZJMP GetCurrentConsoleFont
  111. ZJMP GetNextVDMCommand
  112. ZJMP GetNumberOfConsoleFonts
  113. ZJMP GetVDMCurrentDirectories
  114. ZJMP InvalidateConsoleDIBits
  115. ZJMP OpenConsoleW
  116. ZJMP OpenProfileUserMapping
  117. ZJMP QueryWin31IniFilesMappedToRegistry
  118. ZJMP RegisterConsoleVDM
  119. ZJMP RegisterWaitForInputIdle
  120. ZJMP RtlUnwind
  121. ZJMP SetConsoleCommandHistoryMode
  122. ZJMP SetConsoleCursor
  123. ZJMP SetConsoleDisplayMode
  124. ZJMP SetConsoleFont
  125. ZJMP SetConsoleHardwareState
  126. ZJMP SetConsoleKeyShortcuts
  127. ZJMP SetConsoleMaximumWindowSize
  128. ZJMP SetConsoleMenuClose
  129. ZJMP SetConsoleNumberOfCommandsA
  130. ZJMP SetConsoleNumberOfCommandsW
  131. ZJMP SetConsolePalette
  132. ZJMP SetLastConsoleEventActive
  133. ZJMP SetVDMCurrentDirectories
  134. ZJMP ShowConsoleCursor
  135. ZJMP TrimVirtualBuffer
  136. ZJMP VDMConsoleOperation
  137. ZJMP VDMOperationStarted
  138. ZJMP ValidateLCID
  139. ZJMP VerifyConsoleIoHandle
  140. ZJMP VirtualBufferExceptionHandler
  141. ZJMP WriteConsoleInputVDMA
  142. ZJMP WriteConsoleInputVDMW
  143. ZJMP lstrcat
  144. ZJMP lstrcmp
  145. ZJMP lstrcmpi
  146. ZJMP lstrcpy
  147. ZJMP lstrlen
  148. ZJMP ConvertDefaultLocale
  149. ZJMP DisableThreadLibraryCalls
  150. ZJMP EnumCalendarInfoA
  151. ZJMP EnumCalendarInfoW
  152. ZJMP EnumDateFormatsA
  153. ZJMP EnumDateFormatsW
  154. ZJMP EnumSystemCodePagesA
  155. ZJMP EnumSystemCodePagesW
  156. ZJMP EnumSystemLocalesA
  157. ZJMP EnumSystemLocalesW
  158. ZJMP EnumTimeFormatsA
  159. ZJMP EnumTimeFormatsW
  160. ZJMP FoldStringA
  161. ZJMP FreeLibraryAndExitThread
  162. ZJMP GetBinaryTypeA
  163. ZJMP GetBinaryTypeW
  164. ZJMP GetCompressedFileSizeA
  165. ZJMP GetCompressedFileSizeW
  166. ZJMP GetCurrencyFormatA
  167. ZJMP GetCurrencyFormatW
  168. ZJMP GetEnvironmentStrings
  169. ZJMP GetNumberFormatA
  170. ZJMP GetNumberFormatW
  171. ZJMP GetProcessAffinityMask
  172. ZJMP GetShortPathNameA
  173. ZJMP GetShortPathNameW
  174. ZJMP GetStringTypeExA
  175. ZJMP GetStringTypeExW
  176. ZJMP GetSystemTimeAdjustment
  177. ZJMP IsValidLocale
  178. ZJMP RegisterWowExec
  179. ZJMP SetLocaleInfoA
  180. ZJMP SetLocaleInfoW
  181. ZJMP SetSystemTimeAdjustment
  182. ZJMP SystemTimeToTzSpecificLocalTime
  183. ZJMP lstrcpyn
  184. END