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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x4ca8f4]
xor dh, dh
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x38], eax
push edi
mov dword [esp + 0x2c], ecx
mov al, byte [esi]
mov dword [esp + 0x34], 0
mov dword [0x4ca8f4], 0
mov dword [esp + 0x30], 0xffffffff
mov byte [esp + 0x13], 0xa
mov byte [0x4ca952], 0
mov byte [0x4ca8e3], 0
mov byte [0x4ca8e2], 0
mov dword [0x4ca954], 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 0x450ab1
mov ebx, 1
movsx eax, al
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbctoupper]
add eax, 0xffffffbd
add esp, 4
cmp eax, 0x19
ja case.0x450923.69
movzx eax, byte [eax + 0x45105c]
jmp dword [eax*4 + 0x451034]
mov bl, byte [esi + 1]
lea edi, [esi + 1]
movzx eax, bl
test eax, 0xffffff80
je 0x45093e
xor edx, edx
jmp 0x45094c
push 2
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
add esp, 8
mov edx, eax
mov al, bl
and al, 0xdf
test edx, edx
movzx ecx, al
movzx eax, bl
mov ebx, 1
cmove ecx, eax
cmp cl, 0x4c
sete al
inc al
cmp cl, 0x4c
mov byte [0x4ca952], al
cmovne edi, esi
mov esi, edi
jmp case.0x450923.69
mov cl, byte [esi + 1]
mov dh, byte [esp + 0x11]
test cl, cl
je 0x450aa5
inc esi
mov byte [esp + 0x13], cl
jmp 0x450aa5
mov dl, byte [esi + 1]
inc esi
cmp dl, 0x20
je case.0x450923.70
cmp dl, 9
je case.0x450923.70
mov edi, esi
test dl, dl
je 0x4509c4
mov ecx, 0x4bb7f4
mov al, 0x20
nop
cmp dl, al
je 0x4509dc
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x4509b0
mov dl, byte [edi + 1]
inc edi
test dl, dl
jne 0x4509a7
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4509d0
sub ecx, edx
lea edi, [esi + ecx]
push 0
mov eax, edi
mov ecx, 0x4cc848
sub eax, esi
push eax
push esi
call fcn.0042e8f0
mov ecx, eax
mov dword [0x4ca8f4], ecx
test ecx, ecx
je 0x450fa9
cmp byte [ecx + 0x51], 0
jne 0x450fa9
mov eax, dword [ecx + 0x10]
sub eax, 2
cmp eax, 1
ja 0x450fa9
mov eax, dword [ecx + 0xc]
cmp word [eax + 4], 0
jne 0x450fa9
cmp word [eax + 0x14], 0
jne 0x450fa9
lea esi, [edi - 1]
jmp case.0x450923.69
mov byte [0x4ca8e3], 1
jmp case.0x450923.69
lea eax, [esi + 1]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
cmp eax, 1
cmovl eax, ebx
dec eax
mov dword [0x4ca954], eax
jmp case.0x450923.69
push 6
push str.Random
push esi
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbicmp]
mov dh, byte [esp + 0x1d]
add esp, 0xc
test eax, eax
jne 0x450a7c
mov byte [esp + 0x14], 1
add esi, 5
jmp 0x450aa5
mov byte [0x4ca8e2], 1
jmp 0x450aa5
mov byte [esp + 0x16], 1
mov dword [esp + 0x30], 0
jmp case.0x450923.69
mov dh, 1
mov byte [esp + 0x11], dh
jmp 0x450aa5
mov byte [esp + 0x17], 1
mov dh, byte [esp + 0x11]
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x450903
mov esi, dword [ebp + 8]
mov dl, byte [esi]
test dl, dl
je 0x450fa9
mov ebx, dword [0x4cbec8]
mov dword [esp + 0x28], ebx
mov al, byte [ebx + 0x17]
test al, al
jne 0x450ad5
mov eax, dword [ebx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
ja 0x450fa9
mov edi, 1
mov ecx, esi
cmp dl, byte [esp + 0x13]
lea eax, [edi + 1]
mov dl, byte [ecx + 1]
cmovne eax, edi
inc ecx
mov edi, eax
test dl, dl
jne 0x450ae4
mov eax, ecx
sub eax, esi
mov dword [esp + 0x18], eax
test dh, dh
jne 0x450b19
cmp ecx, esi
jbe 0x450b19
mov dl, byte [esp + 0x13]
cmp byte [ecx - 1], dl
jne 0x450b19
mov byte [esp + 0x15], 1
dec edi
jmp 0x450b4e
cmp byte [esp + 0x13], 0xa
jne 0x450b4e
push 0xa
push esi
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbschr]
add esp, 8
test eax, eax
je 0x450b4a
cmp eax, esi
jbe 0x450b4a
cmp byte [eax - 1], 0xd
mov eax, dword [esp + 0x18]
jne 0x450b4e
mov cl, 1
mov byte [esp + 0x12], cl
mov byte [esp + 0x15], cl
jmp 0x450b52
mov eax, dword [esp + 0x18]
mov cl, byte [esp + 0x12]
cmp edi, 1
jne 0x450b6a
push edi
push 0
push eax
push esi
mov ecx, ebx
call fcn.004a2db0
mov ebx, eax
jmp 0x450fae
cmp dword [0x4ca8f4], 0
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
jne 0x450b7d
test cl, cl
je 0x450be6
add eax, 3
push eax
call ebx
mov ecx, eax
add esp, 4
mov dword [esp + 0x34], ecx
test ecx, ecx
jne 0x450bab
mov ecx, dword [esp + 0x2c]
push 0x4b6ba9
push eax
push str.Out_of_memory.
call fcn.0043eaa0
mov ebx, eax
jmp 0x450fae
mov eax, dword [esp + 0x18]
inc eax
push eax
push esi
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [esp + 0x40]
add esp, 0xc
cmp byte [esp + 0x12], 0
mov esi, edx
je 0x450be6
mov ecx, dword [esp + 0x18]
mov ax, word [0x4bf3b0]
mov word [ecx + edx], ax
mov al, byte [0x4bf3b2]
mov byte [ecx + edx + 2], al
add ecx, 2
mov dword [esp + 0x18], ecx
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 + 0x1c], ecx
push eax
call ebx
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jne 0x450c29
mov ecx, dword [esp + 0x2c]
push 0x4b6ba9
push eax
push str.Out_of_memory.
call fcn.0043eaa0
mov ebx, eax
jmp 0x450fae
mov edx, dword [0x4cdad0]
mov edi, eax
mov dword [eax], esi
xor ebx, ebx
mov al, byte [esi]
mov dword [esp + 0x24], ebx
test al, al
je 0x450cb5
mov cl, byte [esp + 0x13]
cmp al, cl
jne 0x450ca9
inc ebx
mov byte [esi], 0
cmp byte [esp + 0x14], 0
je 0x450ca0
sub dword [0x4c99a0], 1
jne 0x450c66
call fcn.00420e00
mov edx, dword [0x4cdad0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4cdad0], 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 cl, byte [esp + 0x13]
shr eax, 1
mov dword [edi + 4], eax
add edi, dword [esp + 0x1c]
lea eax, [esi + 1]
mov dword [edi], eax
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x450c43
mov dword [esp + 0x24], ebx
cmp byte [esp + 0x15], 0
mov al, byte [esp + 0x14]
jne 0x450d17
inc ebx
mov dword [esp + 0x24], ebx
test al, al
je 0x450d17
sub dword [0x4c99a0], 1
jne 0x450cdd
call fcn.00420e00
mov edx, dword [0x4cdad0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4cdad0], 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 [0x4ca8f4], 0
je 0x450d27
push 0x4506c0
jmp 0x450d45
test al, al
je 0x450d32
push 0x4506b0
jmp 0x450d45
cmp byte [esp + 0x17], 0
mov eax, 0x450560
mov ecx, 0x450640
cmovne eax, ecx
push eax
push dword [esp + 0x20]
push ebx
push dword [esp + 0x2c]
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
mov esi, dword [esp + 0x38]
add esp, 0x10
mov ecx, esi
push 1
push 0
push dword [esp + 0x20]
push 0
call fcn.004a2db0
cmp eax, 1
je 0x450d78
xor ebx, ebx
jmp 0x450fae
xor edi, edi
mov dword [esp + 0x18], 0
lea eax, [ebx - 1]
mov ecx, esi
mov ebx, dword [esp + 0x20]
push edi
push 1
mov dword [esp + 0x40], eax
call fcn.00401550
mov esi, eax
mov dword [esp + 0x2c], edi
cmp dword [esp + 0x24], edi
jbe 0x450e39
cmp byte [esp + 0x16], 0
je 0x450df4
test edi, edi
je 0x450df4
cmp byte [0x4ca8e3], 0
je 0x450e6e
cmp dword [0x4ca954], 0
jne 0x450e6e
mov ecx, dword [ebx]
call fcn.00421130
mov ecx, edi
movsd qword [esp + 0x40], xmm0
call fcn.00421130
movsd xmm1, qword [esp + 0x40]
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x450ea2
mov eax, dword [ebx]
mov cl, byte [eax]
test cl, cl
je 0x450e0c
nop dword [eax]
lea eax, [eax + 1]
mov byte [esi], cl
mov cl, byte [eax]
inc esi
test cl, cl
jne 0x450e00
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x38]
jb 0x450e1d
cmp byte [esp + 0x15], 0
je 0x450e24
mov cl, byte [esp + 0x13]
mov byte [esi], cl
inc esi
mov edi, dword [ebx]
add ebx, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x24]
jb 0x450da7
push dword [esp + 0x20]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ebx, dword [esp + 0x2c]
add esp, 4
cmp byte [esp + 0x12], 0
je 0x450f20
cmp byte [esi - 2], 0xd
jne 0x450eec
mov byte [esi - 2], 0
cmp byte [ebx + 0x17], 0
jne 0x450ec5
mov esi, dword [ebx + 0xc]
jmp 0x450ec7
mov cl, byte [0x4ca952]
mov eax, dword [ebx]
push edi
push eax
test cl, cl
jne 0x450e84
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
jmp 0x450e97
cmp cl, 2
jne 0x450e91
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
jmp 0x450e9a
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x450df4
inc dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x38]
jne 0x450e26
cmp byte [esp + 0x15], 0
jne 0x450e26
dec esi
jmp 0x450e26
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x450ee2
test byte [esi + 0x15], 8
je 0x450eda
mov ecx, esi
call fcn.004013b0
add esi, 0xc
add dword [esi], 0xfffffffe
jmp 0x450f23
mov esi, 0x4ce2c0
add dword [esi], 0xfffffffe
jmp 0x450f23
mov byte [esi - 1], 0
cmp byte [ebx + 0x17], 0
jne 0x450efb
mov esi, dword [ebx + 0xc]
jmp 0x450efd
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x450f17
test byte [esi + 0x15], 8
je 0x450f10
mov ecx, esi
call fcn.004013b0
add esi, 0xc
dec dword [esi]
jmp 0x450f23
mov esi, 0x4ce2c0
dec dword [esi]
jmp 0x450f23
mov byte [esi], 0
cmp byte [esp + 0x16], 0
je 0x450f7d
cmp dword [esp + 0x18], 0
je 0x450f7d
push 0
push 1
mov ecx, ebx
call fcn.00401550
mov esi, eax
lea eax, [esi + 1]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x450f41
sub esi, eax
cmp byte [ebx + 0x17], cl
jne 0x450f54
mov edi, dword [ebx + 0xc]
jmp 0x450f56
mov edi, ebx
cmp byte [edi + 0x17], 1
jne 0x450f6e
test byte [edi + 0x15], 8
je 0x450f69
mov ecx, edi
call fcn.004013b0
add edi, 0xc
jmp 0x450f73
mov edi, 0x4ce2c0
mov eax, dword [esp + 0x18]
mov dword [edi], esi
mov dword [esp + 0x30], eax
cmp byte [ebx + 0x17], 0
jne 0x450f86
mov ebx, dword [ebx + 0xc]
cmp byte [ebx + 0x17], 2
jne 0x450fa5
cmp dword [0x4cc838], 0
je 0x450fa5
push 1
mov ecx, 0x4cc82c
call fcn.004056e0
mov ebx, eax
jmp 0x450fae
and byte [ebx + 0x15], 0x86
mov ebx, 1
mov edi, dword [esp + 0x30]
cmp edi, 0xffffffff
je 0x45100c
mov esi, dword [0x4ca738]
cmp byte [esi + 0x17], 0
jne 0x450fc6
mov esi, dword [esi + 0xc]
mov al, byte [esi + 0x15]
test al, 2
je 0x450fdd
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 0x450ffc
mov ecx, esi
call fcn.004013b0
and byte [esi + 0x15], 0x8f
jmp 0x45100c
cmp dword [0x4ca760], 0
je 0x45100c
mov ecx, esi
call fcn.004013b0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x45101e
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [esp + 0x3c]
pop edi
mov dword [0x4ca8f4], eax
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8