Andrew Eikum : advapi32: Consolidate helper function.