> For the complete documentation index, see [llms.txt](https://refresh-cx.gitbook.io/refresh.cx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://refresh-cx.gitbook.io/refresh.cx-docs/memory/scan.md).

# Scan

Pattern-scans a module (default: the game executable) and returns the address, or nil. With a third argument it resolves a RIP-relative pointer at that offset instead.

## **Syntax**

```lua
refresh.Memory.Scan(pattern [, module [, ripOffset]]) -> Integer
```

## **Return**

{% hint style="success" %}
Integer or nil
{% endhint %}

## Usage Example

```lua
local addr = refresh.Memory.Scan("48 8B 05 ? ? ? ?", "FiveM_GTAProcess.exe")
```
