Function at 0x1400166b8
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r15
lea rbp, [rsp - 0xa0]
sub rsp, 0x1a0
mov qword [rbp - 0x58], 0xfffffffffffffffe
mov rax, qword [0x140046180]
xor rax, rsp
mov qword [rbp + 0x98], rax
mov rsi, r8
mov rbx, rdx
mov r12, rcx
xor r13d, r13d
cmp qword [rdx + 0x10], r13
jne 0x140016706
lea eax, [r13 + 6]
jmp 0x140016b77
mov rcx, r8
call fcn.1400065b4
mov r15d, 0xf
mov qword [rbp + 0x40], r15
mov qword [rbp + 0x38], r13
mov byte [rbp + 0x28], r13b
lea rcx, [rbp + 0x60]
lea rdx, [0x14003a938]
lea r8d, [r15 + 0x22]
call fcn.1400230b0
lea edx, [r15 + 0x20]
mov al, byte [rbp + rdx + 0x5f]
xor byte [rbp + rdx + 0x60], al
dec rdx
test rdx, rdx
jg 0x140016738
xor byte [rbp + 0x60], 0xe
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x60]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp + 0x60]
lea rcx, [rbp + 0x28]
call fcn.140002348
or rdi, 0xffffffffffffffff
mov r9, rdi
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp + 0x28]
call fcn.14000a82c
mov rax, qword [0x14003a970]
mov qword [rbp + 0x50], rax
movzx eax, word [0x14003a978]
mov word [rbp + 0x58], ax
mov al, byte [0x14003a97a]
mov byte [rbp + 0x5a], al
lea ecx, [rdi + 0xa]
mov al, byte [rbp + rcx + 0x4f]
xor byte [rbp + rcx + 0x50], al
dec rcx
test rcx, rcx
jg 0x1400167a4
xor byte [rbp + 0x50], 0xed
lea rdx, [rbp + 0x50]
lea rcx, [rbp + 0x28]
call fcn.14000a6ec
mov qword [rbp + 0x18], r15
mov qword [rbp + 0x10], r13
mov byte [rbp], r13b
lea rcx, [rsp + 0x68]
call fcn.14000259c
nop
lea rcx, [rbp - 0x78]
call fcn.14000259c
nop
mov qword [rsp + 0x58], r13
mov ecx, 0x400
mov qword [rsp + 0x60], rcx
call fcn.140014420
mov qword [rsp + 0x50], rax
lea rcx, [rsp + 0x68]
call fcn.1400163c0
mov qword [rsp + 0x58], r13
mov qword [rbp - 0x10], r15
mov qword [rbp - 0x18], r13
mov byte [rbp - 0x28], r13b
mov r9, rdi
xor r8d, r8d
lea rdx, [rbp + 0x28]
lea rcx, [rbp - 0x28]
call fcn.14000278c
nop
cmp qword [rbp + 0x10], r13
jbe 0x140016847
mov r9, rdi
xor r8d, r8d
lea rdx, [rbp]
lea rcx, [rbp - 0x28]
call fcn.14000278c
mov dword [rbp + 0x50], r13d
mov qword [rbp + 0x78], r15
mov qword [rbp + 0x70], r13
mov byte [rbp + 0x60], r13b
mov r8d, 3
lea rdx, [0x140039840]
lea rcx, [rbp + 0x60]
call fcn.140002348
nop
lea rdx, [rbp - 0x28]
cmp qword [rbp - 0x10], 0x10
cmovae rdx, qword [rbp - 0x28]
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x40], r13
mov byte [rbp - 0x50], r13b
xor eax, eax
mov rcx, rdi
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rbp - 0x50]
call fcn.140002348
nop
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x78]
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x50]
mov rcx, r12
call fcn.140015c7c
mov edi, eax
cmp qword [rbp - 0x38], 0x10
jb 0x1400168f6
mov rcx, qword [rbp - 0x50]
call fcn.1400233e4
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x40], r13
mov byte [rbp - 0x50], r13b
cmp qword [rbp + 0x78], 0x10
jb 0x140016912
mov rcx, qword [rbp + 0x60]
call fcn.1400233e4
mov ebx, r13d
test edi, edi
je 0x140016a2e
mov edx, 0x5a2bc0
mov ecx, 0xb9f5b9c
call fcn.140022154
mov ecx, 0xbb8
call rax
mov qword [rbp + 0x78], r15
mov qword [rbp + 0x70], r13
mov byte [rbp + 0x60], r13b
mov r8d, 3
lea rdx, [0x140039840]
lea rcx, [rbp + 0x60]
call fcn.140002348
nop
lea rdx, [rbp - 0x28]
cmp qword [rbp - 0x10], 0x10
cmovae rdx, qword [rbp - 0x28]
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x40], r13
mov byte [rbp - 0x50], r13b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rbp - 0x50]
call fcn.140002348
nop
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x78]
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x50]
mov rcx, r12
call fcn.140015c7c
mov edi, eax
cmp qword [rbp - 0x38], 0x10
jb 0x1400169df
mov rcx, qword [rbp - 0x50]
call fcn.1400233e4
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x40], r13
mov byte [rbp - 0x50], r13b
cmp qword [rbp + 0x78], 0x10
jb 0x1400169fb
mov rcx, qword [rbp + 0x60]
call fcn.1400233e4
inc ebx
cmp ebx, 3
jl 0x140016915
test edi, edi
je 0x140016a2e
cmp edi, 2
je 0x140016abc
cmp edi, 4
je 0x140016abc
cmp edi, 1
je 0x140016ab5
cmp edi, 3
je 0x140016ab5
mov eax, 0x51eb851f
mul dword [rbp + 0x50]
shr edx, 5
mov edi, 4
cmp edx, edi
je 0x140016ae3
cmp edx, 2
jne 0x140016ae1
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x40], r13
mov byte [rbp - 0x50], r13b
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
lea rcx, [rbp - 0x50]
call fcn.140002348
nop
lea r8, [rbp]
mov rdx, rsi
lea rcx, [rbp - 0x50]
call fcn.14001a840
test eax, eax
je 0x140016ac3
cmp qword [rbp - 0x38], 0x10
jb 0x140016a93
mov rcx, qword [rbp - 0x50]
call fcn.1400233e4
mov edi, r13d
cmp qword [rbp - 0x10], 0x10
jb 0x140016aa6
mov rcx, qword [rbp - 0x28]
call fcn.1400233e4
cmp qword [rbp + 0x10], r13
jbe 0x140016af7
or rdi, 0xffffffffffffffff
jmp 0x140016809
mov edi, 1
jmp 0x140016ae6
mov edi, 3
jmp 0x140016ae6
cmp qword [rbp - 0x38], 0x10
jb 0x140016ad3
mov rcx, qword [rbp - 0x50]
call fcn.1400233e4
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x40], r13
mov byte [rbp - 0x50], r13b
jmp 0x140016ae6
jmp 0x140016ae6
mov edi, r13d
cmp qword [rbp - 0x10], 0x10
jb 0x140016af7
mov rcx, qword [rbp - 0x28]
call fcn.1400233e4
nop
lea rcx, [rsp + 0x50]
call fcn.1400054b8
nop
mov r8, qword [rbp - 0x70]
mov r9, r8
mov r8, qword [r8]
lea rdx, [rbp + 0x50]
lea rcx, [rbp - 0x78]
call fcn.1400024e4
nop
mov rcx, qword [rbp - 0x70]
call fcn.1400233e4
nop
mov r8, qword [rsp + 0x70]
mov r9, r8
mov r8, qword [r8]
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x68]
call fcn.1400024e4
nop
mov rcx, qword [rsp + 0x70]
call fcn.1400233e4
nop
cmp qword [rbp + 0x18], 0x10
jb 0x140016b59
mov rcx, qword [rbp]
call fcn.1400233e4
mov qword [rbp + 0x18], r15
mov qword [rbp + 0x10], r13
mov byte [rbp], r13b
cmp qword [rbp + 0x40], 0x10
jb 0x140016b75
mov rcx, qword [rbp + 0x28]
call fcn.1400233e4
mov eax, edi
mov rcx, qword [rbp + 0x98]
xor rcx, rsp
call fcn.140022ee0
add rsp, 0x1a0
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret