Function at 0x140143f90
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x168
mov qword [rsp + 0x50], r8
cmp rdx, 0x15
jae 0x140143fe0
mov rsi, rdx
mov r15, rcx
cmp rsi, 1
jbe 0x140143fcb
mov r8d, 1
mov rcx, r15
mov rdx, rsi
call fcn.140167850
nop
add rsp, 0x168
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ebp, r9d
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x28], rcx
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x38], 1
movzx eax, byte [rsp + 0x30]
and byte [rsp + 0x38], al
mov r15, qword [rsp + 0x28]
mov r12, qword [rsp + 0x40]
nop word [rax + rax]
test ebp, ebp
je 0x140144c01
test byte [rsp + 0x30], 1
je 0x14014450f
mov rdx, r12
shr rdx, 2
lea rax, [rdx + rdx]
lea rcx, [rdx + rdx*2]
cmp r12, 0x31
jbe 0x140144090
lea r9, [rdx - 1]
mov r10d, dword [r15 + rdx*8]
mov r11d, dword [r15 + rdx*8 + 4]
mov esi, dword [r15 + rdx*8 - 8]
mov r14d, dword [r15 + rdx*8 - 4]
xor r8d, r8d
cmp r11d, r14d
setb r8b
xor ebx, ebx
cmp r10d, esi
setb bl
cmove ebx, r8d
cmp bl, 1
mov dword [rsp + 0x24], ebp
jne 0x1401440a0
mov r8d, 1
mov rbx, r9
mov r9, rdx
mov r11d, r14d
mov r10d, esi
jmp 0x1401440a6
xor r8d, r8d
mov r13, rax
jmp 0x140144283
xor r8d, r8d
mov rbx, rdx
mov esi, dword [r15 + rdx*8 + 8]
mov r14d, dword [r15 + rdx*8 + 0xc]
xor r13d, r13d
cmp r14d, r11d
setb r13b
xor ebp, ebp
cmp esi, r10d
setb bpl
cmove ebp, r13d
cmp bpl, 1
jne 0x1401440e0
inc rdx
inc r8
jmp 0x1401440e9
mov r14d, r11d
mov esi, r10d
mov rdx, rbx
xor r10d, r10d
cmp r14d, dword [r15 + r9*8 + 4]
setb r10b
xor r11d, r11d
cmp esi, dword [r15 + r9*8]
setb r11b
cmove r11d, r10d
movzx r10d, r11b
add r8, r10
test r10b, r10b
cmovne rdx, r9
lea r9, [rax - 1]
mov ebx, dword [r15 + rax*8]
mov r14d, dword [r15 + rax*8 + 4]
mov r10d, dword [r15 + rax*8 - 8]
mov r11d, dword [r15 + rax*8 - 4]
xor esi, esi
cmp r14d, r11d
setb sil
xor ebp, ebp
cmp ebx, r10d
setb bpl
cmove ebp, esi
cmp bpl, 1
jne 0x140144150
inc r8
mov rsi, r9
mov r9, rax
jmp 0x140144159
mov rsi, rax
mov r11d, r14d
mov r10d, ebx
mov r13, rax
or r13, 1
mov ebx, dword [r15 + r13*8]
mov r14d, dword [r15 + r13*8 + 4]
xor ebp, ebp
cmp r14d, r11d
setb bpl
xor edi, edi
cmp ebx, r10d
setb dil
cmove edi, ebp
cmp dil, 1
jne 0x140144190
inc r8
jmp 0x140144199
mov r13, rsi
mov r14d, r11d
mov ebx, r10d
xor r10d, r10d
cmp r14d, dword [r15 + r9*8 + 4]
setb r10b
xor r11d, r11d
cmp ebx, dword [r15 + r9*8]
setb r11b
cmove r11d, r10d
movzx r10d, r11b
add r8, r10
test r10b, r10b
cmovne r13, r9
lea r9, [rcx - 1]
mov ebx, dword [r15 + rcx*8]
mov r14d, dword [r15 + rcx*8 + 4]
mov r11d, dword [r15 + rcx*8 - 8]
mov esi, dword [r15 + rcx*8 - 4]
xor r10d, r10d
cmp r14d, esi
setb r10b
xor edi, edi
cmp ebx, r11d
setb dil
cmove edi, r10d
cmp dil, 1
jne 0x140144210
inc r8
mov r10, r9
mov r9, rcx
jmp 0x140144219
mov r10, rcx
mov esi, r14d
mov r11d, ebx
mov ebx, dword [r15 + rcx*8 + 8]
mov r14d, dword [r15 + rcx*8 + 0xc]
xor edi, edi
cmp r14d, esi
setb dil
xor ebp, ebp
cmp ebx, r11d
setb bpl
cmove ebp, edi
cmp bpl, 1
jne 0x140144250
inc rcx
inc r8
mov r10, rcx
jmp 0x140144256
mov r14d, esi
mov ebx, r11d
mov ebp, dword [rsp + 0x24]
xor ecx, ecx
cmp r14d, dword [r15 + r9*8 + 4]
setb cl
xor r11d, r11d
cmp ebx, dword [r15 + r9*8]
setb r11b
cmove r11d, ecx
movzx ecx, r11b
add r8, rcx
test cl, cl
cmovne r10, r9
mov rcx, r10
mov esi, dword [r15 + r13*8]
mov ebx, dword [r15 + r13*8 + 4]
mov r9d, dword [r15 + rdx*8]
mov r10d, dword [r15 + rdx*8 + 4]
xor r11d, r11d
cmp ebx, r10d
setb r11b
xor r14d, r14d
cmp esi, r9d
setb r14b
cmove r14d, r11d
cmp r14b, 1
jne 0x1401442c0
inc r8
mov r11, rdx
jmp 0x1401442cc
mov r11, r13
mov r13, rdx
mov r10d, ebx
mov r9d, esi
mov edx, dword [r15 + rcx*8]
mov esi, dword [r15 + rcx*8 + 4]
xor ebx, ebx
cmp esi, r10d
setb bl
xor r14d, r14d
cmp edx, r9d
setb r14b
cmove r14d, ebx
cmp r14b, 1
jne 0x140144300
inc r8
jmp 0x140144309
mov rcx, r11
mov esi, r10d
mov edx, r9d
movabs rdi, 0x1ffffffffffffffe
xor r9d, r9d
cmp esi, dword [r15 + r13*8 + 4]
setb r9b
xor r10d, r10d
cmp edx, dword [r15 + r13*8]
setb r10b
cmove r10d, r9d
cmp r10b, 1
jne 0x140144370
mov ecx, r8d
mov r8d, 1
cmp ecx, 0xb
jb 0x140144373
mov rcx, r12
shr rcx, 1
lea rdx, [r15 + r12*8]
lea r8, [rcx*8]
sub rdx, r8
cmp rcx, 1
jne 0x140144384
xor r8d, r8d
jmp 0x1401443c8
mov r13, rcx
test r8, r8
sete al
test byte [rsp + 0x38], al
je 0x1401443f9
jmp 0x140144521
lea r9, [r12 - 1]
xor r8d, r8d
nop dword [rax]
mov r10, qword [r15 + r9*8]
mov r11, qword [r15 + r8*8]
mov qword [r15 + r8*8], r10
mov qword [r15 + r9*8], r11
mov r10, r8
xor r10, rdi
add r10, rcx
mov r11, qword [rdx + r10*8]
mov rsi, qword [r15 + r8*8 + 8]
mov qword [r15 + r8*8 + 8], r11
mov qword [rdx + r10*8], rsi
add r8, 2
add r9, 0xfffffffffffffffe
cmp rax, r8
jne 0x140144390
test r12b, 2
je 0x1401443e7
mov rax, r8
not rax
add rcx, rax
mov rax, qword [rdx + rcx*8]
mov r9, qword [r15 + r8*8]
mov qword [r15 + r8*8], rax
mov qword [rdx + rcx*8], r9
not r13
add r13, r12
mov al, 1
test byte [rsp + 0x38], al
jne 0x140144521
cmp qword [rsp + 0x50], 0
je 0x140144540
cmp r13, r12
jae 0x140144c11
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx]
mov ecx, dword [rcx + 4]
xor edx, edx
cmp ecx, dword [r15 + r13*8 + 4]
setb dl
xor ecx, ecx
cmp eax, dword [r15 + r13*8]
setb cl
cmove ecx, edx
test cl, cl
jne 0x140144550
mov rax, qword [r15]
mov rcx, qword [r15 + r13*8]
mov qword [r15], rcx
mov qword [r15 + r13*8], rax
lea r8, [r12 - 1]
mov eax, dword [r15]
mov edx, dword [r15 + 4]
lea r9, [r15 + 8]
xor ecx, ecx
cmp rcx, r8
jae 0x14014448c
nop dword [rax + rax]
xor r10d, r10d
cmp edx, dword [r15 + rcx*8 + 0xc]
setb r10b
xor r11d, r11d
cmp eax, dword [r15 + rcx*8 + 8]
setb r11b
cmove r11d, r10d
test r11b, r11b
jne 0x14014448c
inc rcx
cmp r8, rcx
jne 0x140144460
mov rcx, r8
lea r10, [r9 + r8*8]
dec r8
cmp rcx, r8
jae 0x1401444e0
lea r11, [r10 - 8]
xor esi, esi
cmp edx, dword [r10 - 4]
setb sil
xor edi, edi
cmp eax, dword [r10 - 8]
setb dil
cmove edi, esi
mov r10, r11
test dil, dil
jne 0x140144490
mov r10, qword [r15 + rcx*8 + 8]
mov rsi, qword [r11]
mov qword [r15 + rcx*8 + 8], rsi
mov qword [r11], r10
inc rcx
cmp rcx, r8
jb 0x140144460
jmp 0x14014448c
inc rcx
shl rdx, 0x20
or rdx, rax
mov qword [r15], rdx
mov rsi, r12
sub rsi, rcx
jb 0x140144c44
lea r15, [r15 + rcx*8]
mov r12, rsi
cmp rsi, 0x15
jae 0x140144010
jmp 0x140143fb4
mov rcx, r15
mov rdx, r12
call fcn.1401672d0
dec ebp
jmp 0x140144023
mov rcx, r15
mov rdx, r12
call fcn.140167420
test al, al
je 0x1401443f9
jmp 0x140143fcb
mov r12, qword [rsp + 0x40]
jmp 0x140144555
mov qword [rsp + 0x28], r15
cmp r13, r12
mov r10, qword [rsp + 0x28]
jae 0x140144c23
mov rax, qword [r10]
mov rcx, qword [r10 + r13*8]
mov qword [r10], rcx
mov qword [r10 + r13*8], rax
lea rax, [r10 + 8]
lea r8, [r12 - 1]
mov r15d, dword [r10]
mov r14d, dword [r10 + 4]
xor ecx, ecx
nop word cs:[rax + rax]
xor edx, edx
cmp dword [r10 + rcx*8 + 0xc], r14d
setb dl
xor r9d, r9d
cmp dword [r10 + rcx*8 + 8], r15d
setb r9b
cmove r9d, edx
cmp r9b, 1
jne 0x1401445c0
inc rcx
cmp r8, rcx
jne 0x140144590
mov rcx, r8
nop dword [rax + rax]
mov rdx, r8
cmp rcx, r8
jae 0x1401445ec
lea r8, [rdx - 1]
xor r11d, r11d
cmp dword [r10 + rdx*8 + 4], r14d
setb r11b
xor r9d, r9d
cmp dword [r10 + rdx*8], r15d
setb r9b
cmove r9d, r11d
test r9b, r9b
je 0x1401445c0
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x24], ebp
cmp rcx, rdx
ja 0x140144c53
mov qword [rsp + 0x60], rcx
lea r13, [rax + rcx*8]
mov qword [rsp + 0x58], rdx
lea r9, [rax + rdx*8]
mov esi, pe_nt_image_headers64
xor r11d, r11d
xor eax, eax
xor r10d, r10d
xor ebp, ebp
mov edi, pe_nt_image_headers64
mov qword [rsp + 0x48], r13
jmp 0x14014469e
movzx ecx, byte [rbp + 1]
inc rbp
movzx edx, dl
not rdx
mov r8, qword [r13 + rcx*8]
mov qword [r9 + rdx*8], r8
movzx ebx, byte [rax + 1]
inc rax
not rbx
mov rdx, qword [r9 + rbx*8]
mov qword [r13 + rcx*8], rdx
movlps qword [r9 + rbx*8], xmm0
inc rbp
inc rax
mov rdi, qword [rsp + 0x30]
cmp rbp, r10
mov ecx, 0
cmove rcx, rdi
mov rdx, rsi
neg rdx
cmp rax, r11
mov r8d, 0
cmovne rdx, r8
lea r13, [r13 + rcx*8]
lea r9, [r9 + rdx*8]
cmp r12, 0x808
jb 0x140144990
mov r12, r9
sub r12, r13
cmp r12, 0x808
jae 0x1401446f3
mov rdx, r12
shr rdx, 3
cmp rbp, r10
setb r8b
cmp rax, r11
setb bl
or bl, r8b
lea r8, [rdx - 0x80]
test bl, bl
mov rcx, rdi
mov rdi, rdx
cmovne rdi, r8
cmp rbp, r10
cmovb rsi, r8
cmovae rcx, rdi
mov rdi, rcx
test bl, bl
jne 0x1401446f3
mov rdi, r12
shr rdi, 4
sub rdx, rdi
mov rsi, rdx
mov qword [rsp + 0x38], rsi
cmp rbp, r10
mov qword [rsp + 0x30], rdi
jne 0x1401447d0
test rdi, rdi
je 0x140144720
cmp rdi, 1
jne 0x14014472d
xor esi, esi
mov r8, r13
lea r10, [rsp + 0x68]
jmp 0x14014479f
lea rbp, [rsp + 0x68]
mov r10, rbp
jmp 0x1401447d0
mov rbp, rdi
and rbp, 0xfffffffffffffffe
lea r10, [rsp + 0x68]
mov r8, r13
xor esi, esi
nop
xor edx, edx
cmp dword [r8 + 4], r14d
setae dl
xor edi, edi
cmp dword [r8], r15d
mov ebx, esi
setae dil
cmove edi, edx
mov byte [r10], sil
movzx edx, dil
add rsi, 2
lea edi, [rbx + 1]
mov byte [r10 + rdx], dil
xor edi, edi
cmp dword [r8 + 0xc], r14d
setae dil
xor ebx, ebx
cmp dword [r8 + 8], r15d
lea rdx, [r10 + rdx]
setae bl
cmove ebx, edi
movzx r10d, bl
add r10, rdx
add r8, 0x10
cmp rbp, rsi
jne 0x140144740
lea rbp, [rsp + 0x68]
test byte [rsp + 0x30], 1
je 0x1401447d0
xor edx, edx
cmp dword [r8 + 4], r14d
setae dl
xor edi, edi
cmp dword [r8], r15d
setae dil
cmove edi, edx
mov byte [r10], sil
movzx edx, dil
add r10, rdx
lea rbp, [rsp + 0x68]
nop word cs:[rax + rax]
cmp rax, r11
mov rsi, qword [rsp + 0x38]
jne 0x1401448c0
test rsi, rsi
je 0x1401447fb
cmp rsi, 1
jne 0x14014480b
mov rdx, r9
xor ebx, ebx
lea r11, [rsp + 0xe8]
jmp 0x140144889
lea rax, [rsp + 0xe8]
mov r11, rax
jmp 0x1401448c0
mov rax, rsi
and rax, 0xfffffffffffffffe
lea r11, [rsp + 0xe8]
xor ebx, ebx
mov rdx, r9
nop
xor esi, esi
cmp dword [rdx - 4], r14d
setb sil
xor edi, edi
cmp dword [rdx - 8], r15d
mov r8d, ebx
setb dil
cmove edi, esi
add rbx, 2
xor esi, esi
cmp dword [rdx - 0xc], r14d
setb sil
xor ecx, ecx
cmp dword [rdx - 0x10], r15d
mov byte [r11], r8b
setb cl
cmove ecx, esi
movzx esi, dil
lea rdi, [r11 + rsi]
add rdx, 0xfffffffffffffff0
inc r8d
mov byte [r11 + rsi], r8b
movzx r11d, cl
add r11, rdi
cmp rax, rbx
jne 0x140144820
lea rax, [rsp + 0xe8]
mov rsi, qword [rsp + 0x38]
test sil, 1
je 0x1401448c0
xor eax, eax
cmp dword [rdx - 4], r14d
setb al
xor r8d, r8d
cmp dword [rdx - 8], r15d
setb r8b
cmove r8d, eax
mov byte [r11], bl
movzx eax, r8b
add r11, rax
lea rax, [rsp + 0xe8]
nop word cs:[rax + rax]
mov rdx, r10
sub rdx, rbp
mov rdi, r11
sub rdi, rax
cmp rdx, rdi
cmovb rdi, rdx
test rdi, rdi
je 0x140144664
movzx ecx, byte [rbp]
movsd xmm0, qword [r13 + rcx*8]
movzx edx, byte [rax]
mov rbx, rdx
not rbx
mov r8, qword [r9 + rbx*8]
mov qword [r13 + rcx*8], r8
cmp rdi, 1
je 0x140144659
cmp rdi, 2
je 0x140144630
dec rdi
mov r8, rdi
and r8, 0xfffffffffffffffe
nop word [rax + rax]
movzx ecx, byte [rbp + 1]
movzx edx, dl
not rdx
mov rsi, qword [r13 + rcx*8]
mov qword [r9 + rdx*8], rsi
movzx edx, byte [rax + 1]
not rdx
mov rsi, qword [r9 + rdx*8]
mov qword [r13 + rcx*8], rsi
movzx ecx, byte [rbp + 2]
add rbp, 2
mov rsi, qword [r13 + rcx*8]
mov qword [r9 + rdx*8], rsi
movzx edx, byte [rax + 2]
add rax, 2
mov rbx, rdx
not rbx
mov rsi, qword [r9 + rbx*8]
mov qword [r13 + rcx*8], rsi
add r8, 0xfffffffffffffffe
jne 0x140144920
test dil, 1
mov rsi, qword [rsp + 0x38]
jne 0x140144630
jmp 0x140144659
mov r8, rbp
sub r8, r10
jae 0x140144a00
mov ebx, r10d
sub ebx, ebp
and ebx, 3
mov rdi, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x40]
je 0x140144a43
mov r12, qword [rsp + 0x48]
nop word cs:[rax + rax]
movzx ecx, byte [r10 - 1]
dec r10
lea rax, [r9 - 8]
mov r11, qword [r13 + rcx*8]
mov rsi, qword [r9 - 8]
mov qword [r13 + rcx*8], rsi
mov qword [r9 - 8], r11
mov r9, rax
dec rbx
jne 0x1401449c0
mov rsi, rax
cmp r8, 0xfffffffffffffffc
jbe 0x140144a60
jmp 0x140144b40
cmp rax, r11
mov rdi, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x40]
jae 0x140144a36
mov ecx, r11d
sub ecx, eax
test cl, 1
mov r12, qword [rsp + 0x48]
jne 0x140144ace
mov r8, r11
dec r11
cmp r11, rax
jne 0x140144b00
jmp 0x140144b40
mov rsi, r13
mov r12, qword [rsp + 0x48]
jmp 0x140144b40
mov rax, r9
mov r12, qword [rsp + 0x48]
mov rsi, rax
cmp r8, 0xfffffffffffffffc
ja 0x140144b40
nop dword [rax + rax]
movzx ecx, byte [r10 - 1]
mov r9, qword [r13 + rcx*8]
mov r8, qword [rax - 8]
mov qword [r13 + rcx*8], r8
mov qword [rax - 8], r9
movzx ecx, byte [r10 - 2]
mov r9, qword [r13 + rcx*8]
mov r8, qword [rax - 0x10]
mov qword [r13 + rcx*8], r8
mov qword [rax - 0x10], r9
movzx ecx, byte [r10 - 3]
mov r9, qword [r13 + rcx*8]
mov r8, qword [rax - 0x18]
mov qword [r13 + rcx*8], r8
mov qword [rax - 0x18], r9
movzx ecx, byte [r10 - 4]
add r10, 0xfffffffffffffffc
lea rsi, [rax - 0x20]
mov r9, qword [r13 + rcx*8]
mov r8, qword [rax - 0x20]
mov qword [r13 + rcx*8], r8
mov qword [rax - 0x20], r9
mov rax, rsi
cmp rbp, r10
jb 0x140144a60
jmp 0x140144b40
lea r8, [r11 - 1]
movzx ecx, byte [r11 - 1]
not rcx
mov rsi, qword [r13]
mov r10, qword [r9 + rcx*8]
mov qword [r13], r10
mov qword [r9 + rcx*8], rsi
add r13, 8
mov rsi, r13
dec r11
cmp r11, rax
je 0x140144b40
nop dword [rax]
movzx ecx, byte [r8 - 1]
not rcx
mov r11, qword [r13]
mov r10, qword [r9 + rcx*8]
mov qword [r13], r10
mov qword [r9 + rcx*8], r11
movzx ecx, byte [r8 - 2]
add r8, 0xfffffffffffffffe
not rcx
mov r11, qword [r13 + 8]
mov r10, qword [r9 + rcx*8]
mov qword [r13 + 8], r10
mov qword [r9 + rcx*8], r11
add r13, 0x10
cmp rax, r8
jb 0x140144b00
mov rsi, r13
sub rsi, r12
shr rsi, 3
mov rax, qword [rsp + 0x60]
add rsi, rax
shl r14, 0x20
or r14, r15
mov qword [rdi], r14
mov r15, rdx
sub r15, rsi
jbe 0x140144c35
cmp rax, qword [rsp + 0x58]
setae byte [rsp + 0x38]
lea r12, [rdi + rsi*8]
mov rax, qword [rdi + rsi*8]
mov qword [rdi], rax
mov qword [rdi + rsi*8], r14
cmp rsi, r15
mov rax, r15
cmovb rax, rsi
shr rdx, 3
cmp rax, rdx
setae byte [rsp + 0x30]
lea r14, [rdi + rsi*8]
add r14, 8
dec r15
cmp rsi, r15
jae 0x140144bd0
mov rcx, rdi
mov rdx, rsi
mov r8, qword [rsp + 0x50]
mov ebp, dword [rsp + 0x24]
mov r9d, ebp
call fcn.140143f90
mov qword [rsp + 0x50], r12
mov rsi, r15
mov r15, r14
jmp 0x140144be8
mov rcx, r14
mov rdx, r15
mov r8, r12
mov ebp, dword [rsp + 0x24]
mov r9d, ebp
call fcn.140143f90
mov r15, rdi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x28], r15
cmp rsi, 0x15
jae 0x140143ff7
jmp 0x140143fb4
mov rcx, r15
mov rdx, r12
call fcn.140167070
jmp 0x140143fcb
lea r8, [0x14026be60]
mov rcx, r13
mov rdx, r12
call fcn.14002d5f0
lea r8, [0x14026bed8]
mov rcx, r13
mov rdx, r12
call fcn.14002d5f0
lea r8, [0x14026bf08]
mov rcx, rsi
call fcn.14002d5f0
lea r8, [0x14026be78]
mov rdx, r12
call fcn.14002d5e0
lea r8, [0x14026bef0]
call fcn.1400324f0
ud2