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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x4af208]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov bl, 0xa
mov dword [esp + 0x28], ecx
xor ch, ch
push edi
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], eax
mov dword [0x4af208], 0
mov dword [esp + 0x30], 0xffffffff
mov byte [esp + 0x12], bl
mov byte [0x4af26c], 0
mov byte [0x4af26b], 0
mov byte [0x4af26a], 0
mov dword [0x4af20c], 0
mov byte [esp + 0x11], ch
mov byte [esp + 0x15], ch
mov byte [esp + 0x13], ch
mov byte [esp + 0x17], ch
mov byte [esp + 0x14], ch
mov byte [esp + 0x16], ch
cmp byte [esi], ch
je 0x43c745
mov edi, 1
movsx eax, byte [esi]
push eax
call fcn.0048832d
add eax, 0xffffffbd
add esp, 4
cmp eax, 0x19
ja case.0x43c5c1.69
movzx eax, byte [eax + 0x43ccc0]
jmp dword [eax*4 + 0x43cc98]
mov al, byte [esi + 1]
movzx ebx, al
test ebx, 0xffffff80
jne 0x43c5e8
push 2
push ebx
call fcn.0048708c
add esp, 8
test eax, eax
je 0x43c5e8
and ebx, 0xffffffdf
mov ch, byte [esp + 0x11]
cmp bl, 0x4c
mov bl, byte [esp + 0x12]
mov edi, 1
jne 0x43c607
inc esi
mov byte [0x4af26c], 2
jmp 0x43c73b
mov byte [0x4af26c], 1
jmp 0x43c73b
cmp byte [esi + 1], 0
lea eax, [esi + 1]
je case.0x43c5c1.69
mov ch, byte [esp + 0x11]
mov esi, eax
mov al, byte [esi]
test al, al
je 0x43c73b
mov bl, al
mov byte [esp + 0x12], bl
jmp 0x43c73b
mov al, byte [esi + 1]
inc esi
cmp al, 0x20
je case.0x43c5c1.70
cmp al, 9
je case.0x43c5c1.70
mov edx, 0x4a0c84
mov ecx, esi
call fcn.0040a9c0
mov edi, eax
test edi, edi
jne 0x43c66c
mov ecx, esi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x43c660
sub ecx, edx
lea edi, [esi + ecx]
push 0
mov eax, edi
mov ecx, 0x4b09a0
sub eax, esi
push eax
push esi
call fcn.00420490
mov dword [0x4af208], eax
test eax, eax
je 0x43cbf8
cmp byte [eax + 0x3d], 0
jne 0x43cbf8
mov ecx, dword [eax + 0x10]
cmp ecx, 2
jl 0x43cbf8
cmp ecx, 3
jg 0x43cbf8
mov eax, dword [eax + 0xc]
cmp word [eax + 4], 0
jne 0x43cbf8
cmp word [eax + 0x14], 0
jne 0x43cbf8
lea esi, [edi - 1]
mov edi, 1
jmp case.0x43c5c1.69
mov byte [0x4af26b], 1
jmp case.0x43c5c1.69
lea eax, [esi + 1]
push eax
call fcn.00487180
add esp, 4
cmp eax, 1
cmovl eax, edi
dec eax
mov dword [0x4af20c], eax
jmp case.0x43c5c1.69
push 6
push str.Random
push esi
call fcn.0048616d
mov ch, byte [esp + 0x1d]
add esp, 0xc
test eax, eax
jne 0x43c712
mov byte [esp + 0x14], 1
add esi, 5
jmp 0x43c73b
mov byte [0x4af26a], 1
jmp 0x43c73b
mov byte [esp + 0x16], 1
mov dword [esp + 0x30], 0
jmp case.0x43c5c1.69
mov ch, 1
mov byte [esp + 0x11], ch
jmp 0x43c73b
mov byte [esp + 0x17], 1
mov ch, byte [esp + 0x11]
inc esi
cmp byte [esi], 0
jne 0x43c5a2
mov esi, dword [ebp + 8]
mov cl, byte [esi]
test cl, cl
je 0x43cbf8
mov edx, dword [0x4b0840]
mov dword [esp + 0x1c], edx
mov al, byte [edx + 0x17]
test al, al
jne 0x43c769
mov eax, dword [edx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
ja 0x43cbf8
mov edi, 1
mov eax, esi
cmp cl, bl
jne 0x43c77d
inc edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x43c778
mov ebx, eax
sub ebx, esi
mov dword [esp + 0x28], ebx
test ch, ch
jne 0x43c7c0
cmp eax, esi
jbe 0x43c7c0
mov cl, byte [esp + 0x12]
cmp byte [eax - 1], cl
jne 0x43c7c0
mov byte [esp + 0x15], 1
dec edi
mov al, byte [esp + 0x13]
cmp edi, 1
jne 0x43c7f0
push edi
push 0
push ebx
push esi
mov ecx, edx
call fcn.004759c0
mov ebx, eax
jmp 0x43cbfd
cmp byte [esp + 0x12], 0xa
jne 0x43c7a4
push 0xa
push esi
call fcn.00486ac4
mov edx, dword [esp + 0x24]
add esp, 8
test eax, eax
je 0x43c7a4
cmp eax, esi
jbe 0x43c7a4
cmp byte [eax - 1], 0xd
jne 0x43c7a4
mov al, 1
mov byte [esp + 0x13], al
mov byte [esp + 0x15], al
jmp 0x43c7a8
cmp dword [0x4af208], 0
jne 0x43c7fd
test al, al
je 0x43c863
lea eax, [ebx + 3]
push eax
call fcn.00485a15
mov ecx, eax
add esp, 4
mov dword [esp + 0x34], ecx
test ecx, ecx
jne 0x43c82e
mov ecx, dword [esp + 0x2c]
push 0x49e065
push eax
push str.Out_of_memory.
call fcn.0042e0a0
mov ebx, eax
jmp 0x43cbfd
lea eax, [ebx + 1]
push eax
push esi
push ecx
call fcn.0048e4b0
mov ecx, dword [esp + 0x40]
add esp, 0xc
cmp byte [esp + 0x13], 0
mov esi, ecx
je 0x43c863
mov ax, word [0x4a42f0]
mov word [ebx + ecx], ax
mov al, byte [0x4a42f2]
mov byte [ebx + ecx + 2], al
add ebx, 2
mov dword [esp + 0x28], ebx
xor eax, eax
cmp byte [esp + 0x14], al
setne al
lea ecx, [eax*4 + 4]
lea eax, [edi + 1]
mov dword [esp + 0x20], ecx
imul eax, ecx
push eax
call fcn.00485a15
mov ecx, eax
add esp, 4
mov dword [esp + 0x24], ecx
test ecx, ecx
jne 0x43c8ab
mov ecx, dword [esp + 0x2c]
push 0x49e065
push eax
push str.Out_of_memory.
call fcn.0042e0a0
mov ebx, eax
jmp 0x43cbfd
mov edx, dword [0x4b1be0]
xor eax, eax
mov dword [ecx], esi
mov edi, ecx
mov dword [esp + 0x18], eax
cmp byte [esi], al
je 0x43c945
mov ebx, dword [esp + 0x20]
mov cl, byte [esp + 0x12]
jmp 0x43c8d0
cmp byte [esi], cl
jne 0x43c93b
inc eax
mov byte [esi], 0
cmp byte [esp + 0x14], 0
mov dword [esp + 0x18], eax
je 0x43c930
dec dword [0x4ad374]
jne 0x43c8f6
call fcn.00413fb0
mov edx, dword [0x4b1be0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4b1be0], 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 + 0x12]
shr eax, 1
mov dword [edi + 4], eax
add edi, ebx
lea eax, [esi + 1]
mov dword [edi], eax
mov eax, dword [esp + 0x18]
inc esi
cmp byte [esi], 0
jne 0x43c8d0
mov ebx, dword [esp + 0x28]
cmp byte [esp + 0x15], 0
jne 0x43c9a2
inc eax
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x14]
test al, al
je 0x43c9a6
dec dword [0x4ad374]
jne 0x43c96c
call fcn.00413fb0
mov edx, dword [0x4b1be0]
mov ecx, dword [edx]
mov eax, ecx
shr eax, 0xb
add edx, 4
xor ecx, eax
mov dword [0x4b1be0], 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 [0x4af208], 0
je 0x43c9b6
push 0x43c390
jmp 0x43c9d4
test al, al
je 0x43c9c1
push 0x43c380
jmp 0x43c9d4
cmp byte [esp + 0x17], 0
mov eax, 0x43c240
mov ecx, 0x43c310
cmovne eax, ecx
push eax
push dword [esp + 0x24]
mov edi, dword [esp + 0x20]
push edi
push dword [esp + 0x30]
call fcn.00486c80
mov esi, dword [esp + 0x2c]
add esp, 0x10
mov ecx, esi
push 1
push 0
push ebx
push 0
call fcn.004759c0
cmp eax, 1
je 0x43ca07
xor ebx, ebx
jmp 0x43cbfd
mov ebx, dword [esp + 0x24]
lea eax, [edi - 1]
xor edi, edi
mov dword [esp + 0x38], eax
push edi
push 1
mov ecx, esi
mov dword [esp + 0x30], 0
call fcn.004024d0
mov esi, eax
mov dword [esp + 0x2c], edi
cmp dword [esp + 0x18], edi
jbe 0x43cac9
cmp byte [esp + 0x16], 0
je 0x43ca83
test edi, edi
je 0x43ca83
cmp byte [0x4af26b], 0
je 0x43caf3
cmp dword [0x4af20c], 0
jne 0x43caf3
mov ecx, dword [ebx]
call fcn.004145b0
mov ecx, edi
movsd qword [esp + 0x40], xmm0
call fcn.004145b0
movsd xmm1, qword [esp + 0x40]
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x43cb27
mov eax, dword [ebx]
mov cl, byte [eax]
test cl, cl
je 0x43ca9c
jmp 0x43ca90
mov byte [esi], cl
lea eax, [eax + 1]
mov cl, byte [eax]
inc esi
test cl, cl
jne 0x43ca90
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x38]
jb 0x43caad
cmp byte [esp + 0x15], 0
je 0x43cab4
mov cl, byte [esp + 0x12]
mov byte [esi], cl
inc esi
mov edi, dword [ebx]
add ebx, dword [esp + 0x20]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x18]
jb 0x43ca36
push dword [esp + 0x24]
call fcn.004858b4
mov ebx, dword [esp + 0x20]
add esp, 4
cmp byte [esp + 0x13], 0
je 0x43cb6d
mov byte [esi - 2], 0
cmp byte [ebx + 0x17], 0
jne 0x43cb46
mov esi, dword [ebx + 0xc]
jmp 0x43cb48
mov al, byte [0x4af26c]
push edi
push dword [ebx]
test al, al
jne 0x43cb06
call fcn.004855c8
jmp 0x43cb17
cmp al, 2
jne 0x43cb12
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
jmp 0x43cb1a
call fcn.004858ec
add esp, 8
test eax, eax
setne al
test al, al
jne 0x43ca83
inc dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x38]
jne 0x43cab6
cmp byte [esp + 0x15], 0
jne 0x43cab6
dec esi
jmp 0x43cab6
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x43cb63
test byte [esi + 0x15], 8
je 0x43cb5b
mov ecx, esi
call fcn.004023f0
add esi, 0xc
add dword [esi], 0xfffffffe
jmp 0x43cb70
mov esi, 0x4b1c4c
add dword [esi], 0xfffffffe
jmp 0x43cb70
mov byte [esi], 0
cmp byte [esp + 0x16], 0
je 0x43cbcc
cmp dword [esp + 0x28], 0
je 0x43cbcc
push 0
push 1
mov ecx, ebx
call fcn.004024d0
mov esi, eax
lea eax, [esi + 1]
mov edi, edi
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x43cb90
sub esi, eax
cmp byte [ebx + 0x17], cl
jne 0x43cba3
mov edi, dword [ebx + 0xc]
jmp 0x43cba5
mov edi, ebx
cmp byte [edi + 0x17], 1
jne 0x43cbbd
test byte [edi + 0x15], 8
je 0x43cbb8
mov ecx, edi
call fcn.004023f0
add edi, 0xc
jmp 0x43cbc2
mov edi, 0x4b1c4c
mov eax, dword [esp + 0x28]
mov dword [edi], esi
mov dword [esp + 0x30], eax
cmp byte [ebx + 0x17], 0
jne 0x43cbd5
mov ebx, dword [ebx + 0xc]
cmp byte [ebx + 0x17], 2
jne 0x43cbf4
cmp dword [0x4b101c], 0
je 0x43cbf4
push 1
mov ecx, 0x4b1010
call fcn.00405a20
mov ebx, eax
jmp 0x43cbfd
and byte [ebx + 0x15], 0x86
mov ebx, 1
mov edi, dword [esp + 0x30]
cmp edi, 0xffffffff
je 0x43cc70
mov esi, dword [0x4af094]
cmp byte [esi + 0x17], 0
jne 0x43cc15
mov esi, dword [esi + 0xc]
mov al, byte [esi + 0x15]
test al, 2
je 0x43cc29
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
jns 0x43cc4b
mov ecx, esi
call fcn.004023f0
and byte [esi + 0x15], 0x8f
jmp 0x43cc70
cmp dword [0x4af0b8], 0
je 0x43cc58
test al, 0x10
jne 0x43cc65
cmp dword [0x4af0b4], 0
je 0x43cc70
test al, 0x20
je 0x43cc70
test al, 8
je 0x43cc70
mov ecx, esi
call fcn.004023f0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x43cc81
push eax
call fcn.004858b4
add esp, 4
mov eax, dword [esp + 0x3c]
pop edi
mov dword [0x4af208], eax
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8