mirror of
https://github.com/QuasarApp/pe-parse.git
synced 2025-05-16 21:09:34 +00:00
.
This commit is contained in:
parent
9ed4759bc7
commit
e6f3f4f948
@ -2,6 +2,12 @@
|
|||||||
#define _NT_HEADERS
|
#define _NT_HEADERS
|
||||||
#include <boost/cstdint.hpp>
|
#include <boost/cstdint.hpp>
|
||||||
|
|
||||||
|
//need an offsetof macro
|
||||||
|
|
||||||
|
//need to pack these structure definitions
|
||||||
|
|
||||||
|
//some constant definitions
|
||||||
|
|
||||||
struct dos_header {
|
struct dos_header {
|
||||||
boost::uint16_t e_magic;
|
boost::uint16_t e_magic;
|
||||||
boost::uint16_t e_cblp;
|
boost::uint16_t e_cblp;
|
||||||
@ -24,4 +30,14 @@ struct dos_header {
|
|||||||
boost::uint32_t e_lfanew;
|
boost::uint32_t e_lfanew;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct file_header {
|
||||||
|
boost::uint16_t Machine;
|
||||||
|
boost::uint16_t NumberOfSections;
|
||||||
|
boost::uint32_t TimeDateStamp;
|
||||||
|
boost::uint32_t PointerToSymbolTable;
|
||||||
|
boost::uint32_t NumberOfSymbols;
|
||||||
|
boost::uint16_t SizeOfOptionalHeader;
|
||||||
|
boost::uint16_t Characteristics;
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,6 +18,8 @@ bool readWord(bounded_buffer *b, boost::uint32_t offset, boost::uint16_t &out);
|
|||||||
bool readDword(bounded_buffer *b, boost::uint32_t offset, boost::uint32_t &out);
|
bool readDword(bounded_buffer *b, boost::uint32_t offset, boost::uint32_t &out);
|
||||||
|
|
||||||
bounded_buffer *readFileToFileBuffer(const char *filePath);
|
bounded_buffer *readFileToFileBuffer(const char *filePath);
|
||||||
|
bounded_buffer *splitBuffer(bounded_buffer *b, boost::uint32_t from, boost::uint32_t to);
|
||||||
|
void deleteBuffer(bounded_buffer *b);
|
||||||
|
|
||||||
void deleteBuffer(bounded_buffer *b);
|
void deleteBuffer(bounded_buffer *b);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user