<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cheatengine.org/index.php?action=history&amp;feed=atom&amp;title=Lua%3AClass%3ARIPRelativeScanner</id>
	<title>Lua:Class:RIPRelativeScanner - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cheatengine.org/index.php?action=history&amp;feed=atom&amp;title=Lua%3AClass%3ARIPRelativeScanner"/>
	<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Lua:Class:RIPRelativeScanner&amp;action=history"/>
	<updated>2026-06-26T11:13:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Lua:Class:RIPRelativeScanner&amp;diff=7996&amp;oldid=prev</id>
		<title>Leunsel: Initial page creation.</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Lua:Class:RIPRelativeScanner&amp;diff=7996&amp;oldid=prev"/>
		<updated>2026-06-21T17:13:52Z</updated>

		<summary type="html">&lt;p&gt;Initial page creation.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Lua]]&lt;br /&gt;
{{CodeBox|'''class''' RIPRelativeScanner ''':''' Object}}&lt;br /&gt;
&lt;br /&gt;
The RIPRelativeScanner class scans a memory range or module for RIP-relative instructions.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Inheritance===&lt;br /&gt;
{|width=&amp;quot;85%&amp;quot; cellpadding=&amp;quot;10%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
!align=&amp;quot;left&amp;quot;|Class&lt;br /&gt;
!align=&amp;quot;left&amp;quot;|Inherits From&lt;br /&gt;
!style=&amp;quot;width: 80%;background-color:white;&amp;quot; align=&amp;quot;left&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|RIPRelativeScanner&lt;br /&gt;
|Object&lt;br /&gt;
|Scans a memory range or module for RIP-relative instructions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Creation===&lt;br /&gt;
{{CodeBox|'''function''' createRipRelativeScanner(''startaddress'', ''stopaddress'', ''includejumpsandcalls'') ''':''' RIPRelativeScanner}}&lt;br /&gt;
{{CodeBox|'''function''' createRipRelativeScanner(''modulename'', ''includejumpsandcalls'') ''':''' RIPRelativeScanner}}&lt;br /&gt;
&lt;br /&gt;
Creates a RIP-relative scanner.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The ''includejumpsandcalls'' parameter controls whether RIP-relative jumps and calls are included in the results.&lt;br /&gt;
&lt;br /&gt;
===Function Parameters===&lt;br /&gt;
{|width=&amp;quot;85%&amp;quot; cellpadding=&amp;quot;10%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
!align=&amp;quot;left&amp;quot;|Parameter&lt;br /&gt;
!align=&amp;quot;left&amp;quot;|Type&lt;br /&gt;
!style=&amp;quot;width: 80%;background-color:white;&amp;quot; align=&amp;quot;left&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|startaddress&lt;br /&gt;
|Integer or [[CEAddressString]]&lt;br /&gt;
|The start address of the memory range to scan.&lt;br /&gt;
|-&lt;br /&gt;
|stopaddress&lt;br /&gt;
|Integer or [[CEAddressString]]&lt;br /&gt;
|The stop address of the memory range to scan.&lt;br /&gt;
|-&lt;br /&gt;
|modulename&lt;br /&gt;
|String&lt;br /&gt;
|The name of the module to scan.&lt;br /&gt;
|-&lt;br /&gt;
|includejumpsandcalls&lt;br /&gt;
|Boolean (optional)&lt;br /&gt;
|If true, RIP-relative jumps and calls are included in the scan results.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
RIPRelativeScanner — The created RIPRelativeScanner object.&lt;br /&gt;
&lt;br /&gt;
===Properties===&lt;br /&gt;
{|width=&amp;quot;85%&amp;quot; cellpadding=&amp;quot;10%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
!align=&amp;quot;left&amp;quot;|Property&lt;br /&gt;
!align=&amp;quot;left&amp;quot;|Type&lt;br /&gt;
!style=&amp;quot;width: 80%;background-color:white;&amp;quot; align=&amp;quot;left&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|Count&lt;br /&gt;
|Integer&lt;br /&gt;
|The number of instructions found that have a RIP-relative address.&lt;br /&gt;
|-&lt;br /&gt;
|Address[]&lt;br /&gt;
|Integer&lt;br /&gt;
|An array used to access the results. Each entry is the address of the RIP-relative offset inside the instruction.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Methods===&lt;br /&gt;
This class has no documented methods.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local scanner = createRipRelativeScanner(&amp;quot;game.exe&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
print(&amp;quot;RIP-relative instruction count: &amp;quot; .. tostring(scanner.Count))&lt;br /&gt;
&lt;br /&gt;
for i = 0, scanner.Count - 1 do&lt;br /&gt;
  print(string.format(&amp;quot;%X&amp;quot;, scanner.Address[i]))&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local startAddress = getAddress(&amp;quot;game.exe&amp;quot;)&lt;br /&gt;
local stopAddress = startAddress + getModuleSize(&amp;quot;game.exe&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local scanner = createRipRelativeScanner(startAddress, stopAddress, true)&lt;br /&gt;
&lt;br /&gt;
print(&amp;quot;RIP-relative instruction count: &amp;quot; .. tostring(scanner.Count))&lt;br /&gt;
&lt;br /&gt;
for i = 0, math.min(scanner.Count - 1, 9) do&lt;br /&gt;
  print(string.format(&amp;quot;%X&amp;quot;, scanner.Address[i]))&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{LuaSeeAlso}}&lt;/div&gt;</summary>
		<author><name>Leunsel</name></author>
		
	</entry>
</feed>