Function at 0x45f080
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x4fbb0c]
xor dh, dh
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov bl, 0xa
mov dword [esp + 0x38], eax
push edi
mov dword [esp + 0x24], ecx
mov al, byte [esi]
mov dword [esp + 0x34], 0
mov dword [0x4fbb0c], 0
mov dword [esp + 0x30], 0xffffffff
mov byte [esp + 0x13], bl
mov byte [0x4fbb70], 0
mov byte [0x4fbb6b], 0
mov byte [0x4fbb6a], 0
mov dword [0x4fbb6c], 0
mov byte [esp + 0x11], dh
mov byte [esp + 0x15], dh
mov byte [esp + 0x12], dh
mov byte [esp + 0x17], dh
mov byte [esp + 0x14], dh
mov byte [esp + 0x16], dh
test al, al
je 0x45f2b4
mov edi, 1
movsx eax, al
push eax
call fcn.004cc965
add eax, 0xffffffbd
add esp, 4
cmp eax, 0x19
ja case.0x45f123.69
movzx eax, byte [eax + 0x45f85c]
jmp dword [eax*4 + 0x45f834]
mov bl, byte [esi + 1]
lea edi, [esi + 1]
movzx eax, bl
test eax, 0xffffff80
je 0x45f13e
xor edx, edx
jmp 0x45f14b
push 2
push eax
call fcn.004c7451
add esp, 8
mov edx, eax
mov al, bl
and al, 0xdf
test edx, edx
movzx ecx, al
movzx eax, bl
mov bl, byte [esp + 0x13]
cmove ecx, eax
cmp cl, 0x4c
sete al
inc al
cmp cl, 0x4c
mov byte [0x4fbb70], al
cmovne edi, esi
mov esi, edi
mov edi, 1
jmp case.0x45f123.69
mov cl, byte [esi + 1]
mov dh, byte [esp + 0x11]
test cl, cl
je 0x45f2a8
mov bl, cl
inc esi
mov byte [esp + 0x13], bl
jmp 0x45f2a8
mov dl, byte [esi + 1]
inc esi
cmp dl, 0x20
je case.0x45f123.70
cmp dl, 9
je case.0x45f123.70
mov edi, esi
test dl, dl
je 0x45f1cb
nop dword [eax]
mov ecx, 0x4e902c
mov al, 0x20
cmp dl, al
je 0x45f1dc
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x45f1b7
mov dl, byte [edi + 1]
inc edi
test dl, dl
jne 0x45f1b0
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x45f1d0
sub ecx, edx
lea edi, [esi + ecx]
push 0
mov eax, edi
mov ecx, 0x4fda88
sub eax, esi
push eax
push esi
call fcn.0043cf80
mov ecx, eax
mov dword [0x4fbb0c], ecx
test ecx, ecx
je 0x45f7ab
cmp byte [ecx + 0x51], 0
jne 0x45f7ab
mov eax, dword [ecx + 0x10]
sub eax, 2
cmp eax, 1
ja 0x45f7ab
mov eax, dword [ecx + 0xc]
cmp word [eax + 4], 0
jne 0x45f7ab
cmp word [eax + 0x14], 0
jne 0x45f7ab
lea esi, [edi - 1]
mov edi, 1
jmp case.0x45f123.69
mov byte [0x4fbb6b], 1
jmp case.0x45f123.69
lea eax, [esi + 1]
push eax
call fcn.004c4df6
add esp, 4
cmp eax, 1
cmovl eax, edi
dec eax
mov dword [0x4fbb6c], eax
jmp case.0x45f123.69
push 6
push str.Random
push esi
call fcn.004c4e4b
mov dh, byte [esp + 0x1d]
add esp, 0xc
test eax, eax
jne 0x45f27f
mov byte [esp + 0x14], 1
add esi, 5
jmp 0x45f2a8
mov byte [0x4fbb6a], 1
jmp 0x45f2a8
mov byte [esp + 0x16], 1
mov dword [esp + 0x30], 0
jmp case.0x45f123.69
mov dh, 1
mov byte [esp + 0x11], dh
jmp 0x45f2a8
mov byte [esp + 0x17], 1
mov dh, byte [esp + 0x11]
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x45f104
mov esi, dword [ebp + 8]
mov dl, byte [esi]
test dl, dl
je 0x45f7ab
mov ecx, dword [0x4fd110]
mov dword [esp + 0x1c], ecx
mov al, byte [ecx + 0x17]
test al, al
jne 0x45f2d8
mov eax, dword [ecx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
ja 0x45f7ab
mov edi, 1
mov ecx, esi
cmp dl, bl
lea eax, [edi + 1]
mov dl, byte [ecx + 1]
cmovne eax, edi
inc ecx
mov edi, eax
test dl, dl
jne 0x45f2e7
mov ebx, ecx
sub ebx, esi
mov dword [esp + 0x20], ebx
test dh, dh
jne 0x45f336
cmp ecx, esi
jbe 0x45f336
mov al, byte [esp + 0x13]
cmp byte [ecx - 1], al
jne 0x45f336
mov byte [esp + 0x15], 1
dec edi
mov al, byte [esp + 0x12]
cmp edi, 1
jne 0x45f362
mov ecx, dword [esp + 0x1c]
push edi
push 0
push ebx
push esi
call fcn.004b01a0
mov ebx, eax
jmp 0x45f7b0
cmp byte [esp + 0x13], 0xa
jne 0x45f318
push 0xa
push esi
call fcn.004ca733
add esp, 8
test eax, eax
je 0x45f318
cmp eax, esi
jbe 0x45f318
cmp byte [eax - 1], 0xd
jne 0x45f318
mov al, 1
mov byte [esp + 0x12], al
mov byte [esp + 0x15], al
jmp 0x45f31c
cmp dword [0x4fbb0c], 0
jne 0x45f36f
test al, al
je 0x45f3d5
lea eax, [ebx + 3]
push eax
call fcn.004c4e35
mov ecx, eax
add esp, 4
mov dword [esp + 0x34], ecx
test ecx, ecx
jne 0x45f3a0
mov ecx, dword [esp + 0x24]
push 0x4e3371
push eax
push str.Out_of_memory.
call fcn.0044d920
mov ebx, eax
jmp 0x45f7b0
lea eax, [ebx + 1]
push eax
push esi
push ecx
call fcn.004c2440
mov ecx, dword [esp + 0x40]
add esp, 0xc
cmp byte [esp + 0x12], 0
mov esi, ecx
je 0x45f3d5
mov ax, word [0x4ee75c]
mov word [ebx + ecx], ax
mov al, byte [0x4ee75e]
mov byte [ebx + ecx + 2], al
add ebx, 2
mov dword [esp + 0x20], ebx
xor ecx, ecx
lea eax, [edi + 1]
cmp byte [esp + 0x14], cl
setne cl
lea ecx, [ecx*4 + 4]
imul eax, ecx
mov dword [esp + 0x28], ecx
push eax
call fcn.004c4e35
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x45f41b
mov ecx, dword [esp + 0x24]
push 0x4e3371
push eax
push str.Out_of_memory.
call fcn.0044d920
mov ebx, eax
jmp 0x45f7b0
mov edx, dword [0x4fed18]
mov edi, eax
mov dword [eax], esi
xor ecx, ecx
mov al, byte [esi]
mov dword [esp + 0x18], ecx
test al, al
je 0x45f4b8
mov ebx, dword [esp + 0x28]
mov ah, byte [esp + 0x13]
nop dword [eax]
cmp al, ah
jne 0x45f4ac
inc ecx
mov byte [esi], 0
cmp byte [esp + 0x14], 0
mov dword [esp + 0x18], ecx
je 0x45f4a1
sub dword [0x4fa384], 1
jne 0x45f467
call fcn.00428980
mov edx, dword [0x4fed18]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4fed18], edx
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
mov ecx, dword [esp + 0x18]
shr eax, 1
mov dword [edi + 4], eax
add edi, ebx
lea eax, [esi + 1]
mov dword [edi], eax
mov ah, byte [esp + 0x13]
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x45f440
mov ebx, dword [esp + 0x20]
cmp byte [esp + 0x15], 0
mov al, byte [esp + 0x14]
jne 0x45f51a
inc ecx
mov dword [esp + 0x18], ecx
test al, al
je 0x45f51a
sub dword [0x4fa384], 1
jne 0x45f4e0
call fcn.00428980
mov edx, dword [0x4fed18]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4fed18], edx
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
shr eax, 1
mov dword [edi + 4], eax
mov al, byte [esp + 0x14]
cmp dword [0x4fbb0c], 0
je 0x45f52a
mov eax, 0x45ee90
jmp 0x45f547
test al, al
je 0x45f535
mov eax, 0x45ee80
jmp 0x45f547
cmp byte [esp + 0x17], 0
mov eax, 0x45ed40
mov ecx, 0x45ee10
cmovne eax, ecx
mov edi, dword [esp + 0x18]
push eax
push dword [esp + 0x2c]
push edi
push dword [esp + 0x38]
call fcn.004cad90
mov esi, dword [esp + 0x2c]
add esp, 0x10
mov ecx, esi
push 1
push 0
push ebx
push 0
call fcn.004b01a0
cmp eax, 1
je 0x45f57b
xor ebx, ebx
jmp 0x45f7b0
mov ebx, dword [esp + 0x2c]
lea eax, [edi - 1]
xor edi, edi
mov dword [esp + 0x38], eax
push edi
push 1
mov ecx, esi
mov dword [esp + 0x28], 0
call fcn.00401670
mov esi, eax
mov dword [esp + 0x24], edi
cmp dword [esp + 0x18], edi
jbe 0x45f63e
nop word [eax + eax]
cmp byte [esp + 0x16], 0
je 0x45f5fd
test edi, edi
je 0x45f5fd
cmp byte [0x4fbb6b], 0
je 0x45f672
cmp dword [0x4fbb6c], 0
jne 0x45f672
mov ecx, dword [ebx]
call fcn.00428cb0
mov ecx, edi
movsd qword [esp + 0x40], xmm0
call fcn.00428cb0
movsd xmm1, qword [esp + 0x40]
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x45f6a4
mov eax, dword [ebx]
mov cl, byte [eax]
test cl, cl
je 0x45f611
lea eax, [eax + 1]
mov byte [esi], cl
mov cl, byte [eax]
inc esi
test cl, cl
jne 0x45f605
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x38]
jb 0x45f622
cmp byte [esp + 0x15], 0
je 0x45f629
mov cl, byte [esp + 0x13]
mov byte [esi], cl
inc esi
mov edi, dword [ebx]
add ebx, dword [esp + 0x28]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x18]
jb 0x45f5b0
push dword [esp + 0x2c]
call fcn.004c4247
mov ebx, dword [esp + 0x20]
add esp, 4
cmp byte [esp + 0x12], 0
je 0x45f722
cmp byte [esi - 2], 0xd
jne 0x45f6ee
mov byte [esi - 2], 0
cmp byte [ebx + 0x17], 0
jne 0x45f6c7
mov esi, dword [ebx + 0xc]
jmp 0x45f6c9
mov cl, byte [0x4fbb70]
mov eax, dword [ebx]
push edi
push eax
test cl, cl
jne 0x45f687
call fcn.004c408e
jmp 0x45f699
cmp cl, 2
jne 0x45f694
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
jmp 0x45f69c
call fcn.004c4262
add esp, 8
test eax, eax
jne 0x45f5fd
inc dword [esp + 0x20]
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x38]
jne 0x45f62b
cmp byte [esp + 0x15], 0
jne 0x45f62b
dec esi
jmp 0x45f62b
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x45f6e4
test byte [esi + 0x15], 8
je 0x45f6dc
mov ecx, esi
call fcn.004014d0
add esi, 0xc
add dword [esi], 0xfffffffe
jmp 0x45f725
mov esi, 0x4ff514
add dword [esi], 0xfffffffe
jmp 0x45f725
mov byte [esi - 1], 0
cmp byte [ebx + 0x17], 0
jne 0x45f6fd
mov esi, dword [ebx + 0xc]
jmp 0x45f6ff
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x45f719
test byte [esi + 0x15], 8
je 0x45f712
mov ecx, esi
call fcn.004014d0
add esi, 0xc
dec dword [esi]
jmp 0x45f725
mov esi, 0x4ff514
dec dword [esi]
jmp 0x45f725
mov byte [esi], 0
cmp byte [esp + 0x16], 0
je 0x45f77f
cmp dword [esp + 0x20], 0
je 0x45f77f
push 0
push 1
mov ecx, ebx
call fcn.00401670
mov esi, eax
lea eax, [esi + 1]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x45f743
sub esi, eax
cmp byte [ebx + 0x17], cl
jne 0x45f756
mov edi, dword [ebx + 0xc]
jmp 0x45f758
mov edi, ebx
cmp byte [edi + 0x17], 1
jne 0x45f770
test byte [edi + 0x15], 8
je 0x45f76b
mov ecx, edi
call fcn.004014d0
add edi, 0xc
jmp 0x45f775
mov edi, 0x4ff514
mov eax, dword [esp + 0x20]
mov dword [edi], esi
mov dword [esp + 0x30], eax
cmp byte [ebx + 0x17], 0
jne 0x45f788
mov ebx, dword [ebx + 0xc]
cmp byte [ebx + 0x17], 2
jne 0x45f7a7
cmp dword [0x4fda78], 0
je 0x45f7a7
push 1
mov ecx, 0x4fda6c
call fcn.00406230
mov ebx, eax
jmp 0x45f7b0
and byte [ebx + 0x15], 0x86
mov ebx, 1
mov edi, dword [esp + 0x30]
cmp edi, 0xffffffff
je 0x45f80e
mov esi, dword [0x4fb94c]
cmp byte [esi + 0x17], 0
jne 0x45f7c8
mov esi, dword [esi + 0xc]
mov al, byte [esi + 0x15]
test al, 2
je 0x45f7df
and al, 0x3d
mov byte [esi + 0x15], al
mov eax, dword [esi]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov al, byte [esi + 0x15]
and al, 0x8b
mov dword [esi], edi
or al, 0x18
mov dword [esi + 4], 0
mov byte [esi + 0x15], al
jge 0x45f7fe
mov ecx, esi
call fcn.004014d0
and byte [esi + 0x15], 0x8f
jmp 0x45f80e
cmp dword [0x4fb974], 0
je 0x45f80e
mov ecx, esi
call fcn.004014d0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x45f81f
push eax
call fcn.004c4247
add esp, 4
mov eax, dword [esp + 0x3c]
pop edi
mov dword [0x4fbb0c], eax
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8