Fetching in a new function into program's memory and calling it
Alright so I had this idea: I will allocate a space in the memory and will write into it a function, can I call that function later on using assembly?
Like:
I'm a total noob on C++ (especially ASM), so is this possible?
Like:
Code:
DWORD ptr = (DWORD)malloc( <size> );
memcpy(&ptr, <function>, <size>);
__asm{
mov eax, ptr
call eax
};
