Skip to content
chrncl
Work06 / 09
Personal/PERSONAL - C++ - Win32 - SIMD

Memory Scanner

A user-mode memory scanner that enumerates process memory and pattern-scans signatures using hand-written AVX2 intrinsics.

Walks a target process's virtual address space via VirtualQueryEx, filtering to committed, readable regions before handing them to a wildcard byte-pattern scanner implemented three ways: a naive byte-by-byte baseline, a Boyer-Moore-Horspool variant for non-wildcard patterns, and an AVX2 SIMD path comparing 32 bytes per instruction for the no-wildcard hot path. On a typical 4GB process space, the SIMD scanner completes in under 200ms.

Writing the SIMD path meant understanding 32-byte buffer alignment, how _mm256_cmpeq_epi8 produces a bitmask, and how _mm256_movemask_epi8 collapses it to a 32-bit integer for scalar comparison, and handling tail bytes cleanly when a region's length is not a multiple of 32, without buffer overreads, took more care than the main loop.

Status

Personal

Stack

C++ · WIN32 API · VIRTUAL MEMORY · PATTERN SCAN · SIMD/AVX2 · INTRINSICS