Jump to content
  • 0

Save relative location instead of absolute?


GeraldLim

Question

Posted

Since every time a game gets launched the memory allocated changes, Is it possible to save a relative value instead of an absolute location? 

Example: a value at an offset from the start of a library that GG is able to find using the "goto" key.

4 answers to this question

Recommended Posts

Posted

Lib base editing.

4 hours ago, Crystal_Mods100x said:

are you talking about lib base value editing or regular editing like editing one value from goto after refining your last value you got

 

Posted

Its better just to use the ordinary so and py im thinking ur saying search directly the value u want to edit by finding its address then editing it in Xa 

but this is better:

--Main Function
function LibraryPatch(libName,offset,target_flags,edit,msg)
  gg.setRanges(gg.REGION_CODE_APP)
  local so = gg.getRangesList(libName)[1].start
  local py = offset
  local v = {}
  v[1] = {address = so + py, flags = target_flags, value = edit}
  gg.setValues(v)
  gg.toast(msg)
end

--Example:(use libUE4.so or libil2cpp.so)
LibraryPatch("libil2cpp.so",0x9119,16,99999,"test toast")

is this what you want?

all u have to do is search for the file and put 2 values together to get an offset, put your flag, value and toast message then you are done 😄

a

Posted
7 hours ago, Crystal_Mods100x said:

Its better just to use the ordinary so and py im thinking ur saying search directly the value u want to edit by finding its address then editing it in Xa 

but this is better:

--Main Function
function LibraryPatch(libName,offset,target_flags,edit,msg)
  gg.setRanges(gg.REGION_CODE_APP)
  local so = gg.getRangesList(libName)[1].start
  local py = offset
  local v = {}
  v[1] = {address = so + py, flags = target_flags, value = edit}
  gg.setValues(v)
  gg.toast(msg)
end

--Example:(use libUE4.so or libil2cpp.so)
LibraryPatch("libil2cpp.so",0x9119,16,99999,"test toast")

is this what you want?

all u have to do is search for the file and put 2 values together to get an offset, put your flag, value and toast message then you are done 😄

a

Simple and lite weight syntax

local library = "libil2cpp.so"

local function memPatch (offset, hex)
  local addr = gg.getRangesList(library)[1].start
  local value = {{
      address = addr + offset,
      flags = gg.TYPE_QWORD,
      value = hex .. "r",
  }}
  gg.setValues(value)
end

memPatch(0x145885, "01 25 A0 50 64 A1 32 45")

It is preferable to use hex for editing cause arm opcode may cause some exeption

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.