Function at 0x1401ba390
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov qword [rsp + 0xb0], rcx
mov rbp, rdx
mov ebx, r8d
mov qword [rsp + 0xc8], r9
mov dword [r9], 0
test rdx, rdx
je 0x1401baa00
test r8d, r8d
je 0x1401baa00
mov eax, dword [rsp + 0xd0]
mov edi, dword [rsp + 0xd0]
sub eax, 1
lea edx, [rdi + 0x23]
cmp eax, 0x2000
mov eax, 0x2000
cmovb rax, rdx
mov rcx, rax
mov qword [rsp + 0x30], rax
call fcn.1400eab00
mov r14, rax
test rax, rax
je 0x1401baa00
mov rax, qword [rsp + 0xb0]
mov r8d, dword [rax + 0x10]
cmp r8, 0x7f
jbe 0x1401baae8
mov rcx, r8
xor edx, edx
nop word cs:[rax + rax]
nop word cs:[rax + rax]
nop dword [rax + rax]
mov r9d, ecx
mov rax, rdx
shr rcx, 7
add rdx, 1
or r9d, 0xffffff80
mov byte [r14 + rdx - 1], r9b
cmp rcx, 0x7f
ja 0x1401ba440
add rax, 2
add rdx, r14
mov r9, rax
mov r10d, ebx
mov byte [rdx], cl
mov rdx, r10
cmp ebx, 0x7f
jbe 0x1401ba49b
nop word cs:[rax + rax]
nop
mov ecx, edx
add rax, 1
shr rdx, 7
or ecx, 0xffffff80
mov r9, rax
mov byte [r14 + rax - 1], cl
cmp rdx, 0x7f
ja 0x1401ba480
mov rdi, qword [rsp + 0xb0]
mov byte [r14 + r9], dl
mov rdi, qword [rdi + 8]
mov qword [rsp + 0x50], rdi
add rdi, r8
lea r8, [rbp + r10]
mov qword [rsp + 0x38], rdi
lea rdi, [rax + 2]
mov qword [rsp + 0x48], r8
cmp rbp, r8
jae 0x1401baa4f
movzx ebx, byte [rbp]
add rbp, 1
lea rdi, [rax + 3]
mov byte [r14 + rax + 2], bl
cmp rbp, r8
jae 0x1401baafe
mov ecx, 1
lea r15, [0x140228da0]
jmp 0x1401ba505
cmp rbp, r8
jae 0x1401ba52c
movzx eax, byte [rbp]
mov edx, ebx
add rdi, 1
shl ebx, 8
shr edx, 0x17
add ecx, 1
add rbp, 1
or ebx, eax
mov byte [r14 + rdi - 1], al
xor ebx, dword [r15 + rdx*4]
cmp ecx, 0x10
jne 0x1401ba500
mov rax, qword [rsp + 0x48]
mov r13d, ecx
cmp rbp, rax
jae 0x1401bab15
mov dword [rsp + 0x28], ebx
xor esi, esi
xor r12d, r12d
mov r8, r14
nop dword [rax]
mov rax, qword [rsp + 0x30]
sub rax, 0x22
mov qword [rsp + 0x40], rax
cmp rsi, 0xfff
jbe 0x1401ba6dd
mov ebx, dword [rsp + 0x28]
test r13d, r13d
jne 0x1401ba849
mov rax, r12
mov r14, r12
mov r9, r12
mov rcx, rdi
and eax, 0xff00
movzx r13d, r12b
mov r10, r12
add rdi, 1
mov rbx, rax
and r14d, 0xff0000
and r9d, 0xff000000
mov eax, 0x10000
lea r11, [r8 + rcx]
cmp rsi, rax
cmovae rax, rsi
lea edx, [rax - 0x10000]
mov eax, pe_nt_image_headers64
sub rsi, rdx
test r13, r13
je 0x1401ba5d5
mov byte [r8 + rdi], r12b
mov eax, 0x81
lea rdi, [rcx + 2]
test rbx, rbx
je 0x1401ba5ea
mov rbx, r8
mov rcx, r12
or eax, 2
mov byte [rbx + rdi], ch
add rdi, 1
test r14, r14
je 0x1401ba601
mov rcx, r12
or eax, 4
sar rcx, 0x10
mov byte [r8 + rdi], cl
add rdi, 1
test r9, r9
je 0x1401ba615
sar r12, 0x18
or eax, 8
mov byte [r8 + rdi], r12b
add rdi, 1
test sil, sil
je 0x1401ba625
mov byte [r8 + rdi], sil
or eax, 0x10
add rdi, 1
test esi, 0xff00
je 0x1401ba63d
mov rbx, r8
mov rcx, rsi
or eax, 0x20
mov byte [rbx + rdi], ch
add rdi, 1
mov byte [r11], al
lea r12, [rsi + r10]
mov eax, 0xffffffff
add rbp, rsi
cmp r12, rax
jg 0x1401ba688
mov rsi, rdx
cmp rdx, 0xfff
jbe 0x1401ba68a
mov rax, qword [rsp + 0x40]
cmp rdi, rax
jae 0x1401ba8c0
mov rax, qword [rsp + 0x48]
cmp rbp, rax
jae 0x1401baa4c
mov rsi, rdx
jmp 0x1401ba578
xor esi, esi
movzx eax, byte [rbp - 0x10]
mov ebx, eax
lea rax, [rbp - 0xf]
nop word cs:[rax + rax]
nop
movzx ecx, byte [rax]
mov edx, ebx
add rax, 1
shl ebx, 8
shr edx, 0x17
or ebx, ecx
xor ebx, dword [r15 + rdx*4]
cmp rax, rbp
jne 0x1401ba6a0
mov dword [rsp + 0x28], ebx
mov rbx, qword [rsp + 0x40]
xor r13d, r13d
cmp rdi, rbx
jae 0x1401ba8c3
mov rbx, qword [rsp + 0x48]
cmp rax, rbx
jae 0x1401baa44
mov ebx, dword [rsp + 0x28]
mov r9, qword [rsp + 0xb0]
movzx eax, byte [rbp - 0x10]
lea rcx, [0x1402289a0]
xor ebx, dword [rcx + rax*4]
movzx ecx, byte [rbp]
mov eax, ebx
shr ebx, 0x17
shl eax, 8
mov edx, ecx
or eax, ecx
xor eax, dword [r15 + rbx*4]
mov ebx, eax
and eax, dword [r9 + 0x14]
mov ecx, eax
add eax, 1
mov rcx, qword [r9 + rcx*8 + 0x18]
mov r11, qword [r9 + rax*8 + 0x18]
cmp rcx, r11
jae 0x1401ba7fa
mov r14, qword [rsp + 0x48]
mov byte [rsp + 0x5f], dl
mov dword [rsp + 0x58], r13d
sub r14, rbp
jmp 0x1401ba74d
add rcx, 0x10
cmp rcx, r11
jae 0x1401ba7f0
cmp dword [rcx + 8], ebx
jne 0x1401ba740
mov r13, qword [rcx]
mov r10, qword [rsp + 0x38]
sub r10, r13
mov eax, r10d
cmp r14, rax
jge 0x1401ba76b
mov rax, r14
mov r10, r14
cmp rsi, rax
jae 0x1401ba7f0
mov r10d, r10d
mov qword [rsp + 0x28], rcx
mov rdx, rbp
mov rax, r13
add r10, r13
jmp 0x1401ba7a9
add rax, 1
cmp r10, rax
je 0x1401ba7b5
add rdx, 1
movzx ecx, byte [rax]
cmp byte [rdx - 1], cl
je 0x1401ba7a0
sub rax, r13
mov rcx, qword [rsp + 0x28]
cmp rsi, rax
jae 0x1401ba740
mov rsi, qword [rsp + 0x50]
sub r13, rsi
mov r12, r13
cmp rax, 0xfff
ja 0x1401ba9db
add rcx, 0x10
mov rsi, rax
cmp rcx, r11
jb 0x1401ba74d
nop dword [rax]
movzx edx, byte [rsp + 0x5f]
mov r13d, dword [rsp + 0x58]
cmp rsi, 3
ja 0x1401ba93a
add rbp, 1
lea rax, [rdi + 1]
test r13d, r13d
jne 0x1401ba943
mov byte [r8 + rax], dl
mov rax, qword [rsp + 0x40]
add rdi, 2
cmp rdi, rax
jae 0x1401ba980
mov rax, qword [rsp + 0x48]
cmp rbp, rax
jae 0x1401bab0c
mov r13d, 1
xor esi, esi
jmp 0x1401ba6e9
mov rdi, rax
test r12, r12
je 0x1401baa6f
mov rax, qword [rsp + 0x50]
movzx ecx, byte [rbp - 1]
mov r10, r12
cmp byte [rax + r12 - 1], cl
jne 0x1401baaab
add rsi, 1
sub r12, 1
lea rax, [rdi - 1]
sub rbp, 1
sub r13d, 1
jne 0x1401ba846
lea rcx, [rdi - 2]
mov rdi, r12
mov r14, r12
mov r9, r12
mov dword [rsp + 0x28], ebx
movzx r13d, r12b
mov r10, r12
mov edx, 0xffffffff
and edi, 0xff00
and r14d, 0xff0000
and r9d, 0xff000000
mov rbx, rdi
mov rdi, rax
mov byte [r8 + rax - 1], dl
jmp 0x1401ba5a5
xor r13d, r13d
mov rax, qword [rsp + 0x30]
mov ecx, dword [rsp + 0xd0]
lea rax, [rax + rax*2]
shr rax, 1
mov qword [rsp + 0x30], rax
mov rbx, rax
test ecx, ecx
je 0x1401ba908
mov eax, dword [rsp + 0xd0]
mov ecx, dword [rsp + 0xd0]
cmp rbx, rax
lea edx, [rcx + 0x23]
cmovb rdx, rbx
mov qword [rsp + 0x30], rdx
cmp rax, rdi
jl 0x1401baa57
mov rdx, qword [rsp + 0x30]
mov rcx, r8
mov qword [rsp + 0x40], r8
call fcn.1400eb7d0
mov r8, qword [rsp + 0x40]
test rax, rax
je 0x1401baa2a
mov rbx, qword [rsp + 0x48]
cmp rbp, rbx
jae 0x1401ba9a2
mov r8, rax
jmp 0x1401ba550
mov dword [rsp + 0x28], ebx
jmp 0x1401ba56b
add r13d, 1
mov byte [r8 + rdi], dl
cmp r13d, 0x7f
jne 0x1401baa08
mov byte [r8 + rdi - 0x7f], 0x7f
mov rdi, qword [rsp + 0x40]
cmp rax, rdi
jae 0x1401ba991
mov rdi, qword [rsp + 0x48]
cmp rbp, rdi
jae 0x1401bab1d
mov rdi, rax
xor r13d, r13d
xor esi, esi
jmp 0x1401ba6e9
mov dword [rsp + 0x28], ebx
mov r13d, 1
xor esi, esi
jmp 0x1401ba8c3
mov dword [rsp + 0x28], ebx
mov rdi, rax
xor r13d, r13d
xor esi, esi
jmp 0x1401ba8c3
test r13d, r13d
je 0x1401ba9b5
movsxd rcx, r13d
mov rdx, rdi
sub rdx, rcx
mov byte [rax + rdx - 1], r13b
mov edx, dword [rsp + 0xd0]
test edx, edx
jne 0x1401ba9ec
mov rsi, qword [rsp + 0xc8]
mov dword [rsi], edi
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x28], ebx
mov r13d, dword [rsp + 0x58]
mov rsi, rax
jmp 0x1401ba56b
mov edx, dword [rsp + 0xd0]
cmp rdx, rdi
jge 0x1401ba9c0
mov rcx, rax
call fcn.1400eaf30
xor eax, eax
jmp 0x1401ba9ca
mov rdi, qword [rsp + 0x40]
cmp rax, rdi
jae 0x1401baa36
mov rdi, qword [rsp + 0x48]
cmp rbp, rdi
jae 0x1401bab28
mov rdi, rax
xor esi, esi
jmp 0x1401ba6e9
mov rcx, r8
call fcn.1400eaf30
xor eax, eax
jmp 0x1401ba9ca
mov dword [rsp + 0x28], ebx
mov rdi, rax
xor esi, esi
jmp 0x1401ba8c3
mov rax, r8
jmp 0x1401ba9b5
mov r14, r8
mov rax, r14
jmp 0x1401ba9b5
mov r14, r8
test r13d, r13d
je 0x1401baa6a
movsxd rax, r13d
sub rdi, rax
mov byte [r8 + rdi - 1], r13b
mov rax, r14
jmp 0x1401ba9f8
movsxd rdx, r13d
mov rax, rdi
lea r11, [r8 + rdi]
mov dword [rsp + 0x28], ebx
sub rax, rdx
mov byte [r8 + rax - 1], r13b
mov eax, 0x10000
cmp rsi, rax
cmovae rax, rsi
add rdi, 1
xor r10d, r10d
lea edx, [rax - 0x10000]
mov eax, pe_nt_image_headers64
sub rsi, rdx
jmp 0x1401ba615
movsxd rdx, r13d
mov rax, rdi
mov dword [rsp + 0x28], ebx
mov r14, r12
mov rbx, r12
mov r9, r12
sub rax, rdx
mov rcx, rdi
mov edx, r13d
add rdi, 1
movzx r13d, r12b
and ebx, 0xff00
and r14d, 0xff0000
and r9d, 0xff000000
jmp 0x1401ba8b6
mov rdx, r14
mov rcx, r8
mov r9d, 1
mov eax, 1
jmp 0x1401ba467
mov rax, r14
mov r13d, 1
jmp 0x1401ba9a7
mov r14, r8
mov r13d, 1
mov rax, r14
jmp 0x1401ba9a7
mov r14, r8
mov rdi, rax
jmp 0x1401baa4f
mov r14, r8
mov rdi, rax
jmp 0x1401bab15