Jump to content
  • 0

Need help in script. I don't know if it's possible to do it automatically


Nikhil336

Question

2 answers to this question

Recommended Posts

Posted
On 8/26/2022 at 1:23 PM, Nikhil336 said:

Is it possible to do it automatically?

Yes, automation of searching for tagged pointers to an address or a range of addresses is pretty straightforward. Here is an example of the code for adding tag to a pointer: 

address = 0x1122334455
taggedAddress = address | 0xB400000000000000

Next example shows how code for tagging pointers can be organized to follow good practices: 

local POINTER_TAG = 0xB4
local TAG_SHIFT = 56

local function addTag(pointer)
  return pointer | (POINTER_TAG << TAG_SHIFT)
end

The usage of the code above can be illustrated with modified version of Pointer scan script to search for tagged pointers: 

-- Modified version of the following script to search for tagged pointers
-- https://gameguardian.net/forum/files/file/30-pointer-scan/

local POINTER_TAG = 0xB4
local TAG_SHIFT = 56

local function addTag(pointer)
  return pointer | (POINTER_TAG << TAG_SHIFT)
end

local d = {'', '512'}

while true do
	d = gg.prompt({'Address of value in hex. E.g. BAADBEEF', 'Maximal possible offset. E.g. "100" or "100h" for hex'}, d, {'number', 'number'})
	if d == nil then
		break
	end
	
	local address = tonumber(d[1], 16)
	if address == nil then
		gg.alert('Address must be hex number')
		goto continue_1
	end
	address = addTag(address)
	local offset, hex = string.gsub(d[2], 'h', '')
	if hex == 0 then
		offset = tonumber(offset)
	else
		offset = tonumber(offset, 16)
	end
	if offset == nil then
		gg.alert('Offset must be decimal or hex number')
		goto continue_1
	end
	
	local search = (address - offset)..'~'..address
	gg.searchNumber(search, gg.TYPE_QWORD)
	break;
	
	::continue_1::
end

tagged_pointer_scan.lua

 

Posted

Hello my friend, this is a bug in the game guardian that happens sometimes, and there is no solution, But you can do this with other values so that combining the above values with the value can solve it for you.It is not a final solution, as I told you bug.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.