Sumber Kode

Wipe DOS Stub - Remove DOS Header from PE

  • delphibasics
  • Nov 19' 14
  • Delphi
  • 34
  • 310
  • United States
Win32 files do not require a complete DOS header [ IMAGE_DOS_HEADER ]. Only two values are necessary for execution on a Win32 system:
  1. e_magic which contains the string "MZ". We use the value in e_magic to check if the file has a valid DOS header by comparing it to the value IMAGE_DOS_SIGNATURE. If both values match, we can assume that the file has a valid DOS header.
  2. e_lfanew which contains the file offset of the PE header. In order to go to the PE header, we must move the file pointer to the offset specified by the value in e_lfanew.
This program shows you code to reduce the DOS header to these two values.

  Program: WipeDOSStub
  Author: steve10120
  Description: Wipe the DOS stub from a PE

Only Delphi source code is included in the archive.
Powered by
Pasar Kode Partner


  • Tags :
comments powered by Disqus

Kode Terkait

Delete version resource from a PE file.

FTP Account Checker

Password Field Reader Example

Get/Set PEB - GetModuleFileName

Magic API Hook

Create Forms Dynamically

Check if process is running in Delphi IDE

Extract Complete Icon [All Sizes]

Tree View File Manager

Operate Clipboard without Clipboard Unit