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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [0x4e5bbc]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, 1
mov dword [esp + 0x40], eax
push edi
mov dword [esp + 0x34], ecx
movzx eax, word [esi]
mov dword [esp + 0x3c], 0
mov dword [0x4e5bbc], 0
mov dword [esp + 0x38], 0xffffffff
mov dword [esp + 0x1c], 0xa
mov byte [0x4e5a82], 0
mov byte [0x4e5a7f], 0
mov byte [0x4e5a7e], 0
mov dword [0x4e5c74], 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 0x457320
mov ecx, eax
mov edi, ebx
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_towupper]
movzx eax, ax
add esp, 4
add eax, 0xffffffbd
cmp eax, 0x19
ja case.0x4571c0.69
movzx eax, byte [eax + 0x457964]
jmp dword [eax*4 + 0x45793c]
mov cx, word [esi + 2]
call fcn.004130a0
cmp ax, 0x4c
jne 0x4571e7
mov al, 2
add esi, 2
mov byte [0x4e5a82], al
mov edi, ebx
jmp case.0x4571c0.69
mov al, bl
mov edi, ebx
mov byte [0x4e5a82], al
jmp case.0x4571c0.69
movzx eax, word [esi + 2]
mov edx, eax
test ax, ax
je case.0x4571c0.69
add esi, 2
mov dword [esp + 0x1c], eax
jmp case.0x4571c0.69
movzx eax, word [esi + 2]
add esi, 2
cmp eax, 0x20
je case.0x4571c0.70
cmp eax, 9
je case.0x4571c0.70
mov edx, 0x4d05d4
mov ecx, esi
call fcn.00406570
mov edi, eax
test edi, edi
jne 0x457252
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x457240
sub ecx, edx
sar ecx, 1
lea edi, [esi + ecx*2]
mov eax, edi
mov ecx, 0x4e7b70
sub eax, esi
push 0
sar eax, 1
push eax
push esi
call fcn.00439000
mov ecx, eax
mov dword [0x4e5bbc], ecx
test ecx, ecx
je 0x4578fb
cmp byte [ecx + 0x51], 0
jne 0x4578fb
mov eax, dword [ecx + 0x10]
sub eax, 2
cmp eax, 1
ja 0x4578fb
mov eax, dword [ecx + 0xc]
cmp word [eax + 4], 0
jne 0x4578fb
cmp word [eax + 0x14], 0
jne 0x4578fb
lea esi, [edi - 2]
mov edi, ebx
jmp case.0x4571c0.69
mov byte [0x4e5a7f], bl
jmp case.0x4571c0.69
lea eax, [esi + 2]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
add esp, 4
cmp eax, 1
cmovl eax, edi
dec eax
mov dword [0x4e5c74], eax
jmp case.0x4571c0.69
push 6
push str.Random
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4572f0
mov byte [esp + 0x13], bl
add esi, 0xa
jmp case.0x4571c0.69
mov byte [0x4e5a7e], bl
jmp case.0x4571c0.69
xor eax, eax
mov byte [esp + 0x15], bl
mov dword [esp + 0x38], eax
jmp case.0x4571c0.69
mov byte [esp + 0x16], bl
jmp case.0x4571c0.69
mov byte [esp + 0x17], bl
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x4571a0
mov esi, dword [ebp + 8]
movzx edx, word [esi]
test dx, dx
je 0x4578fb
mov ecx, dword [0x4e7210]
mov dword [esp + 0x24], ecx
mov al, byte [ecx + 0x17]
test al, al
jne 0x457346
mov eax, dword [ecx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
ja 0x4578fb
mov edi, ebx
mov ecx, esi
mov ebx, dword [esp + 0x1c]
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 0x457356
mov ebx, ecx
sub ebx, esi
sar ebx, 1
mov dword [esp + 0x30], ebx
cmp byte [esp + 0x16], al
jne 0x4573b0
cmp ecx, esi
jbe 0x4573b0
mov eax, dword [esp + 0x1c]
cmp word [ecx - 2], ax
jne 0x4573b0
mov byte [esp + 0x14], 1
dec edi
mov cl, byte [esp + 0x12]
cmp edi, 1
jne 0x4573df
mov ecx, dword [esp + 0x24]
push edi
push 0
push ebx
push esi
call fcn.004a0a20
mov ebx, eax
jmp 0x4578fb
cmp word [esp + 0x1c], 0xa
jne 0x457392
push 0xa
push esi
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
add esp, 8
test eax, eax
je 0x457392
cmp eax, esi
jbe 0x457392
cmp word [eax - 2], 0xd
jne 0x457392
mov cl, 1
mov byte [esp + 0x12], cl
mov byte [esp + 0x14], cl
jmp 0x457396
cmp dword [0x4e5bbc], 0
jne 0x4573ec
test cl, cl
je 0x45745b
lea eax, [ebx*2 + 6]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, eax
add esp, 4
mov dword [esp + 0x3c], ecx
test ecx, ecx
jne 0x457422
mov ecx, dword [esp + 0x34]
push 0x4b9c40
push eax
push 0x4cdb90
call fcn.00447a80
mov ebx, eax
jmp 0x4578fb
lea eax, [ebx*2 + 2]
push eax
push esi
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x48]
add esp, 0xc
cmp byte [esp + 0x12], 0
mov esi, ecx
je 0x45745b
mov eax, dword [0x4d84e4]
mov dword [ecx + ebx*2], eax
mov ax, word [0x4d84e8]
mov word [ecx + ebx*2 + 4], ax
add ebx, 2
mov dword [esp + 0x30], 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 + 0x20], ecx
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
jne 0x4574a2
mov ecx, dword [esp + 0x34]
push 0x4b9c40
push eax
push 0x4cdb90
call fcn.00447a80
mov ebx, eax
jmp 0x4578fb
mov edx, dword [0x4e92f0]
mov edi, eax
mov dword [eax], esi
movzx eax, word [esi]
mov dword [esp + 0x18], 0
test ax, ax
je 0x45753b
mov bl, byte [esp + 0x13]
mov ecx, eax
cmp cx, word [esp + 0x1c]
jne 0x457529
inc dword [esp + 0x18]
xor eax, eax
mov word [esi], ax
test bl, bl
je 0x457520
sub dword [0x4e4b58], 1
jne 0x4574ea
call fcn.004272d0
mov edx, dword [0x4e92f0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4e92f0], 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 + 0x20]
lea eax, [esi + 2]
mov dword [edi], eax
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x4574c2
mov ebx, dword [esp + 0x30]
cmp byte [esp + 0x14], 0
mov esi, dword [esp + 0x18]
mov al, byte [esp + 0x13]
jne 0x4575a1
inc esi
mov dword [esp + 0x18], esi
test al, al
je 0x4575a1
sub dword [0x4e4b58], 1
jne 0x457567
call fcn.004272d0
mov edx, dword [0x4e92f0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4e92f0], 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 [0x4e5bbc], 0
je 0x4575b1
push 0x456f70
jmp 0x4575cf
test al, al
je 0x4575bc
push 0x456f60
jmp 0x4575cf
cmp byte [esp + 0x17], 0
mov eax, 0x456d50
mov ecx, 0x456ec0
cmovne eax, ecx
push eax
push dword [esp + 0x24]
mov edi, dword [esp + 0x30]
push esi
push edi
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
mov esi, dword [esp + 0x34]
add esp, 0x10
mov ecx, esi
push 1
push 0
push ebx
push 0
call fcn.004a0a20
xor ebx, ebx
cmp eax, 1
jne 0x4578fb
mov eax, dword [esp + 0x18]
mov ecx, esi
push ebx
dec eax
mov dword [esp + 0x30], ebx
push 1
mov dword [esp + 0x48], eax
mov dword [esp + 0x3c], edi
call fcn.00401640
mov esi, eax
mov dword [esp + 0x30], ebx
cmp dword [esp + 0x18], ebx
jbe 0x457747
nop word [eax + eax]
cmp byte [esp + 0x15], 0
je 0x4576f3
test ebx, ebx
je 0x4576f3
cmp byte [0x4e5a7f], 0
je 0x457784
cmp dword [0x4e5c74], 0
jne 0x457784
mov edi, dword [edi]
mov ecx, edi
call fcn.00404c80
test al, al
je 0x457689
push 0x10
push 0
push edi
mov edi, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wcstoi64]
call edi
add esp, 0xc
mov ecx, eax
call fcn.004b7ef0
movsd qword [esp + 0x48], xmm0
jmp 0x4576a9
push edi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtof]
mov edi, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wcstoi64]
add esp, 4
fstp qword [esp + 0x48]
movsd xmm0, qword [esp + 0x48]
movsd qword [esp + 0x48], xmm0
mov ecx, ebx
call fcn.00404c80
test al, al
je 0x4576c7
push 0x10
push 0
push ebx
call edi
add esp, 0xc
mov ecx, eax
call fcn.004b7ef0
jmp 0x4576db
push ebx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtof]
fstp qword [esp + 0x54]
movsd xmm0, qword [esp + 0x54]
add esp, 4
movsd xmm1, qword [esp + 0x48]
mov edi, dword [esp + 0x34]
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x4577e4
mov ecx, dword [edi]
movzx eax, word [ecx]
test ax, ax
je 0x457713
mov edx, eax
nop
add ecx, 2
mov word [esi], dx
add esi, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x457700
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0x40]
jb 0x457724
cmp byte [esp + 0x14], 0
je 0x45772e
mov ecx, dword [esp + 0x1c]
mov word [esi], cx
add esi, 2
mov ebx, dword [edi]
add edi, dword [esp + 0x20]
inc eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edi
cmp eax, dword [esp + 0x18]
jb 0x457630
push dword [esp + 0x28]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ebx, dword [esp + 0x28]
xor eax, eax
add esp, 4
cmp byte [esp + 0x12], al
je 0x457865
cmp word [esi - 4], 0xd
jne 0x457830
mov word [esi - 4], ax
cmp byte [ebx + 0x17], al
jne 0x457809
mov esi, dword [ebx + 0xc]
jmp 0x45780b
cmp byte [0x4e5a82], 0
mov eax, dword [edi]
jne 0x45779c
push ebx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
jmp 0x4577dc
cmp byte [0x4e5a82], 2
jne 0x4577af
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x4577dc
mov ecx, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4577d7
test dx, dx
je 0x4577d3
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4577d7
add eax, 4
add ecx, 4
test dx, dx
jne 0x4577b1
xor eax, eax
jmp 0x4577dc
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4576f3
inc dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0x40]
jne 0x457730
cmp byte [esp + 0x14], 0
jne 0x457730
sub esi, 2
jmp 0x457730
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x457826
test byte [esi + 0x15], 8
je 0x45781e
mov ecx, esi
call fcn.00401560
add esi, 0xc
add dword [esi], 0xfffffffc
jmp 0x457868
mov esi, 0x4e9af0
add dword [esi], 0xfffffffc
jmp 0x457868
mov word [esi - 2], ax
cmp byte [ebx + 0x17], al
jne 0x45783e
mov esi, dword [ebx + 0xc]
jmp 0x457840
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x45785b
test byte [esi + 0x15], 8
je 0x457853
mov ecx, esi
call fcn.00401560
add esi, 0xc
add dword [esi], 0xfffffffe
jmp 0x457868
mov esi, 0x4e9af0
add dword [esi], 0xfffffffe
jmp 0x457868
mov word [esi], ax
cmp byte [esp + 0x15], 0
je 0x4578cb
cmp dword [esp + 0x2c], 0
je 0x4578cb
push 0
push 1
mov ecx, ebx
call fcn.00401640
mov esi, eax
lea eax, [esi + 2]
mov cx, word [esi]
add esi, 2
test cx, cx
jne 0x457886
sub esi, eax
sar esi, 1
cmp byte [ebx + 0x17], cl
jne 0x45789f
mov edi, dword [ebx + 0xc]
jmp 0x4578a1
mov edi, ebx
cmp byte [edi + 0x17], 1
jne 0x4578b9
test byte [edi + 0x15], 8
je 0x4578b4
mov ecx, edi
call fcn.00401560
add edi, 0xc
jmp 0x4578be
mov edi, 0x4e9af0
lea eax, [esi + esi]
mov dword [edi], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x38], eax
cmp byte [ebx + 0x17], 0
jne 0x4578d4
mov ebx, dword [ebx + 0xc]
cmp byte [ebx + 0x17], 2
jne 0x4578f2
cmp dword [0x4e86dc], 0
je 0x4578f2
push ecx
mov ecx, 0x4e86d0
call fcn.00406180
mov ebx, eax
jmp 0x4578fb
and byte [ebx + 0x15], 0x86
mov ebx, 1
mov eax, dword [esp + 0x38]
cmp eax, 0xffffffff
je 0x457914
mov ecx, dword [0x4e59cc]
push 0x18
push 0
push eax
call fcn.004014e0
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x457926
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [esp + 0x44]
pop edi
mov dword [0x4e5bbc], eax
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8