Function at 0x140170760
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rdi, r9
mov ebp, r8d
mov rbx, rdx
mov rsi, rcx
mov r15d, esi
mov r14d, edi
mov ecx, r8d
and ecx, 0x1f
cmp ecx, 9
setae al
jb 0x1401707bd
cmp ecx, 0xc
jbe 0x140170845
cmp ecx, 0xe
jbe 0x140170890
cmp ecx, 0xf
jne 0x140170933
mov rcx, rbx
mov rdx, rsi
call fcn.14059bcf8
xor esi, esi
jmp 0x140170ebf
cmp ecx, 4
jae case.default.0x1401707d6
mov eax, ecx
lea rcx, [0x1405ed5fc]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
call fcn.1401649d0
mov esi, eax
movzx r14d, byte [0x140790470]
mov rcx, qword [0x140722b60]
mov eax, dword [0x140722b58]
xor eax, r14d
mov ebx, esi
add ebx, 0x95e8
add eax, esi
add eax, 0x95e8
cdqe
add rax, rcx
mov rcx, rdi
call qword [0x140704440]
mov rcx, qword [0x140722b70]
sub ebx, r14d
add ebx, dword [0x140722b50]
movsxd rax, ebx
add rax, rcx
mov ecx, r15d
mov edx, 0x231071cf
call qword [0x140704440]
test al, 1
jne 0x140170e0c
jmp 0x140170aa2
cmp ecx, 0xa
jbe 0x1401708bf
cmp ecx, 0xc
jne 0x1401709ff
test r14d, r14d
jne 0x140170d1d
rol dword [rax + rax], 0
cmp ecx, 5
jbe 0x1401708e0
cmp ecx, 6
je 0x140170ace
cmp ecx, 8
jne 0x140170b26
lea rcx, [0x14078fff8]
mov edx, 0x8fe1276c
call fcn.14016e1f0
xor esi, esi
jmp 0x140170ebf
cmp ecx, 0xd
jne 0x140170a0b
lea rax, [0x1405e90b0]
mov qword [rbx], rax
test r15d, r15d
je 0x140170bc2
xor ecx, ecx
xor edx, edx
test bpl, 0x40
jne 0x140170d33
jmp 0x140170cc8
cmp ecx, 9
jne 0x1401709ee
test bpl, 0x20
cmp ecx, 4
jne 0x140170a1a
mov edx, 0xce3b1106
mov r8, rdi
call fcn.14016e1f0
test ebx, ebx
je 0x140170e0c
mov esi, r14d
test bpl, 0x20
jne 0x140170aa2
mov rcx, rdi
call fcn.1400954d0
jmp 0x140170e0c
mov r9d, ebx
mov edx, edi
mov r8d, 0x4ff357cc
call fcn.140170760
mov rsi, rax
and esi, 1
jmp 0x140170ebf
cmp ecx, 0x10
jbe 0x140170b4e
nop
mov qword [rsp + 0x30], rdi
mov rdx, rdi
sub rdx, rsi
jae 0x140170ed3
test rbx, rbx
je 0x140170eb9
cmp rbx, 1
mov rax, rbx
adc rax, 0
xor ecx, ecx
cmp rbx, 8
jb 0x140170e63
cmp rdx, 0x20
jb 0x140170e63
cmp rbx, 0x20
jae 0x140170e14
xor ecx, ecx
jmp 0x140170e42
call fcn.140164070
mov r14d, eax
movzx r12d, byte [0x140790470]
mov rcx, qword [0x1407228d8]
mov r13d, eax
sub r13d, r12d
add r13d, 0x6d74
mov eax, dword [0x1407228c4]
add eax, r13d
cdqe
add rax, rcx
mov rcx, rdi
mov ecx, edi
call fcn.14059bda8
xor esi, esi
jmp 0x140170ebf
mov rcx, rbx
call fcn.1401ec3f0
xor esi, esi
jmp 0x140170ebf
call fcn.1401649d0
mov r15d, eax
mov rcx, qword [0x140722c70]
mov eax, dword [0x140722c60]
mov edi, 0xffff858d
sub edi, r15d
sub eax, edi
cdqe
add rax, rcx
mov rcx, rsi
call qword [0x140704440]
mov rcx, qword [0x140722c80]
mov eax, dword [0x140722c68]
sub eax, edi
cdqe
add rax, rcx
mov ecx, r14d
mov edx, 0x358d0c0
call qword [0x140704440]
test al, 1
je 0x140170af8
test bpl, 0x40
je 0x140170a92
jmp 0x140170ebf
mov rcx, rbx
mov edx, 0xfda0459
call fcn.14016e1f0
test r14d, r14d
je 0x140170bd6
mov rcx, rbx
call fcn.1400954d0
mov rsi, rbx
jmp 0x140170ebf
add r14d, esi
nop
mov rcx, qword [0x140722b68]
mov eax, dword [0x140722b54]
add eax, r14d
add eax, 0x95e8
cdqe
add rax, rcx
mov rcx, rdi
call qword [0x140704440]
jmp 0x140170e0c
nop
mov r14, qword [rsi]
test r14, r14
je 0x140170af8
test bpl, 0x20
jne 0x140170bf2
mov rcx, r14
call fcn.140095f50
mov rcx, r14
call fcn.1400954d0
xor esi, esi
jmp 0x140170ebf
test bpl, bpl
js 0x140170b39
nop
mov rcx, qword [0x140722c78]
mov eax, dword [0x140722c64]
add eax, r15d
add eax, 0x7a73
cdqe
add rax, rcx
mov rcx, rsi
call qword [0x140704440]
jmp 0x140170ebf
test r14d, r14d
je 0x140170be8
nop
mov rcx, qword [rbx + 8]
test rcx, rcx
sete dl
movzx eax, byte [0x1407215f2]
cmp al, 0x52
je 0x140170d33
mov r8b, 0xbe
nop dword [rax + rax]
mov al, 0x61
lock cmpxchg byte [0x1407215f2], r8b
je 0x140170c06
cmp al, 0x52
jne 0x140170b70
jmp 0x140170d33
mov rsi, rdi
test ebp, 0x100
jne 0x140170cd5
jmp 0x140170ebf
mov rsi, rbx
test bpl, 0x20
jne 0x140170e0c
jmp 0x140170ebf
mov esi, 1
jmp 0x140170ebf
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x24], 0
jmp 0x140170c0f
mov dword [rsp + 0x24], edx
mov qword [rsp + 0x28], rcx
mov eax, 0x939bf9e8
mov r8d, 0x6c640624
mov r9d, 1
mov r10d, 0x939bf9e9
mov r11d, 0x6c640623
lea r14, [0x1407215e0]
lea r15, [0x1405ed290]
nop word [rax + rax]
mov r12d, r8d
imul r12, r12, 0x4ec4ec4f
shr r12, 0x22
lea r13d, [r12 + r12*2]
lea r12d, [r12 + r13*4]
add r12d, eax
mov r13d, r11d
imul r13, r13, 0x4ec4ec4f
shr r13, 0x22
lea edx, [r13 + r13*2]
lea edx, [r13 + rdx*4]
add edx, r10d
movzx r13d, byte [r9 + r14 - 1]
movzx ecx, byte [r9 + r14]
xor r13b, byte [rdx + r15]
xor r13b, 0xfd
mov byte [r9 + r14 - 1], r13b
xor cl, byte [r12 + r15]
xor cl, 0xfd
mov byte [r9 + r14], cl
add eax, 0xfffffffe
add r8d, 2
add r9, 2
add r10d, 0xfffffffe
add r11d, 2
cmp r9, 0x13
jne 0x140170c40
mov al, 0x52
xchg byte [0x1407215f2], al
nop
mov rcx, qword [rsp + 0x28]
mov edx, dword [rsp + 0x24]
test bpl, 0x40
jne 0x140170d33
mov rcx, rbx
call fcn.1400954d0
test bpl, bpl
js 0x140170cdd
mov rsi, rbx
jmp 0x140170ebf
lea rsi, [0x1407215e0]
test dl, dl
cmove rsi, rcx
jmp 0x140170ebf
mov rcx, rax
and rcx, 0xffffffffffffffe0
xor edx, edx
nop
movups xmm0, xmmword [rsi + rdx]
movups xmm1, xmmword [rsi + rdx + 0x10]
movups xmmword [rdi + rdx], xmm0
movups xmmword [rdi + rdx + 0x10], xmm1
add rdx, 0x20
cmp rcx, rdx
jne 0x140170e1d
cmp rax, rcx
je 0x140170eb9
test al, 0x18
je 0x140170e63
mov rdx, rcx
mov rcx, rax
and rcx, 0xfffffffffffffff8
nop
mov r8, qword [rsi + rdx]
mov qword [rdi + rdx], r8
add rdx, 8
cmp rcx, rdx
jne 0x140170e4c
cmp rax, rcx
je 0x140170eb9
mov r8, rax
mov rdx, rcx
and r8, 3
je 0x140170e84
mov rdx, rcx
nop
movzx r9d, byte [rsi + rdx]
mov byte [rdi + rdx], r9b
inc rdx
dec r8
jne 0x140170e72
sub rcx, rax
cmp rcx, 0xfffffffffffffffc
ja 0x140170eb9
nop
movzx eax, byte [rsi + rdx]
mov byte [rdi + rdx], al
movzx eax, byte [rsi + rdx + 1]
mov byte [rdi + rdx + 1], al
movzx eax, byte [rsi + rdx + 2]
mov byte [rdi + rdx + 2], al
movzx eax, byte [rsi + rdx + 3]
mov byte [rdi + rdx + 3], al
add rdx, 4
cmp rbx, rdx
jne 0x140170e8d