Function at 0x140050df0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x1400c9948]
xor rax, rsp
mov qword [rbp - 8], rax
mov rsi, qword [rbp + 0x58]
lea rax, [r9 - 8]
mov rbx, r9
mov r14, qword [rbp + 0x50]
mov r10, r8
mov byte [rbp - 0x30], 0
mov qword [rsi], 0
cmp qword [rbp + 0x60], rax
jb 0x140051206
test edx, edx
jne 0x140050edc
lea rax, [r9 - 0x18]
movabs rdx, 0x1ffffffffffffe8
cmp rax, rdx
ja 0x140051206
test bl, 7
jne 0x140051206
shr rbx, 3
lea r9, [rbp - 0x20]
mov r8, rbx
mov qword [rsp + 0x28], rsi
mov rdx, r10
mov qword [rsp + 0x20], r14
call fcn.140050c10
mov edi, eax
test eax, eax
jne 0x1400511b5
mov byte [rbp - 0x2f], al
lea r9, [0x140000000]
xor r8d, r8d
nop dword [rax]
nop dword [rax + rax]
movzx ecx, byte [r8 + r9 + 0xb3808]
movzx edx, byte [rbp + r8 - 0x20]
inc r8
movzx eax, byte [rbp - 0x2f]
xor dl, cl
or dl, al
mov byte [rbp - 0x2f], dl
cmp r8, 8
jb 0x140050ea0
movzx eax, byte [rbp - 0x2f]
mov byte [rbp - 0x2e], al
test al, al
je 0x1400511c9
mov edi, 0xffff9d00
jmp 0x1400511b5
cmp edx, 1
jne 0x1400511b0
lea rax, [r9 - 0x10]
mov edx, 0xfffffff0
cmp rax, rdx
ja 0x140051206
test bl, 7
jne 0x140051206
mov rdx, r10
cmp rbx, 0x10
jne 0x140050f52
lea rax, [rbp - 0x28]
mov r8, rbx
lea r9, [rbp - 0x18]
mov qword [rsp + 0x20], rax
call fcn.14001cfd0
mov edi, eax
test eax, eax
jne 0x1400511b5
mov rax, qword [rbp - 0x18]
lea rcx, [rbp - 0x18]
mov qword [rbp - 0x20], rax
xor edx, edx
mov rax, qword [rbp - 0x10]
mov r8, rbx
mov qword [r14], rax
mov rax, qword [fcn.140080540]
call rax
mov qword [rsi], 8
jmp 0x140050f76
mov r8, rbx
mov qword [rsp + 0x28], rsi
shr r8, 3
lea r9, [rbp - 0x20]
mov qword [rsp + 0x20], r14
call fcn.140050c10
mov edi, eax
test eax, eax
jne 0x1400511b5
mov byte [rbp - 0x2f], 0
lea r9, [0x140000000]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdx + r9 + 0xa86dc]
movzx ecx, byte [rbp + rdx - 0x20]
inc rdx
xor cl, al
movzx eax, byte [rbp - 0x2f]
or cl, al
mov byte [rbp - 0x2f], cl
cmp rdx, 4
jb 0x140050f90
movzx eax, byte [rbp - 0x2f]
mov r10d, 0xffff9d00
movzx r15d, byte [rbp - 0x1c]
test al, al
mov rdx, qword [rsi]
mov r9d, 8
cmovne edi, r10d
mov byte [rbp - 0x2e], al
movzx eax, byte [rbp - 0x1b]
lea rdx, [r14 + rdx]
shl r15d, 8
or r15d, eax
mov byte [rbp - 0x2e], 0
movzx eax, byte [rbp - 0x1a]
movzx ecx, byte [rdx - 8]
shl r15d, 8
or r15d, eax
movzx eax, byte [rbp - 0x19]
shl r15d, 8
or r15d, eax
sub rbx, r15
lea rax, [rbx - 8]
cmp rax, 7
mov r11, rax
cmova edi, r10d
and r11d, 7
cmp rax, 7
cmovbe r11, rax
sub r9, r11
jne 0x14005105b
movzx r8d, byte [rdx - 7]
or cl, r8b
movzx r8d, byte [rdx - 6]
or cl, r8b
movzx r8d, byte [rdx - 5]
or cl, r8b
movzx r8d, byte [rdx - 4]
or cl, r8b
movzx r8d, byte [rdx - 3]
or r8b, cl
movzx ecx, byte [rdx - 2]
or r8b, cl
movzx ecx, byte [rdx - 1]
jmp 0x140051186
movzx eax, byte [rbp - 0x30]
or al, cl
xor ecx, ecx
mov byte [rbp - 0x30], al
movzx r8d, byte [rdx - 7]
cmp r9, 1
ja 0x1400510a4
or cl, r8b
movzx r8d, byte [rdx - 6]
or cl, r8b
movzx r8d, byte [rdx - 5]
or cl, r8b
movzx r8d, byte [rdx - 4]
or cl, r8b
movzx r8d, byte [rdx - 3]
or r8b, cl
movzx ecx, byte [rdx - 2]
or r8b, cl
movzx ecx, byte [rdx - 1]
jmp 0x140051186
or al, r8b
mov byte [rbp - 0x30], al
movzx r8d, byte [rdx - 6]
cmp r9, 2
ja 0x1400510e0
or cl, r8b
movzx r8d, byte [rdx - 5]
or cl, r8b
movzx r8d, byte [rdx - 4]
or cl, r8b
movzx r8d, byte [rdx - 3]
or r8b, cl
movzx ecx, byte [rdx - 2]
or r8b, cl
movzx ecx, byte [rdx - 1]
jmp 0x140051186
or al, r8b
mov byte [rbp - 0x30], al
movzx r8d, byte [rdx - 5]
cmp r9, 3
ja 0x140051111
or cl, r8b
movzx r8d, byte [rdx - 4]
or cl, r8b
movzx r8d, byte [rdx - 3]
or r8b, cl
movzx ecx, byte [rdx - 2]
or r8b, cl
movzx ecx, byte [rdx - 1]
jmp 0x140051186
or al, r8b
mov byte [rbp - 0x30], al
movzx r8d, byte [rdx - 4]
cmp r9, 4
ja 0x14005113a
or cl, r8b
movzx r8d, byte [rdx - 3]
or r8b, cl
movzx ecx, byte [rdx - 2]
or r8b, cl
movzx ecx, byte [rdx - 1]
jmp 0x140051186
or al, r8b
mov byte [rbp - 0x30], al
movzx r8d, byte [rdx - 3]
cmp r9, 5
ja 0x14005115b
or r8b, cl
movzx ecx, byte [rdx - 2]
or r8b, cl
movzx ecx, byte [rdx - 1]
jmp 0x140051186
or al, r8b
xor r8b, r8b
mov byte [rbp - 0x30], al
movzx ecx, byte [rdx - 2]
cmp r9, 6
ja 0x140051177
or r8b, cl
movzx ecx, byte [rdx - 1]
jmp 0x140051186
or al, cl
mov byte [rbp - 0x30], al
movzx ecx, byte [rdx - 1]
cmp r9, 7
ja 0x140051194
or r8b, cl
mov byte [rbp - 0x2e], r8b
je 0x140051199
mov edi, r10d
jmp 0x1400511b5
or al, cl
mov byte [rbp - 0x30], al
test edi, edi
jne 0x1400511b5
lea rcx, [r15 + r14]
mov r8, r11
xor edx, edx
call fcn.140080540
mov qword [rsi], r15
jmp 0x1400511c9
mov edi, 0xffff9f80
mov r8, qword [rsi]
xor edx, edx
mov rcx, r14
call fcn.140080540
mov qword [rsi], 0
mov rax, qword [fcn.140080540]
lea rcx, [rbp - 0x30]
xor edx, edx
lea r8d, [rdx + 1]
call rax
mov rax, qword [fcn.140080540]
lea rcx, [rbp - 0x2e]
xor edx, edx
lea r8d, [rdx + 1]
call rax
mov rax, qword [fcn.140080540]
lea rcx, [rbp - 0x20]
xor edx, edx
lea r8d, [rdx + 8]
call rax
mov eax, edi
jmp 0x14005120b
mov eax, 0xffff9f00
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400946f0
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret