BearParser
Portable Executable parsing library (from PE-bear)
Loading...
Searching...
No Matches
BoundImpDirWrapper.h
Go to the documentation of this file.
1#pragma once
2
4
6{
7public:
9 : DataDirEntryWrapper(pe, pe::DIR_BOUND_IMPORT), importsCount(0) { wrap(); }
10
11 virtual bool wrap();
12
13 virtual void* getPtr() { return boundImp(); }
14 virtual bufsize_t getSize();
15 virtual QString getName() { return "BoundImp"; }
16 virtual size_t getFieldsCount() { return this->entries.size(); }
17
18 virtual void* getFieldPtr(size_t fieldId, size_t subField) { return getSubfieldPtr(fieldId, subField ); }
19 virtual bufsize_t getFieldSize(size_t fieldId, size_t subField = FIELD_NONE) { return getSubfieldSize(fieldId, subField); }
20
21 virtual QString getFieldName(size_t fieldId, size_t subField) { return getSubfieldName(fieldId, subField ); }
22 virtual QString getFieldName(size_t fieldId) { return getFieldName(fieldId, FIELD_NONE); }
23
24protected:
25 bool loadNextEntry(size_t entryNum);
26
27 IMAGE_BOUND_IMPORT_DESCRIPTOR* boundImp();
29
30friend class BoundEntryWrapper;
31};
32
34{
35public:
43
45 : ExeNodeWrapper(pe, parent, entryNum ) { }
46
47 bool wrap() { return true; }
48
49 virtual void* getPtr();
50 virtual bufsize_t getSize();
51 virtual QString getName();
52 virtual char* getLibraryName();
53 virtual size_t getFieldsCount() { return FIELD_COUNTER; }
54 virtual size_t getSubFieldsCount() { return 1; }
55
56 virtual void* getFieldPtr(size_t fieldId, size_t subField);
57 virtual QString getFieldName(size_t fieldId);
58};
uint32_t bufsize_t
#define FIELD_NONE
virtual void * getFieldPtr(size_t fieldId, size_t subField)
virtual size_t getFieldsCount()
virtual char * getLibraryName()
BoundEntryWrapper(Executable *pe, BoundImpDirWrapper *parent, size_t entryNum)
FieldID
@ TIMESTAMP
@ FIELD_COUNTER
@ MODULE_FORWARDERS_NUM
@ NONE
@ MODULE_NAME_OFFSET
virtual size_t getSubFieldsCount()
virtual bufsize_t getSize()
virtual QString getFieldName(size_t fieldId)
virtual QString getName()
bool wrap()
virtual void * getPtr()
BoundImpDirWrapper(PEFile *pe)
bool loadNextEntry(size_t entryNum)
virtual void * getFieldPtr(size_t fieldId, size_t subField)
virtual QString getFieldName(size_t fieldId, size_t subField)
IMAGE_BOUND_IMPORT_DESCRIPTOR * boundImp()
virtual void * getPtr()
virtual size_t getFieldsCount()
virtual bufsize_t getSize()
virtual QString getName()
virtual QString getFieldName(size_t fieldId)
virtual bufsize_t getFieldSize(size_t fieldId, size_t subField=FIELD_NONE)
virtual void * getSubfieldPtr(size_t fieldId, size_t subField)
virtual QString getSubfieldName(size_t fieldId, size_t subField)
std::vector< ExeNodeWrapper * > entries
virtual bufsize_t getSubfieldSize(size_t fieldId, size_t subField)