Function at 0x14031e1a0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push r12
push r13
lea rbp, [rsp - 0x78]
sub rsp, 0x178
mov rax, qword [0x1406836b8]
xor rax, rsp
mov qword [rbp + 8], rax
mov rax, qword [rbp + 0x98]
mov r12, rcx
mov qword [rbp - 0x70], rcx
mov r13, r8
mov rcx, qword [rcx]
mov rbx, rdx
mov qword [rbp - 0x68], r8
mov qword [rbp - 0x60], rdx
mov qword [rbp - 0x80], rax
test rcx, rcx
jne 0x14031e1f3
mov eax, 0x80004003
jmp 0x14031e7d3
cmp dword [rdx], 0
jne 0x14031e208
mov rax, qword [rcx]
call qword [rax + 0x10]
mov eax, 0x80070057
jmp 0x14031e7d3
xor edx, edx
mov qword [rsp + 0x1b8], rsi
mov rcx, r13
mov qword [rsp + 0x170], rdi
lea r8d, [rdx - 1]
call fcn.1403200a0
xor edi, edi
xor esi, esi
mov dword [rsp + 0x50], edi
cmp dword [rbx], esi
jle 0x14031e7b2
mov qword [rsp + 0x168], r14
lea r14, [0x14046ac18]
mov qword [rsp + 0x160], r15
xor r15d, r15d
movaps xmmword [rsp + 0x150], xmm6
movss xmm6, dword [0x1404521c8]
movaps xmmword [rsp + 0x140], xmm7
xorps xmm7, xmm7
movaps xmmword [rsp + 0x130], xmm8
movsd xmm8, qword [0x140453708]
movaps xmmword [rsp + 0x120], xmm9
movsd xmm9, qword [0x140451a60]
movaps xmmword [rsp + 0x110], xmm10
xorps xmm10, xmm10
mov qword [rbp - 0x58], r15
mov rcx, qword [r12]
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x54]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov esi, eax
test eax, eax
js 0x14031e761
mov rcx, qword [r12]
lea rdx, [rbp - 8]
xor eax, eax
mov qword [rbp - 8], rax
mov qword [rbp], rax
mov rax, qword [rcx]
call qword [rax + 0x20]
mov esi, eax
test eax, eax
js 0x14031e761
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 8]
call fcn.14031d970
test eax, eax
je 0x14031e75c
xor esi, esi
mov qword [rsp + 0x70], r14
lea ecx, [rax - 0x1c]
mov qword [rsp + 0x78], rsi
mov r14d, esi
cmp ecx, 1
jbe 0x14031e40d
mov rcx, qword [0x1406bbe78]
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x60], rsi
mov rax, qword [rcx]
call qword [rax + 0x50]
test eax, eax
js 0x14031e3fb
mov rcx, qword [rsp + 0x60]
lea r9, [rsp + 0x5c]
mov dword [rsp + 0x5c], esi
lea r8, [0x14046bd90]
lea rdx, [rbp - 8]
mov rax, qword [rcx]
call qword [rax + 0x48]
test eax, eax
js 0x14031e3fb
cmp dword [rsp + 0x5c], esi
je 0x14031e3fb
mov rcx, qword [rsp + 0x60]
lea r8, [0x14046bd90]
mov rdx, qword [r12]
xor r9d, r9d
mov dword [rsp + 0x30], esi
movsd qword [rsp + 0x28], xmm10
mov rax, qword [rcx]
mov qword [rsp + 0x20], rsi
call qword [rax + 0x40]
test eax, eax
js 0x14031e3fb
mov rbx, qword [rsp + 0x60]
test rbx, rbx
je 0x14031e3a0
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
mov rcx, qword [r12]
test rcx, rcx
je 0x14031e3af
mov rax, qword [rcx]
call qword [rax + 0x10]
mov r9, qword [rbp - 0x80]
mov ecx, 0x1c
mov r8d, dword [rsp + 0x58]
mov edx, dword [rsp + 0x54]
mov dword [rsp + 0x48], esi
mov qword [rsp + 0x40], rsi
mov dword [rsp + 0x38], esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
mov qword [r12], rbx
call fcn.1403287f0
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.14031f810
mov r14, qword [rsp + 0x78]
mov rbx, qword [rbp - 0x60]
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x14031e453
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x14031e453
mov r9, qword [rbp - 0x80]
mov ecx, eax
mov r8d, dword [rsp + 0x58]
mov edx, dword [rsp + 0x54]
mov dword [rsp + 0x48], esi
mov qword [rsp + 0x40], rsi
mov dword [rsp + 0x38], esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call fcn.1403287f0
test rax, rax
je 0x14031e740
mov qword [rsp + 0x78], rax
lock inc dword [rax + 8]
mov r14, qword [rsp + 0x78]
test r14, r14
je 0x14031e740
mov rcx, qword [rbx + 8]
xor eax, eax
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rax
movss xmm1, dword [r15 + rcx]
ucomiss xmm1, xmm7
jp 0x14031e4a5
jne 0x14031e4a5
movss xmm0, dword [r15 + rcx + 8]
ucomiss xmm0, xmm6
jp 0x14031e4a5
jne 0x14031e4a5
movss xmm0, dword [r15 + rcx + 4]
ucomiss xmm0, xmm7
jp 0x14031e4a5
jne 0x14031e4a5
movss xmm0, dword [r15 + rcx + 0xc]
ucomiss xmm0, xmm6
jp 0x14031e4a5
je 0x14031e552
mov eax, dword [rsp + 0x54]
lea rsi, [rbp - 0x18]
xorps xmm3, xmm3
xorps xmm2, xmm2
cvtsi2ss xmm3, rax
mulss xmm1, xmm3
cvtps2pd xmm0, xmm1
addsd xmm0, xmm8
addsd xmm0, xmm9
movsd qword [rbp - 0x48], xmm0
mov eax, dword [rbp - 0x48]
mov dword [rbp - 0x18], eax
mov eax, dword [rsp + 0x58]
cvtsi2ss xmm2, rax
movaps xmm0, xmm2
mulss xmm0, dword [r15 + rcx + 4]
cvtps2pd xmm1, xmm0
addsd xmm1, xmm8
addsd xmm1, xmm9
movsd qword [rbp - 0x40], xmm1
mov eax, dword [rbp - 0x40]
mov dword [rbp - 0x14], eax
movss xmm0, dword [r15 + rcx + 8]
subss xmm0, dword [r15 + rcx]
mulss xmm0, xmm3
cvtps2pd xmm1, xmm0
addsd xmm1, xmm8
addsd xmm1, xmm9
movsd qword [rbp - 0x38], xmm1
mov eax, dword [rbp - 0x38]
mov dword [rbp - 0x10], eax
movss xmm0, dword [r15 + rcx + 0xc]
subss xmm0, dword [r15 + rcx + 4]
mulss xmm0, xmm2
cvtps2pd xmm1, xmm0
addsd xmm1, xmm8
addsd xmm1, xmm9
movsd qword [rbp - 0x30], xmm1
mov eax, dword [rbp - 0x30]
mov dword [rbp - 0xc], eax
mov rbx, qword [r14 + 0x10]
mov rcx, r14
movzx edi, word [rbx + 0xe]
imul edi, dword [rbx + 4]
add edi, 0x1f
shr edi, 3
and edi, 0x1ffffffc
call fcn.1403201b0
mov rcx, qword [r12]
mov r8, rax
mov eax, dword [rbx + 8]
cdq
mov qword [rsp + 0x20], r8
mov r9d, eax
mov r10, qword [rcx]
xor r9d, edx
sub r9d, edx
imul r9d, edi
neg edi
mov eax, edi
cdq
xor eax, edx
sub eax, edx
mov rdx, rsi
mov r8d, eax
call qword [r10 + 0x38]
mov esi, eax
test eax, eax
js 0x14031e70c
mov rcx, qword [r14 + 0x10]
test rcx, rcx
je 0x14031e705
movzx eax, word [rcx + 0xe]
xor esi, esi
imul eax, dword [rcx + 4]
mov rcx, r14
mov dword [rsp + 0x6c], esi
add eax, 0x1f
shr eax, 3
and eax, 0x1ffffffc
neg eax
cdq
mov r13d, eax
xor r13d, edx
sub r13d, edx
call fcn.1403201b0
movsxd rdx, r13d
lea ecx, [rsi + 0x40]
mov rbx, rax
mov qword [rbp - 0x78], rax
call qword [0x140449860]
mov rcx, rax
call qword [0x140449850]
mov r12, rax
test rax, rax
jne 0x14031e617
mov esi, 0x8007000e
jmp 0x14031e6c5
mov rax, qword [r14 + 0x10]
mov eax, dword [rax + 8]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x14031e6a1
mov r15d, esi
mov eax, r15d
movsxd rdi, esi
not eax
movsxd r8, r13d
add eax, ecx
add rdi, rbx
imul eax, r13d
mov rdx, rdi
mov rcx, r12
movsxd rbx, eax
add rbx, qword [rbp - 0x78]
call fcn.14039e68d
movsxd r8, r13d
mov rdx, rbx
mov rcx, rdi
call fcn.14039e68d
movsxd r8, r13d
mov rdx, r12
mov rcx, rbx
call fcn.14039e68d
mov rax, qword [r14 + 0x10]
inc r15d
mov rbx, qword [rbp - 0x78]
add esi, r13d
mov eax, dword [rax + 8]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
cmp r15d, eax
jl 0x14031e633
mov esi, dword [rsp + 0x6c]
mov r15, qword [rbp - 0x58]
mov rcx, r12
call qword [0x140449848]
mov rcx, rax
call qword [0x140449858]
mov rcx, r12
call qword [0x140449848]
mov rcx, rax
call qword [0x140449840]
mov r13, qword [rbp - 0x68]
test esi, esi
js 0x14031e6e6
mov r8d, dword [r13]
lea rdx, [rsp + 0x70]
mov r9d, 1
mov rcx, r13
call fcn.1403207e0
mov esi, eax
mov r12, qword [rbp - 0x70]
lea r14, [0x14046ac18]
mov edi, dword [rsp + 0x50]
lea rcx, [rsp + 0x70]
call fcn.14031f670
mov rbx, qword [rbp - 0x60]
jmp 0x14031e761
mov esi, 0x80070057
jmp 0x14031e6ea
mov r8d, dword [r13]
lea r14, [0x14046ac18]
mov r9d, 1
mov qword [rbp - 0x28], r14
lea rdx, [rbp - 0x28]
mov qword [rbp - 0x20], 0
mov rcx, r13
call fcn.1403207e0
lea rcx, [rbp - 0x28]
call fcn.14031f670
jmp 0x14031e6f1
lea rcx, [rsp + 0x70]
mov esi, 0x8007000e
lea r14, [0x14046ac18]
call fcn.14031f670
mov rbx, qword [rbp - 0x60]
jmp 0x14031e761
mov esi, 0x8004e035
inc edi
add r15, 0x10
mov dword [rsp + 0x50], edi
mov qword [rbp - 0x58], r15
cmp edi, dword [rbx]
jl 0x14031e2a0
movaps xmm10, xmmword [rsp + 0x110]
movaps xmm9, xmmword [rsp + 0x120]
movaps xmm8, xmmword [rsp + 0x130]
movaps xmm7, xmmword [rsp + 0x140]
movaps xmm6, xmmword [rsp + 0x150]
mov r15, qword [rsp + 0x160]
mov r14, qword [rsp + 0x168]
mov rcx, qword [r12]
mov rdi, qword [rsp + 0x170]
test rcx, rcx
je 0x14031e7c9
mov rax, qword [rcx]
call qword [rax + 0x10]
mov eax, esi
mov rsi, qword [rsp + 0x1b8]
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.14039bbb0
add rsp, 0x178
pop r13
pop r12
pop rbx
pop rbp
ret