Function at 0x180006874
Capabilities:
Encode data using xor

Disassembly:
mov byte [rsp + 8], cl
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x18
mov rbx, qword [rsp + 0xa8]
mov r11, rdx
mov rbp, qword [rsp + 0x90]
xor edx, edx
mov rsi, qword [rsp + 0x98]
mov ecx, 0xffff
mov r15, qword [rsp + 0xa0]
mov r12, r9
dec dword [rbx]
mov eax, dword [rbx]
movzx r14d, word [0x18002f940]
movzx r9d, r8b
mov qword [rsp + 0xa8], r9
lea eax, [rax*2 + 1]
movsxd r10, eax
movzx eax, byte [r10 + rbp]
add word [0x18002f93c], cx
mov rcx, qword [rsp + 0x88]
mov qword [rsp + 0x68], rax
dec rcx
mov rax, qword [0x18002f8e0]
div rcx
movsxd rax, dword [0x18002f8a4]
mov qword [rsp + 0x78], rax
mov eax, dword [rbx]
mov qword [rsp], rdx
mov edx, 0x146d
lea eax, [rax*2 + 1]
movsxd rcx, eax
lea rax, [r9 + r9*2]
mov r9b, byte [0x18002f910]
movzx r8d, byte [rcx + rbp]
sub r8d, dword [r11 + rax*4]
imul eax, dword [0x18002f944], 0x1817
mov rcx, qword [0x18002f930]
movzx r11d, word [rsi + 0x30dc]
movsxd rdi, r8d
mov word [rsp + 0x70], r11w
movsxd r13, eax
movzx eax, word [0x18002f938]
or rax, rcx
dec rcx
mov qword [0x18002f930], rcx
dec dword [rbx]
movsxd rcx, dword [rbx]
mov qword [rsp + 0x88], rax
movsxd r10, dword [rcx*8 + 0x146d]
cmp r10d, 0x17a0
je 0x180006a4f
mov rax, qword [rsp + 0xa8]
lea r11, [r15 + r10*4]
movzx ecx, r9b
xor edx, edx
div rcx
movzx eax, byte [rsp + 0x60]
mov r8, r12
mov qword [rsp + 0xa8], rax
sub r8, r14
movzx eax, r9b
sub rsi, r15
mov r15, qword [rsp + 0xa8]
lea r9, [r14 + r10*8]
mov rbp, rdx
mov word [rsp + 0x60], ax
movzx r14d, ax
mov dword [0x18002f8c4], r10d
xor edx, edx
xor qword [r9], rbp
inc r10d
mov eax, dword [r11]
mov dword [r8 + r9 + 0x70], eax
lea r9, [r9 + 8]
movsxd rax, dword [rsi + r11 + 0x14]
add r11, 4
imul rax, qword [0x18002f8b8]
div r15
movzx ecx, ax
movzx eax, word [0x18002f938]
imul eax, ecx
mov word [0x18002f938], ax
mov eax, dword [rbx]
add eax, 0xc
movsxd rcx, eax
movzx eax, r14w
sub ax, word [rdi + rcx*2]
mov word [rdi + rcx*2], ax
cmp r10d, 0x17a0
jne 0x1800069d4
mov rbp, qword [rsp + 0x90]
mov edx, 0x146d
mov r15, qword [rsp + 0xa0]
movzx r11d, word [rsp + 0x70]
inc qword [rdx]
mov rax, qword [rdx]
xor edx, edx
mov rcx, qword [0x18002f908]
movzx eax, byte [rax + rbp]
div qword [rsp + 0x88]
mov rax, qword [0x18002f8f8]
mov r9, rdx
mov rdx, qword [rsp + 0x78]
mov dword [rcx + rax*4 + 0xa0], 0xa75
mov eax, 0x8e4
dec qword [0x18002f8f8]
mov rax, qword [rax]
lea rcx, [rax + rax*2]
or dword [r12 + rcx*4], 0xe3e
mov eax, dword [rbx]
lea ecx, [rax + rax*2]
movsxd r8, ecx
mov rcx, qword [rsp + 0x68]
mov al, byte [r12 + r8*4]
neg al
xor byte [r8 + rcx], al
mov eax, 0x146d
movzx ecx, byte [rdx + 0xa50]
bts ecx, 8
mov rax, qword [rax]
mov dword [r15 + rax*4], ecx
movzx r8d, byte [rdx]
xor edx, edx
mov rax, qword [0x18002f8f8]
shl r8, 5
movzx ecx, word [rdi + rax*2]
mov eax, 0x1653
div ecx
mov rcx, qword [rsp]
movsxd rax, edx
and qword [r8 + rcx], rax
mov rax, qword [0x18002f930]
inc qword [0x18002f8f8]
mov rcx, rax
movzx edx, word [0x18002f93c]
dec rax
mov qword [0x18002f930], rax
cmp rdx, rcx
je 0x180006b2c
movzx eax, r11w
cmp dword [rax*4 + 0x119d], 0x1dac
jle 0x180006b51
movzx eax, word [rdi + 0x1592]
xor edx, edx
movzx ecx, r9w
div ecx
movsxd rax, dword [rbx]
or dl, byte [0x18002f944]
mov byte [rax + rbp], dl
mov dword [0x18002f8a0], 0xa73
mov eax, dword [r13 + 0x614]
xor eax, 0x1211
add rsp, 0x18
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret