Luckily Bitcoin running on WIN32 uses OpenSSL in addition to the OS random function to generate a key. Check out this block of code:
{
assert(num <= 32);
CSHA512 hasher;
unsigned char buf[64];
// First source: OpenSSL's RNG
RandAddSeedPerfmon();
GetRandBytes(buf, 32);
hasher.Write(buf, 32);
// Second source: OS RNG
GetOSRand(buf);
hasher.Write(buf, 32);
// Combine with and update state
{
std::unique_lock
hasher.Write(rng_state, sizeof(rng_state));
hasher.Write((const unsigned char*)&rng_counter, sizeof(rng_counter));
++rng_counter;
hasher.Finalize(buf);
memcpy(rng_state, buf + 32, 32);
}
// Produce output
memcpy(out, buf, num);
memory_cleanse(buf, 64);
}
https://github.com/bitcoin/bitcoin/blob/daf3e7def7b9e5db7a32f5a20b5c4e09e3f0dd18/src/random.cpp#L210-L233
If you follow the code from here you'll see what I'm talking about.
Further reading on RAND_add:
https://wiki.openssl.org/index.php/Manual:RAND_add(3)