Calling program functions from inside of an injected dll

Hello,

i just started improving my game hacking skills in c++ a little bit since the last like 1-2years i was only using Cheat Engine and VB.NET for it. Since the only thing i can do with that is basic memory hacking i just started coding a dll in c++. I already added all the stuff from my old VB projects but now i wanna try something new. How is it possible to call one of the functions of the program i inject the dll into? For example let's say i wanna call this function of the game:
1
2
3
4
5
6
7
8
9
10
11
12
void AavaPlayerController::ServerAddKillCount ( int Add )
{
	static UFunction* pFnServerAddKillCount = NULL;

	if ( ! pFnServerAddKillCount )
		pFnServerAddKillCount = (UFunction*) UObject::GObjObjects()->Data[ 47763 ];

	AavaPlayerController_execServerAddKillCount_Parms ServerAddKillCount_Parms;
	ServerAddKillCount_Parms.Add = Add;

	this->ProcessEvent ( pFnServerAddKillCount, &ServerAddKillCount_Parms, NULL );
};


How can i call it with the needed parameters from the dll? For example do i have to do it like in inline asm by coding something like
1
2
mov eax <parameter1> 
call <function>
?
And which information about the function i wanna call do i need to actually call it? What i want is not a copy&paste basic source code for everything, i clearly want to learn and understand how it can be done.
Last edited on
Topic archived. No new replies allowed.