wilmans2m

Lasthope3

Mar 28th, 2024 (edited)
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 28.80 KB | Gaming | 0 0
  1. LUA = 'WILS2M'
  2. GLabel = 'Last Hope 3'
  3. GProcess = 'com.JESoftware.LastHopeSniper3'
  4. GVersion = '(vAU.02)'
  5. xbit = 64
  6. LibResult = 1
  7. xlib = 'libil2cpp.so'
  8. xREV = 1  I={}
  9. xCNE = 0
  10. xSSE = 0
  11. XbitX = 2
  12. printx = '---------------------------------------------------------------'
  13. expire='free'
  14. game = gg.getTargetInfo()
  15. P=game.processName
  16. FP=game.name
  17. L=gg.getTargetInfo().label
  18. M=gg.getTargetInfo()["label"]
  19. V=game.versionName
  20. TP=gg.getTargetPackage()
  21. xTAGx="Have fun"
  22. xLINKx="https://t.me/HxE_Chat"
  23. xLINK1x="https://www.tiktok.com/@hxesq"
  24. APEXSN=gg.getFile():match('[^/]+$')
  25. printx="---------------------------------------------------------------"
  26. print(printx)
  27. print(xTAGx)
  28. print("Telegram = "..xLINKx)
  29. print("TikTok = "..xLINK1x)
  30. print(printx)  
  31. print("Script = "..GLabel.."  "..GVersion)
  32. --███████████████████████
  33. --███████████████████████
  34. --███████████████████████
  35. -- APEX[GG]v2
  36. apex=1
  37. gg.setVisible(false)
  38. v=gg.getTargetInfo()
  39.     if v==nil then
  40.         print("×× ERROR ××\n×× INVALID PROCESS SELECTED / OR NO ROOT ACCESS")
  41.         gg.setVisible(true) os.exit()
  42.         return
  43.     end
  44.    
  45. HxEmenu = ('            ⚡HxE Menu by wils2m⚡\
  46.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  47.                     ⛥🇮‌🇳‌🇫‌🇴‌⛥\
  48.  🎮🅖🅐🅜🅔🎮 : '..GLabel..'\
  49.  🎰🅥🅔🅡🅢🎰 : '..GVersion..'\
  50.    🎰🅐🅡🅜🎰   : '..xbit..'\
  51. \
  52. ⏳Exᴘɪʀᴇᴅ Date⏳ : '..expire..'\
  53. 🎁 Encryption 🎁 :  '..expire..'\
  54.            ❦ ════ •⊰❂ - ❂⊱• ════ ❦')
  55.            
  56. gg.alert(HxEmenu)
  57.  
  58. gg.alert("                           Patch Note\
  59.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  60. - HxE script menu\
  61. - Huge thanks to Apex[GG]\
  62. - Script auto updated\
  63. - Set player to High XP\
  64. - Unlimited Gold, Coins\
  65. - Unlimited Ammos, No Reload\
  66. - No Ads\
  67. - Free upgrades\
  68. - Max Zoom\
  69.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  70. ")
  71. ------------------------------------------------------------------------------
  72. A={} for i =1,100 do A[i]={} end
  73. ------------------------------------------------------------------------------
  74. OFF="× " ON="√ "
  75. UG=OFF UC=OFF HL=OFF NR=OFF MZ=OFF FU=OFF WH=OFF DM=OFF UA=OFF PL=OFF AP=OFF
  76.     if v.x64 then x1="hC0BEA0D2" x2='h006A98D2'
  77.     else x1="h990040E3" x2='h640000E3'
  78.     end
  79.  
  80. function menu()
  81. apex=0
  82. gg.toast(xTAGx)  
  83. mc=gg.multiChoice({
  84.     UG.."Unlimited Gold",
  85.     UC.."Unlimited Coins",
  86.     WH.."Weapons Hacks",
  87.     DM.."High Damage",
  88.     UA.."Unlimited Ammo",
  89.     FU.."Free upgrades",
  90.     HL.."Player to High Level",
  91.     NR.."No Reload",
  92.     MZ.."Max Zoom",
  93.     "[ EXIT ]"},
  94.     {},xTAGx.."\n"..xLINKx.."\n"..GLabel.." "..GVersion.." "..xBITx)
  95.    
  96.     if mc==nil then cancel() return end
  97.     if mc[1] then gold() end
  98.     if mc[2] then coins() end
  99.     if mc[3] then weapons() end
  100.     if mc[4] then damage() end
  101.     if mc[5] then ammo() end
  102.     if mc[6] then upgrade() end
  103.     if mc[7] then xp() end
  104.     if mc[8] then reload() end
  105.     if mc[9] then zoom() end
  106.    
  107. xhaX={
  108.     UG.."Unlimited Gold",
  109.     UC.."Unlimited Coins",
  110.     WH.."Weapons Hacks",
  111.     DM.."High Damage",
  112.     UA.."Unlimited Ammo",
  113.     FU.."Free upgrades",
  114.     HL.."Player to High Level",
  115.     NR.."No Reload",
  116.     MZ.."Max Zoom",
  117.     }
  118. xhaX=table.concat(xhaX, "\n")
  119. xhaX=tostring(xhaX)
  120.  
  121.     if mc[10] then exit() return end
  122.  
  123. gg.toast("[√] Complete")
  124. gg.alert(GLabel.." "..GVersion.." "..xBITx.."\n\n"..xhaX,"OK",nil,xTAGx)  
  125.  
  126. end
  127.  
  128. --█████████████████████████████████████████████
  129.  
  130. --public class JEGameSettings : JESingletonManagerBehaviour<JEGameSettings>
  131. --public static bool get_NoSplashAds
  132.     A[1].class="JEGameSettings"
  133.     A[1].method="get_NoSplashAds"
  134. --public class JEGameSettings : JESingletonManagerBehaviour<JEGameSettings>
  135. --public static bool get_NoWaitTimeOnCrates()
  136.     A[2].class="JEGameSettings"
  137.     A[2].method="get_NoWaitTimeOnCrates"
  138. --public static bool get_NoSecretCompartment()
  139.     A[3].class="JEGameSettings"
  140.     A[3].method="get_NoSecretCompartment"
  141.  
  142.     function adprem()
  143.     for i = 1,3  do if A[i].error == 1 then error() break return end end
  144.     for i = A[1].start, A[3].finish do o=I[i]
  145.     if AP==OFF then x=1 arm() else revert() end
  146.     end
  147.  
  148.     if AP==OFF then AP=ON else AP=OFF end
  149.     end
  150.        
  151. --█████████████████████████████████████████████
  152.  
  153. --public class GlobalStatistics
  154. --public static int get_AllaRubiner
  155. --10M x="h2013A0D2"
  156.     A[4].class="GlobalStatistics"
  157.     A[4].method="get_AllaRubiner"
  158.  
  159. function gold()
  160.     if A[4].error==1 then error() return end
  161.     for i = A[4].start, A[4].finish do o=I[i]
  162.     if UG==OFF then x="h2013A0D2" arm() else revert() end
  163.     end
  164.  
  165.     if UG==OFF then UG=ON else UG=OFF end
  166.     end
  167.  
  168. --█████████████████████████████████████████████
  169.  
  170. --public class GlobalStatistics
  171. --public static int get_AllaMynt()
  172. --10M x="h2013A0D2"
  173.     A[5].class="GlobalStatistics"
  174.     A[5].method="get_AllaRubiner"
  175.  
  176. function coins()
  177.     if A[5].error==1 then error() return end
  178.     for i = A[5].start, A[5].finish do o=I[i]
  179.     if UC==OFF then x="h2013A0D2" arm() else revert() end
  180.     end
  181.  
  182.     if UC==OFF then UC=ON else UC=OFF end
  183.     end
  184.  
  185. --█████████████████████████████████████████████
  186.  
  187. --public class GlobalStatistics
  188. --public static int get_PlayerXP()
  189.     A[6].class="GlobalStatistics"
  190.     A[6].method="get_PlayerXP"
  191.  
  192. function xp()
  193.     if A[6].error==1 then error() return end
  194.     for i = A[6].start, A[6].finish do o=I[i]
  195.     if HL==OFF then x="h2013A0D2" arm() else revert() end
  196.     end
  197.  
  198.     if HL==OFF then HL=ON else HL=OFF end
  199. end
  200.  
  201. --█████████████████████████████████████████████
  202.  
  203. --public class Weapon : MonoBehaviour
  204. --public float ReloadTime()
  205.     A[7].class="Weapon"
  206.     A[7].method="ReloadTime"
  207.  
  208. function reload()
  209.     if A[7].error==1 then error() return end
  210.     for i = A[7].start, A[7].finish do o=I[i]
  211.     if NR==OFF then x=0 arm() else revert() end
  212.     end
  213.  
  214.     if NR==OFF then NR=ON else NR=OFF end
  215. end
  216.  
  217. --█████████████████████████████████████████████
  218.  
  219. --public class SniperWeapon : MonoBehaviour
  220. --public int get_MaxZoomLevels()
  221.     A[8].class="SniperWeapon"
  222.     A[8].method="get_MaxZoomLevels"
  223.    
  224. function zoom()
  225.     if A[8].error==1 then error() return end
  226.     for i = A[8].start, A[8].finish do o=I[i]
  227.     if MZ==OFF then x="h800180D2" arm() else revert() end
  228.     end
  229.  
  230.     if MZ==OFF then MZ=ON else MZ=OFF end
  231. end
  232.  
  233. --█████████████████████████████████████████████
  234.  
  235. --public class JEPlayerContainerGUI : MonoBehaviour
  236. --public bool get_FreeUpgrade()
  237.     A[9].class="JEPlayerContainerGUI"
  238.     A[9].method="get_FreeUpgrade"
  239. --public class JESniperWeaponParts.WeaponPart
  240. --public int get_CostCoins()
  241.     A[10].class="WeaponPart"
  242.     A[10].method="get_CostCoins"
  243. --public int get_CostParts()
  244.     A[11].class="WeaponPart"
  245.     A[11].method="get_CostParts"
  246. --public int get_costRubys()
  247.     A[12].class="WeaponPart"
  248.     A[12].method="get_costRubys"
  249. --public class JESniperWeaponSpecialPart : MonoBehaviour
  250. --public bool CanUpgrade(bool rubies = False)
  251.     A[13].class="JESniperWeaponSpecialPart"
  252.     A[13].method="CanUpgrade"
  253. --public int NextLevelCost(bool coins = True)
  254.     A[14].class="JESniperWeaponSpecialPart"
  255.     A[14].method="NextLevelCost"
  256. --public bool isBoughtPart(int p)
  257.     A[15].class="JESniperWeaponSpecialPart"
  258.     A[15].method="isBoughtPart"
  259. --public class JEMultiplayerHero : MonoBehaviour, ITriggerDataOwner
  260. --public bool get_HeroLocked()
  261.     A[16].class="JEMultiplayerHero"
  262.     A[16].method="get_HeroLocked"
  263.  
  264. function upgrade()
  265.     for i = 9,16 do if A[i].error == 1 then error() break return end end
  266.     for i = A[9].start, A[9].finish do o=I[i]
  267.     if FU==OFF then x=1 arm() else revert() end
  268.     end  
  269.     for i = A[10].start, A[12].finish do o=I[i]
  270.     if FU==OFF then x=0 arm() else revert() end
  271.     end
  272.     for i = A[13].start, A[13].finish do o=I[i]
  273.     if FU==OFF then x=1 arm() else revert() end
  274.     end
  275.    for i = A[14].start, A[14].finish do o=I[i]
  276.     if FU==OFF then x=0 arm() else revert() end
  277.     end
  278.     for i = A[15].start, A[15].finish do o=I[i]
  279.     if FU==OFF then x=1 arm() else revert() end
  280.     end
  281.     for i = A[16].start, A[16].finish do o=I[i]
  282.     if FU==OFF then x=1 arm() else revert() end
  283.     end
  284.  
  285.     if FU==OFF then FU=ON else FU=OFF end
  286. end
  287.  
  288. --█████████████████████████████████████████████
  289.  
  290. --public class JESniperWeaponContainer : MonoBehaviour
  291. --public bool get_isHeatingWeapon()
  292.     A[17].class="JESniperWeaponContainer"
  293.     A[17].method="get_isHeatingWeapon"
  294. --public bool get_IsLocked()
  295.     A[18].class="JESniperWeaponContainer"
  296.     A[18].method="get_IsLocked"
  297. --public int BuyCost(bool coins)
  298.     A[19].class="JESniperWeaponContainer"
  299.     A[19].method="BuyCost"
  300. --public bool CanBuyWith(bool rubies, float factor)
  301.     A[20].class="JESniperWeaponContainer"
  302.     A[20].method="CanBuyWith"
  303.  
  304. function weapons()
  305.     for i = 17,20 do if A[i].error == 1 then error() break return end end
  306.     for i = A[17].start, A[20].finish do o=I[i]
  307.     if WH==OFF then x=0 arm() else revert() end
  308.     end
  309.  
  310.     if WH==OFF then WH=ON else WH=OFF end
  311. end
  312.    
  313. --█████████████████████████████████████████████
  314.  
  315. --public class Weapon : MonoBehaviour
  316. --public float get_internalMaxBullets()
  317. --float 1000 inutile plus --x="h408FA8D2"
  318.     A[21].class="Weapon"
  319.     A[21].method="get_internalMaxBullets"
  320. --public class JESniperWeaponContainer : MonoBehaviour
  321. --public float get_ClipSize()
  322. --float 1000 inutile plus --x="h408FA8D2"
  323.     A[22].class="JESniperWeaponContainer"
  324.     A[22].method="get_ClipSize"
  325.  
  326. function ammo()
  327.     for i = 21,22 do if A[i].error == 1 then error() break return end end
  328.     for i = A[21].start, A[22].finish do o=I[i]
  329.     if UA==OFF then x="h408FA8D2" arm() else revert() end
  330.     end
  331.  
  332.     if UA==OFF then UA=ON else UA=OFF end
  333. end
  334.  
  335. --█████████████████████████████████████████████
  336.  
  337. --public float get_MaxDamage()
  338. --I[18]=0xFDFB30
  339. --public float get_Damage()
  340. --I[19]=0xFE016C
  341. --public class Weapon : MonoBehaviour
  342. --public float get_GetWeaponRange()
  343. --I[20]=0xF3A918
  344. --public float get_CalculatedDamage()
  345.     A[23].class="Weapon"
  346.     A[23].method="get_CalculatedDamage"
  347. --public bool FireBullet(bool force = False, bool consumeAmmo = True)
  348.     A[24].class="Weapon"
  349.     A[24].method="FireBullet"
  350.  
  351. function damage()
  352.     for i = 23,24 do if A[i].error == 1 then error() break return end end
  353.     for i = A[23].start, A[23].finish do o=I[i]
  354.     if DM==OFF then x="h2013A0D2" arm() else revert() end
  355.     end
  356.     for i = A[24].start, A[24].finish do o=I[i]
  357.     if DM==OFF then x=1 arm() else revert() end
  358.     end
  359.  
  360.     if DM==OFF then DM=ON else DM=OFF end
  361. end
  362.  
  363. --█████████████████████████████████████████████
  364. --█████████████████████████████████████████████
  365. --█████████████████████████████████████████████
  366.     if v.processName~=GProcess then
  367.         print("This Script is For:\n    "..GLabel.."\n    "..GProcess.."\nYou Selected:\n    "..v.label.."\n    "..v.processName)
  368.         gg.setVisible (true) os.exit()
  369.         return
  370.     end
  371. ------------------------------------------------------------------------------
  372.     if v.x64 then bitx=64 xBITx="[x64]" else bitx=32 xBITx="[x32]" end
  373.         print(xBITx)  
  374.         print(printx)  
  375. ------------------------------------------------------------------------------
  376.  
  377. isrdy=gg.alert("Last Hope 3\nThis Script is Auto-Updating. \nInitial Calibration May Take A While.\n\nYOU MUST NOT CURRENTLY BE IN ANY GAMEPLAY (MISSION/BATTLE/ETC). Otherwise, Calibration will Fail and Hacks Not Work\n\n(All hacks must be activated from lobby)","EXIT","START",xTAGx)  
  378. if isrdy~=2 then gg.setVisible(true) os.exit() return end
  379.  
  380. --█████████████████████████████████████████████
  381.     if LibResult==1 then
  382.     xAPEXx={} xXx=0
  383.     xLibRes=0
  384.     libx=gg.getRangesList()
  385.         if #(libx)==0 then
  386.         print("×× LIB ERROR #01 ××\nNo Libs Found\nTry a Different Virtual Environment \nor Try a Better Game Installation Method\nor Download Game From 'apkcombo.com' ")
  387.         gg.setVisible(true)
  388.         os.exit()
  389.         end
  390.     libx=gg.getRangesList(xlib)
  391.         if #(libx)==0 then  
  392.         print("×× No "..xlib.." Found")
  393.         xLibRes=2
  394.         goto APEX_SPLIT
  395.         end
  396.     xlibn=0
  397.         for i, v in ipairs(libx) do
  398.             if libx[i].state=="Xa" then
  399.             xXx=xXx+1
  400.             xAPEXx[xXx]=libx[i].start
  401.             xLibRes=1
  402.             end
  403.         end
  404.         if xLibRes==0 then
  405.         print("×× LIB ERROR #03 ××\nNo "..xlib.." Found in Xa\nTry a Different Virtual Environment \nor Try a Better Game Installation Method\nor Download Game From 'apkcombo.com' ")
  406.         gg.setVisible(true)
  407.         os.exit()    
  408.         end    
  409.                  
  410.         ::APEX_SPLIT::    
  411.         if xLibRes==2 then
  412.         splitapk=0
  413.         libx=gg.getRangesList()
  414.             for i, v in ipairs(libx) do
  415.                 if libx[i].state=="Xa" and string.match(libx[i].name,"split_config") then
  416.                 splitapk=1
  417.                 end
  418.             end
  419.             if splitapk==1 then
  420.             xsapk={} xsapkx=0
  421.                 for i, v in ipairs(libx) do
  422.                     if libx[i].state=="Xa" then
  423.                     xsapkx=xsapkx+1
  424.                     xsapk[xsapkx]=libx[i]["end"]-libx[i].start
  425.                     end
  426.                 end
  427.                 if xsapkx~=0 then                
  428.                 APEXQ=math.max(table.unpack(xsapk))
  429.                     for i, v in ipairs(libx) do              
  430.                         if libx[i].state=="Xa" and libx[i]["end"]-libx[i].start==APEXQ then              
  431.                         xXx=xXx+1            
  432.                        xAPEXx[xXx]=libx[i].start
  433.                         print("√√ Split Apk Lib Found\n√√ "..libx[i].name)
  434.                         xLibRes=1                      
  435.                         end
  436.                     end
  437.                 end
  438.             end
  439.          
  440.              if splitapk==0 and xLibRes~=1 then
  441.              print("×× No split_config Lib Found")  
  442.              xc=1 xt={}
  443.              libx=gg.getRangesList()
  444.                  for i, v in ipairs(libx) do
  445.                      if libx[i].state=="Xa" then
  446.                      xt[xc]=tonumber(libx[i]["end"]-libx[i].start)
  447.                      xc=xc+1
  448.                      end
  449.                  end
  450.              APEXQ=math.max(table.unpack(xt))
  451.                  for i, v in ipairs(libx) do              
  452.                      if libx[i].state=="Xa" and libx[i]["end"]-libx[i].start==APEXQ then        
  453.                      xXx=xXx+1      
  454.                      xAPEXx[xXx]=libx[i].start
  455.                      print("√√ math.max Xa Lib Found\n√√ "..libx[i].name)
  456.                      xLibRes=1  
  457.                      end
  458.                  end
  459.             end                        
  460.  
  461.             if xLibRes~=1 then
  462.             print("×× Correct Lib Not Found ××\n×× Direct/Split Config/Xa Max ××")
  463.             gg.setVisible(true)
  464.             os.exit()
  465.              return
  466.             end
  467.         end
  468.     end
  469. --█████████████████████████████████████████████
  470. function arm()
  471. o=tonumber(o)
  472.     for XxX=1,#(xAPEXx) do
  473.     xdump=nil xdump={}
  474.     xdump[1]={} xdump[2]={}
  475.     xdump[1].address=xAPEXx[XxX] + o
  476.     xdump[1].flags=4
  477.         if x==0 then xdump[1].value=xfalse end
  478.         if x==1 then xdump[1].value=xtrue end
  479.         if x~=0 and x~=1 then xdump[1].value=x end
  480.     xdump[2].address=xAPEXx[XxX]+(o+4)
  481.     xdump[2].flags=4
  482.     xdump[2].value=xEND
  483.     gg.setValues(xdump)
  484.     end
  485. end
  486. ------------------------------------------------------------------------------  
  487. function revert()
  488.     for XxX=1,#(xAPEXx) do
  489.     REVERT=nil REVERT={} xRx=nil xRx=1
  490.         for i, v in ipairs(ORIG) do
  491.             if tonumber(xAPEXx[XxX]+o)==ORIG[i].address then
  492.             REVERT[xRx]={}
  493.             REVERT[xRx].address=xAPEXx[XxX]+o
  494.             REVERT[xRx].flags=4
  495.             REVERT[xRx].value=ORIG[i].value
  496.             xRx=xRx+1
  497.             REVERT[xRx]={}
  498.             REVERT[xRx].address=xAPEXx[XxX]+o+4
  499.             REVERT[xRx].flags=4
  500.             REVERT[xRx].value=ORIG[i+1].value
  501.             gg.setValues(REVERT)
  502.             break
  503.             end
  504.         xRx=xRx+1
  505.         end
  506.     end
  507. end
  508.  
  509. --█████████████████████████████████████████████
  510.  
  511. function sort()
  512. SORT1={} apexsort=0
  513.      for sorti = A[s].start, A[s].finish do
  514.          apexsort=apexsort+1
  515.          SORT1[apexsort] = I[sorti]
  516.      end
  517. SORT2={} table.sort(SORT1)
  518.     for sort2, v in pairs(SORT1) do
  519.         SORT2[sort2]=v
  520.     end
  521. r=SORT2[r]
  522. end
  523.  
  524. --█████████████████████████████████████████████
  525. if v.x64 then
  526. xtrue="h200080D2" -- MOV X0, #0x1
  527. xfalse="h000080D2" -- MOV X0, #0x0
  528. xEND="hC0035FD6" -- RET
  529. else
  530. xtrue="h0100A0E3" -- MOVW R0, #1
  531. xfalse="h0000A0E3" -- MOVW R0, #0
  532. xEND="h1EFF2FE1" -- BX LR
  533. end
  534.  
  535. --█████████████████████████████████████████████
  536. -- APEX[GG]v2
  537. function clear()
  538. gg.getResults(gg.getResultsCount())
  539. gg.clearResults()
  540. end
  541. ------------------------------------------------------------------------------  
  542. function get()
  543. gg.getResults(gg.getResultsCount())
  544. end
  545. ------------------------------------------------------------------------------  
  546. function search()
  547. gg.getResults(gg.getResultsCount())
  548. gg.clearResults()
  549. gg.searchNumber(x,t)
  550. end
  551. ------------------------------------------------------------------------------  
  552. function refine()
  553. gg.refineNumber(x,t)
  554. end
  555. ------------------------------------------------------------------------------  
  556. function refinenot()
  557. gg.refineNumber(x,t,false,gg.SIGN_NOT_EQUAL)
  558. end
  559. ------------------------------------------------------------------------------  
  560. function edit()
  561. gg.getResults(gg.getResultsCount())
  562. gg.editAll(x,t)
  563. end
  564. ------------------------------------------------------------------------------  
  565. function check()
  566. E=nil E=gg.getResultsCount()
  567. end
  568. ------------------------------------------------------------------------------  
  569. function offset()
  570. o=tonumber(o) addoff=nil
  571. addoff=gg.getResults(gg.getResultsCount())
  572.     for i, v in ipairs(addoff) do
  573.         addoff[i].address=addoff[i].address+o
  574.         addoff[i].flags=t
  575.     end
  576. gg.loadResults(addoff)
  577. end
  578.  
  579. --█████████████████████████████████████████████
  580. function cancel()
  581. gg.toast("CANCELLED")
  582. end
  583. ------------------------------------------------------------------------------  
  584. function wait()
  585. gg.toast("Please Wait..")
  586. end
  587. ------------------------------------------------------------------------------  
  588. function error()
  589. gg.toast("× ERROR ×")
  590. gg.sleep(1000)
  591. end
  592. ------------------------------------------------------------------------------  
  593. function exit()
  594. gg.getListItems()
  595. gg.clearList()
  596. gg.getResults(gg.getResultsCount())
  597. gg.clearResults()
  598. gg.toast("[ EXIT ]")  
  599.     if xhaX~=nil then
  600.         print(printx)
  601.         print(xhaX)
  602.         print(printx)  
  603.     end
  604. gg.setVisible(true)
  605. os.exit()
  606. return
  607. end
  608. --█████████████████████████████████████████████
  609. if v.x64 then off1=-16 typ=32 else off1=-8 typ=4 end
  610. gg.setRanges(gg.REGION_OTHER | gg.REGION_C_ALLOC)
  611. gmdx=gg.getRangesList("global-metadata.dat")
  612.     if #(gmdx)~=0 then        
  613.     gmds=gg.getRangesList("global-metadata.dat")[1].start
  614.     gmde=gg.getRangesList("global-metadata.dat")[1]["end"]
  615.     else gmds=nil gmde=nil
  616.     end
  617. ATOTAL=0
  618. for i = 1,100 do
  619.     if A[i].class==nil then break end
  620.     ATOTAL=ATOTAL+1
  621. end
  622.  
  623. ASTART=1 AEND=0 ATABT=ATOTAL+1 ATAB=1
  624. S=0
  625.     while ATAB<=ATOTAL do
  626.     ::AUTOSTART::
  627.         if ATAB>ATOTAL then break goto FINISHED end
  628.     gg.toast("Please Wait.. [ "..ATABT-ATAB.." ]")
  629.     A[ATAB].error=1
  630.     ANAME=nil ANAME={}
  631.     if A[ATAB].name~=nil then
  632.         for i = 1,#(tostring(A[ATAB].name)) do
  633.             ANAME[i]=string.byte(A[ATAB].name,i)
  634.         end
  635.     else
  636.         ANAME[1]=0
  637.     end
  638.     ACLASS=nil ACLASS={}
  639.     if A[ATAB].class~=nil then
  640.         for i = 1,#(tostring(A[ATAB].class)) do
  641.             ACLASS[i]=string.byte(A[ATAB].class,i)
  642.         end
  643.     else
  644.         A[ATAB].class=0
  645.     end
  646.    
  647.                 ASTART=AEND+1
  648.                 clear() t=1
  649.                 gg.searchNumber(":"..tostring(A[ATAB].method),1,false,gg.SIGN_EQUAL,gmds, gmde)
  650.                 xm=gg.getResults(2) gg.getResults(gg.getResultsCount())
  651.                 check()
  652.                     if E==0 then ATAB=ATAB+1
  653.                         if ATAB>ATOTAL then break return end
  654.                     goto AUTOSTART return
  655.                     end
  656.                 x=xm[1].value..";"..xm[2].value.."::2" refine()
  657.                 x=xm[1].value refine()
  658.                 o=-1 offset() x=0 refine() oo=#(tostring(A[ATAB].method))
  659.                 o=oo+1 offset() refine() o=-oo offset()
  660.                 check()
  661.                     if E==0 then ATAB=ATAB+1
  662.                         if ATAB>ATOTAL then break return end
  663.                     goto AUTOSTART return
  664.                     end
  665.                 gg.searchPointer(0) xcount=gg.getResultsCount()
  666.                 xpoint=gg.getResults(xcount,nil, nil, nil, nil, nil, nil, nil,gg.POINTER_READ_ONLY)
  667.                     if #(xpoint)==0 then ATAB=ATAB+1
  668.                         if ATAB>ATOTAL then break return end
  669.                     goto AUTOSTART return
  670.                     end
  671.                 clear()
  672.                     for xp=1,#(xpoint) do
  673.                     xpoint[xp].address=xpoint[xp].address+off1
  674.                     xpoint[xp].flags=typ
  675.                     end
  676.                 gg.loadResults(xpoint)
  677.                 xoff=gg.getResults(#(xpoint),nil, nil, nil, nil, nil, nil, nil, gg.POINTER_EXECUTABLE)
  678.                     if #(xoff)==0 then ATAB=ATAB+1
  679.                         if ATAB>ATOTAL then break return end
  680.                     goto AUTOSTART return
  681.                     end
  682.                     xfin=1
  683.                     while xfin<=#(xoff) do
  684.                     ::XFIN::
  685.                         if xfin>#(xoff) then ATAB=ATAB+1
  686.                             if ATAB>ATOTAL then break return end
  687.                         goto AUTOSTART return
  688.                         end
  689.                         if gg.getTargetInfo().x64 then
  690.                             xadd=tonumber(xoff[xfin].value)  
  691.                         else
  692.                             xadd=string.format("%X",tonumber(xoff[xfin].value))
  693.                             xadd=string.sub(tostring(xadd), -8,-1)
  694.                             xadd=tonumber("0x"..xadd)
  695.                         end    
  696.                     gval1=nil gval1={} gval1[1]={}
  697.                         if gg.getTargetInfo().x64 then gvo=24 gvo1=16 gvo2=24 else gvo=12 gvo1=8 gvo2=12 end
  698.                     gval1[1].address=xoff[xfin].address+gvo
  699.                     gval1[1].flags=typ
  700.                     gval1=gg.getValues(gval1)
  701.                         if gg.getTargetInfo().x64 then
  702.                             gval=tonumber(gval1[1].value)  
  703.                         else
  704.                             gval=string.format("%X",tonumber(gval1[1].value))
  705.                             gval=string.sub(tostring(gval), -8,-1)
  706.                             gval=tonumber("0x"..gval)
  707.                         end    
  708.                     gval2=nil gval2={} gval2[1]={} gval2[2]={}
  709.                     gval2[1].address=gval+gvo1
  710.                     gval2[1].flags=typ
  711.                     gval2[2].address=gval+gvo2
  712.                     gval2[2].flags=typ
  713.                     gval2=gg.getValues(gval2)
  714.                         if gg.getTargetInfo().x64 then
  715.                             gval21=tonumber(gval2[1].value)  
  716.                             gval22=tonumber(gval2[2].value)
  717.                         else
  718.                             gval21=string.format("%X",tonumber(gval2[1].value))
  719.                             gval21=string.sub(tostring(gval21), -8,-1)
  720.                             gval21=tonumber("0x"..gval21)
  721.                             gval22=string.format("%X",tonumber(gval2[2].value))
  722.                             gval22=string.sub(tostring(gval22), -8,-1)
  723.                             gval22=tonumber("0x"..gval22)
  724.                         end    
  725.                          xrefine=0
  726.                          if A[ATAB].class~=0 then
  727.                             for xyz=1,#(ACLASS) do
  728.                                 gvalc={} gvalc[1]={}
  729.                                 gvalc[1].address=gval21+(xyz-1)
  730.                                 gvalc[1].flags=1                        
  731.                                 gvalc=gg.getValues(gvalc)
  732.                                 if gvalc[1].value~=ACLASS[xyz] then xrefine=1 break xfin=xfin+1 goto XFIN end
  733.                             end
  734.                         end
  735.                        
  736.                         if A[ATAB].name~=0 then
  737.                             for xyz=1,#(ANAME) do
  738.                                 gvalc={} gvalc[1]={}
  739.                                 gvalc[1].address=gval22+(xyz-1)
  740.                                 gvalc[1].flags=1                        
  741.                                 gvalc=gg.getValues(gvalc)
  742.                                     if gvalc[1].value~=ANAME[xyz] then xrefine=1 break xfin=xfin+1 goto XFIN end                                
  743.                             end
  744.                         end
  745.                          
  746.                          if xrefine==0 then
  747.                         A[ATAB].start=ASTART AEND=AEND+1
  748.                         A[ATAB].finish=AEND
  749.                         A[ATAB].error=0
  750.                         clear() I[AEND]=xadd-xAPEXx[xXx]
  751.                         end
  752.                     xfin=xfin+1            
  753.                     end -- xfin
  754.     ATAB=ATAB+1
  755.     end -- ATAB
  756.    
  757. ---------------------------------------------------
  758.  
  759. ::FINISHED::
  760.  xBAR=0
  761.     for i = 1, ATOTAL do
  762.         if A[i].error~=0 then xBAR=xBAR+1 end
  763.     end
  764.     if xBAR==ATOTAL  then
  765.         gg.alert("× AUTO UPDATE FAILURE ×","EXIT",nil, xTAGx)  
  766.         exit()
  767.         return
  768.     end
  769.     if xBAR>=1 then gg.alert("× Auto Update Errors\nSome/All Hacks May Not Work","OK",nil, xTAGx)
  770.     else gg.alert("√ Auto Update Success","OK",nil, xTAGx)
  771.     end
  772. --------------------------------
  773. adprem()
  774.  
  775. --█████████████████████████████████████████████
  776. if xREV==1 then
  777. xRx=1 ORIG={} xREV={}
  778.     for XxX=1,#(xAPEXx) do  
  779.         for i, v in ipairs(I) do
  780.         ORIG[xRx]={}
  781.         ORIG[xRx].address=xAPEXx[XxX]+tonumber(I[i])
  782.         ORIG[xRx].flags=4
  783.         xRx=xRx+1
  784.         ORIG[xRx]={}
  785.         ORIG[xRx].address=xAPEXx[XxX]+tonumber(I[i])+4
  786.         ORIG[xRx].flags=4
  787.         xRx=xRx+1
  788.         end    
  789.     end
  790. ORIG=gg.getValues(ORIG)
  791. end
  792. --█████████████████████████████████████████████
  793. while true do
  794.     if gg.isVisible() then
  795.         gg.setVisible(false)
  796.         menu()
  797.     else
  798.         if apex==1 then
  799.             gg.setVisible(false)
  800.             menu()
  801.         end
  802.     end
  803. end
  804.  
Add Comment
Please, Sign In to add comment