local XGCK = -1 function Main() local Lin=gg.multiChoice({ "云更新测试", "云更新测试", "云更新测试", "退出加密测试" },nil,"凛-测试云更新专用") if Lin==nil then else if Lin[1]==true then 普通写法() end if Lin[2]==true then 基址写法() end if Lin[3]==true then 指针写法() end if Lin[4]==true then os.exit() end end XGCK=-1 end function 普通写法() gg.clearResults() gg.setRanges(gg.REGION_BAD) gg.searchNumber("4.8559592e34;1.4312985e-45;2.7615351e29",gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0,-1) gg.searchNumber("1.9012985e-45",gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0,-1) gg.getResults(100) gg.editAll("520991314",gg.TYPE_FLOAT) gg.clearResults() gg.alert("执行完成\n模式:普通写法\n凛-测试_加密专用") end function 基址写法() gg.clearResults() gg.searchNumber("4.8559592e34;1.4312985e-45;2.7615351e29;1.9012985e-45",gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0,-1) local res=gg.getResults(100) gg.clearResults() local batch={} if #res>0 then local base=res[1].address for _,info in ipairs(res) do batch[#batch+1]={address=base+(info.address-base),value="520991314",type=gg.TYPE_FLOAT} end end gg.setValues(batch) gg.alert("执行完成\n模式:基址批量写法\n凛-测试_加密专用") end function 指针写法() local function SearchWrite(Search,Write,Type) gg.clearResults() gg.setVisible(false) gg.searchNumber(Search[1][1],Type) local count=gg.getResultCount() local result=gg.getResults(count) gg.clearResults() local data={} local base=Search[1][2] if count<=0 then gg.toast("未找到主特征码") return false end for _,v in ipairs(result) do v.isUseful=true end for k=2,#Search do local tmp={} local offset=Search[k][2]-base local num=Search[k][1] for _,v in ipairs(result) do tmp[#tmp+1]={address=v.address+offset,flags=v.flags} end tmp=gg.getValues(tmp) for i,v in ipairs(tmp) do if v.value~=num then result[i].isUseful=false end end end for _,v in ipairs(result) do if v.isUseful then data[#data+1]=v.address end end if #data<=0 then gg.toast("无匹配数据") return false end local t={} for _,addr in ipairs(data) do for _,w in ipairs(Write) do local offset=w[2]-base t[#t+1]={address=addr+offset,flags=Type,value=w[1]} if w[3] then local item={t[#t]} item.freeze=true gg.addListItems(item) end end end gg.setValues(t) gg.toast("已修改"..#t.."条数据") end gg.setRanges(gg.REGION_ANONYMOUS) local SS={{4,0},{1,0x50}} local XG={{1,0x60}} local Type=gg.TYPE_FLOAT SearchWrite(SS,XG,Type) gg.alert("执行完成\n模式:指针写法\n凛-测试_加密专用") end while true do if gg.isVisible(true) then XGCK=1 gg.setVisible(false) end gg.clearResults() if XGCK==1 then Main() end end