What algorithm did Windows XP use to choose your initial user picture?

A technical breakdown explains the algorithm Windows XP used to randomly select default user profile pictures. The author highlights the use of reservoir sampling to efficiently select a file from a directory in a single pass.
Why it matters
Understanding legacy software algorithms provides insight into historical engineering constraints and efficient coding practices for resource-limited environments.
I noted some time ago that Windows XP chose your initial picture at random from among the pictures in the %ALLUSERSPROFILE%\ Application Data\ Microsoft\ User Account Pictures\ Default Pictures directory. But it seems people want to know more.
Has anyone attempted to figure out the RNG for how Windows XP determines what profile picture is used on first account creation?
The random number generator is our friend RtlRandomEx , using the current value of GetTickCount() as the initial seed.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in