I've discovered (and tested) the algorithm that windows' implementation of cstdlib uses to produce random numbers.
Compare how many numbers? 15
With what seed? 528
rand() myrand()
1762 1762
14014 14014
16336 16336
26650 26650
15462 15462
20726 20726
13339 13339
26780 26780
12282 12282
28464 28464
26063 26063
18589 18589
25061 25061
20453 20453
7055 7055
Press any key to continue . . .
Numbers on the left are produced by actually calling rand(), numbers on the right are produced by calling my reimplementation with the same seed value.
This seems like it would be useful functionality for hourglass, to have, but unfortunately, in real use cases random seed is stored in dynamically allocated memory, pointed to from dynamically allocated memory, pointed to from dynamically allocated memory which means that, even using MHS, it is very difficult to find and track in a meaningful way.
However, it seems like it should be relatively simple for hourglass to hook rand() and track the per-thread _storerand value somewhere user accessible.