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

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x18]
push esi
push edi
mov edi, eax
cmp ebx, 3
jl 0x474190
movzx eax, byte [esp + 0x28]
or ecx, 0xffffffff
sub ecx, eax
add ebx, ecx
cmp byte [0x4f1552], 0
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], edi
je 0x473f01
mov byte [esp + 0x20], 0
mov eax, dword [ebp + 8]
push eax
push str._03u:
mov esi, ebx
call fcn.004a2f10
add esp, 8
add edi, eax
dec dword [0x4ec458]
jne 0x473e22
call fcn.004136d0
mov ecx, dword [0x4efb04]
mov eax, dword [ecx]
add ecx, 4
mov dword [0x4efb04], ecx
mov ecx, eax
shr ecx, 0xb
xor eax, ecx
mov edx, eax
and edx, 0xff3a58ad
shl edx, 7
xor eax, edx
mov ecx, eax
and ecx, 0xffffdf8c
shl ecx, 0xf
xor eax, ecx
mov ecx, eax
shr ecx, 0x12
xor ecx, eax
movzx eax, word [ebp]
cdq
push edx
push eax
push 0
push ecx
call fcn.004c9840
inc ax
cmp byte [esp + 0x30], 0
movzx edx, ax
mov dword [esp + 0x18], edx
je 0x473eb8
mov eax, dword [esp + 0x2c]
fild dword [esp + 0x2c]
test eax, eax
jns 0x473e8c
fadd dword [0x4e58e0]
fdiv qword [0x4e58d8]
sub esp, 8
fstp qword [esp]
push 0x4e3aa0
call fcn.0049be50
mov esi, dword [esp + 0x1c]
add esp, 4
sub esi, edi
push eax
add esi, ebx
call fcn.004a2f10
add esp, 0xc
add edi, eax
movzx ecx, word [ebp]
cmp ecx, 0xf
je 0x4740fa
cmp ecx, 0x10
je 0x4740fa
cmp ecx, 7
ja 0x473ed8
cmp ecx, 1
jae 0x473ef3
cmp ecx, 9
jb 0x473ff7
cmp ecx, 0x20
ja 0x473ff7
cmp ecx, 0x18
jae 0x473ff7
cmp byte [ebp + 2], 1
jbe 0x473f31
mov edx, dword [ebp + 0xc]
mov ebx, dword [edx + 0x14]
jmp 0x473f36
movzx esi, word [ebp + 4]
call fcn.0046a810
mov byte [esp + 0x20], al
test al, al
je 0x473e00
call fcn.004137a0
mov edx, dword [ebp + 8]
push 0
push edx
push 0
push eax
call fcn.004c9840
add eax, 0xa
jmp 0x473e03
mov ebx, 0x4d6959
cmp byte [esp + 0x20], 0
je 0x473f46
mov esi, 0x4d6959
mov edx, esi
jmp 0x473f66
mov ebp, dword [ebp + 0xc]
mov eax, ecx
imul eax, eax, 0x15
mov esi, dword [eax + 0x4ec7a8]
mov eax, dword [ebp + 4]
cmp byte [eax], 0
je 0x473f60
mov edx, eax
jmp 0x473f66
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x18]
cmp ecx, 9
jb 0x473f75
mov eax, 0x4e3adc
cmp ecx, 0x20
jbe 0x473f7a
mov eax, 0x4d6959
push ebx
push esi
push edx
push eax
push str.u_t4hp_ed
call fcn.0049be50
mov esi, dword [esp + 0x24]
sub esi, edi
add esi, dword [esp + 0x38]
add esp, 4
push eax
call fcn.004a2f10
add esp, 0x14
add edi, eax
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x474162
cmp byte [esp + 0x30], 0
jne 0x474162
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
test eax, eax
jns 0x473fcd
fadd dword [0x4e58e0]
fdiv qword [0x4e58d8]
mov ebp, dword [esp + 0x10]
sub esp, 8
mov esi, ebp
sub esi, edi
add esi, ebx
fstp qword [esp]
push str.___0.2f_
call fcn.004a2f10
add esp, 0xc
add edi, eax
jmp 0x474166
cmp ecx, 0x6a
jne 0x47404e
mov ebp, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
cmp byte [eax], 0
jne 0x474013
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x474013
mov ecx, dword [ecx + 0x18]
jmp 0x474015
mov ecx, eax
mov eax, dword [ebp + 4]
cmp byte [eax], 0
jne 0x474023
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov edx, dword [ebp + 0x24]
push edx
push ecx
push eax
push 0x4e3af4
call fcn.0049be50
mov esi, dword [esp + 0x20]
add esp, 4
sub esi, edi
push eax
add esi, ebx
call fcn.004a2f10
add esp, 0x10
add edi, eax
jmp 0x473fa4
cmp byte [esp + 0x20], 0
movzx eax, word [esp + 0x18]
jne 0x47405c
mov eax, ecx
mov esi, dword [esp + 0x10]
movzx eax, ax
imul eax, eax, 0x15
mov ecx, dword [eax + 0x4ec7a8]
push ecx
sub esi, edi
push 0x4e3b0c
add esi, ebx
call fcn.004a2f10
xor ebx, ebx
add esp, 8
add edi, eax
cmp byte [ebp + 2], bl
jbe 0x473fa0
mov dword [esp + 0x14], ebx
cmp byte [esp + 0x20], 0
je 0x4740ae
movzx eax, word [esp + 0x18]
movzx edx, bl
xor edx, eax
xor edx, 0xf0
push edx
push 0x4e3b10
jmp 0x4740d3
mov eax, dword [ebp + 0xc]
add eax, dword [esp + 0x14]
cmp byte [eax], 0
je 0x4740ca
mov ecx, dword [eax + 4]
cmp byte [ecx], 0
jne 0x4740ca
mov edx, dword [eax + 8]
mov eax, dword [edx + 0x18]
jmp 0x4740cd
mov eax, dword [eax + 4]
push eax
push 0x4e3b14
mov esi, dword [esp + 0x18]
sub esi, edi
add esi, dword [esp + 0x2c]
call fcn.004a2f10
add dword [esp + 0x1c], 0x10
add edi, eax
movzx eax, byte [ebp + 2]
inc ebx
add esp, 8
cmp ebx, eax
jl 0x47408f
jmp 0x473fa0
mov al, byte [ebp + 2]
cmp al, 2
jbe 0x474109
mov edx, dword [ebp + 0xc]
mov esi, dword [edx + 0x24]
jmp 0x47410e
mov esi, 0x4d6959
cmp al, 1
jbe 0x47411a
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 0x14]
jmp 0x47411f
mov edx, 0x4d6959
mov ebp, dword [ebp + 0xc]
mov eax, dword [ebp + 4]
cmp byte [eax], 0
jne 0x474130
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
imul ecx, ecx, 0x15
push esi
push edx
mov edx, dword [ecx + 0x4ec7a8]
push edx
push eax
push str.9.qb_uh6a_n___xc:
call fcn.0049be50
mov esi, dword [esp + 0x24]
add esp, 4
sub esi, edi
push eax
add esi, ebx
call fcn.004a2f10
add esp, 0x14
add edi, eax
jmp 0x473fa4
mov ebp, dword [esp + 0x10]
cmp byte [esp + 0x28], 0
je 0x474171
mov byte [edi], 0xd
inc edi
cmp byte [esp + 0x20], 0
mov word [edi], 0xa
je 0x47418d
mov byte [ebp], 0
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x14
lea eax, [edi + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x14