I learned that if you want to implement some functions with scripts, you need to decompile the game first.
There may be some errors in my description,but some decompilation results are attached:
A -369,098,634|ae029a6c|4|8a000223|0|0|0|0|r-xp|/data/data/com.vmos.pro/osimg/r/ot01/data/app/com.miHoYo.enterprise.NGHSoD-1/lib/arm/libil2cpp.so|8fea6c
B -476,016,639|ae17a94c|4|e3a00000|0|0|0|0|r-xp|/data/data/com.vmos.pro/osimg/r/ot01/data/app/com.miHoYo.enterprise.NGHSoD-1/lib/arm/libil2cpp.so|a4f94c
C -509,607,936|ae5b5324|4|1a000044|0|0|0|0|r-xp|/data/data/com.vmos.pro/osimg/r/ot01/data/app/com.miHoYo.enterprise.NGHSoD-1/lib/arm/libil2cpp.so|e8a324
In the Lua script, he looks like this(This script is used to modify health and attack power.):
function a()
skz({"libil2cpp.so"},{"0x28312c0"},{840043488,4})
gg.toast("success")endfunction b()
skz({"libil2cpp.so"},{"0x3889f4c"},{1384120352,4})
gg.toast("success")end
(skz() is a custom function. If you want to know more about it:
function skz(so,offset,edit)function toast(a) gg.toast(a) gg.sleep(500)endif so[1][1]thenif edit=='gg.TYPE_AUTO'or'127'or'gg.TYPE_BYTE'or'1'or'gg.TYPE_DOUBLE'or'64'or'gg.TYPE_DWORD'or'4'or'gg.TYPE_FLOAT'or'16'or'gg.TYPE_QWORD'or'32'or'gg.TYPE_WORD'or'2'or'gg.TYPE_XOR'or'8'then
gg.clearResults() gg.searchNumber(so[1][1],edit)local count=gg.getResultCount()local result=gg.getResults(count) gg.clearResults()local data={}local base=so[1][2]if(count>0)thenfor i,v in ipairs(result)do v.isUseful=trueendfor k=2,#so dolocal tmp={}local Offset=so[k][2]-base local num=so[k][1]for i,v in ipairs(result)do tmp[#tmp+1]={} tmp[#tmp]["address"]=v["address"]+Offset tmp[#tmp]["flags"]=v["flags"]end tmp=gg.getValues(tmp)for i,v in ipairs(tmp)doif(tostring(v["value"])~=tostring(num))then result[i].isUseful=falseendendendfor i,v in ipairs(result)doif(v.isUseful)then data[#data+1]=v["address"]endendif(#data>0)thenlocal t={}local base=so[1][2]for i=1,#data dofor k,w in ipairs(offset)do Offset=w[2]-base t[#t+1]={} t[#t]["address"]=data[i]+Offset t[#t]["flags"]=edit t[#t]["value"]=w[1]if(w[3]==true)thenlocal item={} item[#item+1]=t[#t] item[#item].freeze=true gg.addListItems(item)endendend gg.setValues(t) toast("Open successfully")else toast("Secondary signature error")returnfalseendelse toast("No result of main signature search")returnfalseendendelsefor k, v in pairs(offset)do
offset[k]=tonumber(v:gsub("0x",""),16)endlocal ti = gg.getTargetInfo()local ranges ={}local t = gg.getRangesList('^/data/*.so*$')for i, v in pairs(t)doif v.type:sub(2,2)=='w'then
table.insert(ranges, v)endendlocal S_list = ranges
local t ={}local _A =nil
_t =4for i in pairs(S_list)dolocal _N = S_list[i]["internalName"]:gsub('^.*/','')if so[1]== _N and so[2]== S_list[i].state then
_A = S_list[i]breakendendif _A then
t[#t +1]={}
t[#t]["address"]= _A["start"]+ offset[1]
t[#t]["flags"]= _t
if#offset ~=1thenfor i =2,#offset dolocal S = gg.getValues(t)
t ={}for _ in pairs(S)doifnot ti["x64"]then
S[_]["value"]= S[_]["value"]&0xFFFFFFFFend
t[#t +1]={}
t[#t]["address"]= S[_]["value"]+ offset[i]
t[#t]["flags"]= _t
endend
_A = t[#t]["address"]endelse
_A=gg.getRangesList(so[1])[1]if _A then
_A=_A["start"]+offset[1]else
_A=0endendif _A==0then
toast("So acquisition failed")endif edit thenlocal edittt={}
edittt[1]={}
edittt[1]["address"]=_A
edittt[1]["flags"]=edit[2]if edit[3]then
edittt[1]["freeze"]=trueend
edittt[1]["value"]=edit[1]if edit[3]then
gg.addListItems(edittt)returntrueelse
gg.setValues(edittt)returntrueendelsereturn _A
endendend
)
This script is no longer useful. If anyone knows about decompiled games, please tell me something about this. I want to learn to write such a script. Thank you.
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.
Question
winyeki19
I learned that if you want to implement some functions with scripts, you need to decompile the game first.
There may be some errors in my description,but some decompilation results are attached:
In the Lua script, he looks like this(This script is used to modify health and attack power.):
(skz() is a custom function. If you want to know more about it:
)
This script is no longer useful. If anyone knows about decompiled games, please tell me something about this. I want to learn to write such a script. Thank you.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.