There's not really a such thing as Pirated Windows as such for the retail versions. Windows is free for download and use, all the way back to Win95 A. What you pay for is the key, that's the questionable part. Many Win8.1 keys and prior are generated using illegal software, they look real to the OS so come back as legit. Many keys are stolen, pulled from pc's found in junkyards, or even yardsales, so there really can be no proof of original purchase or owner. Many are pulled off the hard drive from client pc's by questionable repair shops and sold online on the gray-market. Many are just 2nd party sales, that come with the pc so technically skate by under Microsoft eula.
Regardless, your OS as such isn't Pirated Version unless it has been changed from its original copyright code. Whether the key is fully vested as original legit Microsoft and you are the only user of that key, is a different story.
The way it works is the keys are an algorithmic sequence, there's billions of possible combinations, but each combination is tailored to a specific OS. For ease of explanation, assume the answer for Win7 is 13 and for Win7Pro the answer is 56. You plug in your key using Win7Pro and the answer is 13, it's not a viable key. Get 1 number or letter different and the answer comes back as 56.00003, and it's not a valid key. But everything was done on the user end.
Because of the way internet, dialup, connections etc worked back then, the pc was the Judge of valid keys. Today with Win10 and readily available internet, Microsoft itself has all the keys, owns all the keys, you purchase the right to use that key.
You have a valid Win7 key. Your pc accepts it as a valid key. It'll come back as active and valid, according to your pc. There's nothing about the key that's invalid. The legality of its acquisition in the first place is what's questionable.