There are other ways to pass data to a new process when it starts running without resorting to hacking its memory beforehand.
How do I pass a lot of data to a process when it starts up?
Undocumented and hard-to-find information regarding the CreateProcess API call (scroll down to the "Pass arbitrary data to a child process!" section)