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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x4c937c]
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x44], eax
mov dword [0x4c937c], edi
mov dword [esp + 0x20], 1
mov dword [esp + 0x34], 0xffffffff
mov dword [esp + 0x24], 0xa
mov byte [0x4c9386], 0
mov byte [0x4c9385], 0
mov byte [0x4c9384], 0
mov dword [0x4c9380], edi
mov byte [esp + 0x17], 0
mov byte [esp + 0x14], 0
mov byte [esp + 0x15], 0
mov byte [esp + 0x18], 0
mov byte [esp + 0x13], 0
mov byte [esp + 0x16], 0
cmp word [esi], di
je 0x43f776
movzx ecx, word [esi]
push ecx
call fcn.00491c9d
movzx eax, ax
add eax, 0xffffffbd
add esp, 4
cmp eax, 0x19
ja case.0x43f5ff.69
movzx edx, byte [eax + 0x4400bc]
jmp dword [edx*4 + 0x440094]
movzx ebx, word [esi + 2]
test ebx, 0xffffff80
jne 0x43f624
push 2
push ebx
call fcn.00490ebe
add esp, 8
cmp eax, edi
je 0x43f624
and ebx, 0xffffffdf
cmp bx, 0x4c
jne 0x43f639
add esi, 2
mov byte [0x4c9386], 2
jmp case.0x43f5ff.69
mov byte [0x4c9386], 1
jmp case.0x43f5ff.69
cmp word [esi + 2], di
je case.0x43f5ff.69
movzx eax, word [esi + 2]
add esi, 2
cmp ax, di
je case.0x43f5ff.69
mov dword [esp + 0x24], eax
jmp case.0x43f5ff.69
movzx eax, word [esi + 2]
add esi, 2
cmp eax, 0x20
je case.0x43f5ff.70
cmp eax, 9
je case.0x43f5ff.70
mov ebx, 0x4a681c
mov eax, esi
call fcn.004098d0
mov ebx, eax
test ebx, ebx
jne 0x43f6a2
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43f690
sub eax, edx
sar eax, 1
lea ebx, [esi + eax*2]
mov ecx, ebx
sub ecx, esi
push 0
sar ecx, 1
push ecx
push esi
mov ecx, 0x4cb508
call fcn.00421ac0
mov ecx, eax
mov dword [0x4c937c], ecx
test ecx, ecx
je 0x43ffe0
cmp byte [ecx + 0x3d], 0
jne 0x43ffe0
mov eax, dword [ecx + 0x10]
cmp eax, 2
jl 0x43ffe0
cmp eax, 3
jg 0x43ffe0
mov eax, dword [ecx + 0xc]
cmp word [eax + 4], 0
jne 0x43ffe0
cmp word [eax + 0x14], 0
jne 0x43ffe0
lea esi, [ebx - 2]
xor edi, edi
jmp case.0x43f5ff.69
mov byte [0x4c9385], 1
jmp case.0x43f5ff.69
lea edx, [esi + 2]
push edx
call fcn.00490f06
add esp, 4
cmp eax, 1
jge 0x43f724
mov eax, 1
dec eax
mov dword [0x4c9380], eax
jmp case.0x43f5ff.69
push 6
push str.Random
push esi
call fcn.0048fe1d
add esp, 0xc
test eax, eax
jne 0x43f74a
mov byte [esp + 0x13], 1
add esi, 0xa
jmp case.0x43f5ff.69
mov byte [0x4c9384], 1
jmp case.0x43f5ff.69
mov byte [esp + 0x16], 1
mov dword [esp + 0x34], edi
jmp case.0x43f5ff.69
mov byte [esp + 0x17], 1
jmp case.0x43f5ff.69
mov byte [esp + 0x18], 1
add esi, 2
cmp word [esi], di
jne 0x43f5dd
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax]
cmp cx, di
je 0x43ffe0
mov edi, dword [0x4ca4b0]
mov al, byte [edi + 0x17]
mov dword [esp + 0x1c], edi
test al, al
jne 0x43f79c
mov edx, dword [edi + 0xc]
mov al, byte [edx + 0x17]
cmp al, 2
ja 0x43ffe0
mov edx, dword [ebp + 0xc]
mov ebx, dword [esp + 0x24]
mov esi, 1
mov eax, edx
cmp cx, bx
jne 0x43f7b8
inc esi
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x43f7b2
mov ebx, eax
sub ebx, edx
sar ebx, 1
mov dword [esp + 0x20], esi
mov dword [esp + 0x30], ebx
cmp byte [esp + 0x17], cl
jne 0x43f7ee
cmp eax, edx
jbe 0x43f7ee
mov ax, word [eax - 2]
cmp ax, word [esp + 0x24]
jne 0x43f7ee
dec esi
mov dword [esp + 0x20], esi
jmp 0x43f818
cmp word [esp + 0x24], 0xa
jne 0x43f81d
mov ecx, edx
push 0xa
push ecx
call fcn.00490a41
add esp, 8
test eax, eax
je 0x43f81d
cmp eax, dword [ebp + 0xc]
jbe 0x43f81d
cmp word [eax - 2], 0xd
jne 0x43f81d
mov byte [esp + 0x15], 1
mov byte [esp + 0x14], 1
cmp esi, 1
jne 0x43f839
mov edx, dword [ebp + 0xc]
push esi
push 0
push ebx
push edx
push edi
call fcn.004793e0
mov dword [esp + 0x20], eax
jmp 0x43ffe0
cmp dword [0x4c937c], 0
jne 0x43f849
cmp byte [esp + 0x15], 0
je 0x43f8bf
lea eax, [ebx + ebx + 6]
push eax
call fcn.0048fca4
mov edi, eax
add esp, 4
mov dword [esp + 0x38], edi
test edi, edi
jne 0x43f87c
mov ecx, dword [ebp + 8]
push 0x4a3890
push eax
push str.Out_of_memory.
call fcn.00430370
mov dword [esp + 0x20], eax
jmp 0x43ffe0
mov edx, dword [ebp + 0xc]
lea esi, [ebx + ebx]
lea ecx, [esi + 2]
push ecx
push edx
push edi
call fcn.00497c20
add esp, 0xc
cmp byte [esp + 0x15], 0
mov dword [ebp + 0xc], edi
je 0x43f8bb
mov eax, 0x4ad2f0
sub esi, eax
add esi, dword [esp + 0x38]
movzx ecx, word [eax]
mov word [esi + eax], cx
add eax, 2
test cx, cx
jne 0x43f8a5
add ebx, 2
mov dword [esp + 0x30], ebx
mov esi, dword [esp + 0x20]
xor eax, eax
cmp byte [esp + 0x13], al
setne al
inc esi
inc eax
add eax, eax
add eax, eax
imul esi, eax
push esi
mov dword [esp + 0x2c], eax
call fcn.0048fca4
mov ebx, eax
add esp, 4
mov dword [esp + 0x40], ebx
test ebx, ebx
jne 0x43f904
mov ecx, dword [ebp + 8]
push 0x4a3890
push eax
push str.Out_of_memory.
call fcn.00430370
mov dword [esp + 0x20], eax
jmp 0x43ffe0
mov esi, dword [ebp + 0xc]
mov dword [ebx], esi
cmp word [esi], 0
mov edi, ebx
mov dword [esp + 0x20], 0
mov edx, 1
je 0x43f999
mov ax, word [esi]
cmp ax, word [esp + 0x24]
jne 0x43f990
add dword [esp + 0x20], edx
xor ecx, ecx
mov word [esi], cx
cmp byte [esp + 0x13], cl
je 0x43f987
sub dword [0x4c6938], edx
jne 0x43f949
call fcn.004147f0
mov edx, 1
mov ecx, dword [0x4c94a8]
mov eax, dword [ecx]
add ecx, 4
mov dword [0x4c94a8], ecx
mov ecx, eax
shr ecx, 0xb
xor eax, ecx
mov ecx, eax
and ecx, 0xff3a58ad
shl ecx, 7
xor eax, ecx
mov ecx, eax
and ecx, 0xffffdf8c
shl ecx, 0xf
xor eax, ecx
mov ecx, eax
shr ecx, 0x12
xor ecx, eax
shr ecx, 1
mov dword [edi + 4], ecx
add edi, dword [esp + 0x28]
lea eax, [esi + 2]
mov dword [edi], eax
add esi, 2
cmp word [esi], 0
jne 0x43f91e
cmp byte [esp + 0x14], 0
jne 0x43f9f6
add dword [esp + 0x20], edx
cmp byte [esp + 0x13], 0
je 0x43f9f6
sub dword [0x4c6938], edx
jne 0x43f9b8
call fcn.004147f0
mov ecx, dword [0x4c94a8]
mov eax, dword [ecx]
add ecx, 4
mov dword [0x4c94a8], 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 edx, eax
shr edx, 0x12
xor edx, eax
shr edx, 1
mov dword [edi + 4], edx
cmp dword [0x4c937c], 0
je 0x43fa10
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
push 0x43f3b0
push eax
push ecx
jmp 0x43fa44
cmp byte [esp + 0x13], 0
je 0x43fa28
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push 0x43f3a0
push edx
push eax
jmp 0x43fa44
cmp byte [esp + 0x18], 0
mov eax, 0x43f300
jne 0x43fa39
mov eax, 0x43f190
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
push ebx
call fcn.00490b70
mov esi, dword [esp + 0x2c]
mov cl, byte [esi + 0x17]
mov ebx, dword [esp + 0x40]
add esp, 0x10
mov dword [esp + 0x30], ebx
test cl, cl
jne 0x43fa72
mov eax, dword [esi + 0xc]
push 1
push 0
push ebx
push 0
push eax
call fcn.004793e0
jmp 0x43fac3
mov byte [esp + 0x13], 1
mov dl, 1
cmp ebx, 0xffffffff
jne 0x43fa88
xor dl, dl
xor ebx, ebx
mov dword [esp + 0x30], ebx
jmp 0x43fa8d
mov byte [esp + 0x13], 0
lea eax, [ebx + 1]
lea edi, [eax + eax]
cmp cl, 2
jne 0x43fad5
cmp byte [esp + 0x13], 0
je 0x43faad
push 0x4a3890
mov eax, ebx
call fcn.004045c0
jmp 0x43fac3
mov edi, eax
mov esi, 0x4cc048
call fcn.00404640
neg eax
sbb eax, eax
neg eax
mov esi, dword [esp + 0x1c]
cmp eax, 1
je 0x43fb15
mov dword [esp + 0x20], 0
jmp 0x43ffe0
cmp edi, dword [0x4c6954]
jbe 0x43faf8
cmp edi, dword [esi + 0x10]
jbe 0x43faf8
push 0x4a3890
push 0x4bf1e0
mov ecx, 0x4cb508
call fcn.00430620
jmp 0x43fac3
cmp eax, 2
jae 0x43fbac
xor ecx, ecx
test dl, dl
setne cl
xor al, al
add ecx, 3
push ecx
mov ecx, esi
call fcn.004799a0
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x40]
xor ebx, ebx
push ebx
lea edx, [edi - 1]
push 1
mov ecx, esi
mov dword [esp + 0x44], edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x50], eax
call fcn.00401220
mov dword [esp + 0x18], eax
mov dword [esp + 0x2c], ebx
test edi, edi
je 0x43fe24
mov edi, dword [esp + 0x48]
lea esp, [esp]
cmp byte [esp + 0x16], 0
je 0x43febe
test ebx, ebx
je 0x43febe
cmp byte [0x4c9385], 0
je 0x43fe5b
cmp dword [0x4c9380], 0
jne 0x43fe5b
mov esi, dword [edi]
mov eax, esi
call fcn.0040ec60
test al, al
je 0x43fda2
push 0x10
push 0
push esi
call fcn.00491933
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], edx
fild qword [esp + 0x54]
add esp, 0xc
jmp 0x43fdab
mov al, byte [esi + 0x15]
test al, 2
je 0x43fbc2
and al, 0x3d
mov byte [esi + 0x15], al
mov eax, dword [esi]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov edx, dword [esi + 0x10]
and byte [esi + 0x15], 0x82
mov dword [esp + 0x3c], edx
cmp edi, edx
jbe 0x43fbfc
mov cl, byte [esi + 0x14]
cmp cl, 1
jbe 0x43fc37
cmp cl, 2
je 0x43fc75
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x1c]
and byte [ecx + 0x15], 0x7f
mov dword [ecx + 0x10], esi
mov esi, dword [esp + 0x1c]
mov dword [ecx + 8], eax
cmp byte [esp + 0x13], 0
je 0x43fd8f
mov eax, dword [esi + 8]
cmp eax, 0x4a3890
je 0x43fc23
lea edx, [ebx + ebx]
push edx
push 0x4a3890
push eax
call fcn.004906e0
add esp, 0xc
mov eax, dword [esi + 8]
xor ecx, ecx
mov word [eax + ebx*2], cx
lea ecx, [ebx + ebx]
mov dword [esi + 0xc], ecx
jmp 0x43fb15
cmp edi, 0x80
ja 0x43fc75
cmp edi, 8
ja 0x43fc4b
mov esi, 8
jmp 0x43fc59
mov ecx, 0x10
cmp ecx, edi
sbb esi, esi
and esi, 0x70
add esi, ecx
mov eax, esi
call fcn.00473700
test eax, eax
je 0x43fac8
mov ecx, dword [esp + 0x1c]
mov byte [ecx + 0x14], 1
jmp 0x43fbee
cmp edi, 0x20
jae 0x43fc84
mov esi, 0x20
jmp 0x43fd09
cmp edi, 0x208
jae 0x43fc93
mov esi, 0x208
jmp 0x43fd09
cmp edi, 0x50000
jae 0x43fcd7
mov dword [esp + 0x48], edi
fild dword [esp + 0x48]
test edi, edi
jns 0x43fcad
fadd qword [0x4c0e00]
fmul qword [0x4c0e38]
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x3c], eax
fldcw word [esp + 0x3c]
fistp qword [esp + 0x58]
mov esi, dword [esp + 0x58]
fldcw word [esp + 0x18]
jmp 0x43fd09
cmp edi, 0x320000
jae 0x43fce7
lea esi, [edi + 0x8000]
jmp 0x43fd09
cmp edi, 0xc80000
jae 0x43fd03
mov eax, 0x51eb851f
mul edi
mov esi, edx
mov edx, dword [esp + 0x3c]
shr esi, 5
add esi, edi
jmp 0x43fd09
lea esi, [edi + 0x20000]
mov eax, dword [0x4c6954]
cmp esi, eax
jbe 0x43fd14
mov esi, eax
cmp cl, 2
jne 0x43fd53
test edx, edx
je 0x43fd53
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 8]
push eax
mov bl, 1
call fcn.00490561
add esp, 4
xor edi, edi
cmp esi, edi
jl 0x43fd57
push esi
call fcn.0048fca4
add esp, 4
cmp eax, edi
je 0x43fd57
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x30]
mov byte [ecx + 0x14], 2
jmp 0x43fbee
xor bl, bl
jmp 0x43fd2f
mov eax, dword [esp + 0x1c]
test bl, bl
je 0x43fd6b
mov dword [eax + 0x10], edi
mov dword [eax + 8], 0x4cb4dc
jmp 0x43fd73
mov edx, dword [eax + 8]
xor ecx, ecx
mov word [edx], cx
push 0x4a3890
push str.Out_of_memory.
mov ecx, 0x4cb508
mov dword [eax + 0xc], edi
call fcn.00430620
jmp 0x43fabf
mov edx, dword [esi + 8]
xor eax, eax
lea ecx, [ebx + ebx]
mov word [edx], ax
mov dword [esi + 0xc], ecx
jmp 0x43fb15
push esi
call fcn.00491a12
add esp, 4
mov eax, ebx
fstp qword [esp + 0x58]
call fcn.0040ec60
test al, al
je 0x43fdd5
push 0x10
push 0
push ebx
call fcn.00491933
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], edx
fild qword [esp + 0x5c]
add esp, 0xc
jmp 0x43fdde
push ebx
call fcn.00491a12
add esp, 4
fld qword [esp + 0x58]
fucompp
fnstsw ax
test ah, 0x44
jp 0x43febe
mov edx, dword [esp + 0x2c]
inc dword [esp + 0x30]
cmp edx, dword [esp + 0x3c]
jne 0x43fe09
cmp byte [esp + 0x14], 0
jne 0x43fe09
sub dword [esp + 0x18], 2
mov eax, dword [esp + 0x2c]
add edi, dword [esp + 0x28]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x20]
jb 0x43fb50
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x40]
push eax
call fcn.00490561
add esp, 4
cmp byte [esp + 0x15], 0
je 0x43ff38
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov word [edx - 4], cx
cmp byte [esi + 0x17], cl
jne 0x43ff0c
mov ebx, dword [esp + 0x1c]
mov esi, dword [ebx + 0xc]
jmp 0x43ff12
mov al, byte [0x4c9386]
test al, al
jne 0x43fe72
mov ecx, dword [edi]
push ebx
push ecx
call fcn.0048fc19
add esp, 8
jmp 0x43feb1
cmp al, 2
jne 0x43fe82
mov edx, dword [edi]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x43feb1
mov eax, dword [edi]
mov ecx, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x43feac
test dx, dx
je 0x43fea8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x43feac
add eax, 4
add ecx, 4
test dx, dx
jne 0x43fe86
xor eax, eax
jmp 0x43feb1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x43fdef
mov ecx, dword [edi]
movzx eax, word [ecx]
mov edx, dword [esp + 0x18]
test ax, ax
je 0x43fee5
lea esp, [esp]
add ecx, 2
mov word [edx], ax
movzx eax, word [ecx]
add edx, 2
test ax, ax
jne 0x43fed0
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x2c], eax
jb 0x43fef6
cmp byte [esp + 0x14], 0
je 0x43ff05
mov cx, word [esp + 0x24]
mov word [edx], cx
add edx, 2
mov dword [esp + 0x18], edx
mov ebx, dword [edi]
jmp 0x43fe09
mov esi, dword [esp + 0x1c]
mov ebx, esi
cmp byte [esi + 0x17], 1
jne 0x43ff2e
test byte [esi + 0x15], 8
je 0x43ff25
mov eax, esi
call fcn.00401160
add dword [esi + 0xc], 0xfffffffc
lea eax, [esi + 0xc]
jmp 0x43ff45
mov eax, 0x4cc20c
add dword [eax], 0xfffffffc
jmp 0x43ff45
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
xor eax, eax
mov word [ecx], ax
cmp byte [esp + 0x16], 0
je 0x43ffa8
cmp dword [esp + 0x30], 0
je 0x43ffa8
push 0
push 1
mov ecx, ebx
call fcn.00401220
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43ff61
sub eax, edx
sar eax, 1
mov edi, eax
cmp byte [ebx + 0x17], cl
jne 0x43ff7c
mov esi, dword [ebx + 0xc]
jmp 0x43ff7e
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x43ff96
test byte [esi + 0x15], 8
je 0x43ff91
mov eax, esi
call fcn.00401160
lea eax, [esi + 0xc]
jmp 0x43ff9b
mov eax, 0x4cc20c
lea edx, [edi + edi]
mov dword [eax], edx
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], eax
cmp byte [ebx + 0x17], 0
jne 0x43ffb3
mov eax, dword [ebx + 0xc]
jmp 0x43ffb5
mov eax, ebx
cmp byte [eax + 0x17], 2
jne 0x43ffd4
cmp dword [0x4cc054], 0
je 0x43ffd4
mov ecx, 0x4cc048
call fcn.004046c0
mov dword [esp + 0x20], eax
jmp 0x43ffe0
and byte [eax + 0x15], 0x86
mov dword [esp + 0x20], 1
mov edi, dword [esp + 0x34]
cmp edi, 0xffffffff
je 0x440055
mov esi, dword [0x4cad6c]
cmp byte [esi + 0x17], 0
jne 0x43fff8
mov esi, dword [esi + 0xc]
mov al, byte [esi + 0x15]
test al, 2
je 0x44000e
and al, 0x3d
mov byte [esi + 0x15], al
mov eax, dword [esi]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov al, byte [esi + 0x15]
and al, 0x9b
or al, 0x18
mov dword [esi], edi
mov dword [esi + 4], 0
mov byte [esi + 0x15], al
jns 0x440030
mov eax, esi
call fcn.00401160
and byte [esi + 0x15], 0x8f
jmp 0x440055
cmp dword [0x4ca6c8], 0
je 0x44003d
test al, 0x10
jne 0x44004a
cmp dword [0x4ca6cc], 0
je 0x440055
test al, 0x20
je 0x440055
test al, 8
je 0x440055
mov eax, esi
call fcn.00401160
mov eax, dword [esp + 0x38]
test eax, eax
je 0x44007c
push eax
call fcn.00490561
mov eax, dword [esp + 0x48]
mov dword [0x4c937c], eax
mov eax, dword [esp + 0x24]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
pop edi
pop esi
mov dword [0x4c937c], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8