Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 7th, 2013  |  syntax: None  |  size: 1.97 KB  |  hits: 30  |  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}
  2. 11@ = 0
  3. 05F7: 0@ = label @lbl offset
  4. 05DF: write_memory 0x00689A5C size 4 value 0@ virtual_protect 1 //689A5C
  5. 05F8: 1@ = var 11@ offset
  6. 0@ += 2
  7. 05DF: write_memory 0@ size 4 value 1@ virtual_protect 0
  8. while true
  9.     wait 0
  10.     if
  11.         11@ == 1
  12.     then
  13.         while true
  14.             wait 0
  15.             if and
  16.                 $ONMISSION == 0
  17.                 not Actor.Driving($PLAYER_ACTOR)    
  18.             then
  19.                 Break
  20.             end
  21.         end
  22.         05DF: write_memory 0x61D8F7 size 5 value 0x90 virtual_protect 1
  23.        
  24.         05E1: call 0x61D8B0 num_params 1 pop 0 6
  25.         05DF: write_memory 0x61D8F7 size 1 value 0xE8 virtual_protect 1  
  26.         05F5: call_scm_func @setMemOffset 3 memory 0x61D8F8 pointing_to 0x0061A690 virtual_protect 1      
  27.         11@ = 0
  28.     end
  29. end
  30.  
  31. :lbl
  32. hex
  33.     C705 00000000 01000000  // MOV DWORD PTR DS:[00000000], 1
  34.     B8 C56B4500             // MOV EAX,00456BC5
  35.     FFE0                    // JMP EAX
  36. end
  37.  
  38. {
  39.   FUNCTIONS INCLUDED:
  40.  
  41. -   getMemOffset
  42.       Type: GET
  43.         Description: Get the relative offset of a memory pointing to a specific address.
  44.  
  45. -   setMemOffset
  46.       Type: GET
  47.         Description: Set a 4-byte relative offset of a memory pointing to a specific address with virtual protection.
  48. }
  49.  
  50. :getMemOffset
  51. {
  52.   Parameters:
  53.     Passed:
  54.       0@ - memory pointer
  55.       1@ - memory to point
  56.     Result:
  57.       1@ - memory offset
  58.  
  59.   Example:
  60.     05F5: call_scm_func @getMemOffset 2 memory 0x0 pointing_to 0x0 store_to 1@
  61. }
  62. 0@ += 0x4
  63. 000E: 1@ -= 0@
  64. 05F6: ret 1 1@
  65.  
  66. :setMemOffset
  67. {
  68.   Parameters:
  69.     Passed:
  70.       0@ - memory pointer
  71.       1@ - memory to point
  72.       2@ - virtual protection
  73.     Result:
  74.       none
  75.  
  76.   Example:
  77.     05F5: call_scm_func @setMemOffset 3 memory 0x0 pointing_to 0x0 virtual_protect 0
  78. }
  79. 05F5: call_scm_func @getMemOffset 2 memory 0@ pointing_to 1@ store_to 3@
  80. 05DF: write_memory 0@ size 4 value 3@ virtual_protect 2@
  81. 05F6: ret 0