Function at 0x180016164
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
mov r8d, dword [0x18002f8c4]
mov rsi, rdx
mov r10d, dword [0x18002f948]
mov eax, 0x1de9
movzx r14d, word [0x18002f940]
cdq
mov rdi, qword [rsp + 0x70]
mov ebp, r10d
movsxd r15, dword [0x18002f8a4]
dec r10d
idiv r8d
xor edx, edx
mov dword [0x18002f948], r10d
movsxd r12, eax
mov bl, cl
mov rax, qword [0x18002f908]
inc r8d
mov rcx, qword [0x18002f8b0]
mov r13, r9
and ebp, 0x1f3
mov eax, dword [rax + 0x6ba0]
sub eax, 0x16b2
mov dword [0x18002f8c4], r8d
movzx r8d, word [0x18002f928]
cdqe
mov qword [rsp + 0x38], rax
mov eax, r14d
div qword [rsp + 0x68]
mov rax, qword [0x18002f8a8]
xor r14, 0x1080
mov r11, rdx
mov edx, 0x1a9c
movzx r9d, word [rax + rcx*4]
mov rax, qword [0x18002f8f8]
or r9w, dx
movsxd rdx, dword [0x18002f944]
or rdx, qword [0x18002f8e8]
movzx ecx, word [rdi + rax*8]
mov edi, 0xa5f
mov rax, qword [0x18002f920]
imul r8d, ecx
movsxd rcx, dword [0x18002f8c0]
xor rcx, 0x446
cmp word [rcx + rax*2], di
mov rdi, qword [rsp + 0x70]
je 0x180016303
movsxd rax, r10d
cmp rax, qword [0x18002f8e0]
ja 0x180016303
mov r10b, byte [rsp + 0x58]
movzx eax, r9w
add eax, 7
movzx edx, r9w
or byte [rax + rbp], 0x72
mov eax, dword [0x18002f8a4]
mov rcx, qword [0x18002f928]
lea eax, [rax + rax*2]
cdqe
and rcx, qword [rdi + rax*8]
imul rax, rcx, 0x19b0
movzx ecx, word [0x18002f938]
mov qword [0x18002f928], rax
mov eax, 0x1cf6
imul ecx, eax
mov eax, 0xcea
mov dword [0x18002f910], 0x1ba4
or cx, ax
mov eax, 0x1c51
sub cx, word [rsi + rdx*2]
add cx, ax
mov word [rsi + rdx*2], cx
mov rax, qword [0x18002f8f0]
movzx edx, bl
xor edx, dword [0x18002f8b0]
mov ebx, dword [rsp + 0x60]
movzx ecx, r8w
mov dword [rax + rcx*4 + 0x78], edx
mov edx, dword [0x18002f910]
jmp 0x180016357
mov ebx, dword [rsp + 0x60]
mov ecx, 0x124e
mov r10b, byte [rsp + 0x58]
add r10b, 0xff
movzx eax, r10b
movzx r8d, r10b
add r8, 0x1a1
movzx edx, word [rdx + rax*2]
imul edx, ecx
mov ecx, 0xa5e0
lea rax, [r8 + r8*2]
sub cx, dx
mov word [rax*2], cx
movzx edx, word [0x5dc4]
or edx, ebx
sub edx, dword [0x18002f910]
mov dword [0x18002f910], edx
inc ebx
mov r9, qword [0x18002f8c8]
mov ecx, dword [0x18002f8c4]
add ecx, 0xffffe71d
movzx r8d, r10b
shl r8d, 2
mov eax, dword [r9 + 0xd3c8]
imul eax, ecx
xor dword [0x18002f8a4], eax
mov eax, dword [r12 + 0x47c0]
xor eax, dword [0x18002f8b8]
add edx, eax
movsxd rax, dword [0x18002f914]
mov dword [0x18002f910], edx
movzx ecx, byte [r9 + 0x42a8]
mov rdx, qword [rsp + 0x38]
movzx edx, byte [rax + rdx]
imul edx, ecx
movzx ecx, byte [r8 + rbp]
sub dl, byte [r9 + 0xdee0]
movzx eax, dl
imul ecx, eax
mov eax, 0x1c60
movzx edx, r10b
mov byte [r8 + rbp], cl
mov ecx, 0xc80
imul edx, ecx
mov ecx, 0xb56
or dx, ax
mov rax, qword [0x18002f8b0]
mov word [0x18002f938], dx
cmp word [rsi + rax*2], cx
ja 0x180016406
cmp dword [0x18002f910], 0x1a91
jne 0x18001664b
movzx eax, word [r11]
mov r12d, 1
add r11, 2
cmp dword [r14 + rax*4], 0x12a7
jg 0x180016651
mov rax, qword [rsp + 0x50]
movsxd r8, dword [0x18002f8a4]
movzx ecx, r10b
sub r10b, r12b
cmp r8, qword [rax + rcx*8]
ja 0x180016651
add r8d, r12d
mov eax, 0x99c
mov dword [0x18002f8a4], r8d
movzx eax, word [rax]
and qword [r15 + rax*8], 0x1136
movzx eax, word [0x18002f8dc]
mov r8, qword [0x18002f920]
movsxd rcx, dword [r13 + rax*4]
movabs rax, 0xa40b88cf9e9926c5
sub rcx, qword [rdi + 0xa4a0]
mul rcx
mov eax, 0x1ea
shr rdx, 0xb
or word [r8 + r8 + 0x86a], dx
mov rcx, qword [0x18002f920]
sub ax, word [rsi + rcx*2]
mov word [rsi + rcx*2], ax
movzx eax, r10b
movsxd r8, dword [rdi + rax*8 + 0x20]
cmp r8, qword [0x18002f8e8]
mov r11, r8
je 0x180016510
shl r11, 2
movzx ecx, word [0x18002f940]
mov eax, ecx
sub eax, r8d
cdq
idiv ecx
add dword [0x18002f8a0], eax
mov rax, qword [0x18002f908]
xor dword [r11 + rax], 3
mov eax, r8d
imul eax, r8d
lea r11, [r11 + 4]
cdq
idiv r8d
xor edx, edx
add r8d, r12d
cdqe
div qword [0x18002f930]
movsxd rcx, r8d
cmp rcx, qword [0x18002f8e8]
mov r9, rax
mov qword [0x18002f930], rax
jne 0x1800164ba
jmp 0x180016517
mov r9, qword [0x18002f930]
mov edx, dword [0x18002f948]
movsxd r11, dword [0x18002f910]
lea eax, [rdx + 6]
sub edx, r12d
movsxd rcx, eax
movzx r8d, word [rcx + rcx + 0xe54]
mov dword [0x18002f948], edx
cmp r8d, r11d
je 0x1800165b3
mov rax, qword [0x18002f900]
mov ebp, r11d
mov r15, qword [0x18002f8f8]
sub ebp, r8d
movzx r14d, r10b
mov r10d, dword [0x18002f914]
lea rdi, [rax + r8*4]
movzx r8d, word [0x18002f8dc]
mov eax, r10d
neg r9
or eax, 0x1e4a
sub r10d, r12d
mov dword [0x18002f8a4], eax
mov dword [0x18002f914], r10d
mov eax, dword [rdi]
lea rdi, [rdi + 4]
movzx ecx, word [rsi + r15*2]
cdq
idiv r14d
mov qword [0x18002f930], r9
cdq
idiv ecx
and r8w, ax
mov word [0x18002f8dc], r8w
sub rbp, r12
jne 0x18001656c
jmp 0x1800165c2
mov r10d, dword [0x18002f914]
movzx r8d, word [0x18002f8dc]
add r8w, r12w
mov word [0x18002f8dc], r8w
movzx eax, r8w
mov r8, r11
and r8, qword [0x18002f8b8]
add rax, 0x167
mov rcx, r8
lea r9, [rax + rax*2]
movabs rax, 0x802a049880ae130b
mul r8
sub rcx, rdx
shr rcx, 1
add rcx, rdx
xor edx, edx
shr rcx, 0xc
imul rcx, rcx, 0x1553
sub r8, rcx
movsxd rcx, r10d
mov rax, r8
div rcx
sub ax, word [r9*2]
mov word [r9*2], ax
sub ebx, dword [0x18002f8c0]
add ebx, 0x393
mov dword [0x18002f8c0], ebx
mov eax, dword [r13 + 0x4570]
mov dword [0x18002f8a0], eax
jmp 0x180016697
mov r12d, 1
movsxd rcx, dword [0x18002f948]
mov rax, qword [0x18002f918]
mov qword [rax + rcx*8], 0xc0f
mov ecx, 0x8440
movsxd rax, dword [0x18002f8a4]
mov word [rax*2 + 0x86a], cx
movzx eax, word [0x18002f944]
movzx ecx, r10b
sub ax, word [r11 + rcx*2]
mov word [r11 + rcx*2], ax
add dword [0x18002f944], r12d
mov rbx, qword [rsp + 0x30]
mov eax, 0x15b7
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
pop r15
pop r14
pop r13
pop r12
pop rdi
ret