Hook for WriteProcessMemory