diff options
| author | auth12 <[email protected]> | 2020-08-06 15:33:18 +0100 |
|---|---|---|
| committer | auth12 <[email protected]> | 2020-08-06 15:33:18 +0100 |
| commit | d120e7b489adc42a4489c63305413dfe52ed8bbf (patch) | |
| tree | 6c114e3b0e8f22aa4c0210e2006a88ec63182b95 /client/src/util/util.cpp | |
| parent | More ui improvements. (diff) | |
| download | loader-d120e7b489adc42a4489c63305413dfe52ed8bbf.tar.xz loader-d120e7b489adc42a4489c63305413dfe52ed8bbf.zip | |
Improved CPU usage drastically.
Switched to directx9.
Reduced RAM usage by only remapping modules from a blacklist.
Diffstat (limited to 'client/src/util/util.cpp')
| -rw-r--r-- | client/src/util/util.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/util/util.cpp b/client/src/util/util.cpp index fab886e..7103604 100644 --- a/client/src/util/util.cpp +++ b/client/src/util/util.cpp @@ -56,11 +56,13 @@ bool util::close_handle(HANDLE handle) { } -void pe::get_all_modules(std::unordered_map<std::string, virtual_image>& modules) { +bool pe::get_all_modules(std::unordered_map<std::string, virtual_image>& modules) { + modules.clear(); + auto peb = util::peb(); - if (!peb) return; + if (!peb) return false; - if (!peb->Ldr->InMemoryOrderModuleList.Flink) return; + if (!peb->Ldr->InMemoryOrderModuleList.Flink) return false; auto* list = &peb->Ldr->InMemoryOrderModuleList; @@ -74,4 +76,6 @@ void pe::get_all_modules(std::unordered_map<std::string, virtual_image>& modules modules[name] = virtual_image(entry->DllBase); } + + return !modules.empty(); }
\ No newline at end of file |