function cleanOffset(offset) if not offset or offset < 0 then return 0 end return offset end -- 时间段判断 原样不动 function getTimeText() local h = tonumber(os.date("%H")) if h >= 0 and h < 6 then return "凌晨" elseif h >= 6 and h < 10 then return "早上" elseif h >= 10 and h < 14 then return "中午" elseif h >= 14 and h < 18 then return "下午" elseif h >= 18 and h < 22 then return "晚上" else return "深夜" end end function addToFile(content) local filePath = "/storage/emulated/0/叶天_4.4.4_32Bit_偏移量.h" local file = io.open(filePath, "w") if file then file:write(content) file:close() end end function searchValue(name,searchStr,refineStr,range,dataType) gg.setRanges(range) gg.searchNumber(searchStr,dataType) if refineStr ~= nil and refineStr ~= "" then gg.refineNumber(refineStr,dataType) end end function getLibBase(libName) local ranges = gg.getRangesList(libName) if ranges and #ranges > 0 then return ranges[1].start end return nil end local UE4 = getLibBase("libUE4.so") local gameChineseName = "BETA PUBG MOBILE" local packageName = gg.getTargetPackage() local gameInfo = gg.getTargetInfo() local gameVersionName = gameInfo and gameInfo.versionName or "未知" local versionCode = gameInfo and gameInfo.versionCode or "未知" local TB = "脚本已结束:\n" TB = TB .. "/*游戏进程: " .. gameChineseName .. "(" .. packageName .. ")\n" TB = TB .. "ABI架构: 32位 \n" TB = TB .. "版本/UID: " .. gameVersionName .. "/" .. versionCode .. "\n" TB = TB .. "抓取时间: " .. os.date("%Y年%m月%d日").." "..getTimeText().." "..os.date("%H时%M分%S秒").."\n" TB = TB .. "频道: @PUBGMYTNB \n" TB = TB .. "作者: 叶天 */\n" gg.clearResults() gg.setVisible(false) searchValue("Gname","5.60519386e-45;1.0;-1.0:9","5.60519386e-45",16,16) fw = gg.getResults(1) if fw[1] then local add = string.format("0x%x",fw[1].address-UE4-0x8) TB = TB.."Gname Offsets :"..add..")+0x88);\n" end gg.clearResults() searchValue("GWorld","6208;1;4::200","6208",16,4) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local add = string.format("0x%x",_G[1].address-UE4+0x24) TB = TB.."GWorld Offsets :"..add..")+0x3C);\n" end gg.clearResults() searchValue("VMatrix","90F;16384D","90",16,16) fw = gg.getResults(1) if fw[1] then local add = string.format("0x%x",fw[1].address-UE4+0x14) TB = TB.."VMatrix Offsets :"..add..")+0x7C);\n\n" end gg.clearResults() searchValue("GNames","-390230032;-382906384;-485856597::43","-382906384",16384,4) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x",_G[1].address-UE4) TB = TB.."#define GNames_Offset "..offsets end gg.clearResults() searchValue("GEngine","16777216",nil,16,4) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local addr = _G[1].address-0x1C local ut = gg.getValues({{address = addr, flags = 4}})[1].value if ut == 4 then local offsets = string.format("0x%x",_G[1].address-UE4+0x28) TB = TB.."\n#define GEngine_Offset "..offsets.." //UEngine\n" end end gg.clearResults() searchValue("GEngine","90F;16384D","90",16,16) fw = gg.getResults(1) if fw[1] then local add = string.format("0x%x",fw[1].address-UE4+0x14) TB = TB.."#define GEngine_Offset "..add.." //ULocalPlayer\n" end gg.clearResults() searchValue("GUObject","480000",nil,16,4) fw = gg.getResults(1) if fw[1] then local offsets = string.format("0x%x",fw[1].address-UE4-0x14) TB = TB.."#define GUObject_Offset "..offsets end gg.clearResults() searchValue("GetActorArray","167772165;-382907376;-509562867;167772175;167772168::","-382907376",16384,4) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x",_G[1].address-UE4) TB = TB.."\n#define GetActorArray_Offset "..offsets end gg.clearResults() searchValue("Canvas_Map","4;7;603::","603",16,4) fw = gg.getResults(1) if fw[1] then local offsets = string.format("0x%x",fw[1].address-UE4+0x10) TB = TB.."\n#define Canvas_Map_Offset "..offsets end gg.clearResults() searchValue("ProcessEvent","167772160;-442560424;-516948175;167772163;167772162;167772160::200","-442560424",16384,4) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x",_G[1].address-UE4-0x18) TB = TB.."\n#define ProcessEvent_Offset "..offsets.." //Child" end gg.clearResults() searchValue("ProcessEvent","167772160;-382906384;-443088844;-443154420::","-382906384",16384,4) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x",_G[1].address-UE4) TB = TB.."\n#define ProcessEvent_Offset "..offsets.." //Main" end gg.clearResults() searchValue("GNativeAndroidApp","10000~99999;1800000000~1899999999;10000~99999;605::","605",8|16,4) fw = gg.getResults(1) if fw[1] then local offsets = string.format("0x%x",fw[1].address-UE4-0x34) TB = TB.."\n#define GNativeAndroidApp_Offset "..offsets end gg.clearResults() searchValue("Actors","h34 00 00 00 34 00 00 00 40 01 00 00","1",8,1) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x", _G[1].address-UE4+0x2B) TB = TB.."\n#define Actors_Offset "..offsets.."\n" end gg.clearResults() searchValue("LaunchBP","-443535056;-443744236;-197088529::420","-443744236",16384,4) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x",_G[1].address-UE4-0x10) TB = TB.."\n#define LaunchBP_Offset "..offsets--BP追踪 end gg.clearResults() searchValue("ShootBulletInner","-9.3991982e20;-9.49153888e20;-1.84940124e24;-1.06174099e28::83","-1.84940124e24",16384,16) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x", _G[1].address-UE4-0x10) TB = TB.."\n#define ShootBulletInner_Offset "..offsets--Sh追踪 end gg.clearResults() searchValue("UpdateVolleyShootParameters","-1.30951038e25;-3.3616461e27;-9.49153888e20;-1.84940124e24::200","-1.30951038e25",16384,16) fw = gg.getResults(1) if fw[1] then local offsets = string.format("0x%x",fw[1].address-UE4) TB = TB.."\n#define UpdateVolleyShootParameters_Offset "..offsets--Up追踪 end gg.clearResults() searchValue("LineOfSightTo","2.52435514e-28;-1.30939232e25;1.5782063e-30","-1.30939232e25",16384,16) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x",_G[1].address-UE4) TB = TB.."\n#define LineOfSightTo_Offset "..offsets--掩体判断 end gg.clearResults() searchValue("GetCameraRotation","-306115840;-306050304;-306181376;-301983216::150","-306050304",16384,4) local _G = gg.getResults(gg.getResultsCount()) if _G[1] then local offsets = string.format("0x%x",_G[1].address-UE4+0x4) TB = TB.."\n#define GetCameraRotation_Offset "..offsets end gg.clearResults() searchValue("GetCameraLocation","-306181376;-305067264;-306181376;-301983216::63","-306181376",16384,4) fw = gg.getResults(1) if fw[1] then local offsets = string.format("0x%x",fw[1].address-UE4+0x4) TB = TB.."\n#define GetCameraLocation_Offset "..offsets end gg.clearResults() TB = TB .. "\n\n退出.\nBy 叶天" addToFile(TB) gg.toast("偏移采集完成,已保存文件") print(TB)