SplitScript reference / Process / scanMemory
Process.scanMemory
Method
Process.scanMemory(signature: Signature) -> async address
Scans every readable mapped memory range in the process.
Ranges are visited from the highest address to the lowest address and unreadable mappings are skipped. The operation suspends until a match exists and is cancelled automatically when the process closes. Prefer module or explicit-range scans when the target is known because they perform less work. Only a bounded window is inspected per tick, so even a large process-wide search keeps yielding to the host.
This can initialize an attachment-scoped address in onAttach or rediscover an allocation that moved while the same process remains open from whileAttached. A pending per-update invocation suppresses timer decisions until the scan completes.
Parameters
signature: The compiled signature pattern.
Effects: reads process memory, requires an attached process, suspends, cancels when the process closes
Runtime behavior: available in suspending attachment code; suspends; cancels when the process closes
Examples
Discover a runtime-created marker outside known modules
let timerData = await process.scanMemory(sig"54 49 4D 52 ?? ?? ?? ??")