Function at 0x140170580
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov qword [rbp], 0xfffffffffffffffe
mov rdi, rdx
mov rsi, rcx
mov rax, qword [rcx]
mov r15, qword [rcx + 0x20]
mov rbx, qword [rax]
mov r14d, dword [rbx]
mov rcx, qword [rdx + 0x10]
lea rdx, [rbx + 4]
mov r8, r14
call fcn.1403414a0
mov qword [rbp - 8], rbx
mov qword [rbp - 0x30], r14
lea rcx, [rbx + r14]
add rcx, 4
mov rbx, qword [0x140448bc8]
movsxd r14, dword [rbx]
mov r13d, dword [0x140363b50]
mov eax, dword [rcx]
cmp rax, 4
jb 0x140170663
mov qword [rbp - 0x10], r15
lea r8, [rcx + 4]
mov rdx, qword [rdi + 0x10]
mov r10, rax
shr r10, 2
mov r9, r10
add r9, qword [0x140490458]
cmp r10d, 1
jne 0x140170611
xor r10d, r10d
jmp 0x14017064d
mov r11d, r9d
and r11d, 0x3ffffffe
xor r10d, r10d
nop
mov r15d, dword [r8 + r10*4]
mov r12d, dword [rdi + 0x20]
add dword [rdx + r15], r12d
lea r15, [r10*4]
or r15, 4
mov r15d, dword [r8 + r15]
mov r12d, dword [rdi + 0x20]
add dword [rdx + r15], r12d
add r10, 2
cmp r11, r10
jne 0x140170620
test r9b, 1
mov r15, qword [rbp - 0x10]
je 0x140170663
mov r8d, dword [r8 + r10*4]
mov r9d, dword [rdi + 0x20]
add dword [rdx + r8], r9d
mov r9d, eax
mov r10d, dword [r9 + rcx + 4]
cmp r10, 4
jb 0x14017076f
mov qword [rbp - 0x38], rbx
mov dword [rbp - 0x24], r13d
mov qword [rbp - 0x10], r14
mov rax, qword [rdi + 0x10]
mov edx, eax
sub edx, r15d
shr r10, 2
mov r8, r10
not r8
mov r11d, r10d
xor r11d, 3
and r8, 0xfffffffffffffffc
or r8, r11
not r8
xor r11d, r11d
cmp byte [0x1404909b4], 0
jne 0x140170728
lea r15, [r10 - 1]
cmp r15, 3
jb 0x140170728
add rcx, r9
add rcx, 4
and r10d, 0xfffffffc
mov r11, qword [rbp - 0x30]
add r11, r9
mov rbx, qword [rbp - 8]
lea r12, [rbx + r11]
add r12, 0x14
xor r11d, r11d
nop dword [rax]
lea r15, [r11*4]
mov r14d, dword [r12 + r11*4 - 8]
add dword [rax + r14], edx
mov r14d, dword [r12 + r11*4 - 4]
add dword [rax + r14], edx
mov r14d, dword [r12 + r11*4]
mov ebx, dword [rax + r14]
mov r13d, ebx
xor r13d, edx
and ebx, edx
lea ebx, [r13 + rbx*2]
mov dword [rax + r14], ebx
or r15, 0xc
mov ebx, dword [rcx + r15 + 4]
add dword [rax + rbx], edx
add r11, 4
cmp r10, r11
jne 0x1401706e0
test r8, r8
mov r14, qword [rbp - 0x10]
mov r13d, dword [rbp - 0x24]
mov rbx, qword [rbp - 0x38]
je 0x14017076f
lea rcx, [r9 + r11*4]
add rcx, qword [rbp - 0x30]
mov r9, qword [rbp - 8]
add rcx, r9
add rcx, 0xc
xor r9d, r9d
nop
mov r10d, dword [rcx]
add dword [rax + r10], edx
mov r10, r9
xor r10, 1
and r9d, 1
lea r9, [r10 + r9*2]
add rcx, 4
cmp r9, r8
jne 0x140170750
mov eax, dword [rdi + 0x10]
mov ecx, dword [rdi]
mov edx, dword [rdi + 8]
mov r8d, dword [rsi + 0x20]
sub ecx, r8d
mov dword [rbp - 0x20], ecx
add ecx, edx
inc ecx
mov dword [rbp - 0x1c], ecx
sub eax, r8d
mov dword [rbp - 0x18], eax
mov rdx, qword [rsi + 0x10]
cmp rdx, qword [rsi + 0x18]
je 0x1401707ba
mov eax, dword [rbp - 0x18]
mov dword [rdx + 8], eax
mov rax, qword [rbp - 0x20]
mov qword [rdx], rax
add qword [rsi + 0x10], 0xc
cmp qword [0x140493098], 0
jne 0x140170877
jmp 0x1401707d5
lea rcx, [rsi + 8]
lea r8, [rbp - 0x20]
call fcn.1401709b0
cmp qword [0x140493098], 0
jne 0x140170877
add r14, rbx
mov ecx, 0x900
mov edx, 0x72905116
call fcn.140084ab0
mov edi, dword [0x1404909b0]
lea edx, [rdi + 1]
mov dword [0x1404909b0], edx
mov ecx, edi
not ecx
xor edi, edx
not edx
and edx, ecx
or edi, edx
xor edi, 0xffffffff
je 0x14017080b
xor ebx, ebx
jmp 0x140170837
xor edx, edx
xor ebx, ebx
test r13d, r13d
jle 0x140170837
nop word cs:[rax + rax]
movsxd rcx, edx
xor rbx, qword [r14 + rcx]
mov ecx, edx
xor ecx, 8
and edx, 8
lea edx, [rcx + rdx*2]
cmp edx, r13d
jl 0x140170820
mov qword [rbp - 8], rax
mov rcx, rax
call fcn.14006fd00
xor eax, eax
cmp edi, 1
sbb rax, rax
mov rcx, qword [0x140363b60]
sub rcx, rbx
and rcx, rax
movzx eax, byte [0x1404909b4]
mov rdx, qword [rbp - 8]
setne cl
or al, cl
and al, 1
mov byte [0x1404909b4], al
mov qword [0x140493098], rdx
mov rax, qword [0x140493098]
mov rax, qword [rax + 0x8d8]
mov r8, qword [rsi + 0x20]
mov rcx, qword [rsi + 8]
mov rdx, qword [rsi + 0x10]
sub rdx, rcx
shr rdx, 2
imul edx, edx, 0xaaaaaaab
call qword [case.0x1400eabdd.0]
cmp eax, 1
sete al
sete byte [rsi + 0x28]
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret