Revert "Changed the memory protection check when creating a hook. (experimental)"

This reverts commit df18b059f3dcf0f7d8a7bb42e8a95b4fd19679da.