Resolve TODO: Fix copy-on-write shared memory sections

The main problem was the use of WriteProcessMemory(), which attempts to
change everything to PAGE_EXECUTE_READWRITE which fails for
copy-on-write sections.  Use NtWriteVirtualMemory instead, failing due
to invalid protection attributes is actually what I would prefer to
happen