He's after a none 'malware' related method,
And an example is what one wanted.
So the link i posted should be perfect if he knows the language,
If it was malware type methods he was after, I Would of gave him a simple exe infect,
Where the 'malware' would infect every exe which is accessible..
Never the less, ive posted below a small snippet which will copy the running pe file
too the windows & system directory, Nice and basic, and the method is used in most
Malware today
int replicate(){
char Buffer[260],Windows[260],System32[MAX_PATH];
GetWindowsDirectory(Windows,sizeof(Windows));
GetModuleFileName(NULL,Buffer,MAX_PATH);
strcat(Windows,"\\");
strcat(Windows,"FileName.exe");
GetSystemDirectory(System32, sizeof(System32));
strcat(System32,"\\");
strcat(System32, "FileName.exe");
return 0;
}