Seems it might be using a look up table internally, Get_Random_Int() calls Random2Class::operator()(void) for the object FreeRandom which in turn uses member data initialized in the Random2Class constructor which calls Random3Class RNG functions to initialize some member data.
There's a check to reset a member variable to 0 if it's higher than 249 in Random2Class::operator()(void) so..
edit: yeah it's using a lookup table
int __cdecl Random2Class__Random2Class(int a1, int a2)
{
signed int v2; // ebx@1
int result; // eax@2
char v4; // [sp+Ch] [bp-14h]@1
*(_DWORD *)a1 = 0;
*(_DWORD *)(a1 + 4) = 103;
Random3Class__Random3Class(&v4, a2, 0);
v2 = 0;
do
{
result = Random3Class__operator__(&v4);
*(_DWORD *)(a1 + 4 * v2++ + 8) = result;
}
while ( v2 <= 249 );
return result;
}
[Updated on: Sun, 12 August 2012 14:21]
Report message to a moderator