{$CLEO .cs}
0000: NOP
while true
wait 0
05E0: 0@ = read_memory 0x00864A08 size 1 virtual_protect 1
if and
$ONMISSION == 0
not Actor.Driving($PLAYER_ACTOR)
0@ <> 0//05EE: key_pressed 50 //115
then
while 0@ <> 0
wait 0
05E0: 0@ = read_memory 0x00864A08 size 1 virtual_protect 1
end
05DF: write_memory 0x61D8F7 size 5 value 0x90 virtual_protect 1
05E1: call 0x61D8B0 num_params 1 pop 0 0
05DF: write_memory 0x61D8F7 size 1 value 0xE8 virtual_protect 1
05F5: call_scm_func @setMemOffset 3 memory 0x61D8F8 pointing_to 0x0061A690 virtual_protect 1
wait 500
end
end
{
FUNCTIONS INCLUDED:
- getMemOffset
Type: GET
Description: Get the relative offset of a memory pointing to a specific address.
- setMemOffset
Type: GET
Description: Set a 4-byte relative offset of a memory pointing to a specific address with virtual protection.
}
:getMemOffset
{
Parameters:
Passed:
0@ - memory pointer
1@ - memory to point
Result:
1@ - memory offset
Example:
05F5: call_scm_func @getMemOffset 2 memory 0x0 pointing_to 0x0 store_to 1@
}
0@ += 0x4
000E: 1@ -= 0@
05F6: ret 1 1@
:setMemOffset
{
Parameters:
Passed:
0@ - memory pointer
1@ - memory to point
2@ - virtual protection
Result:
none
Example:
05F5: call_scm_func @setMemOffset 3 memory 0x0 pointing_to 0x0 virtual_protect 0
}
05F5: call_scm_func @getMemOffset 2 memory 0@ pointing_to 1@ store_to 3@
05DF: write_memory 0@ size 4 value 3@ virtual_protect 2@
05F6: ret 0