Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :asm_PutOnAddressRelativeAddressToAddress
- {
- Description:
- Writes at the specified address a relative adress to second adress.
- Type: SET
- Parameters:
- Passed:
- 0@ - source adress
- 1@ - size of written adress (1, 2, 4)
- 2@ - source virtual protect
- 3@ - destination adress
- Example:
- 0AB1: call_scm_func @asm_PutOnAddressRelativeAddressToAddress 4 source_adress 2@ source_size 4 source_virtual_protect true destination 0x004912DC
- }
- 0062: 3@ -= 0@ // (int)
- 0062: 3@ -= 1@ // (int)
- 0A8C: write_memory 0@ size 1@ value 3@ virtual_protect 2@
- 0AB2: ret 0
- :asm_PutOnAddressRelativeAddressToLabel
- {
- Description:
- Writes at the specified adress a relative adress to second adress.
- Type: SET
- Parameters:
- Passed:
- 0@ - adress of script content (current_thread_pointer + 0x10)
- 1@ - source adress
- 2@ - size of written adress (1, 2, 4)
- 3@ - source virtual protect
- 4@ - destination label
- Example:
- 0AB1: call_scm_func @asm_PutOnAddressRelativeAddressToLabel 5 script_content 1@ source_adress 2@ source_size 4 source_virtual_protect true destination @label
- }
- 0062: 0@ -= 4@ // (int) // destination: label adress
- 0062: 0@ -= 1@ // (int)
- 0062: 0@ -= 2@ // (int)
- 0A8C: write_memory 1@ size 2@ value 0@ virtual_protect 3@
- 0AB2: ret 0
- :asm_PutOnLabelRelativeAddressToAddress
- {
- Description:
- Writes at the specified label a relative adress to second adress.
- Type: SET
- Parameters:
- Passed:
- 0@ - adress of script content (current_thread_pointer + 0x10)
- 1@ - source label
- 2@ - size of written adress (1, 2, 4)
- 3@ - destination adress
- Example:
- 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content 0@ source_label @function_adress source_size 4 destination 0x004912DC
- }
- 0062: 0@ -= 1@ // (int)
- 0062: 3@ -= 0@ // (int)
- 0062: 3@ -= 2@ // (int)
- 0A8C: write_memory 0@ size 2@ value 3@ virtual_protect false
- 0AB2: ret 0
- :asm_PutOnLabelRelativeAddressToLabel
- {
- Description:
- Writes at the specified label a relative adress to second label.
- Type: SET
- Parameters:
- Passed:
- 0@ - adress of script content (current_thread_pointer + 0x10)
- 1@ - source label
- 2@ - size of written adress (1, 2, 4)
- 3@ - destination label
- Example:
- 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToLabel 4 script_content 0@ source_label @function_source source_size 4 destination @function_destination
- }
- 0062: 0@ -= 1@ // (int) // source adress
- 0062: 1@ -= 3@ // (int) // difference
- 0062: 1@ -= 2@ // (int) // -= size
- 0A8C: write_memory 0@ size 2@ value 1@ virtual_protect false
- 0AB2: ret 0
- :asm_PutOnAddressAbsoluteAddressToAddress
- :asm_PutOnAddressAnyValue
- {
- Description:
- Writes at the specified adress any adress/value
- Type: SET
- Parameters:
- Passed:
- 0@ - source adress
- 1@ - size of written adress (1, 2, 4)
- 2@ - source virtual protect
- 3@ - destination adress
- Example:
- 0AB1: call_scm_func @asm_PutOnAddressAbsoluteAddressToAddress 4 source_adress 2@ source_size 4 source_virtual_protect true destination 0x004912DC
- }
- 0A8C: write_memory 0@ size 1@ value 3@ virtual_protect 2@
- 0AB2: ret 0
- :asm_PutOnAddressAbsoluteAddressToLabel
- {
- Description:
- Writes at the specified adress an absolute adress to label.
- Type: SET
- Parameters:
- Passed:
- 0@ - adress of script content (current_thread_pointer + 0x10)
- 1@ - source adress
- 2@ - source virtual protect
- 3@ - destination label
- Example:
- 0AB1: call_scm_func @asm_PutOnAddressAbsoluteAddressToLabel 4 script_content 0@ source_adress 0x466D44 source_virtual_protect true destination @function_destination
- }
- 0062: 0@ -= 3@ // (int) // destination adress
- 0A8C: write_memory 1@ size 4 value 0@ virtual_protect 2@
- 0AB2: ret 0
- :asm_PutOnLabelAbsoluteAddressToLabel
- {
- Description:
- Writes at the specified label an absolute adress to label.
- Type: SET
- Parameters:
- Passed:
- 0@ - adress of script content (current_thread_pointer + 0x10)
- 1@ - source label
- 2@ - destination label
- Example:
- 0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content 0@ source_label @function_source destination @function_destination
- }
- 0A8F: 2@ = 0@ - 2@ // int // destination adress
- 0062: 0@ -= 1@ // (int) // source adress
- 0A8C: write_memory 0@ size 4 value 2@ virtual_protect false
- 0AB2: ret 0
- :asm_PutOnLabelAbsoluteAddressToAddress
- :asm_PutOnLabelAnyValue
- {
- Description:
- Writes at the specified label an absolute adress to second adress.
- Type: SET
- Parameters:
- Passed:
- 0@ - adress of script content (current_thread_pointer + 0x10)
- 1@ - source label
- 2@ - size of written adress (1, 2, 4)
- 3@ - destination adress
- Example:
- 0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToAddress 4 script_content 0@ source_label @function_source source_size 4 destination 0x400000
- }
- 0062: 0@ -= 1@ // (int) // source adress
- 0A8C: write_memory 0@ size 2@ value 3@ virtual_protect false
- 0AB2: ret 0
- :asm_GetStructOffsetLabeltoLabel
- {
- Description:
- Calculates offset between first and second lable
- Type: SET
- Parameters:
- Passed:
- 0@ - first label
- 1@ - second label
- Example:
- 0AB1: call_scm_func @asm_GetStructOffsetLabeltoLabel 2 base_label @vehicles second_label @vehicles_properties store_offset 5@
- }
- 0062: 0@ -= 1@ // (int)
- 0AB2: ret 1 0@
- :asm_PutOnAddressJmpFarToLabel
- {
- Description:
- Writes at the specified label ASM jmp far with relative address to label (0xE9 + relative address)
- Type: SET
- Parameters:
- Passed:
- 0@ - adress of script content (current_thread_pointer + 0x10)
- 1@ - source address
- 2@ - source virtual protect
- 3@ - destination label
- Example:
- 0AB1: call_scm_func @asm_PutOnAddressJmpFarToLabel 4 script_content 0@ source_address 2@ source_virtual_protect true destination @function_destination
- }
- 0062: 0@ -= 3@ // (int) // destination adress
- 0A8C: write_memory 1@ size 1 value 0xE9 virtual_protect 2@
- 1@ += 1
- 0062: 0@ -= 1@ // (int) // difference
- 0@ -= 4
- 0A8C: write_memory 1@ size 4 value 0@ virtual_protect 2@
- 0AB2: ret 0
- :asm_WriteMemoryValueOnAddressesPlacedOnLabel
- {
- Description:
- Writes value of 1, 2 or 4 bytes to memory addresses being put on label until 0 as DWORD terminates list of addresses.
- Type: SET
- Parameters:
- Passed:
- 0@ - adress of script content (current_thread_pointer + 0x10)
- 1@ - label with 4-byte absolute addresses
- 2@ - virtual protect of addresses
- 3@ - size of written value (1, 2, 4)
- 4@ - value to be written
- Example:
- 0AB1: call_scm_func @asm_WriteMemoryValueOnAddressesPlacedOnLabel 5 script_content 0@ label_with_addresses @addresses addresses_virtual_protect false size 4 value 666
- }
- 0062: 0@ -= 1@ // (int)
- while true
- 0A8D: 5@ = read_memory 0@ size 4 virtual_protect false
- if
- 5@ <> false
- else_jump break
- 0A8C: write_memory 5@ size 3@ value 4@ virtual_protect 2@
- 0@ += 4
- end
- 0AB2: ret 0
- :asm_CopyMemoryFromStringVariableToLabel
- {
- Description:
- Copies memory from string variable to label.
- Type: SET
- Parameters:
- Passed:
- 0@ - CRunningScript* (current_thread_pointer)
- 1@ - destination label
- 2@+ - string variables terminated by NULL
- Example:
- 0AB1: call_scm_func @asm_CopyMemoryFromStringVariableToLabel 6 thread_pointer 0@ destination_label @text string 0@ 1@ 2@ 3@
- }
- 0A8E: 31@ = 0@ + 0x10 // int
- 0A8D: 31@ = read_memory 31@ size 4 virtual_protect false
- 0062: 31@ -= 1@ // (int)
- 0@ += 68
- while true
- 0A8D: 1@ = read_memory 0@ size 1 virtual_protect false
- if
- 1@ <> false
- else_jump break
- 0A8C: write_memory 31@ size 1 value 1@ virtual_protect false
- 0@ += 1
- 31@ += 1
- end
- 0A8C: write_memory 31@ size 1 value 0x00 virtual_protect false
- 0AB2: ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement