Advertisement
Guest User

Untitled

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