Windows Vista added the concept of virtual accounts for services. There exists a deterministic mapping between the name of a service and its security identifier.
The format of virtual account's SID is the following.
Revision: 1
Identifier Authority: NT_AUTHORITY (5)
Domain Identifier: NT_SERVICE (80)
Relative Identifier: SHA1(ServiceName)
For example the SID of a service named "TestService" is: S-1-5-80-3892056402-659729507-4115993473-1921682939-1565901394
RtlCreateServiceSid generates the SID of a service from its name.
This function is the first step towards adding virtual account support to System.Security.Principal.NTAccount from .NET which is required for OculusSetup.exe.