Function at 0x1801f79a0
Capabilities:
Encode data using xor

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
push rbx
push rbp
push rdi
push r13
push r14
push r15
sub rsp, 0x38
mov rbx, qword [rsp + 0xa0]
mov rdi, rdx
mov byte [rsp + 0x20], 0
mov r13, rcx
mov rbp, 0xffffffffffffffff
test rbx, rbx
je 0x1801f79f2
cmp qword [rcx + 0x70], 0
je 0x1801f79e2
lea eax, [rbp + 3]
jmp 0x1801f79f4
mov rax, rbp
inc rax
cmp byte [rbx + rax], 0
jne 0x1801f79e5
inc eax
jmp 0x1801f79f4
xor eax, eax
movsxd r15, r8d
cdqe
mov qword [rsp + 0xa0], r15
lea rcx, [r15 + 0x28]
add rcx, rax
call fcn.1802a4320
mov r14, rax
test rax, rax
jne 0x1801f7a27
lea eax, [r14 + 1]
add rsp, 0x38
pop r15
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret
mov qword [rsp + 0x70], rsi
lea rsi, [rax + 0x21]
mov rcx, rsi
mov qword [rsp + 0x30], r12
sub rcx, rdi
nop dword [rax + rax]
movzx eax, byte [rdi]
mov byte [rcx + rdi], al
lea rdi, [rdi + 1]
test al, al
jne 0x1801f7a40
mov r12, qword [r13 + 0x40]
test r12, r12
je 0x1801f7ab0
cmp dword [r13 + 0x1c], 0
je 0x1801f7a70
mov r8d, dword [r13 + 0x50]
mov rcx, rsi
mov rdx, qword [r13 + 0x48]
call fcn.1801f7210
jmp 0x1801f7ab0
movzx eax, byte [rsi]
mov r15, rsi
mov rdi, rsi
test al, al
je 0x1801f7aa4
nop dword [rax]
movsx edx, al
mov rcx, r12
call fcn.180299684
test rax, rax
jne 0x1801f7a99
movzx eax, byte [rdi]
mov byte [r15], al
inc r15
movzx eax, byte [rdi + 1]
inc rdi
test al, al
jne 0x1801f7a80
mov byte [r15], 0
mov r15, qword [rsp + 0xa0]
cmp dword [r13 + 0x18], 0
je 0x1801f7b07
cmp dword [r13 + 0x1c], 0
je 0x1801f7ac8
mov rcx, rsi
call fcn.1801f69f0
jmp 0x1801f7b07
mov r8, rsi
mov rax, rbp
nop
inc rax
cmp byte [rsi + rax], 0
jne 0x1801f7ad0
lea rdx, [rsi - 1]
add rdx, rax
cmp rsi, rdx
jae 0x1801f7b07
nop word [rax + rax]
movzx eax, byte [rdx]
movzx ecx, byte [r8]
mov byte [r8], al
inc r8
mov byte [rdx], cl
dec rdx
cmp r8, rdx
jb 0x1801f7af0
xor r12d, r12d
mov rdx, rsi
mov r8d, r12d
mov ecx, r12d
movsx eax, byte [rdx]
test al, al
je 0x1801f7b2b
shl r8d, 8
inc rdx
or r8d, eax
inc ecx
cmp ecx, 4
jl 0x1801f7b13
movzx r9d, byte [rdx]
test r9b, r9b
je 0x1801f7b69
nop dword [rax]
nop dword [rax + rax]
mov eax, r8d
lea rdx, [rdx + 1]
mov ecx, r8d
sar eax, 0x1b
shl ecx, 5
and eax, 0x1f
mov r8d, eax
or r8d, ecx
movsx ecx, r9b
movzx r9d, byte [rdx]
xor r8d, ecx
test r9b, r9b
jne 0x1801f7b40
xor edx, edx
mov qword [r14 + 0x10], r12
mov eax, r8d
mov qword [r14 + 0x18], r12
div dword [r13]
mov eax, dword [rsp + 0x80]
mov byte [r14], al
mov eax, dword [rsp + 0x88]
mov byte [r14 + 1], al
movzx eax, word [rsp + 0x98]
mov word [r14 + 2], ax
mov rax, qword [rsp + 0x90]
movsxd rdi, edx
mov qword [r14 + 8], rax
test rbx, rbx
je 0x1801f7d00
mov byte [r14 + 0x20], 1
cmp qword [r13 + 0x70], r12
je 0x1801f7c18
mov rcx, rbx
mov byte [r14 + 0x20], 3
call fcn.1802b4260
mov ebx, eax
test eax, eax
jle 0x1801f7bef
cmp eax, dword [r13 + 0x68]
jg 0x1801f7bef
dec eax
movsxd rcx, eax
mov rax, qword [r13 + 0x70]
mov rdx, qword [rax + rcx*8]
mov qword [r15 + rsi + 1], rdx
jmp 0x1801f7cc7
mov ecx, 2
call fcn.1802af008
mov rcx, rax
lea rdx, str.error:_bad_morph._alias_index:__d_n
mov r8d, ebx
call fcn.1800f14a0
mov rdx, r12
mov qword [r15 + rsi + 1], rdx
jmp 0x1801f7cc7
sub r15, rbx
lea rcx, [r15 + rsi]
nop
movzx eax, byte [rbx]
mov byte [rcx + rbx + 1], al
lea rbx, [rbx + 1]
test al, al
jne 0x1801f7c20
cmp dword [r13 + 0x18], r12d
je 0x1801f7cc7
movzx r8d, byte [r14 + 0x20]
cmp dword [r13 + 0x1c], r12d
je 0x1801f7c6e
test r8b, r8b
je 0x1801f7c64
movzx ecx, byte [r14]
add rcx, 0x22
add rcx, r14
test r8b, 2
je 0x1801f7c67
mov rcx, qword [rcx]
call fcn.1801f69f0
jmp 0x1801f7cc7
mov rcx, r12
call fcn.1801f69f0
jmp 0x1801f7cc7
test r8b, r8b
je 0x1801f7c89
movzx edx, byte [r14]
add rdx, 0x22
add rdx, r14
test r8b, 2
je 0x1801f7c90
mov rdx, qword [rdx]
jmp 0x1801f7c90
mov rdx, r12
nop dword [rax]
cmp byte [rdx + rbp + 1], r12b
lea rbp, [rbp + 1]
jne 0x1801f7c90
lea r8, [rbp - 1]
add r8, rdx
cmp rdx, r8
jae 0x1801f7cc7
nop word [rax + rax]
movzx eax, byte [r8]
movzx ecx, byte [rdx]
mov byte [rdx], al
inc rdx
mov byte [r8], cl
dec r8
cmp rdx, r8
jb 0x1801f7cb0
movzx edx, byte [r14 + 0x20]
test dl, dl
je 0x1801f7ce5
movzx ecx, byte [r14]
add rcx, 0x22
add rcx, r14
test dl, 2
je 0x1801f7ce8
mov rcx, qword [rcx]
jmp 0x1801f7ce8
mov rcx, r12
lea rdx, [0x180379ee4]
call fcn.180299a60
test rax, rax
je 0x1801f7d04
add byte [r14 + 0x20], 4
jmp 0x1801f7d04
mov byte [r14 + 0x20], r12b
mov rax, qword [r13 + 8]
mov rbx, qword [rax + rdi*8]
test rbx, rbx
jne 0x1801f7d1a
mov qword [rax + rdi*8], r14
jmp 0x1801f7e85
lea r11, [rbx + 0x10]
movzx edi, byte [rsp + 0xa8]
mov ebp, 0xffe7
cmp qword [r11], r12
je 0x1801f7dd1
cmp qword [rbx + 0x18], r12
jne 0x1801f7dc0
lea r8, [rbx + 0x21]
mov rax, rsi
sub r8, rsi
nop dword [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x1801f7d63
inc rax
test ecx, ecx
jne 0x1801f7d50
test edx, edx
jne 0x1801f7dc0
test dil, dil
jne 0x1801f7dbb
mov r10, qword [rbx + 8]
test r10, r10
je 0x1801f7db5
movsx r9d, word [rbx + 2]
mov r8d, r12d
sub r9d, 1
js 0x1801f7db5
lea eax, [r9 + r8]
cdq
sub eax, edx
sar eax, 1
movsxd rcx, eax
movzx edx, word [r10 + rcx*2]
cmp dx, bp
je 0x1801f7e4f
lea ecx, [rax - 1]
cmovbe ecx, r9d
inc eax
cmp bp, dx
mov r9d, ecx
cmovae r8d, eax
cmp r8d, ecx
jle 0x1801f7d83
mov qword [rbx + 0x18], r14
jmp 0x1801f7dc0
mov byte [rsp + 0x20], 1
mov rbx, qword [r11]
cmp qword [rbx + 0x10], r12
lea r11, [rbx + 0x10]
jne 0x1801f7d34
lea rdx, [rbx + 0x21]
sub rdx, rsi
nop dword [rax + rax]
movzx ecx, byte [rsi]
movzx eax, byte [rsi + rdx]
sub ecx, eax
jne 0x1801f7df2
inc rsi
test eax, eax
jne 0x1801f7de0
test ecx, ecx
jne 0x1801f7e42
test dil, dil
jne 0x1801f7e6f
mov r9, qword [rbx + 8]
test r9, r9
je 0x1801f7e3e
movsx r8d, word [rbx + 2]
sub r8d, 1
js 0x1801f7e3e
nop
lea eax, [r8 + r12]
cdq
sub eax, edx
sar eax, 1
movsxd rcx, eax
movzx edx, word [r9 + rcx*2]
cmp dx, bp
je 0x1801f7e6a
lea ecx, [rax - 1]
cmovbe ecx, r8d
inc eax
cmp bp, dx
mov r8d, ecx
cmovae r12d, eax
cmp r12d, ecx
jle 0x1801f7e10
mov qword [rbx + 0x18], r14
cmp byte [rsp + 0x20], 0
jne 0x1801f7e6f
mov qword [rbx + 0x10], r14
jmp 0x1801f7e85
mov rcx, r10
call fcn.1802a430c
mov rax, qword [r14 + 8]
mov qword [rbx + 8], rax
movzx eax, word [r14 + 2]
mov word [rbx + 2], ax
jmp 0x1801f7e7d
mov rcx, r9
jmp 0x1801f7e52
mov rcx, qword [r14 + 8]
test rcx, rcx
je 0x1801f7e7d
call fcn.1802a430c
mov rcx, r14
call fcn.1802a430c
mov rsi, qword [rsp + 0x70]
xor eax, eax
mov r12, qword [rsp + 0x30]
add rsp, 0x38
pop r15
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret