1 | title mmap.cpp
|
---|
2 | .386
|
---|
3 | .387
|
---|
4 | includelib CPPOM30.LIB
|
---|
5 | includelib OS2386.LIB
|
---|
6 | CODE32 segment dword use32 public 'CODE'
|
---|
7 | CODE32 ends
|
---|
8 | DATA32 segment dword use32 public 'DATA'
|
---|
9 | DATA32 ends
|
---|
10 | CONST32_RO segment dword use32 public 'CONST'
|
---|
11 | CONST32_RO ends
|
---|
12 | BSS32 segment dword use32 public 'BSS'
|
---|
13 | BSS32 ends
|
---|
14 | EH_CODE segment dword use32 public 'CODE'
|
---|
15 | EH_CODE ends
|
---|
16 | CTOR_DTOR1 segment dword use32 public 'DATA'
|
---|
17 | CTOR_DTOR1 ends
|
---|
18 | CTOR_DTOR2 segment dword use32 public 'DATA'
|
---|
19 | CTOR_DTOR2 ends
|
---|
20 | CTOR_DTOR3 segment dword use32 public 'DATA'
|
---|
21 | CTOR_DTOR3 ends
|
---|
22 | EH_DATA segment para use32 public 'DATA'
|
---|
23 | EH_DATA ends
|
---|
24 | _VFT segment para use32 public 'DATA'
|
---|
25 | _VFT ends
|
---|
26 | DGROUP group BSS32, DATA32
|
---|
27 | assume cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT
|
---|
28 | extrn _dllentry:proc
|
---|
29 | extrn WriteLog:proc
|
---|
30 | extrn _fltused:dword
|
---|
31 | CONST32_RO segment
|
---|
32 | @CBE1 db "CreateFileMappingA Not I"
|
---|
33 | db "mplemented!",0ah,0h
|
---|
34 | align 04h
|
---|
35 | @CBE2 db "CreateFileMappingA handl"
|
---|
36 | db "e %d, dwMaximumSize %X%X"
|
---|
37 | db "!",0ah,0h
|
---|
38 | align 04h
|
---|
39 | @CBE3 db "lpszMapName %s",0ah,0h
|
---|
40 | @CBE4 db "CreateFileMappingW Not I"
|
---|
41 | db "mplemented!",0ah,0h
|
---|
42 | align 04h
|
---|
43 | @CBE5 db "MapViewOfFileEx Not Impl"
|
---|
44 | db "emented!",0ah,0h
|
---|
45 | align 04h
|
---|
46 | @CBE6 db "UnmapViewOfFile Not Impl"
|
---|
47 | db "emented! - TRUE",0ah,0h
|
---|
48 | align 04h
|
---|
49 | @CBE7 db "MapViewOfFile Not Implem"
|
---|
50 | db "ented!",0ah,0h
|
---|
51 | CONST32_RO ends
|
---|
52 | DATA32 segment
|
---|
53 | dd _dllentry
|
---|
54 | DATA32 ends
|
---|
55 | CODE32 segment
|
---|
56 |
|
---|
57 | ; 12 HANDLE WIN32API CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpsa,
|
---|
58 | align 04h
|
---|
59 |
|
---|
60 | public _CreateFileMappingA@24
|
---|
61 | _CreateFileMappingA@24 proc
|
---|
62 | push ebp
|
---|
63 | mov ebp,esp
|
---|
64 |
|
---|
65 | ; 16 dprintf(("CreateFileMappingA Not Implemented!\n"));
|
---|
66 | push offset FLAT:@CBE1
|
---|
67 | call WriteLog
|
---|
68 | add esp,04h
|
---|
69 |
|
---|
70 | ; 17 dprintf(("CreateFileMappingA handle %d, dwMaximumSize %X%X!\n", hFile, dwMaximumSizeHigh, dwMaximumSizeLow));
|
---|
71 | push dword ptr [ebp+018h]; dwMaximumSizeLow
|
---|
72 | push dword ptr [ebp+014h]; dwMaximumSizeHigh
|
---|
73 | push dword ptr [ebp+08h]; hFile
|
---|
74 | push offset FLAT:@CBE2
|
---|
75 | call WriteLog
|
---|
76 | add esp,010h
|
---|
77 |
|
---|
78 | ; 18 if(lpszMapName){
|
---|
79 | cmp dword ptr [ebp+01ch],0h; lpszMapName
|
---|
80 | je @BLBL3
|
---|
81 |
|
---|
82 | ; 19 dprintf(("lpszMapName %s\n", lpszMapName));
|
---|
83 | push dword ptr [ebp+01ch]; lpszMapName
|
---|
84 | push offset FLAT:@CBE3
|
---|
85 | call WriteLog
|
---|
86 | add esp,08h
|
---|
87 |
|
---|
88 | ; 20 }
|
---|
89 | @BLBL3:
|
---|
90 |
|
---|
91 | ; 21 return(0);
|
---|
92 | xor eax,eax
|
---|
93 | leave
|
---|
94 | ret 018h
|
---|
95 | _CreateFileMappingA@24 endp
|
---|
96 |
|
---|
97 | ; 25 HANDLE WIN32API CreateFileMappingW(HANDLE hFile, LPSECURITY_ATTRIBUTES lpsa,
|
---|
98 | align 04h
|
---|
99 |
|
---|
100 | public _CreateFileMappingW@24
|
---|
101 | _CreateFileMappingW@24 proc
|
---|
102 | push ebp
|
---|
103 | mov ebp,esp
|
---|
104 |
|
---|
105 | ; 29 dprintf(("CreateFileMappingW Not Implemented!\n"));
|
---|
106 | push offset FLAT:@CBE4
|
---|
107 | call WriteLog
|
---|
108 | add esp,04h
|
---|
109 |
|
---|
110 | ; 30 return(0);
|
---|
111 | xor eax,eax
|
---|
112 | leave
|
---|
113 | ret 018h
|
---|
114 | _CreateFileMappingW@24 endp
|
---|
115 |
|
---|
116 | ; 34 LPVOID WIN32API MapViewOfFileEx(HANDLE hMapObject, DWORD fdwAccess,
|
---|
117 | align 04h
|
---|
118 |
|
---|
119 | public _MapViewOfFileEx@24
|
---|
120 | _MapViewOfFileEx@24 proc
|
---|
121 | push ebp
|
---|
122 | mov ebp,esp
|
---|
123 |
|
---|
124 | ; 38 dprintf(("MapViewOfFileEx Not Implemented!\n"));
|
---|
125 | push offset FLAT:@CBE5
|
---|
126 | call WriteLog
|
---|
127 | add esp,04h
|
---|
128 |
|
---|
129 | ; 39 return(NULL);
|
---|
130 | xor eax,eax
|
---|
131 | leave
|
---|
132 | ret 018h
|
---|
133 | _MapViewOfFileEx@24 endp
|
---|
134 |
|
---|
135 | ; 43 BOOL WIN32API UnmapViewOfFile(LPVOID lpBaseAddress)
|
---|
136 | align 04h
|
---|
137 |
|
---|
138 | public _UnmapViewOfFile@4
|
---|
139 | _UnmapViewOfFile@4 proc
|
---|
140 | push ebp
|
---|
141 | mov ebp,esp
|
---|
142 |
|
---|
143 | ; 45 dprintf(("UnmapViewOfFile Not Implemented! - TRUE\n"));
|
---|
144 | push offset FLAT:@CBE6
|
---|
145 | call WriteLog
|
---|
146 | add esp,04h
|
---|
147 |
|
---|
148 | ; 46 return(TRUE);
|
---|
149 | mov eax,01h
|
---|
150 | leave
|
---|
151 | ret 04h
|
---|
152 | _UnmapViewOfFile@4 endp
|
---|
153 |
|
---|
154 | ; 50 LPVOID WIN32API MapViewOfFile(HANDLE hMapObject, DWORD fdwAccess,
|
---|
155 | align 04h
|
---|
156 |
|
---|
157 | public _MapViewOfFile@20
|
---|
158 | _MapViewOfFile@20 proc
|
---|
159 | push ebp
|
---|
160 | mov ebp,esp
|
---|
161 |
|
---|
162 | ; 54 dprintf(("MapViewOfFile Not Implemented!\n"));
|
---|
163 | push offset FLAT:@CBE7
|
---|
164 | call WriteLog
|
---|
165 | add esp,04h
|
---|
166 |
|
---|
167 | ; 55 return(NULL);
|
---|
168 | xor eax,eax
|
---|
169 | leave
|
---|
170 | ret 014h
|
---|
171 | _MapViewOfFile@20 endp
|
---|
172 | CODE32 ends
|
---|
173 | end
|
---|