Not sure which part of the chainer script that has been included in the script, but i modified the getRanges() function little bit.
function getLib()
gg.setRanges(gg.REGION_CODE_APP)
gg.searchNumber(":libRealRacing3.so", gg.TYPE_BYTE)
local a = gg.getResults(1)
gg.clearResults()
local t = gg.getRangesList()
local startAddress = {}
for i, v in ipairs(t) do
if ((a[1].address > v["start"]) and (a[1].address < v["end"])) then
startAddress = {t[i], t[i+1], t[i+2]}
end
end
return startAddress
end
function getRanges()
local archs = {[0x3] = 'x86', [0x28] = 'ARM', [0x3E] = 'x86-64', [0xB7] = 'AArch64'}
local ranges = {}
local t = getLib()
local arch = 'unknown'
for i, v in ipairs(t) do
if v.type:sub(2, 2) == '-' then
local t = gg.getValues({{address = v.start, flags = gg.TYPE_DWORD}, {address = v.start + 0x12, flags = gg.TYPE_WORD}})
if t[1].value == 0x464C457F then
arch = archs[t[2].value]
if arch == nil then arch = 'unknown' end
end
end
if v.type:sub(2, 2) == 'w' then
v.arch = arch
table.insert(ranges, v)
end
end
return ranges
end
local ranges = getRanges()
print(ranges)
Hope it works.