VirtualProtectEx,
BOOL VirtualProtectEx(
HANDLE hProcess, // handle to process
LPVOID lpAddress, // address of region of committed pages
DWORD dwSize, // size of region
DWORD flNewProtect, // desired access protection
PDWORD lpflOldProtect
// address of variable to get old protection
);
it can give you rights to read or write memory in another process,