Lua:Class:RIPRelativeScanner
<> Reference
class RIPRelativeScanner : Object
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.
Contents
Inheritance[edit]
| Class | Inherits From | Description |
|---|---|---|
| RIPRelativeScanner | Object | Scans a memory range or module for RIP-relative instructions. |
Creation[edit]
<> Reference
function createRipRelativeScanner(startaddress, stopaddress, includejumpsandcalls) : RIPRelativeScanner
<> Reference
function createRipRelativeScanner(modulename, includejumpsandcalls) : RIPRelativeScanner
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]
local scanner = createRipRelativeScanner("game.exe")
print("RIP-relative instruction count: " .. tostring(scanner.Count))
for i = 0, scanner.Count - 1 do
print(string.format("%X", scanner.Address[i]))
end
local startAddress = getAddress("game.exe")
local stopAddress = startAddress + getModuleSize("game.exe")
local scanner = createRipRelativeScanner(startAddress, stopAddress, true)
print("RIP-relative instruction count: " .. tostring(scanner.Count))
for i = 0, math.min(scanner.Count - 1, 9) do
print(string.format("%X", scanner.Address[i]))
end
See Also[edit]
Main Pages