Function at 0x140004850
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1540]
mov eax, 0x1640
call fcn.140014100
sub rsp, rax
movaps xmmword [rsp + 0x1630], xmm6
movaps xmmword [rsp + 0x1620], xmm7
mov rax, qword [0x1403ae348]
xor rax, rsp
mov qword [rbp + 0x1510], rax
xor r15d, r15d
lea rcx, [rbp + 0xa8]
call fcn.140008360
mov rdi, rax
xorps xmm0, xmm0
movups xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], r15
mov qword [rbp + 0x38], r15
mov rsi, qword [rax + 0x10]
cmp qword [rax + 0x18], 8
jb 0x1400048cd
mov rdi, qword [rax]
movabs rbx, 0x7ffffffffffffffe
cmp rsi, rbx
ja 0x1400052fb
mov qword [rbp + 0x38], 7
cmp rsi, 8
jae 0x140004906
mov qword [rbp + 0x30], rsi
mov r8d, 0x10
mov rdx, rdi
lea rcx, [rbp + 0x20]
call fcn.140015d00
jmp 0x14000494e
mov rax, rsi
or rax, 7
cmp rax, rbx
ja 0x140004921
mov rbx, rax
mov ecx, 0xa
cmp rax, rcx
cmovb rbx, rcx
lea rdx, [rbx + 1]
lea rcx, [rbp + 0x20]
call fcn.140003090
mov qword [rbp + 0x20], rax
mov qword [rbp + 0x30], rsi
mov qword [rbp + 0x38], rbx
lea r8, [rsi*2 + 2]
mov rdx, rdi
mov rcx, rax
call fcn.140015d00
nop
lea rcx, [rbp + 0xa8]
call fcn.140002f40
xorps xmm0, xmm0
movups xmmword [rbp + 0x40], xmm0
mov qword [rbp + 0x50], r15
mov qword [rbp + 0x58], 7
mov word [rbp + 0x40], r15w
movups xmmword [rbp + 0xc8], xmm0
movdqa xmm7, xmmword [0x14039e2a0]
movdqu xmmword [rbp + 0xd8], xmm7
mov word [rbp + 0xc8], r15w
movups xmmword [rbp + 0xa8], xmm0
movdqa xmm6, xmm7
movdqu xmmword [rbp + 0xb8], xmm7
mov word [rbp + 0xa8], r15w
mov edi, r15d
mov dword [rsp + 0x20], r15d
xor eax, eax
movups xmmword [rbp + 0x160], xmm0
mov qword [rbp + 0x170], rax
lea edx, [rax + 0x30]
lea r8d, [rax + 1]
lea rcx, [rbp + 0x160]
call fcn.140003bb0
nop
mov rsi, qword [rbp + 0x160]
mov r12, qword [rbp + 0x168]
mov qword [rsp + 0x28], r12
mov rbx, 0xffffffffffffffff
cmp rsi, r12
mov qword [rsp + 0x30], rsi
je 0x140004d7f
lea r10, [0x14039df30]
test edi, edi
jne 0x140004a9d
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x140004a1c
mov rdx, qword [rsi]
xorps xmm0, xmm0
movups xmmword [rbp + 0x10], xmm0
mov r8, r15
mov r9d, 8
nop dword [rax]
mov rax, r8
and eax, 3
lea rcx, [r10 + rax*2]
movzx eax, word [r10 + r8*2 + 8]
xor ax, word [rcx]
mov word [rbp + r8*2 + 0x10], ax
inc r8
sub r9, 1
jne 0x140004a30
movaps xmm0, xmmword [rbp + 0x10]
movdqa xmmword [rbp + 0x10], xmm0
psrldq xmm0, 8
movq rax, xmm0
shr rax, 0x30
mov rcx, r15
test eax, eax
setne cl
add rcx, 7
cmp rcx, qword [rsi + 0x10]
jne 0x140004a9d
lea r8, [rbp + 0x10]
sub r8, rdx
movzx eax, word [r8 + rdx]
cmp ax, word [rdx]
jne 0x140004a9d
add rdx, 2
sub rcx, 1
jne 0x140004a82
mov eax, dword [rsi + 0x54]
mov dword [rsp + 0x20], eax
xorps xmm0, xmm0
movups xmmword [rbp + 0x80], xmm0
movups xmmword [rbp + 0x90], xmm0
mov qword [rbp + 0x80], r15
movups xmmword [rbp + 0x88], xmm0
mov qword [rbp + 0x98], r15
mov qword [rbp + 0xa0], 7
mov word [rbp + 0x88], r15w
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x140004aee
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x140004af1
mov rax, qword [rsi]
jmp 0x140004af1
mov rax, r15
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rcx
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rbp + 0x10], xmm0
mov r8d, 0x80000000
lea rdx, [rbp + 0x10]
lea rcx, [rbp + 0x80]
call fcn.140007fe0
nop
lea rdx, [rbp + 0x60]
lea rcx, [rbp + 0x80]
call fcn.140007550
nop
lea rcx, [rbp + 0x20]
cmp qword [rbp + 0x38], 8
cmovae rcx, qword [rbp + 0x20]
mov qword [rbp + 0x10], rcx
mov r15, qword [rbp + 0x30]
lea r14, [rbp + 0x60]
cmp qword [rbp + 0x78], 8
cmovae r14, qword [rbp + 0x60]
mov r13, rbx
cmp qword [rbp + 0x70], 0xffffffffffffffff
cmovb r13, qword [rbp + 0x70]
cmp r15, r13
ja 0x140005271
jne 0x140004bc1
xor r15d, r15d
mov edi, r15d
test r13, r13
je 0x140004bb0
sub rcx, r14
mov qword [rbp + 0x10], rcx
nop dword [rax + rax]
movzx ecx, word [rcx + r14]
call fcn.14001c914
mov ebx, eax
movzx ecx, word [r14]
call fcn.14001c914
cmp eax, ebx
jne 0x140004bb5
inc rdi
add r14, 2
cmp rdi, r13
mov rcx, qword [rbp + 0x10]
jb 0x140004b80
mov rbx, 0xffffffffffffffff
mov r12, r15
jmp 0x140004c27
mov rbx, 0xffffffffffffffff
mov r12, rbx
jmp 0x140004c27
xor r12d, r12d
test r13, r13
je 0x14000526c
sub r14, rcx
mov rax, r13
sub rax, r12
cmp rax, r15
jb 0x140005265
xor esi, esi
test r15, r15
je 0x140004c18
mov rbx, rcx
nop dword [rax]
movzx ecx, word [r14 + rbx]
call fcn.14001c914
mov edi, eax
movzx ecx, word [rbx]
call fcn.14001c914
cmp edi, eax
jne 0x140005250
inc rsi
add rbx, 2
cmp rsi, r15
jb 0x140004bf0
mov rsi, qword [rsp + 0x30]
mov rbx, 0xffffffffffffffff
xor r15d, r15d
cmp r12, 0xffffffffffffffff
je 0x14000526c
lea rax, [rbp + 0x40]
cmp rax, rsi
je 0x140004c54
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x140004c47
mov rdx, qword [rsi]
mov r8, qword [rsi + 0x10]
lea rcx, [rbp + 0x40]
call fcn.140003190
lea rdx, [rsi + 0x20]
lea rax, [rbp + 0xc8]
cmp rax, rdx
je 0x140004c86
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 8
jb 0x140004c72
mov rdx, qword [rdx]
lea rcx, [rbp + 0xc8]
call fcn.140003190
movdqu xmm7, xmmword [rbp + 0xd8]
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x80]
call fcn.1400078a0
lea rcx, [rbp + 0xa8]
cmp rcx, rax
je 0x140004cc9
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0xa8], xmm0
movups xmm6, xmmword [rax + 0x10]
movdqu xmmword [rbp + 0xb8], xmm6
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], 7
mov word [rax], r15w
mov rdx, qword [rsp + 0x58]
cmp rdx, 8
jb 0x140004d0c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004d06
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140005301
call fcn.140013d94
nop
mov rdx, qword [rbp + 0x78]
cmp rdx, 8
jb 0x140004d4c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004d47
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140005334
call fcn.140013d94
mov qword [rbp + 0x70], r15
mov qword [rbp + 0x78], 7
mov word [rbp + 0x60], r15w
lea rcx, [rbp + 0x88]
call fcn.140002f40
mov rcx, qword [rbp + 0x80]
test rcx, rcx
je 0x140004d7b
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [rsp + 0x20]
cmp qword [rbp + 0x50], 0
je 0x140005307
xor edx, edx
mov r8d, 0xb0
lea rcx, [rsp + 0x60]
call fcn.1400163b0
lea rax, [0x14039e1d8]
mov qword [rsp + 0x60], rax
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], rax
movdqa xmm0, xmmword [0x14039e2a0]
movdqa xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r15w
xorps xmm0, xmm0
movups xmmword [rbp - 0x70], xmm0
movdqa xmm1, xmmword [0x14039e2a0]
movdqa xmmword [rbp - 0x60], xmm1
mov word [rbp - 0x70], r15w
movups xmmword [rbp - 0x50], xmm0
movdqa xmmword [rbp - 0x40], xmm1
mov word [rbp - 0x50], r15w
movups xmmword [rbp - 0x30], xmm0
movdqa xmmword [rbp - 0x20], xmm1
mov word [rbp - 0x30], r15w
mov dword [rbp - 0x10], r15d
mov qword [rbp - 8], r15
call fcn.1400136e0
mov qword [rbp], rax
call fcn.14001375c
mov r8d, 0xffffffff
mov dword [rbp + 0x1504], r8d
mov dword [rbp + 0x184], eax
mov edx, 1
nop dword [rax]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [rbp + rdx*4 + 0x184], eax
inc rdx
cmp rdx, 0x270
jb 0x140004e30
mov dword [rbp + 0x180], 0x270
lea rax, [rbp + 0x180]
mov qword [rsp + 0x40], rax
mov eax, 0x40
nop dword [rax]
dec rax
shr rbx, 1
cmp rbx, r8
ja 0x140004e70
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rbx
mov edx, 0x79
lea rcx, [rsp + 0x40]
call fcn.1400028c0
movabs rdx, 0x8000000000000168
add rdx, rax
movabs r8, 0x8000000000000000
lea rcx, [rdx + r8]
lea rax, [rdx + r8]
cmp rdx, r8
cmovae rax, rcx
mov qword [rbp + 8], rax
xorps xmm0, xmm0
movups xmmword [rbp + 0xf0], xmm0
movups xmmword [rbp + 0x100], xmm0
movups xmmword [rbp + 0x110], xmm0
movups xmmword [rbp + 0x120], xmm0
movups xmmword [rbp + 0x140], xmm0
movups xmmword [rbp + 0x150], xmm0
mov dword [rbp + 0xf0], 0x10
mov qword [rbp + 0xf4], 1
mov qword [rbp + 0xfc], 0
mov qword [rbp + 0x104], 0
mov qword [rbp + 0x110], r15
xor eax, eax
movups xmmword [rbp + 0x118], xmm0
mov qword [rbp + 0x128], rax
movdqa xmm0, xmmword [0x14039e2a0]
movdqa xmmword [rbp + 0x130], xmm0
mov word [rbp + 0x120], r15w
mov dword [rbp + 0x140], r15d
mov byte [rbp + 0x144], al
mov byte [rbp + 0x158], al
lea rdx, [rbp + 0x40]
cmp qword [rbp + 0x58], 8
cmovae rdx, qword [rbp + 0x40]
mov r8, qword [rbp + 0x50]
lea rcx, [rbp + 0x120]
call fcn.140003190
mov dword [rbp - 0x10], edi
lea rax, [rbp + 0xf0]
mov qword [rsp + 0x68], rax
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x140004fc6
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004fc1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000533a
call fcn.140013d94
movups xmm0, xmmword [rbp + 0x40]
movaps xmmword [rsp + 0x70], xmm0
movups xmm1, xmmword [rbp + 0x50]
movaps xmmword [rbp - 0x80], xmm1
mov qword [rbp + 0x50], r15
mov qword [rbp + 0x58], 7
mov word [rbp + 0x40], r15w
mov rdx, qword [rbp - 0x58]
cmp rdx, 8
jb 0x140005028
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005023
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000533a
call fcn.140013d94
movups xmm0, xmmword [rbp + 0x20]
movaps xmmword [rbp - 0x70], xmm0
movups xmm1, xmmword [rbp + 0x30]
movaps xmmword [rbp - 0x60], xmm1
mov qword [rbp + 0x30], r15
mov qword [rbp + 0x38], 7
mov word [rbp + 0x20], r15w
mov rdx, qword [rbp - 0x38]
cmp rdx, 8
jb 0x140005089
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005084
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000533a
call fcn.140013d94
movups xmm0, xmmword [rbp + 0xc8]
movaps xmmword [rbp - 0x50], xmm0
movaps xmmword [rbp - 0x40], xmm7
movdqa xmm0, xmmword [0x14039e2a0]
movdqu xmmword [rbp + 0xd8], xmm0
mov word [rbp + 0xc8], r15w
mov rdx, qword [rbp - 0x18]
cmp rdx, 8
jb 0x1400050f0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400050eb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000533a
call fcn.140013d94
movups xmm0, xmmword [rbp + 0xa8]
movaps xmmword [rbp - 0x30], xmm0
movaps xmmword [rbp - 0x20], xmm6
movdqa xmm0, xmmword [0x14039e2a0]
movdqu xmmword [rbp + 0xb8], xmm0
mov word [rbp + 0xa8], r15w
lea rax, [rsp + 0x60]
mov qword [rbp + 0x118], rax
lea rcx, [rbp + 0xf0]
call fcn.140008220
nop
cmp byte [rbp + 0x158], 0
je 0x140005145
lea rcx, [rbp + 0x148]
call fcn.1400132cc
lea rcx, [rbp + 0x120]
call fcn.140002f40
nop
lea rcx, [rbp - 0x30]
call fcn.140002f40
lea rcx, [rbp - 0x50]
call fcn.140002f40
lea rcx, [rbp - 0x70]
call fcn.140002f40
lea rcx, [rsp + 0x70]
call fcn.140002f40
nop
lea rcx, [rbp + 0x160]
call fcn.1400026b0
nop
mov rdx, qword [rbp + 0x58]
cmp rdx, 8
jb 0x1400051c5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400051c0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140005340
call fcn.140013d94
mov qword [rbp + 0x50], r15
mov qword [rbp + 0x58], 7
mov word [rbp + 0x40], r15w
mov rdx, qword [rbp + 0x38]
cmp rdx, 8
jb 0x140005216
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005211
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400052f5
call fcn.140013d94
mov rcx, qword [rbp + 0x1510]
xor rcx, rsp
call fcn.140014160
lea r11, [rsp + 0x1640]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
inc r12
add r14, 2
cmp r12, r13
jae 0x140005265
mov rcx, qword [rbp + 0x10]
jmp 0x140004bd0
mov rbx, 0xffffffffffffffff
mov r12, qword [rsp + 0x28]
mov rdx, qword [rbp + 0x78]
cmp rdx, 8
jb 0x1400052b1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400052ac
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140005334
call fcn.140013d94
xor r15d, r15d
mov qword [rbp + 0x70], r15
mov qword [rbp + 0x78], 7
mov word [rbp + 0x60], r15w
lea rcx, [rbp + 0x88]
call fcn.140002f40
mov rcx, qword [rbp + 0x80]
test rcx, rcx
je 0x1400052e3
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x30]
add rsi, 0x60
mov edi, dword [rsp + 0x20]
jmp 0x1400049f2
call fcn.14001a534
nop
call fcn.140002fb0
nop
call fcn.14001a534
nop
call fcn.1400036f0
mov r8, rax
mov edx, 3
lea rcx, [rbp + 0x80]
call fcn.1400024f0
lea rdx, [0x1403ac748]
lea rcx, [rbp + 0x80]
call fcn.140014ea0
nop
call fcn.14001a534
nop
call fcn.14001a534
nop
call fcn.14001a534
int3