Function at 0x14019fb40
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov qword [rsp + 0xa0], rcx
mov rsi, rdx
mov ebx, r8d
mov qword [rsp + 0xb8], r9
mov dword [r9], 0
test rdx, rdx
je 0x1401a00a8
test r8d, r8d
je 0x1401a00a8
mov eax, dword [rsp + 0xc0]
mov edi, dword [rsp + 0xc0]
sub eax, 1
lea edx, [rdi + 0x23]
cmp eax, 0x2000
mov eax, 0x2000
cmovb rax, rdx
mov rcx, rax
mov r15, rax
call fcn.1400d2260
mov r13, rax
test rax, rax
je 0x1401a00a8
mov rax, qword [rsp + 0xa0]
mov r8d, dword [rax + 0x10]
cmp r8, 0x7f
jbe 0x1401a00e6
mov rcx, r8
xor edx, edx
nop dword [rax + rax]
mov r9d, ecx
mov rax, rdx
shr rcx, 7
add rdx, 1
or r9d, 0xffffff80
mov byte [r13 + rdx - 1], r9b
cmp rcx, 0x7f
ja 0x14019fbd8
add rax, 2
add rdx, r13
mov r9, rax
mov r10d, ebx
mov byte [rdx], cl
mov rdx, r10
cmp ebx, 0x7f
jbe 0x14019fc2b
nop dword [rax]
mov ecx, edx
add rax, 1
shr rdx, 7
or ecx, 0xffffff80
mov r9, rax
mov byte [r13 + rax - 1], cl
cmp rdx, 0x7f
ja 0x14019fc10
mov rdi, qword [rsp + 0xa0]
lea rcx, [rsi + r10]
mov byte [r13 + r9], dl
mov qword [rsp + 0x38], rcx
mov rdi, qword [rdi + 8]
mov qword [rsp + 0x40], rdi
add rdi, r8
mov qword [rsp + 0x30], rdi
lea rdi, [rax + 2]
cmp rsi, rcx
jae 0x1401a005f
movzx ebx, byte [rsi]
add rsi, 1
lea rdi, [rax + 3]
mov r14d, 1
mov byte [r13 + rax + 2], bl
cmp rsi, rcx
jb 0x14019fc85
jmp 0x1401a0051
cmp rsi, rcx
jae 0x14019fcb3
movzx eax, byte [rsi]
mov edx, ebx
add rdi, 1
shl ebx, 8
shr edx, 0x17
add r14d, 1
add rsi, 1
or ebx, eax
mov byte [r13 + rdi - 1], al
lea rax, [0x140202480]
xor ebx, dword [rax + rdx*4]
cmp r14d, 0xf
jbe 0x14019fc80
mov rax, qword [rsp + 0x38]
cmp rsi, rax
jae 0x1401a0051
xor ebp, ebp
xor r12d, r12d
jmp 0x14019fe31
test r14d, r14d
jne 0x14019ff64
mov rax, r12
mov r11, r12
mov r9, r12
mov rcx, rdi
and eax, 0xff0000
movzx r14d, r12b
mov r10, r12
add rdi, 1
mov qword [rsp + 0x28], rax
and r11d, 0xff00
mov rax, rbp
and r9d, 0xff000000
mov edx, 0x10000
lea r8, [r13 + rcx]
cmp rax, rdx
cmovae rdx, rax
lea ebp, [rdx - 0x10000]
mov edx, pe_nt_image_headers64
sub rax, rbp
test r14, r14
je 0x14019fd3d
mov byte [r13 + rdi], r12b
mov edx, 0x81
lea rdi, [rcx + 2]
test r11, r11
je 0x14019fd54
mov rcx, r12
or edx, 2
movzx ecx, ch
mov byte [r13 + rdi], cl
add rdi, 1
cmp qword [rsp + 0x28], 0
je 0x14019fd6f
mov rcx, r12
or edx, 4
sar rcx, 0x10
mov byte [r13 + rdi], cl
add rdi, 1
test r9, r9
je 0x14019fd84
sar r12, 0x18
or edx, 8
mov byte [r13 + rdi], r12b
add rdi, 1
test al, al
je 0x14019fd94
mov byte [r13 + rdi], al
or edx, 0x10
add rdi, 1
test ah, 0xff
je 0x14019fda8
movzx ecx, ah
or edx, 0x20
mov byte [r13 + rdi], cl
add rdi, 1
add rsi, rax
lea r12, [rax + r10]
mov eax, 0xffffffff
mov byte [r8], dl
cmp r12, rax
jg 0x14019ffe0
xor r14d, r14d
cmp rbp, 0xfff
jbe 0x14019ffe2
lea rax, [r15 - 0x22]
cmp rdi, rax
jb 0x14019fe23
mov edx, dword [rsp + 0xc0]
lea r15, [r15 + r15*2]
shr r15, 1
test edx, edx
je 0x14019fe0c
mov eax, dword [rsp + 0xc0]
mov edx, dword [rsp + 0xc0]
add edx, 0x23
cmp r15, rax
cmovae r15, rdx
cmp rax, rdi
jl 0x1401a0088
mov rdx, r15
mov rcx, r13
call fcn.1400d2e90
test rax, rax
je 0x1401a00a0
mov r13, rax
mov rax, qword [rsp + 0x38]
cmp rsi, rax
jae 0x1401a004c
cmp rbp, 0xfff
ja 0x14019fcd0
movzx eax, byte [rsi - 0x10]
lea rdx, [0x140202080]
mov r11, qword [rsp + 0xa0]
xor ebx, dword [rdx + rax*4]
movzx eax, byte [rsi]
mov ecx, ebx
shr ebx, 0x17
shl ecx, 8
mov edx, eax
or eax, ecx
lea rcx, [0x140202480]
xor eax, dword [rcx + rbx*4]
mov rcx, qword [rsp + 0xa0]
mov ebx, eax
and eax, dword [rcx + 0x14]
mov ecx, eax
add eax, 1
mov rcx, qword [r11 + rcx*8 + 0x18]
mov r10, qword [r11 + rax*8 + 0x18]
cmp rcx, r10
jae 0x14019ff2d
mov r11, qword [rsp + 0x38]
mov byte [rsp + 0x4f], dl
sub r11, rsi
jmp 0x14019fea9
add rcx, 0x10
cmp rcx, r10
jae 0x14019ff28
cmp dword [rcx + 8], ebx
jne 0x14019fea0
mov r9, qword [rcx]
mov r8, qword [rsp + 0x30]
sub r8, r9
mov eax, r8d
cmp r11, rax
jge 0x14019fec7
mov rax, r11
mov r8, r11
cmp rbp, rax
jae 0x14019ff28
mov r8d, r8d
mov qword [rsp + 0x28], rcx
mov rdx, rsi
mov rax, r9
add r8, r9
jmp 0x14019fee9
add rax, 1
cmp rax, r8
je 0x14019fef5
add rdx, 1
movzx ecx, byte [rax]
cmp byte [rdx - 1], cl
je 0x14019fee0
sub rax, r9
mov rcx, qword [rsp + 0x28]
cmp rbp, rax
jae 0x14019fea0
mov rdx, qword [rsp + 0x40]
mov rbp, rax
sub r9, rdx
mov r12, r9
cmp rax, 0xfff
ja 0x14019fcd0
add rcx, 0x10
cmp rcx, r10
jb 0x14019fea9
nop dword [rax]
movzx edx, byte [rsp + 0x4f]
cmp rbp, 3
ja 0x14019fcd0
lea rax, [rdi + 1]
add rsi, 1
test r14d, r14d
jne 0x1401a0020
mov byte [r13 + rax], dl
add rdi, 2
mov r14d, 1
xor ebp, ebp
jmp 0x14019fdd0
mov rbp, rax
mov rdi, r8
test r12, r12
je 0x1401a00b6
mov rax, qword [rsp + 0x40]
movzx edx, byte [rsi - 1]
mov r10, r12
cmp byte [rax + r12 - 1], dl
jne 0x1401a00fc
lea rax, [rbp + 1]
sub r12, 1
lea r8, [rdi - 1]
sub rsi, 1
sub r14d, 1
jne 0x14019ff5e
lea rcx, [rdi - 2]
mov rdi, r12
mov r11, r12
mov r9, r12
and edi, 0xff0000
movzx r14d, r12b
mov r10, r12
and r11d, 0xff00
mov qword [rsp + 0x28], rdi
and r9d, 0xff000000
mov rdi, r8
mov edx, 0xffffffff
mov byte [r13 + r8 - 1], dl
jmp 0x14019fd0b
xor ebp, ebp
movzx ebx, byte [rsi - 0x10]
lea rax, [rsi - 0xf]
nop word [rax + rax]
movzx ecx, byte [rax]
mov edx, ebx
shl ebx, 8
add rax, 1
shr edx, 0x17
or ebx, ecx
lea rcx, [0x140202480]
xor ebx, dword [rcx + rdx*4]
cmp rax, rsi
jne 0x14019fff0
xor r14d, r14d
jmp 0x14019fdd0
add r14d, 1
mov byte [r13 + rdi], dl
cmp r14d, 0x7f
jne 0x1401a0042
mov byte [r13 + rdi - 0x7f], 0x7f
xor r14d, r14d
mov rdi, rax
xor ebp, ebp
jmp 0x14019fdd0
mov rdi, rax
xor ebp, ebp
jmp 0x14019fdd0
test r14d, r14d
je 0x1401a005f
movsxd rdx, r14d
mov rax, rdi
sub rax, rdx
mov byte [r13 + rax - 1], r14b
mov eax, dword [rsp + 0xc0]
test eax, eax
jne 0x1401a00ad
mov rax, qword [rsp + 0xb8]
mov dword [rax], edi
mov rax, r13
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test r14d, r14d
je 0x1401a00a0
movsxd rcx, r14d
mov rdx, rdi
sub rdx, rcx
mov byte [r13 + rdx - 1], r14b
cmp rax, rdi
jge 0x1401a006a
mov rcx, r13
call fcn.1400d2670
xor r13d, r13d
jmp 0x1401a0074
mov eax, dword [rsp + 0xc0]
jmp 0x1401a009b
movsxd rax, r14d
mov r8, rdi
mov edx, r14d
mov rcx, rdi
sub r8, rax
xor r9d, r9d
xor r11d, r11d
xor r14d, r14d
mov qword [rsp + 0x28], 0
mov rax, rbp
add rdi, 1
xor r10d, r10d
jmp 0x14019ffcf
mov rdx, r13
mov rcx, r8
mov r9d, 1
mov eax, 1
jmp 0x14019fbff
movsxd rax, r14d
mov r8, rdi
mov r11, r12
mov r9, r12
sub r8, rax
mov rax, r12
mov edx, r14d
mov rcx, rdi
and eax, 0xff0000
movzx r14d, r12b
add rdi, 1
and r11d, 0xff00
mov qword [rsp + 0x28], rax
and r9d, 0xff000000
mov rax, rbp
jmp 0x14019ffcf