Jump to content
  • 0

libBase that take 'libil2cpp.so' the target offset 0x46992E0 the value to change 'D65F03C0h' and the type gg.TYPE_DWORD


MikeFOLO
 Share

Question

Hello,

 

I need help on a function that take 'libil2cpp.so' the target offset for example 0x46992E0 the value to change 'D65F03C0h' and the type gg.TYPE_DWORD

 

Example: 

libBase('libil2cpp.so', 0x46992E0, 'D65F03C0h', gg.TYPE_DWORD) 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi! You can use template script for offset patching from here: Il2Cpp Hex Patch via GG
 

function libBase(lib, offset,hex)
gg.setVisible(false)
    local targetAddr = 0
    local hexStrCount = #hex:gsub(" ", "")
    if hexStrCount%2~=0 then return print("Check your hex again. Something wrong there") end 
    local hexCount = hexStrCount/2
    
    for i, v in ipairs(gg.getRangesList(lib)) do
        if v.type:sub(3,3) == "x" then targetAddr=v.start+offset break end 
    end
    local editHex = {}
    for i=1, hexCount do
        editHex[i] = {address=targetAddr+(i-1), flags=gg.TYPE_BYTE}
    end
    gg.loadResults(editHex)
    gg.getResults(hexCount)
local edit = "h"..hex
    gg.editAll(edit,1)
gg.clearResults()
end

--[[Use it as a code eg
libBase("libil2cpp.so",0x46992E0,"D6 5F 03 C0") ]]

*The script are derived from @DARK_DEMON_SCRIPTER with little adjustment to suits your goal.
 

Quote

the value to change 'D65F03C0h'

It's an array of bytes/hex string of D6 5F 03 C0, Is this what you means by dword? or do you wan't to change that hex into dword?

Edited by MainC
word
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.