Um...yeah that's simple. I have no idea why you would want to do this, but hey go for it.
A couple of simple C block (array-based) I/O functions will do the trick.
Since I do not see the harm there is in creating a copy of an exe I do not deem this code to be unsafe.
And since you obviously cannot perform this simple task I do not see you as a threat or as someone who could inject assembly opcodes into the correct places in the final exe in a way as to do any damage at all.
Oh and if you don't like the use of new on the C board then replace it with malloc. I could care less really.
int source_handle=_open(source_filename,_O_BINARY | _O_RDONLY,_S_IREAD);
if (source_handle==-1) return;
int target_handle=_open(target_filename,_O_BINARY | _O_WRONLY,_S_IWRITE);
if (target_handle==-1) return;
BYTE *pBuffer=new BYTE[dwLength];
if (!pBuffer) return;
delete  pBuffer;
This is a far cry (no pun intended) from self-modifying code as is. Should you want to do that then I won't help you blow up your system anymore.