Forensics, Malware Analysis, Microsoft Windows, Windows Internals

Dump PE file in C

The Portable Executable (PE) format is a file format for executables, object code, DLLs, FON Font files,[1] and others used in 32-bit and 64-bit versions of Windows operating systems. The PE format is a data structure that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code. – Wikipedia

Other sources about PE format:
Peering Inside the PE

An In-Depth Look into the Win32 Portable Executable File Format Part 1

An In-Depth Look into the Win32 Portable Executable File Format Part 2

Dump PE file:
A simple PE dumper in C.