Portable executable parser and (re-)serializer.
This library can be used to extract and change resources and version information in Windows executables.
pe.cpp and pe.hpp contain the functionality for parsing PE files into
separate (memory) sections, and writing them back:
- PE::read_pe_fileturns a file name or- FILE *into a- PE::PortableExecutablecontaining an- std::vectorof- PE::Sections.
- PE::write_pe_filedoes the reverse.
pe-res.cpp and pe-res.hpp contain the functionality for parsing and
(re-)serializing resource information and version information. Resource
information is held in the .rsrc section in the PE file, version information
is held in each resource with type 16.
- PE::parse_resourcesturns the resources section into a std::map of resources.
- PE::serialize_resourcesdoes the reverse.
- PE::parse_version_infoturns a version info resource into a- PE::VersionInfo.
- PE::serialize_version_infodoes the reverse.
Two-clause BSD license, see COPYING.