Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 7th, 2013  |  syntax: None  |  size: 1.57 KB  |  views: 32  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. {$CLEO .cs}
  2. 0000: NOP
  3. while true
  4. wait 0
  5. 05E0: 0@ = read_memory 0x00864A08 size 1 virtual_protect 1
  6.  
  7. if and
  8.    $ONMISSION == 0
  9.    not Actor.Driving($PLAYER_ACTOR)
  10.    0@ <> 0//05EE:  key_pressed 50 //115
  11. then
  12. while 0@ <> 0
  13. wait 0
  14. 05E0: 0@ = read_memory 0x00864A08 size 1 virtual_protect 1
  15. end
  16. 05DF: write_memory 0x61D8F7 size 5 value 0x90 virtual_protect 1
  17. 05E1: call 0x61D8B0 num_params 1 pop 0 0
  18. 05DF: write_memory 0x61D8F7 size 1 value 0xE8 virtual_protect 1  
  19. 05F5: call_scm_func @setMemOffset 3 memory 0x61D8F8 pointing_to 0x0061A690 virtual_protect 1
  20. wait 500
  21. end
  22. end
  23.  
  24. {
  25.   FUNCTIONS INCLUDED:
  26.  
  27. -   getMemOffset
  28.       Type: GET
  29.         Description: Get the relative offset of a memory pointing to a specific address.
  30.  
  31. -   setMemOffset
  32.       Type: GET
  33.         Description: Set a 4-byte relative offset of a memory pointing to a specific address with virtual protection.
  34. }
  35.  
  36. :getMemOffset
  37. {
  38.   Parameters:
  39.     Passed:
  40.       0@ - memory pointer
  41.       1@ - memory to point
  42.     Result:
  43.       1@ - memory offset
  44.  
  45.   Example:
  46.     05F5: call_scm_func @getMemOffset 2 memory 0x0 pointing_to 0x0 store_to 1@
  47. }
  48. 0@ += 0x4
  49. 000E: 1@ -= 0@
  50. 05F6: ret 1 1@
  51.  
  52. :setMemOffset
  53. {
  54.   Parameters:
  55.     Passed:
  56.       0@ - memory pointer
  57.       1@ - memory to point
  58.       2@ - virtual protection
  59.     Result:
  60.       none
  61.  
  62.   Example:
  63.     05F5: call_scm_func @setMemOffset 3 memory 0x0 pointing_to 0x0 virtual_protect 0
  64. }
  65. 05F5: call_scm_func @getMemOffset 2 memory 0@ pointing_to 1@ store_to 3@
  66. 05DF: write_memory 0@ size 4 value 3@ virtual_protect 2@
  67. 05F6: ret 0