Function at 0x14003ea90
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x30
mov rdi, r8
mov rsi, rcx
test r8, r8
je 0x14003ed72
test dil, 7
jne 0x14003ed72
mov qword [rsp + 0x50], rbx
cmp r9d, 1
jne 0x14003ebb7
mov eax, dword [rcx + 0xc]
mov qword [rsp + 0x58], r14
mov r14d, dword [rcx + 8]
mov dword [rbp - 0x10], r14d
mov dword [rbp - 0xc], eax
cmp r8, 8
jb 0x14003ed60
mov rax, qword [rbp - 0x10]
lea rbx, [rdx + 7]
shr rdi, 3
nop dword [rax]
movzx ecx, byte [rbx - 4]
movzx edx, byte [rbx - 2]
movzx r10d, byte [rbx - 7]
movzx r9d, byte [rbx - 6]
movzx r8d, byte [rbx - 5]
movzx r11d, byte [rbx - 3]
shl r8d, 8
shl edx, 8
shl r10d, 0x18
or ecx, r10d
shl r9d, 0x10
or ecx, r9d
shl r11d, 0x18
or ecx, r8d
shr rax, 0x20
movzx r8d, byte [rbx - 1]
xor ecx, r14d
or r8d, edx
mov dword [rbp + 0x30], ecx
movzx ecx, byte [rbx]
lea rdx, [rbp + 0x30]
shl r8d, 8
or r8d, ecx
mov rcx, rsi
or r8d, r11d
xor r8d, eax
mov dword [rbp + 0x34], r8d
call fcn.14003e650
mov rax, qword [rbp + 0x30]
lea rbx, [rbx + 8]
mov edx, dword [rbp + 0x34]
movzx ecx, byte [rbp + 0x34]
mov byte [rbx - 8], cl
mov ecx, edx
shr ecx, 8
mov byte [rbx - 9], cl
mov ecx, edx
shr ecx, 0x10
mov byte [rbx - 0xa], cl
movzx ecx, al
shr edx, 0x18
mov ecx, eax
shr ecx, 8
mov byte [rbx - 0xd], cl
mov ecx, eax
mov byte [rbx - 0xb], dl
mov edx, eax
shr ecx, 0x10
shr edx, 0x18
mov qword [rbp - 0x10], rax
mov byte [rbx - 0xc], al
mov byte [rbx - 0xe], cl
mov byte [rbx - 0xf], dl
sub rdi, 1
je 0x14003ed60
mov r14d, dword [rbp - 0x10]
jmp 0x14003eaf0
cmp r9d, 2
jne 0x14003eca1
mov eax, dword [rcx + 8]
mov dword [rbp - 0x10], eax
mov eax, dword [rcx + 0xc]
mov dword [rbp - 0xc], eax
cmp rdi, 8
jb 0x14003ed65
lea rbx, [rdx + 7]
shr rdi, 3
nop
lea rdx, [rbp - 0x10]
mov rcx, rsi
call fcn.14003e650
movzx eax, byte [rbx - 5]
movzx r8d, byte [rbx - 7]
movzx edx, byte [rbx - 6]
movzx r10d, byte [rbx - 4]
movzx ecx, byte [rbx - 2]
movzx r9d, byte [rbx - 3]
lea rbx, [rbx + 8]
shl eax, 8
shl edx, 0x10
shl r8d, 0x18
or r10d, r8d
shl ecx, 8
or r10d, edx
shl r9d, 0x18
movzx edx, byte [rbx - 9]
or r10d, eax
movzx eax, byte [rbx - 8]
or edx, ecx
xor r10d, dword [rbp - 0x10]
shl edx, 8
or edx, eax
mov dword [rbp + 0x30], r10d
or edx, r9d
xor edx, dword [rbp - 0xc]
mov dword [rbp + 0x34], edx
mov rax, qword [rbp + 0x30]
mov qword [rbp - 0x10], rax
movzx eax, dl
mov eax, edx
mov byte [rbx - 8], dl
shr eax, 8
mov byte [rbx - 9], al
mov eax, edx
shr eax, 0x10
mov byte [rbx - 0xa], al
movzx eax, r10b
mov byte [rbx - 0xc], al
mov eax, r10d
shr eax, 8
mov byte [rbx - 0xd], al
mov eax, r10d
shr eax, 0x10
shr edx, 0x18
shr r10d, 0x18
mov byte [rbx - 0xb], dl
mov byte [rbx - 0xe], al
mov byte [rbx - 0xf], r10b
sub rdi, 1
jne 0x14003ebe0
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
cmp rdi, 8
jb 0x14003ed65
lea rbx, [rdx + 7]
shr rdi, 3
movzx ecx, byte [rbx - 4]
movzx edx, byte [rbx - 6]
movzx eax, byte [rbx - 5]
movzx r8d, byte [rbx - 7]
shl eax, 8
or ecx, eax
shl edx, 0x10
movzx eax, byte [rbx - 2]
shl eax, 8
shl r8d, 0x18
or ecx, r8d
or ecx, edx
movzx edx, byte [rbx - 3]
mov dword [rbp + 0x30], ecx
movzx ecx, byte [rbx - 1]
or ecx, eax
shl edx, 0x18
movzx eax, byte [rbx]
shl ecx, 8
or ecx, eax
or ecx, edx
lea rdx, [rbp + 0x30]
mov dword [rbp + 0x34], ecx
mov rcx, rsi
call fcn.14003e650
mov ecx, dword [rbp + 0x34]
lea rbx, [rbx + 8]
movzx eax, byte [rbp + 0x34]
mov byte [rbx - 8], al
mov eax, ecx
shr eax, 8
mov byte [rbx - 9], al
mov eax, ecx
shr eax, 0x10
mov byte [rbx - 0xa], al
movzx eax, byte [rbp + 0x30]
shr ecx, 0x18
mov byte [rbx - 0xc], al
mov byte [rbx - 0xb], cl
mov ecx, dword [rbp + 0x30]
mov eax, ecx
shr eax, 8
mov byte [rbx - 0xd], al
mov eax, ecx
shr eax, 0x10
shr ecx, 0x18
mov byte [rbx - 0xe], al
mov byte [rbx - 0xf], cl
sub rdi, 1
jne 0x14003ecb3
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
mov r14, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
lea rax, str.Incorrect_buffer_length
lea rdx, [0x140080598]
mov qword [rbp + 0x30], rax
lea rcx, [rbp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3