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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [0x507c7c]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, 1
mov dword [esp + 0x40], eax
push edi
mov dword [esp + 0x30], ecx
movzx eax, word [esi]
mov dword [esp + 0x3c], 0
mov dword [0x507c7c], 0
mov dword [esp + 0x38], 0xffffffff
mov dword [esp + 0x1c], 0xa
mov byte [0x507b42], 0
mov byte [0x507b3f], 0
mov byte [0x507b3e], 0
mov dword [0x507d34], 0
mov byte [esp + 0x16], 0
mov byte [esp + 0x14], 0
mov byte [esp + 0x12], 0
mov byte [esp + 0x17], 0
mov byte [esp + 0x13], 0
mov byte [esp + 0x15], 0
test ax, ax
je 0x456d95
mov ecx, eax
mov edi, ebx
push ecx
call fcn.004c4ac1
movzx eax, ax
add esp, 4
add eax, 0xffffffbd
cmp eax, 0x19
ja case.0x456c3f.69
movzx eax, byte [eax + 0x4573dc]
jmp dword [eax*4 + 0x4573b4]
mov cx, word [esi + 2]
call fcn.00412f70
cmp ax, 0x4c
jne 0x456c66
mov al, 2
add esi, 2
mov byte [0x507b42], al
mov edi, ebx
jmp case.0x456c3f.69
mov al, bl
mov edi, ebx
mov byte [0x507b42], al
jmp case.0x456c3f.69
movzx eax, word [esi + 2]
mov edx, eax
test ax, ax
je case.0x456c3f.69
add esi, 2
mov dword [esp + 0x1c], eax
jmp case.0x456c3f.69
movzx eax, word [esi + 2]
add esi, 2
cmp eax, 0x20
je case.0x456c3f.70
cmp eax, 9
je case.0x456c3f.70
mov edx, 0x4f0cac
mov ecx, esi
call fcn.004064f0
mov edi, eax
test edi, edi
jne 0x456cc9
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x456cb7
sub ecx, edx
sar ecx, 1
lea edi, [esi + ecx*2]
mov eax, edi
mov ecx, 0x509c28
sub eax, esi
push 0
sar eax, 1
push eax
push esi
call fcn.00438d90
mov ecx, eax
mov dword [0x507c7c], ecx
test ecx, ecx
je 0x457375
cmp byte [ecx + 0x51], 0
jne 0x457375
mov eax, dword [ecx + 0x10]
sub eax, 2
cmp eax, 1
ja 0x457375
mov eax, dword [ecx + 0xc]
cmp word [eax + 4], 0
jne 0x457375
cmp word [eax + 0x14], 0
jne 0x457375
lea esi, [edi - 2]
mov edi, ebx
jmp case.0x456c3f.69
mov byte [0x507b3f], bl
jmp case.0x456c3f.69
lea eax, [esi + 2]
push eax
call fcn.004bb722
add esp, 4
cmp eax, 1
cmovl eax, edi
dec eax
mov dword [0x507d34], eax
jmp case.0x456c3f.69
push 6
push str.Random
push esi
call fcn.004bb7bb
add esp, 0xc
test eax, eax
jne 0x456d65
mov byte [esp + 0x13], bl
add esi, 0xa
jmp case.0x456c3f.69
mov byte [0x507b3e], bl
jmp case.0x456c3f.69
xor eax, eax
mov byte [esp + 0x15], bl
mov dword [esp + 0x38], eax
jmp case.0x456c3f.69
mov byte [esp + 0x16], bl
jmp case.0x456c3f.69
mov byte [esp + 0x17], bl
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x456c20
mov esi, dword [ebp + 8]
movzx edx, word [esi]
test dx, dx
je 0x457375
mov ecx, dword [0x5092c8]
mov dword [esp + 0x20], ecx
mov al, byte [ecx + 0x17]
test al, al
jne 0x456dbb
mov eax, dword [ecx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
ja 0x457375
mov edi, ebx
mov ecx, esi
mov ebx, dword [esp + 0x1c]
nop dword [eax + eax]
cmp dx, bx
lea eax, [edi + 1]
cmovne eax, edi
add ecx, 2
mov edi, eax
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x456dd0
mov ebx, ecx
sub ebx, esi
sar ebx, 1
mov dword [esp + 0x28], ebx
cmp byte [esp + 0x16], al
jne 0x456e2a
cmp ecx, esi
jbe 0x456e2a
mov eax, dword [esp + 0x1c]
cmp word [ecx - 2], ax
jne 0x456e2a
mov byte [esp + 0x14], 1
dec edi
mov al, byte [esp + 0x12]
cmp edi, 1
jne 0x456e58
mov ecx, dword [esp + 0x20]
push edi
push 0
push ebx
push esi
call fcn.0049fde0
mov ebx, eax
jmp 0x457375
cmp word [esp + 0x1c], 0xa
jne 0x456e0c
push 0xa
push esi
call fcn.004b7267
add esp, 8
test eax, eax
je 0x456e0c
cmp eax, esi
jbe 0x456e0c
cmp word [eax - 2], 0xd
jne 0x456e0c
mov al, 1
mov byte [esp + 0x12], al
mov byte [esp + 0x14], al
jmp 0x456e10
cmp dword [0x507c7c], 0
jne 0x456e65
test al, al
je 0x456ed3
lea eax, [ebx*2 + 6]
push eax
call fcn.004bb7a0
mov ecx, eax
add esp, 4
mov dword [esp + 0x3c], ecx
test ecx, ecx
jne 0x456e9a
mov ecx, dword [esp + 0x30]
push 0x4da3cc
push eax
push 0x4ee268
call fcn.00447570
mov ebx, eax
jmp 0x457375
lea eax, [ebx*2 + 2]
push eax
push esi
push ecx
call fcn.004b9800
mov ecx, dword [esp + 0x48]
add esp, 0xc
cmp byte [esp + 0x12], 0
mov esi, ecx
je 0x456ed3
mov eax, dword [0x4f8a98]
mov dword [ecx + ebx*2], eax
mov ax, word [0x4f8a9c]
mov word [ecx + ebx*2 + 4], ax
add ebx, 2
mov dword [esp + 0x28], ebx
xor ecx, ecx
lea eax, [edi + 1]
cmp byte [esp + 0x13], cl
setne cl
lea ecx, [ecx*4 + 4]
imul eax, ecx
mov dword [esp + 0x2c], ecx
push eax
call fcn.004bb7a0
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
jne 0x456f19
mov ecx, dword [esp + 0x30]
push 0x4da3cc
push eax
push 0x4ee268
call fcn.00447570
mov ebx, eax
jmp 0x457375
mov edx, dword [0x50b3a0]
mov edi, eax
mov dword [eax], esi
xor ecx, ecx
movzx eax, word [esi]
mov dword [esp + 0x18], ecx
test ax, ax
je 0x456fbd
mov bl, byte [esp + 0x13]
mov ecx, eax
nop dword [eax + eax]
cmp cx, word [esp + 0x1c]
jne 0x456fa7
inc dword [esp + 0x18]
xor eax, eax
mov word [esi], ax
test bl, bl
je 0x456f9e
sub dword [0x506400], 1
jne 0x456f68
call fcn.00427130
mov edx, dword [0x50b3a0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x50b3a0], 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
add edi, dword [esp + 0x2c]
lea eax, [esi + 2]
mov dword [edi], eax
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x456f40
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
cmp byte [esp + 0x14], 0
mov al, byte [esp + 0x13]
jne 0x45701f
inc ecx
mov dword [esp + 0x18], ecx
test al, al
je 0x45701f
sub dword [0x506400], 1
jne 0x456fe5
call fcn.00427130
mov edx, dword [0x50b3a0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x50b3a0], 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 + 0x13]
cmp dword [0x507c7c], 0
je 0x45702f
mov eax, 0x4569f0
jmp 0x45704c
test al, al
je 0x45703a
mov eax, 0x4569e0
jmp 0x45704c
cmp byte [esp + 0x17], 0
mov eax, 0x4567e0
mov ecx, 0x456950
cmovne eax, ecx
mov edi, dword [esp + 0x18]
push eax
push dword [esp + 0x30]
push edi
push dword [esp + 0x40]
call fcn.004c34d0
mov esi, dword [esp + 0x30]
add esp, 0x10
mov ecx, esi
push 1
push 0
push ebx
push 0
call fcn.0049fde0
xor ebx, ebx
cmp eax, 1
jne 0x457375
lea eax, [edi - 1]
mov dword [esp + 0x24], ebx
mov edi, dword [esp + 0x34]
mov ecx, esi
push ebx
push 1
mov dword [esp + 0x48], eax
mov dword [esp + 0x38], edi
call fcn.00401640
mov esi, eax
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x18], ebx
jbe 0x4571be
nop dword [eax]
cmp byte [esp + 0x15], 0
je 0x45716b
test ebx, ebx
je 0x45716b
cmp byte [0x507b3f], 0
je 0x4571fa
cmp dword [0x507d34], 0
jne 0x4571fa
mov edi, dword [edi]
mov ecx, edi
call fcn.00404cf0
test al, al
je 0x457106
push 0x10
push 0
push edi
call fcn.004bb5f0
add esp, 0xc
mov ecx, eax
call fcn.004d2b00
movsd qword [esp + 0x48], xmm0
jmp 0x45711f
push edi
call fcn.004c3105
fstp qword [esp + 0x4c]
movsd xmm0, qword [esp + 0x4c]
add esp, 4
movsd qword [esp + 0x48], xmm0
mov ecx, ebx
call fcn.00404cf0
test al, al
je 0x457140
push 0x10
push 0
push ebx
call fcn.004bb5f0
add esp, 0xc
mov ecx, eax
call fcn.004d2b00
jmp 0x457153
push ebx
call fcn.004c3105
fstp qword [esp + 0x54]
movsd xmm0, qword [esp + 0x54]
add esp, 4
movsd xmm1, qword [esp + 0x48]
mov edi, dword [esp + 0x30]
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x457259
mov ecx, dword [edi]
movzx eax, word [ecx]
test ax, ax
je 0x45718a
mov edx, eax
add ecx, 2
mov word [esi], dx
add esi, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x457177
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x40]
jb 0x45719b
cmp byte [esp + 0x14], 0
je 0x4571a5
mov ecx, dword [esp + 0x1c]
mov word [esi], cx
add esi, 2
mov ebx, dword [edi]
add edi, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], edi
cmp eax, dword [esp + 0x18]
jb 0x4570b0
push dword [esp + 0x34]
call fcn.004bb7ab
mov ebx, dword [esp + 0x24]
xor eax, eax
add esp, 4
cmp byte [esp + 0x12], al
je 0x4572da
cmp word [esi - 4], 0xd
jne 0x4572a5
mov word [esi - 4], ax
cmp byte [ebx + 0x17], al
jne 0x45727e
mov esi, dword [ebx + 0xc]
jmp 0x457280
cmp byte [0x507b42], 0
mov eax, dword [edi]
jne 0x457211
push ebx
push eax
call fcn.004ba0a7
add esp, 8
jmp 0x457251
cmp byte [0x507b42], 2
jne 0x457224
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x457251
mov ecx, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x45724c
test dx, dx
je 0x457248
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x45724c
add eax, 4
add ecx, 4
test dx, dx
jne 0x457226
xor eax, eax
jmp 0x457251
sbb eax, eax
or eax, 1
test eax, eax
jne 0x45716b
inc dword [esp + 0x24]
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x40]
jne 0x4571a7
cmp byte [esp + 0x14], 0
jne 0x4571a7
sub esi, 2
jmp 0x4571a7
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x45729b
test byte [esi + 0x15], 8
je 0x457293
mov ecx, esi
call fcn.00401560
add esi, 0xc
add dword [esi], 0xfffffffc
jmp 0x4572dd
mov esi, 0x50bba0
add dword [esi], 0xfffffffc
jmp 0x4572dd
mov word [esi - 2], ax
cmp byte [ebx + 0x17], al
jne 0x4572b3
mov esi, dword [ebx + 0xc]
jmp 0x4572b5
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x4572d0
test byte [esi + 0x15], 8
je 0x4572c8
mov ecx, esi
call fcn.00401560
add esi, 0xc
add dword [esi], 0xfffffffe
jmp 0x4572dd
mov esi, 0x50bba0
add dword [esi], 0xfffffffe
jmp 0x4572dd
mov word [esi], ax
cmp byte [esp + 0x15], 0
je 0x457345
cmp dword [esp + 0x24], 0
je 0x457345
push 0
push 1
mov ecx, ebx
call fcn.00401640
mov esi, eax
lea eax, [esi + 2]
nop dword [eax + eax]
mov cx, word [esi]
add esi, 2
test cx, cx
jne 0x457300
sub esi, eax
sar esi, 1
cmp byte [ebx + 0x17], cl
jne 0x457319
mov edi, dword [ebx + 0xc]
jmp 0x45731b
mov edi, ebx
cmp byte [edi + 0x17], 1
jne 0x457333
test byte [edi + 0x15], 8
je 0x45732e
mov ecx, edi
call fcn.00401560
add edi, 0xc
jmp 0x457338
mov edi, 0x50bba0
lea eax, [esi + esi]
mov dword [edi], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x38], eax
cmp byte [ebx + 0x17], 0
jne 0x45734e
mov ebx, dword [ebx + 0xc]
cmp byte [ebx + 0x17], 2
jne 0x45736c
cmp dword [0x50a78c], 0
je 0x45736c
push ecx
mov ecx, 0x50a780
call fcn.004060f0
mov ebx, eax
jmp 0x457375
and byte [ebx + 0x15], 0x86
mov ebx, 1
mov eax, dword [esp + 0x38]
cmp eax, 0xffffffff
je 0x45738e
mov ecx, dword [0x507a8c]
push 0x18
push 0
push eax
call fcn.004014e0
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x45739f
push eax
call fcn.004bb7ab
add esp, 4
mov eax, dword [esp + 0x44]
pop edi
mov dword [0x507c7c], eax
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8