and how are you going to calculate the size of a function? it's not something you can just do by doing
Also you can't just directly copy a function from one place to another using :
Code:
memcpy(&ptr, <function>, <size>);
maybe a combination of malloc + function pointers could work, but I'm unsure.
And judging from the fact that you said "I'm a total noob on C++ (especially ASM), so is this possible?" I'm not sure you'll be able to implement this as this allows deeper knowledge of how things work (eg. stack, what happens during function calls).