Actually, I think you could install iPhone OS 4.0 using a Windows laptop. But you'd still have to be a registered iPhone developer to install it.
Installing the OS doesn't require XCode. The OS is a separate download from XCode. It's supplied as a .dmg (Disk Image) file, which is a proprietary OSX archive format. (Under OSX, you can "mount" a .dmg file to your file system, and once it is opened it appears as a directory in your file system.)
There's a third-party command-line utility available for Windows called dmg2iso that will convert a .dmg file into a .iso file. You can then use a third-party .iso mounter, or simply burn the .iso to a CDRom.
Inside the archive is a single .ipsw file. This can be installed (after first registering your phone's ID as a developer phone using the developer website) using either iTunes or the iPhone Configuration Utility, both of which are available for Windows.
So, technically, this IS possible.