mirror of
https://github.com/QuasarApp/pe-parse.git
synced 2025-04-26 12:24:32 +00:00
.
This commit is contained in:
parent
58643abf49
commit
50ff629e28
@ -1,2 +1,3 @@
|
||||
add_library(parser-library
|
||||
buffer.cpp
|
||||
parse.cpp)
|
||||
|
15
parser-library/buffer.cpp
Normal file
15
parser-library/buffer.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "parse.h"
|
||||
|
||||
using namespace boost;
|
||||
|
||||
bool readByte(bounded_buffer *b, ::uint32_t offset, ::uint8_t &out) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool readWord(bounded_buffer *b, ::uint32_t offset, ::uint16_t &out) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool readDword(bounded_buffer *b, ::uint32_t offset, ::uint32_t &out) {
|
||||
return false;
|
||||
}
|
@ -7,6 +7,15 @@
|
||||
|
||||
typedef boost::uint32_t RVA;
|
||||
|
||||
typedef struct _bounded_buffer {
|
||||
boost::uint8_t *bufBegin;
|
||||
boost::uint32_t bufLen;
|
||||
} bounded_buffer;
|
||||
|
||||
bool readByte(bounded_buffer *b, boost::uint32_t offset, boost::uint8_t &out);
|
||||
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);
|
||||
|
||||
typedef struct _parsed_pe {
|
||||
std::string originalFilePath;
|
||||
} parsed_pe;
|
||||
@ -29,4 +38,8 @@ void IterRelocs(parsed_pe *pe, iterReloc cb, void *cbd);
|
||||
typedef void (*iterRVA)(void *, RVA);
|
||||
void IterExpRVA(parsed_pe *pe, iterRVA cb, void *cbd);
|
||||
|
||||
//iterate over sections
|
||||
typedef void (*iterSec)(void *, RVA secBase, std::string &, bounded_buffer *b);
|
||||
void IterSec(parsed_pe *pe, iterSec cb, void *cbd);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user