every time a program is loaded manually (allocating memory for the PE image, copying sections, resolving imports, relocations, etc ) I need to use C ( define code ) and P (create procedure/function) because all code is undefined. how can I resolve references ( imports, data), detect functions automatically?