☘️
The Insurgent's Manifesto
  • Home
  • Getting Started
    • Setup
    • Configuration
  • Game Improvements & Fixes
    • General
    • Animations
    • Locations
      • Archades
      • Jahara
      • Nalbina Dungeons
    • Events
      • Bhujerba
      • Dalmasca Estersand
      • Dreadnought Leviathan
      • Garamysythe Waterway
      • Giza Plains (Dry)
      • Rabanastre
      • Sky Fortress Bahamut
  • Dalan
    • General
  • VM Extension
    • General
    • Current Call Targets
      • Set Gambit Slot Max
      • Reset Jobs
      • Has Job Assigned
    • New Call Targets
      • Check Version
      • Memory Push Stack
      • Memory Execute
      • Memory Execute F
      • Memory Read Byte
      • Memory Write Byte
      • Memory Read Short
      • Memory Write Short
      • Memory Read Int
      • Memory Write Int
      • Memory Read Float
      • Memory Write Float
  • Text Extension
    • General
  • Support & Updates
    • Changelogs
      • Version 1.5.1
      • Version 1.5.0
      • Version 1.4.0
      • Version 1.3.0
      • Version 1.2.0
      • Version 1.1.0
      • Version 1.0.0
    • Known Issues
    • FAQ
  • Credits
Powered by GitBook
On this page
  • Signature
  • Description
  • Examples
  • Notes
  1. VM Extension
  2. New Call Targets

Memory Execute

Signature

int tim_memoryExecute(int callAddress, int/float arg1, int/float arg2, int/float arg3, int/float arg4); //id:0x1002

Description

Executes the call address with the provided arguments.

  • The first four integer or pointer arguments are passed in the ecx, edx, r8d and r9d registers.

  • The first four floating-point arguments are passed in the first four SSE registers, xmm0-xmm3.

  • Any additional arguments are passed on the stack via the Memory Push Stack function.

  • Forwards the integer or pointer value returned in the eax register from the called function.

Examples

Parameter Passing

function allInt()
{
    regI0 = 1; //ecx
    regI1 = 2; //edx
    regI2 = 3; //r8d
    regI3 = 4; //r9d
    tim_memoryPushStack(5); //rsp+24
    tim_memoryPushStack(6); //rsp+28
    tim_memoryExecute(0x00000000, regI0, regI1, regI2, regI3); 
}

function allFloat()
{
    regF0 = 1.0; //xmm0
    regF1 = 2.0; //xmm1
    regF2 = 3.0; //xmm2
    regF3 = 4.0; //xmm3
    tim_memoryPushStack(5.0); //rsp+24
    tim_memoryPushStack(6.0); //rsp+28
    tim_memoryExecute(0x00000000, regF0, regF1, regF2, regF3);
}

function mixed()
{
    regI0 = 1; //ecx
    regF1 = 2.0; //xmm1
    regI2 = 3; //r8d
    regF3 = 4.0; //xmm3
    tim_memoryPushStack(5); //rsp+24
    tim_memoryPushStack(6.0); //rsp+28
    tim_memoryExecute(0x00000000, regI0, regF1, regI2, regF3);
}

Set All Party Members To Max Level

for (regI0 = 0; regI0 < 40; regI0++)
{
    regI1 = tim_memoryExecute(0x00320A40, regI0, 0, 0, 0); //getBattleUnitKeep(...)
    regI2 = 99 //level
    tim_memoryExecute(0x0030C470, regI1, regI2, 0, 0); //setStats(...)
}

Notes

Since the call address nor the arguments passed to it can be verified by the VM extension itself, the responsibility falls completely to the user to handle both correctly. Failure to do so will otherwise result in a game crash.

PreviousMemory Push StackNextMemory Execute F

Last updated 1 year ago