Is there any index-based table in the program that stores metadata for each function in the executeable? I need to attach pointer to every function pointer given; For example:
if (!HasMetadata(functionPointer)) //Something of the form ...(*)(...)
SetMetadata(new FunctionMetadata()); //Pointer of object of some structure of data
((FunctionMetadata*)GetMetadata(functionPointer))->Counter++;
NOTE: I considered using object from key/value type; I can't because I have more than 3000+ functions, which potentially all of them need to be in the table. If I hadn't 3000+ functions, then I would manually consider adding static value for each function.