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

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

3 answers to this question

Recommended Posts

I add this also :

 

 

function libBase(lib, off, val, type)

    local a = 0;

    for i, v in ipairs(gg.getRangesList(lib)) do

        if v.state == "Xa" then

            a = v.start + off;

            break

        end

    end

    if a == 0 then

        return print("Not found lib");

    end

    local addr = {{

        address = a,

        flags = type,

        value = val .. "h"

    }};

    gg.setValues(addr);

end

Link to comment
Share on other sites

On 9/23/2022 at 6:08 PM, MikeFOLO said:

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) 

 

Use code arm bro

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.