advapi32: Reduce registry access to MAXIMUM_ALLOWED wherever possible.