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

Disassembly:
mov rax, rsp
push r14
push r15
sub rsp, 0xa8
mov qword [rax + 8], rbx
xor r14b, r14b
mov qword [rax - 0x18], rbp
mov rbx, r8
mov qword [rax - 0x20], rsi
mov r8d, 0xa
xor esi, esi
mov qword [rax - 0x28], rdi
mov qword [rax - 0x30], r12
xor dil, dil
mov qword [rax - 0x38], r13
mov rbp, rdx
mov rax, qword [0x1400f1738]
xor r13b, r13b
lea r15d, [rsi + 1]
movzx edx, r8w
mov r12, rcx
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x48], rax
mov qword [0x1400f1738], rsi
mov dword [rsp + 0x40], 0xffffffff
mov word [rsp + 0x30], dx
mov byte [0x1400f17f5], sil
mov byte [0x1400f17f4], sil
mov byte [0x1400f15bf], sil
mov dword [0x1400f1734], esi
mov byte [rsp + 0xd0], sil
mov byte [rsp + 0x32], dil
mov byte [rsp + 0x34], sil
mov byte [rsp + 0xd8], r13b
mov byte [rsp + 0x33], sil
cmp word [rbx], si
je 0x140041c31
lea rdi, [0x140000000]
movzx ecx, word [rbx]
call fcn.1400a1910
movzx eax, ax
add eax, 0xffffffbd
cmp eax, 0x19
ja case.0x140041a52.76
cdqe
movzx eax, byte [rdi + rax + 0x422a8]
mov ecx, dword [rdi + rax*4 + 0x42280]
add rcx, rdi
jmp rcx
movzx edi, word [rbx + 2]
test edi, 0xffffff80
jne 0x140041a73
mov edx, 2
mov ecx, edi
call fcn.14009c1d4
test eax, eax
je 0x140041a73
and edi, 0xffffffdf
movzx edx, word [rsp + 0x30]
cmp di, 0x4c
lea rdi, [0x140000000]
jne 0x140041a97
add rbx, 2
mov byte [0x1400f17f5], 2
xor esi, esi
jmp 0x140041c1a
mov byte [0x1400f17f5], r15b
xor esi, esi
jmp 0x140041c1a
cmp word [rbx + 2], 0
lea rax, [rbx + 2]
je case.0x140041a52.76
mov rbx, rax
movzx eax, word [rax]
test ax, ax
je case.0x140041a52.76
movzx edx, ax
mov word [rsp + 0x30], ax
jmp 0x140041c1a
movzx eax, word [rbx + 2]
add rbx, 2
cmp ax, 0x20
je case.0x140041a52.69
cmp ax, 9
je case.0x140041a52.69
mov rdi, rbx
movzx edx, ax
test ax, ax
je 0x140041b1f
nop
lea rcx, [0x1400d18a0]
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
cmp dx, ax
je 0x140041b33
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x140041b00
movzx edx, word [rdi + 2]
add rdi, 2
test dx, dx
jne 0x140041af0
or rax, 0xffffffffffffffff
cmp word [rbx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x140041b23
lea rdi, [rbx + rax*2]
mov r8, rdi
lea rcx, [0x1400f59d0]
sub r8, rbx
xor r9d, r9d
sar r8, 1
mov rdx, rbx
call fcn.140020f00
mov qword [0x1400f1738], rax
mov rcx, rax
test rax, rax
je 0x140042207
cmp byte [rax + 0x5d], 0
jne 0x140042207
mov eax, dword [rax + 0x20]
sub eax, 2
cmp eax, r15d
ja 0x140042207
mov rax, qword [rcx + 0x18]
cmp word [rax + 8], 0
jne 0x140042207
cmp word [rax + 0x20], 0
jne 0x140042207
lea rbx, [rdi - 2]
lea rdi, [0x140000000]
jmp case.0x140041a52.76
mov byte [0x1400f17f4], r15b
jmp case.0x140041a52.76
lea rcx, [rbx + 2]
call fcn.14009d1f8
cmp eax, r15d
cmovl eax, r15d
dec eax
mov dword [0x1400f1734], eax
jmp case.0x140041a52.76
mov r8d, 6
lea rdx, [0x1400bed00]
mov rcx, rbx
call fcn.14009bc18
movzx edx, word [rsp + 0x30]
test eax, eax
jne 0x140041bf4
movzx r13d, r15b
mov byte [rsp + 0xd8], r15b
add rbx, 0xa
jmp 0x140041c1a
mov byte [0x1400f15bf], r15b
jmp 0x140041c1a
mov eax, esi
mov byte [rsp + 0x33], r15b
mov dword [rsp + 0x40], eax
jmp case.0x140041a52.76
movzx r14d, r15b
jmp case.0x140041a52.76
mov byte [rsp + 0x34], r15b
movzx edx, word [rsp + 0x30]
add rbx, 2
cmp word [rbx], 0
jne 0x140041a27
xor dil, dil
mov r8d, 0xa
movzx ecx, word [rbp]
test cx, cx
je 0x140042207
mov r15, qword [0x1400f5760]
mov qword [rsp + 0x58], r15
movzx eax, byte [r15 + 0x23]
test al, al
jne 0x140041c5b
mov rax, qword [r15 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
ja 0x140042201
mov ebx, 1
mov rax, rbp
nop dword [rax + rax]
cmp cx, dx
jne 0x140041c78
inc rbx
movzx ecx, word [rax + 2]
add rax, 2
test cx, cx
jne 0x140041c70
mov rsi, rax
sub rsi, rbp
sar rsi, 1
test r14b, r14b
jne 0x140041cab
cmp rax, rbp
jbe 0x140041cab
cmp word [rax - 2], dx
jne 0x140041cab
mov byte [rsp + 0xd0], 1
dec rbx
jmp 0x140041cdd
cmp dx, 0xa
jne 0x140041cdd
mov edx, r8d
mov rcx, rbp
call fcn.1400977e8
test rax, rax
je 0x140041cdd
cmp rax, rbp
jbe 0x140041cdd
cmp word [rax - 2], 0xd
jne 0x140041cdd
mov dil, 1
mov byte [rsp + 0x32], dil
mov byte [rsp + 0xd0], dil
cmp rbx, 1
jne 0x140041d00
xor r9d, r9d
mov byte [rsp + 0x20], bl
mov r8, rsi
mov rdx, rbp
mov rcx, r15
call fcn.14007d4e0
mov r15d, eax
jmp 0x140042207
cmp qword [0x1400f1738], 0
jne 0x140041d13
test dil, dil
je 0x140041d94
lea rcx, [rsi*2 + 6]
call fcn.1400997a8
mov qword [rsp + 0x38], rax
mov r14, rax
test rax, rax
jne 0x140041d4e
lea r9, [0x1400bdf7c]
xor r8d, r8d
lea rdx, [0x1400d1750]
mov rcx, r12
call fcn.1400310e0
mov r15d, eax
jmp 0x14004220c
lea rdi, [rsi + rsi]
mov rdx, rbp
lea r8, [rdi + 2]
mov rcx, rax
call fcn.1400973b0
cmp byte [rsp + 0x32], 0
mov rbp, r14
je 0x140041d94
lea rcx, [0x1400d8bc0]
sub rdi, rcx
lea rdx, [rdi + r14]
nop dword [rax]
movzx eax, word [rcx]
mov word [rdx + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x140041d80
add rsi, 2
xor eax, eax
lea rcx, [rbx + 1]
test r13b, r13b
setne al
inc eax
cdqe
lea rdi, [rax*8]
imul rcx, rdi
mov qword [rsp + 0x50], rdi
call fcn.1400997a8
mov qword [rsp + 0x60], rax
mov r14, rax
test rax, rax
jne 0x140041de8
lea r9, [0x1400bdf7c]
xor r8d, r8d
lea rdx, [0x1400d1750]
mov rcx, r12
call fcn.1400310e0
mov r15d, eax
jmp 0x140042207
mov rdx, qword [0x1400f7220]
xor ecx, ecx
movzx r12d, byte [rsp + 0xd8]
mov rbx, rax
mov qword [rax], rbp
mov r13d, ecx
cmp word [rbp], cx
je 0x140041e8e
movzx eax, word [rsp + 0x30]
cmp word [rbp], ax
jne 0x140041e83
inc r13
mov word [rbp], cx
test r12b, r12b
je 0x140041e74
sub dword [0x1400ef454], 1
jne 0x140041e39
call fcn.140013c20
mov rdx, qword [0x1400f7220]
mov ecx, dword [rdx]
mov eax, ecx
shr eax, 0xb
add rdx, 4
xor ecx, eax
mov qword [0x1400f7220], rdx
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 qword [rbx + 8], rax
xor ecx, ecx
lea rax, [rbp + 2]
add rbx, rdi
mov qword [rbx], rax
movzx eax, word [rsp + 0x30]
add rbp, 2
cmp word [rbp], 0
jne 0x140041e12
cmp byte [rsp + 0xd0], 0
jne 0x140041eee
inc r13
test r12b, r12b
je 0x140041eee
sub dword [0x1400ef454], 1
jne 0x140041eb5
call fcn.140013c20
mov rdx, qword [0x1400f7220]
mov ecx, dword [rdx]
mov eax, ecx
shr eax, 0xb
add rdx, 4
xor ecx, eax
mov qword [0x1400f7220], rdx
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 qword [rbx + 8], rax
cmp qword [0x1400f1738], 0
je 0x140041f01
lea r9, [0x1400417b0]
jmp 0x140041f26
test r12b, r12b
je 0x140041f0f
lea r9, [0x1400417a0]
jmp 0x140041f26
cmp byte [rsp + 0x34], 0
lea r9, [0x140041570]
lea rax, [0x1400416f0]
cmovne r9, rax
mov r8, rdi
mov rdx, r13
mov rcx, r14
call fcn.14009bea0
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8, rsi
xor edx, edx
mov rcx, r15
call fcn.14007d4e0
cmp eax, 1
je 0x140041f58
xor eax, eax
mov r15d, eax
jmp 0x140042207
xor eax, eax
lea rdi, [r13 - 1]
xor r8d, r8d
mov rcx, r15
mov r12d, eax
mov esi, eax
lea edx, [rax + 1]
call fcn.1400015b0
xor r8d, r8d
mov rbx, rax
mov ebp, r8d
test r13, r13
je 0x14004207f
movzx r15d, word [rsp + 0x30]
movaps xmmword [rsp + 0x70], xmm6
nop
cmp byte [rsp + 0x33], 0
je 0x140042026
test rsi, rsi
je 0x140042026
cmp byte [0x1400f17f4], 0
je 0x1400420b3
cmp dword [0x1400f1734], 0
jne 0x1400420b3
mov rdi, qword [r14]
mov rcx, rdi
call fcn.14000e2e0
mov rcx, rdi
test al, al
je 0x140041fe5
xor edx, edx
lea r8d, [rdx + 0x10]
call fcn.14009d610
xorps xmm6, xmm6
cvtsi2sd xmm6, rax
jmp 0x140041fed
call fcn.1400a13f0
movaps xmm6, xmm0
mov rcx, rsi
call fcn.14000e2e0
mov rcx, rsi
test al, al
je 0x140042011
xor edx, edx
lea r8d, [rdx + 0x10]
call fcn.14009d610
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
jmp 0x140042016
call fcn.1400a13f0
ucomisd xmm6, xmm0
jp 0x140042022
je 0x14004210e
lea rdi, [r13 - 1]
mov rax, qword [r14]
movzx ecx, word [rax]
test cx, cx
je 0x140042044
mov word [rbx], cx
lea rax, [rax + 2]
movzx ecx, word [rax]
add rbx, 2
test cx, cx
jne 0x140042031
cmp rbp, rdi
jb 0x140042053
cmp byte [rsp + 0xd0], 0
je 0x14004205b
mov word [rbx], r15w
add rbx, 2
mov rsi, qword [r14]
add r14, qword [rsp + 0x50]
inc rbp
mov r8d, 0
cmp rbp, r13
jb 0x140041f90
mov r15, qword [rsp + 0x58]
movaps xmm6, xmmword [rsp + 0x70]
mov rcx, qword [rsp + 0x60]
call fcn.14009d6d0
xor eax, eax
lea rdi, [0x1400f7258]
cmp byte [rsp + 0x32], al
je 0x14004215f
mov word [rbx - 4], ax
cmp byte [r15 + 0x23], al
jne 0x140042135
mov rbx, qword [r15 + 0x10]
jmp 0x140042138
cmp byte [0x1400f17f5], 0
mov rdx, rsi
jne 0x1400420c9
mov rcx, qword [r14]
call fcn.140099630
jmp 0x1400420ff
cmp byte [0x1400f17f5], 2
jne 0x1400420dd
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x1400420ff
mov rax, qword [r14]
sub rdx, rax
movzx ecx, word [rax]
cmp cx, word [rax + rdx]
jne 0x1400420fa
add rax, 2
test cx, cx
jne 0x1400420e3
mov eax, r8d
jmp 0x1400420ff
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
jne 0x140042026
jmp 0x140042112
lea rdi, [r13 - 1]
inc r12d
cmp rbp, rdi
jne 0x14004205e
cmp byte [rsp + 0xd0], 0
jne 0x14004205e
sub rbx, 2
jmp 0x14004205e
mov rbx, r15
cmp byte [rbx + 0x23], 1
jne 0x140042156
test byte [rbx + 0x21], 8
je 0x14004214c
mov rcx, rbx
call fcn.140001500
add rbx, 0x10
add qword [rbx], 0xfffffffffffffffc
jmp 0x140042162
mov rbx, rdi
add qword [rbx], 0xfffffffffffffffc
jmp 0x140042162
mov word [rbx], ax
cmp byte [rsp + 0x33], 0
je 0x1400421cf
test r12d, r12d
je 0x1400421cf
xor r8d, r8d
mov rcx, r15
lea edx, [r8 + 1]
call fcn.1400015b0
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140042181
cmp byte [r15 + 0x23], 0
mov qword [rsp + 0xd0], rcx
jne 0x1400421a0
mov rbx, qword [r15 + 0x10]
jmp 0x1400421a3
mov rbx, r15
cmp byte [rbx + 0x23], 1
jne 0x1400421c3
test byte [rbx + 0x21], 8
je 0x1400421bf
mov rcx, rbx
call fcn.140001500
mov rcx, qword [rsp + 0xd0]
lea rdi, [rbx + 0x10]
lea rax, [rcx + rcx]
mov dword [rsp + 0x40], r12d
mov qword [rdi], rax
cmp byte [r15 + 0x23], 0
jne 0x1400421da
mov r15, qword [r15 + 0x10]
cmp byte [r15 + 0x23], 2
jne 0x1400421fc
cmp qword [0x1400f6610], 0
je 0x1400421fc
lea rcx, [0x1400f65f8]
call fcn.140004cf0
mov r15d, eax
jmp 0x140042207
and byte [r15 + 0x21], 0x86
mov r15d, 1
mov r14, qword [rsp + 0x38]
mov eax, dword [rsp + 0x40]
mov r13, qword [rsp + 0x80]
mov r12, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xc0]
cmp eax, 0xffffffff
je 0x140042256
mov rcx, qword [0x1400f1518]
mov edx, eax
mov r8b, reloc.OLEAUT32.dll_SafeArrayGetElement
call fcn.140001460
test r14, r14
je 0x140042263
mov rcx, r14
call fcn.14009d6d0
mov rax, qword [rsp + 0x48]
mov qword [0x1400f1738], rax
mov eax, r15d
add rsp, 0xa8
pop r15
pop r14
ret