Function at 0x140170a20
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp], 0xfffffffffffffffe
mov r15d, r9d
mov r12d, r8d
mov r14, rdx
mov rsi, rcx
cmp qword [0x140591c70], 0
mov qword [rbp - 8], rdx
jne 0x140170a87
mov ecx, 0x900
mov edx, 0x726de01f
mov r8d, 0xee2411db
call fcn.1400abf80
mov qword [rbp - 0x10], rax
mov rcx, rax
call fcn.140085540
mov rax, qword [rbp - 0x10]
mov qword [0x140591c70], rax
mov r14, qword [rbp - 8]
mov rdi, qword [rbp + 0x98]
mov r8, qword [rbp + 0x88]
mov ebx, dword [rbp + 0x80]
mov r9, qword [rbp + 0x70]
mov r13, qword [0x140591c70]
mov rax, qword [r13 + 0x330]
mov ecx, ebx
xor ecx, 0x60000000
and ecx, ebx
mov edx, r12d
or edx, 0x80000000
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 3
mov rcx, r14
mov r8d, r15d
call qword [case.0x140114b5b.0]
mov qword [rsi + 0x18], rax
cmp rax, 0xffffffffffffffff
je 0x140170b2d
mov ebx, dword [rbp + 0x78]
or byte [rsi + 0x10], 1
mov rcx, rsi
call fcn.14016b660
test al, al
je 0x140170b83
cmp ebx, 5
mov r15, qword [rbp + 0x90]
je 0x140170bad
cmp ebx, 2
je 0x140170bad
cmp ebx, 1
mov rdx, qword [rbp - 8]
jne 0x140170c9f
mov byte [r15], 0
jmp 0x140170e2b
mov rax, qword [r13 + 0x330]
mov rcx, qword [rbp + 0x88]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], ebx
mov ecx, dword [rbp + 0x78]
mov dword [rsp + 0x20], ecx
mov rcx, r14
mov edx, r12d
mov r8d, r15d
mov r9, qword [rbp + 0x70]
call qword [case.0x140114b5b.0]
mov qword [rsi + 0x18], rax
mov ecx, dword [rsi + 0x10]
cmp rax, 0xffffffffffffffff
je 0x140170bef
lea rax, [rsi + 0x10]
mov r15, qword [rbp + 0x90]
mov rdx, qword [rbp - 8]
jmp 0x140170c9a
mov rcx, rsi
call fcn.14016ff60
test al, al
mov r15, qword [rbp + 0x90]
mov rdx, qword [rbp - 8]
jne 0x140170c9f
xor eax, eax
test al, al
je 0x140170cd6
jmp 0x140170d2e
lea rdi, [rsi + 0xb0]
mov rcx, qword [rsi + 0xb0]
test rcx, rcx
mov rdx, qword [rbp - 8]
je 0x140170c77
xor eax, eax
mov r10b, 1
nop dword [rax]
test al, al
jne 0x140170be8
mov r8d, dword [rsi + 0xcc]
mov r9d, dword [0x14058f3fc]
cmp r9d, 0x5b
jle 0x140170c21
test r10b, r10b
je 0x140170bd0
jmp 0x140170bd4
shr cl, 5
and cl, 1
mov rax, qword [rbp + 0x90]
mov byte [rax], cl
add rsi, 0x300
mov rcx, rdi
mov rdx, rsi
mov r8d, 0x5ee98582
mov r9d, 0x3245bf2b
call fcn.14017bc20
jmp 0x140170e2b
cmp r8d, 1
jne 0x140170c39
mov r8, qword [rsi + 0xb8]
xor edx, edx
call fcn.14042db60
mov rdx, qword [rbp - 8]
mov eax, dword [0x14058f3fc]
cmp eax, 0x47
nop word cs:[rax + rax]
mov rcx, qword [rdi]
mov eax, dword [0x14058f3fc]
cmp eax, 0x23
jg 0x140170c50
test rcx, rcx
je 0x140170c77
mov edx, 0x2ad764e
mov r8d, 0xd4a4ec47
call fcn.1400ab270
mov rdx, qword [rbp - 8]
lea rax, [rsi + 0x10]
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], 0
mov byte [rsi + 0xc8], 1
movups xmmword [rsi + 0x2d0], xmm0
mov ecx, dword [rsi + 0x10]
or ecx, 0x10
mov dword [rax], ecx
test r12d, 0x40000002
jne 0x140170cac
or byte [rsi + 0x12], 4
lea rcx, [rsi + 0x28]
mov dword [rsp + 0x20], 0xbcb3e59d
mov r8d, 0x8bf10a67
mov r9d, 0xbb8584d3
call fcn.14017c900
mov byte [r15], 0
mov rax, qword [rsi + 0x18]
jmp 0x140170e30
mov rax, qword [r13 + 0x348]
mov rcx, qword [rsi + 0x18]
call qword [case.0x140114b5b.0]
movzx eax, byte [rsi + 0x10]
shr al, 5
mov ecx, eax
not cl
xor al, 1
and cl, 0xfe
or cl, al
not cl
mov byte [r15], cl
lea rdx, [rsi + 0x300]
mov rcx, rdi
mov r8d, 0x5ee98582
mov r9d, 0x3245bf2b
call fcn.14017bc20
mov eax, dword [0x14058f3f8]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
je 0x140170e2b
lea rbx, [0x14017b920]
lea r14, [rsi + 0x300]
nop dword [rax]
mov r15, qword [r13 + 0x348]
mov r12, qword [rsi + 0x18]
mov ecx, 0x56
call fcn.1403e5794
mov qword [0x14058f3f0], rax
mov rcx, rbx
call fcn.1404058a4
mov rcx, r12
mov rax, r15
mov r15, qword [rbp + 0x90]
call qword [case.0x140114b5b.0]
mov eax, dword [rsi + 0x10]
lea ecx, [rax + rax*4]
add cl, 0xe7
sub al, cl
mul cl
sub al, cl
mul cl
sub al, cl
mul cl
mov edx, eax
mov r8d, eax
shl r8b, cl
sub al, r8b
mul r8b
mov ecx, eax
shl dl, cl
shr dl, cl
mov cl, 1
sub cl, dl
shl dl, cl
shl dl, cl
mov r8d, edx
shl r8b, cl
sub r8b, dl
mov eax, edx
sub al, r8b
mul r8b
mov r8d, edx
mov ecx, eax
shl r8b, cl
sub dl, r8b
mov eax, edx
mul r8b
mov edx, eax
mov ecx, r8d
shl dl, cl
neg dl
mov ecx, eax
xor cl, dl
and dl, al
add dl, dl
add dl, cl
neg dl
mov ecx, eax
neg cl
mov r8d, ecx
xor r8b, dl
and cl, dl
add cl, cl
add cl, r8b
shl al, cl
xor cl, al
not cl
and cl, al
mov byte [r15], cl
mov rcx, rdi
mov rdx, r14
mov r8d, 0x5ee98582
mov r9d, 0x3245bf2b
call fcn.14017bc20
mov eax, dword [0x14058f3f8]
lea ecx, [rax + 1]
imul ecx, eax
test cl, 1
jne 0x140170d40
jmp 0x140170cd6
xor eax, eax
nop dword [rax]
mov ecx, dword [0x14058f3fc]
cmp ecx, 0x3f
jg 0x140170e30
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret