Leaked source code of windows server 2003
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.

526 lines
11 KiB

  1. ; Copyright (c) 1998 Microsoft Corporation
  2. page ,132
  3. ;Thunk Compiler Version 1.8 Dec 14 1994 14:53:05
  4. ;File Compiled Fri Jun 21 14:07:10 1996
  5. ;Command Line: ..\..\..\..\dev\tools\binr\thunk.exe -NC _TEXT ..\wizthk.thk
  6. TITLE $..\wizthk.asm
  7. .386
  8. OPTION READONLY
  9. OPTION OLDSTRUCTS
  10. IFNDEF IS_16
  11. IFNDEF IS_32
  12. %out command line error: specify one of -DIS_16, -DIS_32
  13. .err
  14. ENDIF ;IS_32
  15. ENDIF ;IS_16
  16. IFDEF IS_32
  17. IFDEF IS_16
  18. %out command line error: you can't specify both -DIS_16 and -DIS_32
  19. .err
  20. ENDIF ;IS_16
  21. ;************************* START OF 32-BIT CODE *************************
  22. .model FLAT,STDCALL
  23. ;-- Import common flat thunk routines (in k32)
  24. externDef AllocMappedBuffer :near32
  25. externDef FreeMappedBuffer :near32
  26. externDef MapHInstLS :near32
  27. externDef MapHInstLS_PN :near32
  28. externDef MapHInstSL :near32
  29. externDef MapHInstSL_PN :near32
  30. externDef FT_Prolog :near32
  31. externDef FT_Thunk :near32
  32. externDef QT_Thunk :near32
  33. externDef FT_Exit0 :near32
  34. externDef FT_Exit4 :near32
  35. externDef FT_Exit8 :near32
  36. externDef FT_Exit12 :near32
  37. externDef FT_Exit16 :near32
  38. externDef FT_Exit20 :near32
  39. externDef FT_Exit24 :near32
  40. externDef FT_Exit28 :near32
  41. externDef FT_Exit32 :near32
  42. externDef FT_Exit36 :near32
  43. externDef FT_Exit40 :near32
  44. externDef FT_Exit44 :near32
  45. externDef FT_Exit48 :near32
  46. externDef FT_Exit52 :near32
  47. externDef FT_Exit56 :near32
  48. externDef SMapLS :near32
  49. externDef SUnMapLS :near32
  50. externDef SMapLS_IP_EBP_8 :near32
  51. externDef SUnMapLS_IP_EBP_8 :near32
  52. externDef SMapLS_IP_EBP_12 :near32
  53. externDef SUnMapLS_IP_EBP_12 :near32
  54. externDef SMapLS_IP_EBP_16 :near32
  55. externDef SUnMapLS_IP_EBP_16 :near32
  56. externDef SMapLS_IP_EBP_20 :near32
  57. externDef SUnMapLS_IP_EBP_20 :near32
  58. externDef SMapLS_IP_EBP_24 :near32
  59. externDef SUnMapLS_IP_EBP_24 :near32
  60. externDef SMapLS_IP_EBP_28 :near32
  61. externDef SUnMapLS_IP_EBP_28 :near32
  62. externDef SMapLS_IP_EBP_32 :near32
  63. externDef SUnMapLS_IP_EBP_32 :near32
  64. externDef SMapLS_IP_EBP_36 :near32
  65. externDef SUnMapLS_IP_EBP_36 :near32
  66. externDef SMapLS_IP_EBP_40 :near32
  67. externDef SUnMapLS_IP_EBP_40 :near32
  68. MapLS PROTO NEAR STDCALL :DWORD
  69. UnMapLS PROTO NEAR STDCALL :DWORD
  70. MapSL PROTO NEAR STDCALL p32:DWORD
  71. ;***************** START OF KERNEL32-ONLY SECTION ******************
  72. ; Hacks for kernel32 initialization.
  73. IFDEF FT_DEFINEFTCOMMONROUTINES
  74. .data
  75. public FT_wizthkTargetTable ;Flat address of target table in 16-bit module.
  76. public FT_wizthkChecksum32
  77. FT_wizthkChecksum32 dd 010e07h
  78. ENDIF ;FT_DEFINEFTCOMMONROUTINES
  79. ;***************** END OF KERNEL32-ONLY SECTION ******************
  80. .code
  81. ;************************* COMMON PER-MODULE ROUTINES *************************
  82. .data
  83. public wizthk_ThunkData32 ;This symbol must be exported.
  84. wizthk_ThunkData32 label dword
  85. dd 3130534ch ;Protocol 'LS01'
  86. dd 010e07h ;Checksum
  87. dd 0 ;Jump table address.
  88. dd 3130424ch ;'LB01'
  89. dd 0 ;Flags
  90. dd 0 ;Reserved (MUST BE 0)
  91. dd 0 ;Reserved (MUST BE 0)
  92. dd offset QT_Thunk_wizthk - offset wizthk_ThunkData32
  93. dd offset FT_Prolog_wizthk - offset wizthk_ThunkData32
  94. .code
  95. externDef ThunkConnect32@24:near32
  96. public wizthk_ThunkConnect32@16
  97. wizthk_ThunkConnect32@16:
  98. pop edx
  99. push offset wizthk_ThkData16
  100. push offset wizthk_ThunkData32
  101. push edx
  102. jmp ThunkConnect32@24
  103. wizthk_ThkData16 label byte
  104. db "wizthk_ThunkData16",0
  105. pfnQT_Thunk_wizthk dd offset QT_Thunk_wizthk
  106. pfnFT_Prolog_wizthk dd offset FT_Prolog_wizthk
  107. .data
  108. QT_Thunk_wizthk label byte
  109. db 32 dup(0cch) ;Patch space.
  110. FT_Prolog_wizthk label byte
  111. db 32 dup(0cch) ;Patch space.
  112. .code
  113. ebp_top equ <[ebp + 8]> ;First api parameter
  114. ebp_retval equ <[ebp + -64]> ;Api return value
  115. FT_ESPFIXUP macro dwSpOffset
  116. or dword ptr [ebp + -20], 1 SHL ((dwSpOffset) SHR 1)
  117. endm
  118. ebp_qttop equ <[ebp + 8]>
  119. include fltthk.inc ;Support definitions
  120. include wizthk.inc
  121. ;************************ START OF THUNK BODIES************************
  122. ;
  123. public GetClientConfig16@4
  124. GetClientConfig16@4:
  125. FAPILOG16 212
  126. mov cx, (1 SHL 10) + (0 SHL 8) + 8
  127. ; GetClientConfig16(16) = GetClientConfig16(32) {}
  128. ;
  129. ; dword ptr [ebp+8]: pClientConfig
  130. ;
  131. public IIGetClientConfig16@4
  132. IIGetClientConfig16@4:
  133. call dword ptr [pfnFT_Prolog_wizthk]
  134. sub esp,24
  135. mov esi,[ebp+8]
  136. or esi,esi
  137. jnz L0
  138. push esi
  139. jmp L1
  140. L0:
  141. lea edi,[ebp-88]
  142. push edi ;pClientConfig: lpstruct32->lpstruct16
  143. or dword ptr [ebp-20],01h ;Set flag to fixup ESP-rel argument.
  144. mov ecx,12
  145. @@:
  146. lodsd
  147. stosw
  148. loop @B
  149. L1:
  150. call FT_Thunk
  151. movzx ebx,ax
  152. mov edi,[ebp+8]
  153. or edi,edi
  154. jz L2
  155. lea esi,[ebp-88] ;pClientConfig Struct16->Struct32
  156. mov ecx,12
  157. @@:
  158. lodsw
  159. cwde
  160. stosd
  161. loop @B
  162. L2:
  163. jmp FT_Exit4
  164. ;
  165. public BeginNetcardTCPIPEnum16@0
  166. BeginNetcardTCPIPEnum16@0:
  167. FAPILOG16 161
  168. mov cl,6
  169. ; BeginNetcardTCPIPEnum16(16) = BeginNetcardTCPIPEnum16(32) {}
  170. ;
  171. ;
  172. public IIBeginNetcardTCPIPEnum16@0
  173. IIBeginNetcardTCPIPEnum16@0:
  174. push ebp
  175. mov ebp,esp
  176. push ecx
  177. sub esp,60
  178. call dword ptr [pfnQT_Thunk_wizthk]
  179. movzx eax,ax
  180. leave
  181. retn
  182. ;
  183. public GetNextNetcardTCPIPNode16@12
  184. GetNextNetcardTCPIPNode16@12:
  185. FAPILOG16 131
  186. mov cl,5
  187. ; GetNextNetcardTCPIPNode16(16) = GetNextNetcardTCPIPNode16(32) {}
  188. ;
  189. ; dword ptr [ebp+8]: pszTcpNode
  190. ; dword ptr [ebp+12]: cbTcpNode
  191. ; dword ptr [ebp+16]: dwFlags
  192. ;
  193. public IIGetNextNetcardTCPIPNode16@12
  194. IIGetNextNetcardTCPIPNode16@12:
  195. push ebp
  196. mov ebp,esp
  197. push ecx
  198. sub esp,60
  199. call SMapLS_IP_EBP_8
  200. push eax
  201. push word ptr [ebp+12] ;cbTcpNode: dword->word
  202. push dword ptr [ebp+16] ;dwFlags: dword->dword
  203. call dword ptr [pfnQT_Thunk_wizthk]
  204. cwde
  205. call SUnMapLS_IP_EBP_8
  206. leave
  207. retn 12
  208. ;
  209. public GetSETUPXErrorText16@12
  210. GetSETUPXErrorText16@12:
  211. FAPILOG16 106
  212. mov cl,4
  213. ; GetSETUPXErrorText16(16) = GetSETUPXErrorText16(32) {}
  214. ;
  215. ; dword ptr [ebp+8]: dwErr
  216. ; dword ptr [ebp+12]: pszErrorDesc
  217. ; dword ptr [ebp+16]: cbErrorDesc
  218. ;
  219. public IIGetSETUPXErrorText16@12
  220. IIGetSETUPXErrorText16@12:
  221. push ebp
  222. mov ebp,esp
  223. push ecx
  224. sub esp,60
  225. push dword ptr [ebp+8] ;dwErr: dword->dword
  226. call SMapLS_IP_EBP_12
  227. push eax
  228. push dword ptr [ebp+16] ;cbErrorDesc: dword->dword
  229. call dword ptr [pfnQT_Thunk_wizthk]
  230. call SUnMapLS_IP_EBP_12
  231. leave
  232. retn 12
  233. ;
  234. public RemoveUnneededDefaultComponents16@4
  235. RemoveUnneededDefaultComponents16@4:
  236. FAPILOG16 68
  237. mov cl,3
  238. ; RemoveUnneededDefaultComponents16(16) = RemoveUnneededDefaultComponents16(32) {}
  239. ;
  240. ; dword ptr [ebp+8]: hwndParent
  241. ;
  242. public IIRemoveUnneededDefaultComponents16@4
  243. IIRemoveUnneededDefaultComponents16@4:
  244. push ebp
  245. mov ebp,esp
  246. push ecx
  247. sub esp,60
  248. push word ptr [ebp+8] ;hwndParent: dword->word
  249. call dword ptr [pfnQT_Thunk_wizthk]
  250. movzx eax,ax
  251. leave
  252. retn 4
  253. ;
  254. public RemoveProtocols16@12
  255. RemoveProtocols16@12:
  256. FAPILOG16 46
  257. mov cl,2
  258. jmp IIRemoveProtocols16@12
  259. public InstallComponent16@12
  260. InstallComponent16@12:
  261. FAPILOG16 189
  262. mov cl,7
  263. ; RemoveProtocols16(16) = RemoveProtocols16(32) {}
  264. ;
  265. ; dword ptr [ebp+8]: hwndParent
  266. ; dword ptr [ebp+12]: dwRemoveFromCardType
  267. ; dword ptr [ebp+16]: dwProtocols
  268. ;
  269. public IIRemoveProtocols16@12
  270. IIRemoveProtocols16@12:
  271. push ebp
  272. mov ebp,esp
  273. push ecx
  274. sub esp,60
  275. push word ptr [ebp+8] ;hwndParent: dword->word
  276. push dword ptr [ebp+12] ;dwRemoveFromCardType: dword->dword
  277. push dword ptr [ebp+16] ;dwProtocols: dword->dword
  278. call dword ptr [pfnQT_Thunk_wizthk]
  279. movzx eax,ax
  280. leave
  281. retn 12
  282. ;
  283. public DoGenInstall16@12
  284. DoGenInstall16@12:
  285. FAPILOG16 27
  286. mov cl,1
  287. ; DoGenInstall16(16) = DoGenInstall16(32) {}
  288. ;
  289. ; dword ptr [ebp+8]: hwndParent
  290. ; dword ptr [ebp+12]: lpszInfFile
  291. ; dword ptr [ebp+16]: lpszInfSect
  292. ;
  293. public IIDoGenInstall16@12
  294. IIDoGenInstall16@12:
  295. push ebp
  296. mov ebp,esp
  297. push ecx
  298. sub esp,60
  299. push word ptr [ebp+8] ;hwndParent: dword->word
  300. call SMapLS_IP_EBP_12
  301. push eax
  302. call SMapLS_IP_EBP_16
  303. push eax
  304. call dword ptr [pfnQT_Thunk_wizthk]
  305. movzx eax,ax
  306. call SUnMapLS_IP_EBP_12
  307. call SUnMapLS_IP_EBP_16
  308. leave
  309. retn 12
  310. ;
  311. public SetInstallSourcePath16@4
  312. SetInstallSourcePath16@4:
  313. FAPILOG16 0
  314. mov cl,0
  315. ; SetInstallSourcePath16(16) = SetInstallSourcePath16(32) {}
  316. ;
  317. ; dword ptr [ebp+8]: szSourcePath
  318. ;
  319. public IISetInstallSourcePath16@4
  320. IISetInstallSourcePath16@4:
  321. push ebp
  322. mov ebp,esp
  323. push ecx
  324. sub esp,60
  325. call SMapLS_IP_EBP_8
  326. push eax
  327. call dword ptr [pfnQT_Thunk_wizthk]
  328. movzx eax,ax
  329. call SUnMapLS_IP_EBP_8
  330. leave
  331. retn 4
  332. ;-----------------------------------------------------------
  333. ifdef DEBUG
  334. FT_ThunkLogNames label byte
  335. db '[F] SetInstallSourcePath16',0
  336. db '[F] DoGenInstall16',0
  337. db '[F] RemoveProtocols16',0
  338. db '[F] RemoveUnneededDefaultComponents16',0
  339. db '[F] GetSETUPXErrorText16',0
  340. db '[F] GetNextNetcardTCPIPNode16',0
  341. db '[F] BeginNetcardTCPIPEnum16',0
  342. db '[F] InstallComponent16',0
  343. db '[F] GetClientConfig16',0
  344. endif ;DEBUG
  345. ;-----------------------------------------------------------
  346. ELSE
  347. ;************************* START OF 16-BIT CODE *************************
  348. OPTION SEGMENT:USE16
  349. .model LARGE,PASCAL
  350. .code _TEXT
  351. externDef SetInstallSourcePath16:far16
  352. externDef DoGenInstall16:far16
  353. externDef RemoveProtocols16:far16
  354. externDef RemoveUnneededDefaultComponents16:far16
  355. externDef GetSETUPXErrorText16:far16
  356. externDef GetNextNetcardTCPIPNode16:far16
  357. externDef BeginNetcardTCPIPEnum16:far16
  358. externDef InstallComponent16:far16
  359. externDef GetClientConfig16:far16
  360. FT_wizthkTargetTable label word
  361. dw offset SetInstallSourcePath16
  362. dw seg SetInstallSourcePath16
  363. dw offset DoGenInstall16
  364. dw seg DoGenInstall16
  365. dw offset RemoveProtocols16
  366. dw seg RemoveProtocols16
  367. dw offset RemoveUnneededDefaultComponents16
  368. dw seg RemoveUnneededDefaultComponents16
  369. dw offset GetSETUPXErrorText16
  370. dw seg GetSETUPXErrorText16
  371. dw offset GetNextNetcardTCPIPNode16
  372. dw seg GetNextNetcardTCPIPNode16
  373. dw offset BeginNetcardTCPIPEnum16
  374. dw seg BeginNetcardTCPIPEnum16
  375. dw offset InstallComponent16
  376. dw seg InstallComponent16
  377. dw offset GetClientConfig16
  378. dw seg GetClientConfig16
  379. .data
  380. public wizthk_ThunkData16 ;This symbol must be exported.
  381. wizthk_ThunkData16 dd 3130534ch ;Protocol 'LS01'
  382. dd 010e07h ;Checksum
  383. dw offset FT_wizthkTargetTable
  384. dw seg FT_wizthkTargetTable
  385. dd 0 ;First-time flag.
  386. .code _TEXT
  387. externDef ThunkConnect16:far16
  388. public wizthk_ThunkConnect16
  389. wizthk_ThunkConnect16:
  390. pop ax
  391. pop dx
  392. push seg wizthk_ThunkData16
  393. push offset wizthk_ThunkData16
  394. push seg wizthk_ThkData32
  395. push offset wizthk_ThkData32
  396. push cs
  397. push dx
  398. push ax
  399. jmp ThunkConnect16
  400. wizthk_ThkData32 label byte
  401. db "wizthk_ThunkData32",0
  402. ENDIF
  403. END