Jump to content
  • 0

How to used offset


anhdrg

Question

Posted

I run chainer.lua 

This is log when i run chainer lua

libiMonster.so:bss + 0x65B0 [0x77925D95B0] -> 0x7717643180 + 0xE0 -> 0x770D7C3B80 + 0x38 -> 0x776852BC00 + 0x40 = 12

I want to create a script that fixes 12 to 20 from source libimonster.so:bss and offset as above.

1 answer to this question

Recommended Posts

Posted
local info = gg.getTargetInfo()
local flg = 0x4
if info.x64 then flg = 0x20 end
local start = gg.getRangesList('libiMonster.so:bss')[1].start
local chain = {0x65B0,0xE0,0x38}
local offset = 0x40
local newValue = 0x14

local function gotoPointer(c)
  local p,pointer
  pointer = start
  for i=1, #c do
    p = gg.getValues({
        { address = pointer+c[i] , flags = flg }
        })
    pointer = p[1].value
  end
  return pointer
end

gg.setValues({
    {
      address = gotoPointer(chain)+offset,
      flags = 0x4,
      value = newValue
    }
})

 

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.