Function at 0x140161670
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov eax, dword [rsp + 0x98]
mov rbp, qword [rsp + 0x90]
mov rsi, qword [rsp + 0xa0]
mov r11, rdx
mov edx, dword [rsp + 0xb0]
mov qword [rsp], rcx
mov qword [rsp + 8], r9
mov dword [rsp + 0x18], eax
test edx, edx
jne 0x140161858
mov ebx, dword [rsp + 0x18]
mov r12d, 1
mov rax, rcx
mov r14d, r12d
add rax, 8
mov ecx, ebx
shl r14d, cl
mov rcx, rbx
shl rcx, 0x20
lea edx, [r14 - 1]
or rcx, 1
mov r10, rcx
mov r9, rcx
lea ecx, [rbx - 1]
shl r12d, cl
cmp r8d, 0xffffffff
je 0x1401619c0
mov ebx, r8d
mov dword [rsp + 0x10], r14d
mov ecx, edx
xor r8d, r8d
xor r13d, r13d
mov edi, 1
xor r15d, r15d
jmp 0x14016172f
cmp r12w, r14w
mov word [rsi + r8*2], r14w
mov r13d, 1
lea r14, [r8 + 1]
cmovle rdi, r15
cmp rbx, r8
je 0x14016175a
mov r8, r14
movzx r14d, word [r11 + r8*2]
cmp r14w, 0xffff
jne 0x140161710
mov r14d, ecx
sub ecx, 1
mov dword [rax + r14*8 + 4], r8d
mov r14d, 1
mov word [rsi + r8*2], r14w
lea r14, [r8 + 1]
cmp rbx, r8
jne 0x14016172c
mov r14d, dword [rsp + 0x10]
test r13b, r13b
je 0x140161777
movabs r8, 0xffffffff00000000
and r8, r10
mov r9, r8
or r9, rdi
mov rdi, qword [rsp]
mov qword [rdi], r9
cmp edx, ecx
je 0x140161887
mov r10d, r14d
mov r8d, r14d
xor r15d, r15d
shr r8d, 3
shr r10d, 1
lea r13d, [r10 + r8 + 3]
xor r8d, r8d
nop
movsx r10d, word [r11 + r15*2]
mov edi, r15d
test r10d, r10d
jle 0x1401617cc
xor r9d, r9d
mov r12d, r8d
mov dword [rax + r12*8 + 4], edi
add r8d, r13d
and r8d, edx
cmp ecx, r8d
jb 0x1401617b8
add r9d, 1
cmp r10d, r9d
jne 0x1401617b0
lea r9, [r15 + 1]
cmp rbx, r15
je 0x1401617e0
mov r15, r9
jmp 0x1401617a0
test r14d, r14d
je 0x140161843
mov rbx, qword [rsp]
movzx r8d, byte [rsp + 0x18]
mov r10, qword [rsp + 8]
lea rbx, [rbx + rdx*8 + 0x10]
nop dword [rax]
mov r9d, dword [rax + 4]
lea rcx, [rsi + r9*2]
movzx edx, word [rcx]
lea r11d, [rdx + 1]
mov word [rcx], r11w
bsr ecx, edx
add rax, 8
xor ecx, 0x1f
lea ecx, [r8 + rcx - 0x1f]
shl edx, cl
mov byte [rax - 5], cl
sub edx, r14d
mov word [rax - 8], dx
movzx edx, byte [rbp + r9]
mov byte [rax - 6], dl
mov edx, dword [r10 + r9*4]
mov dword [rax - 4], edx
cmp rax, rbx
jne 0x140161800
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, r11
mov qword [rsp + 0xa0], rsi
mov dword [rsp + 0x98], eax
mov qword [rsp + 0x90], rbp
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp 0x1401619e0
mov r10d, r14d
mov ecx, r14d
mov qword [rsp + 0x10], rax
lea rdi, [r11 + rbx*2]
shr r10d, 1
shr ecx, 3
mov dword [rsp + 0x1c], r14d
lea r8, [rsi + 0x6a]
lea ecx, [r10 + rcx + 3]
xor ebx, ebx
xor r10d, r10d
mov r14, rdi
movabs r15, 0x101010101010101
nop dword [rax]
movsx r9, word [r11]
mov qword [r8 + r10], rbx
cmp r9w, 8
jle 0x140161942
movsx eax, r9w
sub eax, 9
mov edi, eax
shr edi, 3
add edi, 1
cmp eax, 7
jbe 0x1401619b6
mov r12d, edi
lea rax, [rsi + r10 + 0x72]
movq xmm0, rbx
shr r12d, 1
punpcklqdq xmm0, xmm0
shl r12, 4
lea r13, [r12 + rax]
and r12d, 0x10
je 0x140161918
movups xmmword [rax], xmm0
add rax, 0x10
cmp r13, rax
je 0x140161928
nop dword [rax]
movups xmmword [rax], xmm0
add rax, 0x20
movups xmmword [rax - 0x10], xmm0
cmp r13, rax
jne 0x140161918
test dil, 1
je 0x140161942
and edi, 0xfffffffe
lea eax, [rdi*8 + 8]
cdqe
lea rdi, [r8 + r10]
mov qword [rdi + rax], rbx
add r10, r9
add rbx, r15
lea rax, [r11 + 2]
cmp r14, r11
je 0x140161959
mov r11, rax
jmp 0x1401618c0
mov rax, qword [rsp + 0x10]
mov r14d, dword [rsp + 0x1c]
mov r10d, r14d
test r14d, r14d
je 0x140161843
sub r10, 1
and r10, 0xfffffffffffffffe
lea rbx, [rsi + r10 + 0x6c]
xor r10d, r10d
nop
movzx r11d, byte [r8]
mov r9, r10
add r10, rcx
add r8, 2
and r9, rdx
mov dword [rax + r9*8 + 4], r11d
mov r9, r10
movzx r11d, byte [r8 - 1]
add r10, rcx
and r9, rdx
and r10, rdx
mov dword [rax + r9*8 + 4], r11d
cmp rbx, r8
jne 0x140161980
jmp 0x1401617e5
mov eax, 8
jmp 0x140161938
mov rbx, qword [rsp]
mov ecx, r14d
lea r8, [rsi + 0x6a]
shr ecx, 3
mov qword [rbx], r10
mov r10d, r14d
shr r10d, 1
lea ecx, [r10 + rcx + 3]
jmp 0x140161963
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov ebp, 1
mov esi, dword [rsp + 0x98]
mov r12, qword [rsp + 0x90]
mov rdi, r9
mov r9, rsi
mov qword [rsp + 0x70], rcx
mov rbx, rdx
shl r9, 0x20
mov rax, qword [rsp + 0x70]
mov edx, esi
mov ecx, r8d
or r9, 1
shlx r14d, ebp, edx
mov dword [rsp + 0x10], esi
lea edx, [r14 - 1]
mov r11, r9
mov r8, r9
lea r9d, [rsi - 1]
add rax, 8
shlx ebp, ebp, r9d
cmp ecx, 0xffffffff
je 0x140161d20
mov dword [rsp + 8], r14d
mov r9d, ecx
xor r10d, r10d
mov ecx, edx
mov dword [rsp + 0x14], edx
xor r13d, r13d
mov esi, 1
xor r15d, r15d
mov r14, qword [rsp + 0xa0]
jmp 0x140161a96
cmp bp, dx
mov word [r14 + r10*2], dx
mov r13d, 1
lea rdx, [r10 + 1]
cmovle rsi, r15
cmp r9, r10
je 0x140161abe
mov r10, rdx
movzx edx, word [rbx + r10*2]
cmp dx, 0xffff
jne 0x140161a78
mov edx, ecx
sub ecx, 1
mov dword [rax + rdx*8 + 4], r10d
mov edx, 1
mov word [r14 + r10*2], dx
lea rdx, [r10 + 1]
cmp r9, r10
jne 0x140161a93
mov r14d, dword [rsp + 8]
mov edx, dword [rsp + 0x14]
test r13b, r13b
je 0x140161adf
movabs r15, 0xffffffff00000000
and r15, r11
or r15, rsi
mov r8, r15
mov rsi, qword [rsp + 0x70]
mov qword [rsi], r8
cmp edx, ecx
je 0x140161bc4
mov r11d, r14d
mov r10d, r14d
xor r15d, r15d
shr r10d, 3
shr r11d, 1
lea r13d, [r11 + r10 + 3]
xor r10d, r10d
nop word [rax + rax]
movsx r11d, word [rbx + r15*2]
mov esi, r15d
test r11d, r11d
jle 0x140161b3b
xor r8d, r8d
mov ebp, r10d
mov dword [rax + rbp*8 + 4], esi
add r10d, r13d
and r10d, edx
cmp ecx, r10d
jb 0x140161b27
add r8d, 1
cmp r11d, r8d
jne 0x140161b20
lea r8, [r15 + 1]
cmp r9, r15
je 0x140161b50
mov r15, r8
jmp 0x140161b10
test r14d, r14d
je 0x140161bb3
mov rbx, qword [rsp + 0x70]
movzx r9d, byte [rsp + 0x10]
mov r10d, r14d
mov r11, qword [rsp + 0xa0]
lea rbx, [rbx + rdx*8 + 0x10]
mov r8d, dword [rax + 4]
add rax, 8
lea rcx, [r11 + r8*2]
movzx edx, word [rcx]
lea esi, [rdx + 1]
mov word [rcx], si
xor ecx, ecx
lzcnt ecx, edx
lea ecx, [r9 + rcx - 0x1f]
shlx edx, edx, ecx
sub edx, r10d
mov byte [rax - 5], cl
mov word [rax - 8], dx
movzx edx, byte [r12 + r8]
mov byte [rax - 6], dl
mov edx, dword [rdi + r8*4]
mov dword [rax - 4], edx
cmp rax, rbx
jne 0x140161b70
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rsi, qword [rsp + 0xa0]
mov r11d, r14d
mov ecx, r14d
mov qword [rsp + 8], rax
shr r11d, 1
mov qword [rsp + 0x18], rdx
shr ecx, 3
mov rdx, qword [rsp + 0xa0]
lea r10, [rsi + 0x6a]
lea rsi, [rbx + r9*2 + 2]
mov dword [rsp + 0x14], r14d
xor r9d, r9d
lea ecx, [r11 + rcx + 3]
mov r14, rsi
xor r11d, r11d
movabs r15, 0x101010101010101
movsx r8, word [rbx]
mov qword [r10 + r9], r11
cmp r8w, 8
jle 0x140161c92
movsx eax, r8w
sub eax, 9
mov esi, eax
shr esi, 3
add esi, 1
cmp eax, 7
jbe 0x140161d16
mov ebp, esi
lea rax, [rdx + r9 + 0x72]
movq xmm0, r11
shr ebp, 1
punpcklqdq xmm0, xmm0
shl rbp, 4
lea r13, [rbp + rax]
and ebp, 0x10
je 0x140161c68
movups xmmword [rax], xmm0
add rax, 0x10
cmp r13, rax
je 0x140161c78
nop dword [rax + rax]
movups xmmword [rax], xmm0
add rax, 0x20
movups xmmword [rax - 0x10], xmm0
cmp r13, rax
jne 0x140161c68
test sil, 1
je 0x140161c92
and esi, 0xfffffffe
lea eax, [rsi*8 + 8]
cdqe
lea rsi, [r10 + r9]
mov qword [rsi + rax], r11
add rbx, 2
add r9, r8
add r11, r15
cmp r14, rbx
jne 0x140161c10
mov rax, qword [rsp + 8]
mov r14d, dword [rsp + 0x14]
mov rdx, qword [rsp + 0x18]
mov r9d, r14d
test r14d, r14d
je 0x140161bb3
mov rbx, qword [rsp + 0xa0]
sub r9, 1
and r9, 0xfffffffffffffffe
lea rbx, [rbx + r9 + 0x6c]
xor r9d, r9d
nop dword [rax + rax]
movzx r11d, byte [r10]
mov r8, r9
add r9, rcx
add r10, 2
and r8, rdx
mov dword [rax + r8*8 + 4], r11d
mov r8, r9
movzx r11d, byte [r10 - 1]
add r9, rcx
and r8, rdx
and r9, rdx
mov dword [rax + r8*8 + 4], r11d
cmp rbx, r10
jne 0x140161ce0
jmp 0x140161b55
mov eax, 8
jmp 0x140161c88
mov rbx, qword [rsp + 0x70]
mov r9d, r14d
mov ecx, r14d
shr r9d, 1
shr ecx, 3
mov qword [rbx], r11
mov rbx, qword [rsp + 0xa0]
lea ecx, [r9 + rcx + 3]
lea r10, [rbx + 0x6a]
jmp 0x140161cb4