Release 1.7.55: A New Search Engine — Faster, Smarter, with Reference Search
In Process Memory Map version 1.7.55, the search engine was completely reworked. It is now faster, more accurate, and comes with new modes for common reverse-engineering tasks.
New Search Engine
Multithreading
Unlike the old search, the new one is implemented as a parallel search across multiple threads. Large regions are read in 4 MB chunks, and the engine leaves overlap at chunk boundaries so a match that falls on a page boundary is not missed.
Three basic search modes
There used to be two modes; now there are three:
- Readable pages — all pages available for reading
- Read/Write pages — pages available for both reading and writing
- Executable or image pages — a new mode: executable pages and module images
Searching within results and tracking changes
In the next search, the lower ComboBox lets you specify a search-within-results mode.
In this mode, the search range will be narrowed to the results of the previous search.
For quickly checking changes, the results tab's context menu has three actions:
- Keep unchanged in new tab — move to a new tab only the addresses whose value did not change
- Keep changed in new tab — move to a new tab only the ones that changed
- Mark changed in this tab — don't create a new tab, instead highlight the outdated entries in the current one. Changed addresses will then be highlighted in red
Merging search results
Previously, the search would stop once it hit the found-items limit set in the application settings.
Now this limit controls how many results are shown per page. The overall search limit is set to 10,000 addresses.
You move between pages either through the Previous/Next menu, with the Ctrl+PgDown/PgUp hotkeys, or with Ctrl+mouse wheel.
Mask-based search
?? — any byte, A? and ?B — half a byte;
{AddrVA} — rel32 to the given address; the offset is counted from the end of the 4-byte field;
{AddrVA:1}, {AddrVA:2}, {AddrVA:4} — the same, if the instruction has an immediate operand after rel32. RIP is counted from the end of the whole instruction, so the size of this operand must be specified;
For example:
80 3D {AddrVA:1} ?? = CMP byte ptr [RIP + rel32], imm8
66 C7 05 {AddrVA:2} ???? = MOV word ptr [RIP + rel32], imm16
81 3D {AddrVA:4} ???????? — CMP dword ptr [RIP + rel32], imm32
[AddrVA] — absolute address: 4 bytes in a 32-bit process and 8 in a 64-bit one;
[AddrVA:4], [AddrVA:8] — absolute address with its size specified
XX&YY — a byte with a bit mask. For example, 05&C7 covers 05, 0D, 15 … 3D.
Searching for References to an Address and to a String
Two new modes are available: Reference to Address and Reference to String. The engine builds its own set of masks for the target architecture (x86 or x64) and searches not just for the address bytes, but for actual references to that address.
Where Instructions Are Searched For, and Where Just the Address Is
— Instructions are searched for on the executable pages of the image containing the target address. Pages belonging to other modules are skipped: foreign code usually doesn't reference the target address as an instruction.
— Instructions are also searched for across all executable pages that don't belong to any image. This covers JIT code, packers, and injected code.
— On all other readable pages, a regular search for the address value is performed: pointer tables, structures, the stack, data.
✔️ The search range for these modes is formed automatically.
Short jumps (JMP rel8, Jcc rel8) do not take part in the search.
They are encoded with a single offset byte and only work within ±127 bytes of the instruction itself.
Such a jump cannot reference an address in a different function or a different module. The main reason is noise — in the results, they would show up as an almost solid stream of noise from internal jumps within the body of a single function.
That’s why only jumps with a 32-bit offset are searched for.
Strings and Export
The strings dialog has also changed:
First, strings from different regions are now highlighted in different colors
Second, the search inside the dialog has been reworked. Previously, a search simply jumped to the found string, and the next match was reached with F3. Now, all strings that don't match the search results are hidden from the view, and in the remaining ones the matched part is highlighted in yellow.
Third, a quick reference search by the address of the found string has been added for strings.
Similar changes have been made to the export dialog. Now, searching excludes irrelevant entries from the output
A quick-search menu for references to any found function has also been added.
These were the main changes in version 1.7.55; other fixes are of a utility nature and are listed in the updates.txt file.
The release date for the next version, 1.7.56, is not yet known, since the task set for the next version is a complete replacement of the disassembler engine with an in-house one.
The current Distorm no longer satisfies our needs due to its limitations and will no longer be used.