The MS-DOS Stub is a valid application that runs under MS-DOS and is placed
at the front of the .EXE image. The linker places a default stub here, which
prints out the message "This program cannot be run in DOS mode" when the image
is run in MS-DOS. The user can specify another stub by using the /STUB linker
option.
//////如何替换自己的 stub 程序
At location 0x3c, the stub has the file offset to the Portable Executable (PE)
signature. This information enables Windows NT to properly execute the image
file, even though it has a DOS Stub. This file offset is placed at location
0x3c during linking.
--------------------------------------------------------------------------------
来自:mikedeakins 时间:01-4-2 12:49:50 ID:488407
你可以自己写一个简单的程序,功能是把某个 dos exe 文件(假设是 a.exe)的长度写入
该文件的 0x3c处。然后假设已经有一个 b.exe 是 32-bit windows exe。
1,
copy a.exe + b.exe c.exe
2,
edit /b /078 c.exe
3.
编辑文件首先找到第二个 MZ,删除从 MZ 到 PE(包括MZ ,不包括PE)的所有字符。
保存。