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

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi]
mov ebp, dword [eax + 0x64cc]
mov ebx, dword [eax + 0x2724]
xor eax, eax
cmp ebp, eax
push edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
jg 0x10049ba9
mov eax, dword [esp + 0x34]
mov dword [eax], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov ebp, dword [esp + 0x1c]
cmp dword [esp + 0x10], 1
jle 0x10049bfb
mov eax, dword [esi]
mov edx, dword [esp + 0x18]
dec ebp
lea ecx, [eax + ebp*4 + 0x64d0]
lea edx, [eax + edx*4 + 0x64d0]
mov dword [esp + 0x1c], ebp
cmp edx, ecx
je 0x10049bdd
mov edi, dword [edx]
mov dword [esp + 0x24], edi
mov edi, dword [ecx]
mov dword [edx], edi
mov edi, dword [esp + 0x24]
mov dword [ecx], edi
mov edx, dword [edx]
mov edi, dword [esp + 0x18]
mov dword [eax + edx*4 + 0x6a74], edi
mov ecx, dword [ecx]
mov dword [eax + ecx*4 + 0x6a74], ebp
test ebp, ebp
je 0x10049dfc
cmp dword [esi + 0x2780], 0x270
lea edi, [esi + 0x1dc0]
jne 0x10049c14
mov ecx, edi
call fcn.1001ac20
mov ecx, dword [edi + 0x9c0]
mov eax, dword [edi + ecx*4]
inc ecx
mov dword [edi + 0x9c0], 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 eax, edx
xor edx, edx
div ebp
mov eax, dword [esi]
mov edi, dword [eax + edx*4 + 0x64d0]
mov ecx, dword [eax + edi*4 + 0x87c0]
mov dword [esp + 0x18], edx
mov dword [esp + 0x24], ecx
cmp ecx, 4
je 0x10049e4c
mov ebp, dword [eax + edi*4 + 0xaed0]
cmp ebx, 2
jne 0x10049c9f
mov eax, dword [0x100a3d20]
sub eax, dword [0x100a3d1c]
sar eax, 2
cmp ebp, eax
jb 0x10049c94
call fcn.100661d7
mov ecx, dword [0x100a3d1c]
mov ebp, dword [ecx + ebp*4]
jmp 0x10049cbf
mov edx, dword [0x100a3d38]
sub edx, dword [0x100a3d34]
sar edx, 2
cmp ebp, edx
jb 0x10049cb7
call fcn.100661d7
mov eax, dword [0x100a3d34]
mov ebp, dword [eax + ebp*4]
test ebp, ebp
je 0x10049ded
cmp dword [esp + 0x10], 0
jne 0x10049d0c
cmp ebp, 0x1388
jge 0x10049d0c
push ecx
mov eax, esp
mov ecx, esi
mov dword [eax], edi
call fcn.1003db30
cmp eax, 0x64
jge 0x10049d0c
cmp dword [esp + 0x24], 0
je 0x10049ded
mov edx, dword [esi]
mov ecx, ebx
imul ecx, ecx, 0x271
add ecx, edi
cmp dword [edx + ecx*4 + 0x87c0], 0
je 0x10049ded
push ecx
mov eax, esp
mov dword [eax], ebx
push ecx
mov eax, esp
mov dword [eax], edi
mov ecx, dword [esi]
call fcn.10016490
test al, al
jne 0x10049ded
mov eax, dword [esi]
cmp edi, dword [eax + 0x2720]
je 0x10049ded
push ecx
mov eax, esp
push ecx
mov dword [eax], ebx
mov eax, esp
mov dword [eax], edi
mov eax, dword [esi]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.1004aa90
mov edi, dword [eax]
mov ecx, dword [esi]
add esp, 0xc
mov eax, esp
mov dword [eax], ebx
push ecx
mov eax, esp
mov dword [eax], edi
call fcn.100186c0
push ecx
cmp eax, 1
mov eax, esp
mov dword [eax], ebx
push ecx
mov eax, esp
mov dword [eax], edi
jne 0x10049db0
mov ecx, dword [esi]
lea edx, [esp + 0x34]
push edx
call fcn.10017330
cmp dword [eax], 0
jle 0x10049dc1
push ecx
mov eax, esp
mov dword [eax], ebx
push ecx
mov eax, esp
mov dword [eax], edi
mov ecx, dword [esi]
call fcn.100169d0
cmp eax, 1
jg 0x10049dc1
push ecx
mov eax, esp
push ecx
mov dword [eax], ebx
mov eax, esp
mov ecx, esi
mov dword [eax], edi
call fcn.10049060
test al, al
jne 0x10049dc1
mov dword [esp + 0x14], edi
jmp 0x10049ded
mov ecx, esi
call fcn.10049810
test al, al
je 0x10049dc1
mov dword [esp + 0x14], edi
jmp 0x10049ded
push ecx
mov eax, esp
mov dword [eax], edi
mov eax, dword [esi]
push eax
call fcn.10024b80
add esp, 8
test al, al
jne 0x10049ded
push ecx
mov eax, esp
mov dword [eax], edi
mov ecx, dword [esi]
push ecx
call fcn.10025cf0
add esp, 8
test al, al
je 0x10049e4c
mov dword [esp + 0x20], edi
inc dword [esp + 0x10]
cmp dword [esp + 0x1c], 0
jg 0x10049ba5
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
test edi, edi
je 0x10049e1c
push ecx
mov eax, esp
mov dword [eax], edi
mov edx, dword [esi]
push edx
call fcn.10024b80
add esp, 8
test al, al
je 0x10049e4c
test ebx, ebx
je 0x10049b91
push ecx
mov eax, esp
mov dword [eax], ebx
mov eax, dword [esi]
push eax
call fcn.10024b80
add esp, 8
test al, al
jne 0x10049b91
mov eax, dword [esp + 0x34]
mov dword [eax], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov eax, dword [esp + 0x34]
mov dword [eax], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4