Sort of. Basically it generates a value between 0 and 255 and the gender is determined based on a threshold value based on that Pokémon and its gender distribution. If it’s above that threshold the Pokémon is male, otherwise it is female.
Where this comes into play is when a Pokémon has a different gender threshold between its own evolutionary line. (I.e. azurill which has a 75% chance of being female and its evolution Marill which has a 50/50 gender distribution)
Comments
According to a YouTube video I watched a week ago and half remember.