Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [ENABLE]
  2. {$lua}
  3. if syntaxcheck then return end
  4. results = AOBScan("29 D0 89 83 80 04 00 00")
  5. if not results then
  6. error("failed to find aob")
  7. end
  8.  
  9. al = getAddressList()
  10. for i=0, results.Count-1 do
  11. -- AA script didn't like parsing [ENALBE] and [DISABLE] so... format to the rescue lol
  12. local script = [[
  13. // nop step 2 sub instruction
  14. [%s]
  15. define(INJECT, %s)
  16. INJECT:
  17. db 90 90
  18. registersymbol(INJECT)
  19. [%s]
  20. INJECT:
  21. db 29 D0
  22. unregistersymbol(INJECT)
  23. ]]
  24. script = string.format(script, "ENABLE", results[i], "DISABLE")
  25.  
  26. mr = al.createMemoryRecord()
  27. mr.Type = vtAutoAssembler
  28. mr.Script = script
  29. mr.Description = "Autogenerated aob script"
  30. if memrec then -- if in CE 6.7 then nest generated scripts
  31. mr.appendToEntry(memrec)
  32. end
  33. end
  34. results.destroy()
  35.  
  36. -- auto disable this script if in CE 6.7+
  37. if memrec then
  38. local timer = createTimer()
  39. timer.Interval = 100
  40. timer.OnTimer = function(timer)
  41. memrec.Active = false
  42. timer.destroy()
  43. end
  44. end
  45.  
  46. [DISABLE]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement