Source code of Windows XP (NT5)
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.

152 lines
3.7 KiB

  1. RAWPACKQT__VERFINDFILEA_lpdwCurDirLen macro iOffset, iTempOffset
  2. local nullpointer
  3. ; We'll just clear out the HIWORD of the UINT on entrance, and not worry about
  4. ; it on exit, since this value is undefined on failure of the function.
  5. mov eax,dword ptr [ebp + iOffset]
  6. or eax,eax
  7. jz nullpointer
  8. mov word ptr [eax+2],0
  9. nullpointer:
  10. push eax
  11. call MapLS
  12. mov [ebp + iTempOffset], eax
  13. endm
  14. RAWUNPACKQT__VERFINDFILEA_lpdwCurDirLen macro iOffset, iTempOffset
  15. push eax
  16. push [ebp + iTempOffset]
  17. call UnMapLS
  18. pop eax
  19. endm
  20. RAWPACKQT__VERFINDFILEA_lpdwDestDirLen macro iOffset, iTempOffset
  21. local nullpointer
  22. ; We'll just clear out the HIWORD of the UINT on entrance, and not worry about
  23. ; it on exit, since this value is undefined on failure of the function.
  24. mov eax,dword ptr [ebp + iOffset]
  25. or eax,eax
  26. jz nullpointer
  27. mov word ptr [eax+2],0
  28. nullpointer:
  29. push eax
  30. call MapLS
  31. mov [ebp + iTempOffset], eax
  32. endm
  33. RAWUNPACKQT__VERFINDFILEA_lpdwDestDirLen macro iOffset, iTempOffset
  34. push eax
  35. push [ebp + iTempOffset]
  36. call UnMapLS
  37. pop eax
  38. endm
  39. RAWPACKQT__VERINSTALLFILEA_lpwTmpFileLen macro iOffset, iTempOffset
  40. local nullpointer
  41. ; We'll just clear out the HIWORD of the UINT on entrance, and not worry about
  42. ; it on exit, since this value is undefined on failure of the function.
  43. mov eax,dword ptr [ebp + iOffset]
  44. or eax,eax
  45. jz nullpointer
  46. mov word ptr [eax+2],0
  47. nullpointer:
  48. push eax
  49. call MapLS
  50. mov [ebp + iTempOffset], eax
  51. endm
  52. RAWUNPACKQT__VERINSTALLFILEA_lpwTmpFileLen macro iOffset, iTempOffset
  53. push eax
  54. push [ebp + iTempOffset]
  55. call UnMapLS
  56. pop eax
  57. endm
  58. RAWPACKQT__VERQUERYVALUEA_lplpBuffer macro iOffset, iTempOffset
  59. local ebp_pBlock
  60. ebp_pBlock equ [ebp_qttop]
  61. mov eax,ebp_pBlock
  62. mov LOCAL__VERQUERYVALUEA_pBlock32, eax
  63. push dword ptr [ebp + iOffset]
  64. call MapLS
  65. mov LOCAL__VERQUERYVALUEA_lplpBufTemp, eax
  66. mov [ebp + iTempOffset], eax
  67. endm
  68. RAWUNPACKQT__VERQUERYVALUEA_lplpBuffer macro iOffset, iTempOffset
  69. local exit
  70. local ebp_pBlock
  71. ebp_pBlock equ [ebp_qttop]
  72. push eax
  73. push dword ptr LOCAL__VERQUERYVALUEA_lplpBufTemp
  74. call UnMapLS
  75. pop eax
  76. or eax,eax
  77. jz exit
  78. ; HACK! We know that the api returns a pointer inside pBlock.
  79. ; The thunk passed in a 16:16 pointer where the offset is 0 for pBlock
  80. ; (because that's how MapLS works.) So we can deduce the linear
  81. ; address by looking just at the offset.
  82. ;
  83. ; The code generator has already unmapped the selector, so don't use it!
  84. mov ecx, [ebp + iOffset]
  85. movzx edx, word ptr [ecx]
  86. add edx, dword ptr LOCAL__VERQUERYVALUEA_pBlock32
  87. mov [ecx], edx
  88. exit:
  89. endm
  90. RAWPACKQT__VERQUERYVALUEA_lpwLen macro iOffset, iTempOffset
  91. local nullpointer
  92. ; We'll just clear out the HIWORD of the UINT on entrance, and not worry about
  93. ; it on exit, since this value is undefined on failure of the function.
  94. mov eax,dword ptr [ebp + iOffset]
  95. or eax,eax
  96. jz nullpointer
  97. mov word ptr [eax+2],0
  98. nullpointer:
  99. push eax
  100. call MapLS
  101. mov [ebp + iTempOffset], eax
  102. endm
  103. RAWUNPACKQT__VERQUERYVALUEA_lpwLen macro iOffset, iTempOffset
  104. push eax
  105. push [ebp + iTempOffset]
  106. call UnMapLS
  107. pop eax
  108. endm