12 if (lModule ==
nullptr) {
15 ULONGLONG start_addr = lModule->
start;
16 if (this->modulesMap.find(start_addr) != this->modulesMap.end()) {
20 modulesMap[start_addr] = lModule;
29 ULONGLONG module_start = (ULONGLONG)
report->module;
34 if (!this->appendModule(mod)) {
39 if (mod->moduleName ==
"") {
40 mod->moduleName = peconv::get_file_name(
report->moduleFile);
42 size_t old_size = mod->
getSize();
43 if (old_size < report->moduleSize) {
55 const ULONGLONG field_end = address + size;
58 std::map<ULONGLONG, ScannedModule*>::const_iterator firstGreater = modulesMap.upper_bound(address);
60 std::map<ULONGLONG, ScannedModule*>::const_iterator itr;
61 for (itr = modulesMap.begin(); itr != firstGreater; ++itr) {
63 if (!module)
continue;
65 if (address >= module->
getStart() && field_end <= module->getEnd()) {
75 std::map<ULONGLONG, ScannedModule*>::iterator itr = modulesMap.begin();
76 for (; itr != modulesMap.end(); ++itr ) {
80 this->modulesMap.clear();
85 std::map<ULONGLONG, ScannedModule*>::const_iterator start_itr = modulesMap.begin();
86 std::map<ULONGLONG, ScannedModule*>::const_iterator stop_itr = modulesMap.upper_bound(address);
87 std::map<ULONGLONG, ScannedModule*>::const_iterator itr = start_itr;
91 for (; itr != stop_itr; ++itr) {
93 if (address >= module->
start && address < module->getEnd()) {
94 ULONGLONG diff =
module->getEnd() - address;
95 if (diff > max_size) {
105 std::map<ULONGLONG, ScannedModule*>::const_iterator itr = modulesMap.find(address);
106 if (itr != modulesMap.end()) {
A base class of all the reports detailing on the output of the performed module's scan.
ScannedModule * findModuleContaining(ULONGLONG address, size_t size=0) const
size_t getScannedSize(ULONGLONG start_address) const
bool appendToModulesList(ModuleScanReport *report)
bool appendModule(ScannedModule *module)
ScannedModule * getModuleAt(ULONGLONG address) const
Represents a basic info about the scanned module, such as its base offset, size, and the status.
bool isSuspicious() const
ULONGLONG getStart() const
void setSuspicious(bool _is_suspicious)
bool resize(size_t newSize)
Final summary about the scanned process.