I am not sure if hook/inject is the correct term for what I'm actually looking for I want to extend a x86 asm function of a game client using C++ to provide me this functionality:
currently:
lets assume that the target function is something like this
void oldFunction(int opcode, char* data) <- RVA known
{
//do stuff
}
I want to inject C++ code in it so wherever it gets called by the game client I can extend its functionality on my own .dll resulting into something like this:
void oldFunction(int opcode, char* data)
{
oldFunctionCalled(opcode, data); // my method
//do stuff
}
so basically I want to inject my method oldFunctionCalled(opcode) in the oldFunction whose RVA is known