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

Disassembly:
sub rsp, 0x78
cmp dword [0x18002d530], 0x270
jl 0x180004398
mov dword [rsp + 0x70], 0
cmp dword [rsp + 0x70], 0xe3
jge 0x1800041cf
movsxd rcx, dword [rsp + 0x70]
lea rax, [0x18002b420]
mov ecx, dword [rax + rcx*4]
mov edx, 0xffffffff
call fcn.18001a630
mov dword [rsp + 0x54], eax
mov ecx, 0xddb3a856
call fcn.1800107f0
mov edx, eax
mov eax, dword [rsp + 0x54]
xor edx, 0xffffffff
mov ecx, 0xffffffff
xor ecx, 0x2aa57238
or eax, edx
or ecx, 0x2aa57238
xor eax, 0xffffffff
and eax, ecx
mov dword [rsp + 0x58], eax
mov ecx, dword [rsp + 0x70]
mov edx, 1
call fcn.180023340
mov ecx, eax
mov eax, dword [rsp + 0x58]
movsxd rdx, ecx
lea rcx, [0x18002b420]
mov ecx, dword [rcx + rdx*4]
and ecx, 0x7fffffff
or eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x70]
add eax, 0x18d
movsxd rcx, eax
lea rax, [0x18002b420]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x5c], eax
mov ecx, 0x5db3a857
call fcn.1800107f0
mov edx, dword [rsp + 0x5c]
mov ecx, eax
mov eax, dword [rsp + 0x60]
shr edx, cl
mov ecx, edx
xor eax, ecx
mov dword [rsp + 0x68], eax
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x64], eax
mov ecx, 0x5db3a857
call fcn.1800107f0
mov edx, dword [rsp + 0x64]
xor eax, 0xffffffff
mov ecx, edx
xor ecx, eax
call fcn.18001cc90
mov dword [rsp + 0x6c], eax
mov ecx, 0x5db3a857
call fcn.1800107f0
mov edx, dword [rsp + 0x68]
mov eax, dword [rsp + 0x6c]
mov eax, eax
mov ecx, eax
lea rax, [0x18002b26c]
xor edx, dword [rax + rcx*4]
movsxd rcx, dword [rsp + 0x70]
lea rax, [0x18002b420]
mov dword [rax + rcx*4], edx
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x50], eax
mov ecx, 0x5db3a857
call fcn.1800107f0
mov edx, eax
mov eax, dword [rsp + 0x50]
xor ecx, ecx
sub ecx, edx
sub eax, ecx
mov dword [rsp + 0x70], eax
jmp 0x18000408c
jmp 0x1800041d1
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x4c], eax
mov ecx, 0x5db3aa39
call fcn.1800107f0
mov ecx, eax
mov eax, dword [rsp + 0x4c]
cmp eax, ecx
jge 0x1800042db
movsxd rcx, dword [rsp + 0x70]
lea rax, [0x18002b420]
mov eax, dword [rax + rcx*4]
and eax, 0x80000000
mov dword [rsp + 0x40], eax
mov ecx, dword [rsp + 0x70]
mov edx, 1
call fcn.180023340
mov ecx, eax
mov eax, dword [rsp + 0x40]
movsxd rdx, ecx
lea rcx, [0x18002b420]
mov ecx, dword [rcx + rdx*4]
and ecx, 0x7fffffff
or eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x70]
add eax, 0xffffff1d
movsxd rcx, eax
lea rax, [0x18002b420]
mov edx, dword [rax + rcx*4]
mov eax, dword [rsp + 0x74]
shr eax, 1
mov r8d, edx
xor r8d, 0xffffffff
mov ecx, eax
and ecx, r8d
xor eax, 0xffffffff
and edx, eax
call fcn.180017f10
mov ecx, eax
mov dword [rsp + 0x48], ecx
mov eax, dword [rsp + 0x74]
and eax, 1
mov eax, eax
mov edx, eax
lea rax, [0x18002b26c]
mov eax, dword [rax + rdx*4]
mov dword [rsp + 0x44], eax
mov edx, 0xffffffff
call fcn.18001a630
mov ecx, dword [rsp + 0x44]
mov r8d, eax
mov eax, dword [rsp + 0x48]
mov edx, ecx
and edx, r8d
xor ecx, 0xffffffff
and eax, ecx
or edx, eax
movsxd rcx, dword [rsp + 0x70]
lea rax, [0x18002b420]
mov dword [rax + rcx*4], edx
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x3c], eax
mov ecx, 0x5db3a857
call fcn.1800107f0
mov ecx, eax
mov eax, dword [rsp + 0x3c]
add eax, ecx
mov dword [rsp + 0x70], eax
jmp 0x1800041d1
mov eax, dword [0x18002bddc]
and eax, 0x80000000
mov ecx, dword [0x18002b420]
and ecx, 0x7fffffff
or eax, ecx
mov dword [rsp + 0x74], eax
mov ecx, dword [0x18002ba50]
mov edx, dword [rsp + 0x74]
shr edx, 1
call fcn.18001a630
mov ecx, eax
mov dword [rsp + 0x30], ecx
mov eax, dword [rsp + 0x74]
and eax, 1
mov eax, eax
mov edx, eax
lea rax, [0x18002b26c]
mov eax, dword [rax + rdx*4]
mov dword [rsp + 0x34], eax
mov eax, ecx
xor eax, 0xffffffff
and eax, 0x9cb92f00
mov dword [rsp + 0x2c], eax
mov edx, 0xffffffff
xor edx, 0x9cb92f00
mov dword [rsp + 0x28], edx
call fcn.18001cc90
mov r9d, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x2c]
mov r8d, eax
mov eax, dword [rsp + 0x34]
mov edx, eax
xor edx, 0xffffffff
and edx, 0x9cb92f00
and eax, r9d
or ecx, r8d
or edx, eax
call fcn.18001a630
mov ecx, dword [rsp + 0x30]
mov edx, dword [rsp + 0x34]
mov dword [rsp + 0x38], eax
call fcn.18001a630
mov eax, dword [rsp + 0x38]
mov dword [0x18002bddc], eax
mov dword [0x18002d530], 0
mov eax, dword [0x18002d530]
mov ecx, eax
add ecx, 1
mov dword [0x18002d530], ecx
movsxd rcx, eax
lea rax, [0x18002b420]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x74]
shr eax, 0xb
xor eax, dword [rsp + 0x74]
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x74]
shl eax, 7
and eax, 0x9d2c5680
xor eax, dword [rsp + 0x74]
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x74]
shl eax, 0xf
mov dword [rsp + 0x24], eax
mov ecx, 0xb275a856
call fcn.1800107f0
mov ecx, eax
mov eax, dword [rsp + 0x24]
and eax, ecx
xor eax, dword [rsp + 0x74]
mov dword [rsp + 0x74], eax
mov edx, dword [rsp + 0x74]
shr edx, 0x12
mov ecx, dword [rsp + 0x74]
mov r8d, ecx
xor r8d, 0xffffffff
mov eax, edx
and eax, r8d
xor edx, 0xffffffff
and ecx, edx
or eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x74]
add rsp, 0x78
ret