I could just make another entry in the table which writes the value into allocated memory for the injection and then just retrieve it in there, but I figured there must be some way to do this in a more elegant way.
{--optional-->>
cmp [value],0
je originalcode
<<--optional--}
push edi
mov edi,[value]
mov [esi+9A],edi
pop edi
jmp valuemodexit //may need to add some original code before the jump
originalcode:
//originalcode here
jmp valuemodexit
value:
dd 0
"MyGame.exe"+ABCDEF:
jmp valuemod
valuemodexit:
[DISABLE]
"MyGame.exe"+ABCDEF:
mov [esi+9A],al
unregistersymbol(value)
Once the script is activated, add a custom address to your table and put value in the address field. You can assign hotkeys for setting/freezing values etc..
From my understanding it will take the smallest common size, so when I move some value to AL which is one byte in size, it will only take one byte from the value I want to move there. Feel free to correct me there though.