Lua:Class:RIPRelativeScanner
Jump to navigation
Jump to search
The RIPRelativeScanner class scans a memory range or module for RIP-relative instructions.
A RIPRelativeScanner inherits from Object. It can be used to find instructions that contain RIP-relative addresses. The resulting addresses point to the RIP-relative offset inside the instruction.
Inheritance[edit]
| Class | Inherits From | Description |
|---|---|---|
| RIPRelativeScanner | Object | Scans a memory range or module for RIP-relative instructions. |
Creation[edit]
Creates a RIP-relative scanner.
When a start and stop address are provided, the scanner scans the specified address range. When a module name is provided, the scanner scans the specified module.
The includejumpsandcalls parameter controls whether RIP-relative jumps and calls are included in the results.
Function Parameters[edit]
| Parameter | Type | Description |
|---|---|---|
| startaddress | Integer or CEAddressString | The start address of the memory range to scan. |
| stopaddress | Integer or CEAddressString | The stop address of the memory range to scan. |
| modulename | String | The name of the module to scan. |
| includejumpsandcalls | Boolean (optional) | If true, RIP-relative jumps and calls are included in the scan results. |
Returns[edit]
RIPRelativeScanner — The created RIPRelativeScanner object.
Properties[edit]
| Property | Type | Description |
|---|---|---|
| Count | Integer | The number of instructions found that have a RIP-relative address. |
| Address[] | Integer | An array used to access the results. Each entry is the address of the RIP-relative offset inside the instruction. |
Methods[edit]
This class has no documented methods.
Examples[edit]
1 local scanner = createRipRelativeScanner("game.exe")
2
3 print("RIP-relative instruction count: " .. tostring(scanner.Count))
4
5 for i = 0, scanner.Count - 1 do
6 print(string.format("%X", scanner.Address[i]))
7 end
1 local startAddress = getAddress("game.exe")
2 local stopAddress = startAddress + getModuleSize("game.exe")
3
4 local scanner = createRipRelativeScanner(startAddress, stopAddress, true)
5
6 print("RIP-relative instruction count: " .. tostring(scanner.Count))
7
8 for i = 0, math.min(scanner.Count - 1, 9) do
9 print(string.format("%X", scanner.Address[i]))
10 end