There are restrictions on using Microsoft products in certain countries such as Iran. Take a look at FAQ (microsoft.com).
Pirate version of Windows contains malware and is not safe.
The best way would be purchasing a device which genuine version of Windows has been installed.