Function at 0x1800180ec
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov r10, qword [0x18002f908]
mov eax, 0x1cdc
movsxd r11, dword [0x18002f8a4]
cdq
movsxd rdi, dword [0x18002f8c4]
mov r13d, 0x1dc4
sub r13, qword [rcx + 0x3230]
mov rbx, r8
mov r14, qword [0x18002f920]
mov ecx, 0xffff
idiv dword [r10 + r11*4]
movsxd rax, dword [0x18002f948]
movzx r12d, r14w
movzx ebp, word [0x18002f938]
or rdi, rax
movzx eax, word [0x18002f93c]
movzx esi, word [0x18002f940]
mov qword [rsp + 0x10], rax
add ax, cx
mov word [0x18002f93c], ax
movsxd rax, dword [0x18002f914]
mov r10, qword [r8 + 0x74a0]
mov qword [rsp + 8], rax
add r10, 0xccc
add eax, 6
mov dword [rsp], edx
movsxd rcx, eax
mov qword [rsp + 0x20], r13
movzx eax, word [r8 + rcx*8]
mov rcx, qword [0x18002f8b0]
mov word [rsp + 0x90], ax
dec rcx
mov rax, qword [r8]
mov rax, qword [r8 + rax*8]
mov qword [rsp + 0x18], rax
movsxd rax, dword [r10]
movsxd r15, dword [rax*4 + 0xda1]
mov qword [0x18002f8b0], rcx
mov r9, r15
cmp r15, rcx
jbe 0x18001827a
mov r8, r15
lea r11, [r15*4 + 0xe2]
shl r8, 5
mov r13d, 1
add r8, qword [rsp + 0x80]
xor edx, edx
mov rax, r9
div rdi
add r15d, r13d
and rdx, r14
movsxd r9, r15d
mov qword [r8], rdx
xor edx, edx
add dword [r11], 0x1289
lea r8, [r8 + 0x20]
movsxd rax, dword [rsi + 0x19dc]
lea r11, [r11 + 4]
mov rcx, qword [rbx]
div rdi
mov eax, dword [0x18002f948]
shl rcx, 4
mov rdi, rdx
or dword [rcx + 0x1303], eax
mov rax, qword [0x18002f8c8]
mov ecx, dword [rax + 0x9e18]
mov rax, qword [0x18002f8b0]
sub rax, r13
mov dword [0x18002f8d8], ecx
mov qword [0x18002f8b0], rax
cmp r9, rax
jbe 0x180018275
mov r14, qword [0x18002f920]
jmp 0x1800181fe
mov r13, qword [rsp + 0x20]
mov eax, dword [r10]
mov r9d, 0x13b8
movsxd rdi, dword [rsp]
add eax, 7
mov r8, qword [rsp + 0x18]
mov r15, qword [rsp + 0x98]
mov r14, qword [rsp + 8]
movsxd rcx, eax
mov eax, dword [0x18002f910]
add dword [rsi + rcx*4], eax
movsxd rax, dword [r10]
mov ecx, dword [rax*4 + 0x1303]
add dword [0x18002f948], ecx
mov rax, qword [0x18002f8d0]
sub rax, qword [rbx + rdi*8]
mov qword [rbx + rdi*8], rax
mov rdx, qword [0x18002f8b0]
movzx eax, bp
add rdx, rdx
mov ecx, dword [r10 + rdx*8]
imul ecx, dword [r8 + rax*8 + 0xd8]
mov eax, 0xffff
add bp, ax
mov dword [r10 + rdx*8], ecx
mov eax, dword [r10]
shl eax, 2
movsxd rcx, eax
mov rax, qword [0x18002f8f0]
cmp dword [rax + rcx*4], r9d
jne 0x1800183d4
mov r11d, 0x3b28
mov edi, 1
movsxd r8, dword [0x18002f914]
xor edx, edx
movzx ecx, r12w
mov eax, 0x363
div ecx
movsxd rcx, r11d
xor edx, edx
add dword [rsi + r8*4], eax
add r11d, 3
mov rax, qword [0x18002f900]
mov dword [rax + rcx*4], r14d
lea ecx, [r14 + r9]
movsxd rax, r9d
div qword [0x18002f928]
mov qword [0x18002f928], rax
mov rax, qword [0x18002f920]
mov byte [r13 + rax*2], 0xd5
mov eax, 0x11a3
xor r12w, ax
mov eax, dword [0x18002f8c4]
add eax, edi
mov dword [0x18002f8c4], eax
cdqe
mov byte [rax + r15], cl
mov rcx, qword [0x18002f8f0]
movzx edx, word [0x18002f8dc]
add rdx, rdx
mov eax, dword [rcx + rdx*8]
imul eax, dword [rsi + 0x2ed8]
mov dword [rcx + rdx*8], eax
mov eax, 0x159
sub eax, dword [0x18002f8c4]
mov dword [0x18002f8c4], eax
mov word [0x18002f938], r9w
add r9d, edi
mov eax, dword [r10]
shl eax, 2
movsxd rcx, eax
mov rax, qword [0x18002f8f0]
cmp r9d, dword [rax + rcx*4]
je 0x180018312
mov edi, dword [rsp]
mov rax, qword [0x18002f8f8]
mov ecx, 1
mov r11, qword [rsp + 0x10]
movzx r9d, byte [rax + r11]
add rax, rcx
mov qword [0x18002f8f8], rax
mov rax, qword [0x18002f928]
sub rax, rcx
mov qword [0x18002f928], rax
cmp r9, rax
jb 0x1800184c2
mov rdi, qword [rsp + 0x10]
lea r11, [r9 + r15]
mov r15d, ecx
mov eax, dword [r10 + 0x28c8]
add bp, r15w
add eax, r9d
movzx r8d, bp
cdq
movzx r12d, r14w
add r9d, r15d
movzx ecx, byte [r8 + rdi]
idiv ecx
mov eax, 0x94
mov rcx, r14
or byte [r11], dl
sub al, byte [rdi + 0x1b0a]
mov byte [r11], al
movabs rax, 0x7b700b1dc8535f5f
mul r14
mov eax, 0x1597
add r11, r15
sub rcx, rdx
mov r14d, r8d
shr rcx, 1
add rcx, rdx
shr rcx, 0xc
movzx ecx, cx
imul ecx, eax
movsxd rax, dword [r10]
sub r10, 4
movzx eax, word [rax + rax + 0xf31]
sub r12w, cx
mov rcx, qword [0x18002f928]
sub rcx, r15
mov word [rsp + 0x90], ax
movsxd rax, r9d
mov qword [0x18002f928], rcx
cmp rax, rcx
jae 0x18001841a
mov r15, qword [rsp + 0x98]
mov edi, dword [rsp]
mov r11, qword [rsp + 0x10]
movsxd rax, dword [0x18002f914]
mov r9d, 1
add edi, r9d
mov qword [rbx + rax*8], 0x1275
mov edx, dword [0x18002f914]
movzx eax, word [0x18002f940]
sub edx, r9d
mov ecx, dword [0x18002f8c0]
imul ecx, eax
mov dword [0x18002f914], edx
lea eax, [rdx + rdx]
xor edx, edx
movsxd r8, eax
mov rax, qword [0x18002f8f8]
mov dword [0x18002f8c0], ecx
mov rcx, qword [0x18002f918]
movzx eax, byte [rax + r11]
div qword [rcx + r8*8]
mov eax, 0x1303
mov qword [rcx + r8*8], rdx
mov r8, qword [rsp + 0x88]
movsxd rcx, dword [rax]
imul eax, dword [0x18002f910], 0x179d
movsxd rdx, eax
mov rax, qword [0x18002f8c8]
sub rdx, qword [rax + rcx*8]
add rdx, qword [0x18002f8d0]
movsxd rcx, dword [0x18002f948]
mov rax, qword [0x18002f8f0]
mov qword [0x18002f930], rdx
mov r14d, dword [r8 + 0x35a0]
movzx edx, word [0x18002f938]
movzx ecx, word [rax + rcx*4]
lea eax, [rdi + 0x20]
mov dword [rsp + 8], r14d
mov word [rdx*8 + 0xf31], cx
sub dword [0x18002f948], r9d
movsxd rcx, eax
mov eax, 0x9f
mov dword [r8 + rcx*4], eax
movzx eax, bp
movzx r9d, word [rax*8 + 0xf31]
cmp r9, 0x619
jae 0x180018707
movsxd rax, edi
lea r11, [r15 + 8]
mov qword [rsp + 0x20], rax
lea rdi, [r9*4]
add rdi, r13
movzx eax, r12w
movzx r12d, word [rsp + 0x90]
mov r8d, r9d
shl r8, 4
add r11, r9
mov r14d, 0xda1
mov r15d, eax
sub r14, r13
mov r13, qword [rsp + 0x20]
movzx ecx, byte [r11]
xor edx, edx
mov rax, qword [r8 + rbx]
div rcx
mov byte [r11], dl
xor edx, edx
movsxd rax, dword [r10]
add dword [rax*4 + 0x1303], r9d
movzx eax, bp
inc bp
shl rax, 4
movsxd rax, dword [rax + 0xe2]
and qword [0x18002f8b0], rax
mov eax, dword [r10]
add eax, 0x18
movsxd rcx, eax
movzx eax, bp
div qword [rbx + rcx*8]
mov qword [rbx + rcx*8], rdx
mov edx, 1
mov rax, qword [0x18002f8f0]
mov ecx, dword [r8 + rax]
mov dword [r14 + rdi], ecx
mov eax, dword [r10]
shl eax, 2
movsxd rcx, eax
mov rax, qword [rsp + 0x80]
mov eax, dword [rax + r13*8]
mov dword [rcx*4 + 0xda1], eax
mov rax, qword [0x18002f8f8]
add rax, rdx
mov qword [0x18002f8f8], rax
or al, 0x53
mov byte [rdi], al
movsxd rcx, dword [0x18002f914]
movzx eax, r12w
imul eax, r15d
add dword [rsi + rcx*4], eax
mov eax, 0xffff
add r12w, ax
movsxd rax, dword [0x18002f914]
cmp rax, qword [0x18002f930]
jb 0x1800186d8
add qword [rbx], rdx
xor edx, edx
mov rax, qword [rbx]
add rax, rax
movsxd rax, dword [rsi + rax*8]
div qword [0x18002f8b0]
mov dword [0x18002f910], 0x1caf
mov edx, 1
mov qword [0x18002f8b0], rax
add r9d, edx
add r11, rdx
add r8, 0x10
add rdi, 4
cmp r8, 0x6190
jl 0x1800185f3
mov r15, qword [rsp + 0x98]
mov r11, qword [rsp + 0x10]
mov r14d, dword [rsp + 8]
jmp 0x180018710
movzx r12d, word [rsp + 0x90]
movsxd rax, dword [0x18002f8a4]
mov ecx, 0x9f
cmp word [rax + rax + 0xf31], cx
jne 0x1800187f5
movsxd rax, dword [0x18002f948]
movsxd r8, dword [0x18002f8c4]
mov rdx, qword [0x18002f8f0]
mov r10, qword [rsp + 0x80]
movzx r9d, r12w
mov ecx, dword [r10 + rax*8]
or ecx, dword [0x18002f8b8]
or ecx, 0xa89
add dword [rdx + r8*4], ecx
mov r8, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x18]
mov rdx, qword [0x18002f920]
mov dword [0x18002f910], 0x89f
movsxd rax, dword [r8]
movzx ecx, word [rcx + rax*8]
add cx, word [r10 + 0xd9d0]
movzx eax, byte [r15]
and cx, r14w
or bp, cx
movzx ecx, byte [r11 + rax*4 + 2]
mov eax, dword [0x18002f948]
imul eax, ecx
mov dword [0x18002f948], eax
movzx eax, byte [0x18002f8f8]
imul ecx, eax, 0x71
mov eax, 0xe4
sub al, cl
movzx ecx, bp
xor byte [rdx + r15], al
mov eax, dword [r8 + 0x2ebc]
cdq
idiv r9d
cdq
idiv ecx
mov eax, dword [0x18002f948]
movsxd r8, edx
lea eax, [rax*4 + 2]
movsxd rcx, eax
mov qword [r10 + rcx*8], r8
mov eax, dword [0x18002f8c4]
lea ecx, [r9 + rax]
jmp 0x180018801
mov eax, dword [0x18002f8c4]
movzx ecx, r12w
add ecx, eax
dec eax
mov dword [0x18002f8c4], eax
mov eax, ecx
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret