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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x4dc654]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, 0xa
mov dword [esp + 0x38], eax
push edi
mov dword [esp + 0x24], ecx
movzx eax, word [esi]
mov dword [esp + 0x34], 0
mov dword [0x4dc654], 0
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x14], ebx
mov byte [0x4dc65e], 0
mov byte [0x4dc65d], 0
mov byte [0x4dc65c], 0
mov dword [0x4dc658], 0
mov byte [esp + 0x12], 0
mov byte [esp + 0x10], 0
mov byte [esp + 0xe], 0
mov byte [esp + 0x13], 0
mov byte [esp + 0xf], 0
mov byte [esp + 0x11], 0
test ax, ax
je 0x440772
mov ecx, eax
nop word [eax + eax]
push ecx
mov ebx, 1
call fcn.004a1397
movzx eax, ax
add esp, 4
add eax, 0xffffffbd
cmp eax, 0x19
ja case.0x4405b4.69
movzx eax, byte [eax + 0x440d40]
jmp dword [eax*4 + 0x440d18]
movzx eax, word [esi + 2]
lea edi, [esi + 2]
mov ebx, eax
test eax, 0xffffff80
je 0x4405cf
xor edx, edx
jmp 0x4405dc
push 2
push eax
call fcn.0049bd84
add esp, 8
mov edx, eax
mov eax, ebx
and eax, 0xffdf
test edx, edx
movzx ecx, ax
mov eax, ebx
cmove ecx, eax
movzx ecx, cx
cmp ecx, 0x4c
sete al
inc al
cmp ecx, 0x4c
mov byte [0x4dc65e], al
cmovne edi, esi
mov esi, edi
jmp case.0x4405b4.69
movzx eax, word [esi + 2]
mov edx, eax
test ax, ax
je case.0x4405b4.69
mov ebx, edx
add esi, 2
mov dword [esp + 0x14], ebx
jmp 0x440760
lea edi, [esi + 2]
nop word [eax + eax]
movzx eax, word [edi]
cmp eax, 0x20
je 0x44063d
cmp eax, 9
jne 0x440642
add edi, 2
jmp 0x440630
mov ebx, edi
test ax, ax
je 0x440681
mov esi, eax
nop dword [eax + eax]
mov ecx, 0x4ca844
mov edx, 0x20
nop word [eax + eax]
cmp si, dx
je 0x440698
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x440660
movzx eax, word [ebx + 2]
add ebx, 2
mov esi, eax
test ax, ax
jne 0x440650
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x440686
sub ecx, edx
sar ecx, 1
lea ebx, [edi + ecx*2]
mov eax, ebx
mov ecx, 0x4ddca0
sub eax, edi
push 0
sar eax, 1
push eax
push edi
call fcn.004216b0
mov ecx, eax
mov dword [0x4dc654], ecx
test ecx, ecx
je 0x440c90
cmp byte [ecx + 0x3d], 0
jne 0x440c90
mov eax, dword [ecx + 0x10]
sub eax, 2
cmp eax, 1
ja 0x440c90
mov eax, dword [ecx + 0xc]
cmp word [eax + 4], 0
jne 0x440c90
cmp word [eax + 0x14], 0
jne 0x440c90
lea esi, [ebx - 2]
jmp case.0x4405b4.69
mov byte [0x4dc65d], 1
jmp case.0x4405b4.69
lea eax, [esi + 2]
push eax
call fcn.0049ccd5
add esp, 4
cmp eax, 1
cmovl eax, ebx
dec eax
mov dword [0x4dc658], eax
jmp case.0x4405b4.69
push 6
push str.Random
push esi
call fcn.0049b726
mov ebx, dword [esp + 0x20]
add esp, 0xc
test eax, eax
jne 0x440738
mov byte [esp + 0xf], 1
add esi, 0xa
jmp 0x440760
mov byte [0x4dc65c], 1
jmp 0x440760
mov byte [esp + 0x11], 1
mov dword [esp + 0x30], 0
jmp case.0x4405b4.69
mov byte [esp + 0x12], 1
jmp case.0x4405b4.69
mov byte [esp + 0x13], 1
mov ebx, dword [esp + 0x14]
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x440590
mov esi, dword [ebp + 8]
movzx edx, word [esi]
test dx, dx
je 0x440c90
mov ecx, dword [0x4ddbb0]
mov dword [esp + 0x1c], ecx
mov al, byte [ecx + 0x17]
test al, al
jne 0x440798
mov eax, dword [ecx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
ja 0x440c90
mov edi, 1
mov ecx, esi
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 0x4407a7
mov eax, dword [esp + 0x14]
mov ebx, ecx
sub ebx, esi
sar ebx, 1
cmp byte [esp + 0x12], 0
mov dword [esp + 0x20], ebx
jne 0x440802
cmp ecx, esi
jbe 0x440802
cmp word [ecx - 2], ax
jne 0x440802
mov byte [esp + 0x10], 1
dec edi
mov al, byte [esp + 0xe]
cmp edi, 1
jne 0x44082e
mov ecx, dword [esp + 0x1c]
push edi
push 0
push ebx
push esi
call fcn.0047faa0
mov ebx, eax
jmp 0x440c95
cmp ax, 0xa
jne 0x4407e4
push 0xa
push esi
call fcn.00496bcf
add esp, 8
test eax, eax
je 0x4407e4
cmp eax, esi
jbe 0x4407e4
cmp word [eax - 2], 0xd
jne 0x4407e4
mov al, 1
mov byte [esp + 0xe], al
mov byte [esp + 0x10], al
jmp 0x4407e8
cmp dword [0x4dc654], 0
jne 0x44083b
test al, al
je 0x4408a9
lea eax, [ebx*2 + 6]
push eax
call fcn.004997ae
mov ecx, eax
add esp, 4
mov dword [esp + 0x34], ecx
test ecx, ecx
jne 0x440870
mov ecx, dword [esp + 0x24]
push 0x4b70dc
push eax
push str.Out_of_memory.
call fcn.0042ff20
mov ebx, eax
jmp 0x440c95
lea eax, [ebx*2 + 2]
push eax
push esi
push ecx
call fcn.00498e20
mov ecx, dword [esp + 0x40]
add esp, 0xc
cmp byte [esp + 0xe], 0
mov esi, ecx
je 0x4408a9
mov eax, dword [0x4d12e8]
mov dword [ecx + ebx*2], eax
mov ax, word [0x4d12ec]
mov word [ecx + ebx*2 + 4], ax
add ebx, 2
mov dword [esp + 0x20], ebx
xor ecx, ecx
lea eax, [edi + 1]
cmp byte [esp + 0xf], cl
setne cl
lea ecx, [ecx*4 + 4]
imul eax, ecx
mov dword [esp + 0x28], ecx
push eax
call fcn.004997ae
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x4408ef
mov ecx, dword [esp + 0x24]
push 0x4b70dc
push eax
push str.Out_of_memory.
call fcn.0042ff20
mov ebx, eax
jmp 0x440c95
mov edx, dword [0x4df3f0]
mov edi, eax
mov dword [eax], esi
xor ecx, ecx
movzx eax, word [esi]
mov dword [esp + 0x18], ecx
test ax, ax
je 0x440990
mov ecx, eax
xor ebx, ebx
nop
cmp cx, word [esp + 0x14]
jne 0x440976
xor eax, eax
inc ebx
mov word [esi], ax
cmp byte [esp + 0xf], al
je 0x44096d
sub dword [0x4db010], 1
jne 0x440937
call fcn.00414d70
mov edx, dword [0x4df3f0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4df3f0], 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 + 0x28]
lea eax, [esi + 2]
mov dword [edi], eax
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x440910
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
cmp byte [esp + 0x10], 0
mov al, byte [esp + 0xf]
jne 0x4409f2
inc ecx
mov dword [esp + 0x18], ecx
test al, al
je 0x4409f2
sub dword [0x4db010], 1
jne 0x4409b8
call fcn.00414d70
mov edx, dword [0x4df3f0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4df3f0], 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 + 0xf]
cmp dword [0x4dc654], 0
je 0x440a02
mov eax, 0x4402e0
jmp 0x440a1f
test al, al
je 0x440a0d
mov eax, 0x4402d0
jmp 0x440a1f
cmp byte [esp + 0x13], 0
mov eax, 0x440130
mov ecx, 0x440240
cmovne eax, ecx
mov edi, dword [esp + 0x18]
push eax
push dword [esp + 0x2c]
push edi
push dword [esp + 0x38]
call fcn.0049b940
mov esi, dword [esp + 0x2c]
add esp, 0x10
mov ecx, esi
push 1
push 0
push ebx
push 0
call fcn.0047faa0
cmp eax, 1
je 0x440a53
xor ebx, ebx
jmp 0x440c95
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.004014c0
mov esi, eax
mov dword [esp + 0x24], edi
cmp dword [esp + 0x18], edi
jbe 0x440b23
cmp byte [esp + 0x11], 0
je 0x440acf
test edi, edi
je 0x440acf
cmp byte [0x4dc65d], 0
je 0x440b54
cmp dword [0x4dc658], 0
jne 0x440b54
mov ecx, dword [ebx]
call fcn.00415260
mov ecx, edi
movsd qword [esp + 0x40], xmm0
call fcn.00415260
movsd xmm1, qword [esp + 0x40]
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x440bb3
mov ecx, dword [ebx]
movzx eax, word [ecx]
test ax, ax
je 0x440af3
mov edx, eax
nop dword [eax + eax]
add ecx, 2
mov word [esi], dx
add esi, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x440ae0
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x38]
jb 0x440b04
cmp byte [esp + 0x10], 0
je 0x440b0e
mov ecx, dword [esp + 0x14]
mov word [esi], cx
add esi, 2
mov edi, dword [ebx]
add ebx, dword [esp + 0x28]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x18]
jb 0x440a82
push dword [esp + 0x2c]
call fcn.0049b8d4
mov ebx, dword [esp + 0x20]
xor eax, eax
add esp, 4
cmp byte [esp + 0xe], al
je 0x440bff
mov word [esi - 4], ax
cmp byte [ebx + 0x17], al
jne 0x440bd8
mov esi, dword [ebx + 0xc]
jmp 0x440bda
cmp byte [0x4dc65e], 0
mov eax, dword [ebx]
jne 0x440b6b
push edi
push eax
call fcn.00499643
add esp, 8
jmp 0x440bab
cmp byte [0x4dc65e], 2
jne 0x440b7e
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x440bab
mov ecx, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x440ba6
test dx, dx
je 0x440ba2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x440ba6
add eax, 4
add ecx, 4
test dx, dx
jne 0x440b80
xor eax, eax
jmp 0x440bab
sbb eax, eax
or eax, 1
test eax, eax
jne 0x440acf
inc dword [esp + 0x20]
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x38]
jne 0x440b10
cmp byte [esp + 0x10], 0
jne 0x440b10
sub esi, 2
jmp 0x440b10
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x440bf5
test byte [esi + 0x15], 8
je 0x440bed
mov ecx, esi
call fcn.00401330
add esi, 0xc
add dword [esi], 0xfffffffc
jmp 0x440c02
mov esi, 0x4df418
add dword [esi], 0xfffffffc
jmp 0x440c02
mov word [esi], ax
cmp byte [esp + 0x11], 0
je 0x440c65
cmp dword [esp + 0x20], 0
je 0x440c65
push 0
push 1
mov ecx, ebx
call fcn.004014c0
mov esi, eax
lea eax, [esi + 2]
mov cx, word [esi]
add esi, 2
test cx, cx
jne 0x440c20
sub esi, eax
sar esi, 1
cmp byte [ebx + 0x17], cl
jne 0x440c39
mov edi, dword [ebx + 0xc]
jmp 0x440c3b
mov edi, ebx
cmp byte [edi + 0x17], 1
jne 0x440c53
test byte [edi + 0x15], 8
je 0x440c4e
mov ecx, edi
call fcn.00401330
add edi, 0xc
jmp 0x440c58
mov edi, 0x4df418
lea eax, [esi + esi]
mov dword [edi], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x30], eax
cmp byte [ebx + 0x17], 0
jne 0x440c6e
mov ebx, dword [ebx + 0xc]
cmp byte [ebx + 0x17], 2
jne 0x440c8c
cmp dword [0x4de7ec], 0
je 0x440c8c
push ecx
mov ecx, 0x4de7e0
call fcn.00405590
mov ebx, eax
jmp 0x440c95
and byte [ebx + 0x15], 0x86
mov ebx, 1
mov edi, dword [esp + 0x30]
cmp edi, 0xffffffff
je 0x440cf3
mov esi, dword [0x4dc408]
cmp byte [esi + 0x17], 0
jne 0x440cad
mov esi, dword [esi + 0xc]
mov al, byte [esi + 0x15]
test al, 2
je 0x440cc4
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 0x440ce3
mov ecx, esi
call fcn.00401330
and byte [esi + 0x15], 0x8f
jmp 0x440cf3
cmp dword [0x4dc430], 0
je 0x440cf3
mov ecx, esi
call fcn.00401330
mov eax, dword [esp + 0x34]
test eax, eax
je 0x440d04
push eax
call fcn.0049b8d4
add esp, 4
mov eax, dword [esp + 0x3c]
pop edi
mov dword [0x4dc654], eax
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8