Function at 0x1800170ec
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov byte [rax + 8], cl
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
movzx eax, word [0x18002f940]
mov r14, rdx
mov r11, qword [0x18002f8f8]
mov ebp, 1
mov r12, qword [0x18002f8b0]
add ax, bp
movsxd r9, dword [0x18002f948]
add r11, rbp
mov word [0x18002f940], ax
mov r15d, 0xde0
movzx eax, ax
imul eax, dword [0x18002f8c0]
mov qword [0x18002f8f8], r11
movzx edi, word [r8 + r9*2]
add rdi, qword [0x18002f8e8]
movsxd r8, dword [0x18002f944]
movsxd r10, eax
mov rsi, r8
movzx eax, word [rdx + r11*2]
xor edx, edx
imul r13, rax, 0x1450
movzx eax, word [0x18002f93c]
add eax, 0x113b
movzx ecx, cl
mov dword [rsp + 0x54], eax
mov rax, qword [0x18002f918]
mov qword [rsp + 0x60], r10
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x70], r8
mov rax, qword [rax + 0x9f88]
div rcx
mov eax, dword [0x18002f8d8]
mov rcx, qword [0x18002f900]
mov rbx, rdx
mov dword [rsp + 0x50], eax
movabs rax, 0x81ca200607288019
mov qword [rsp + 0x68], rdx
mul r12
mov rax, qword [rsp + 0xf0]
sub r12, rdx
shr r12, 1
add r12, rdx
movzx eax, byte [r11 + rax]
cdq
shr r12, 0xc
idiv dword [rcx + 0x4b90]
mov dword [rsp + 0x58], eax
cmp r9d, r15d
je 0x180017264
mov r11, r9
shl r11, 3
mov rcx, qword [0x18002f8c8]
xor edx, edx
movsxd rax, r8d
mov r8, qword [0x18002f920]
div qword [r11 + rcx]
mov rcx, r13
lea r11, [r11 + 8]
xor rcx, r10
sub rax, rcx
movzx ecx, word [rsi + r8*2]
mov r10, rax
mov eax, r9d
cdq
add r9d, ebp
idiv ecx
mov word [rsi + r8*2], dx
cmp r9d, r15d
je 0x180017251
mov r8d, dword [0x18002f944]
jmp 0x180017209
mov r9d, dword [0x18002f948]
mov r11, qword [0x18002f8f8]
mov qword [rsp + 0x60], r10
mov rcx, qword [0x18002f920]
add r9d, ebp
movzx r15d, byte [rsp + 0xf8]
sub rcx, rbp
mov rsi, qword [rsp + 0x100]
mov ebp, r15d
mov qword [0x18002f920], rcx
mov dword [0x18002f948], r9d
movsxd rdx, dword [rbx + rcx*4]
movsxd rax, dword [rdi + r15*4 + 0x3c]
sub rdx, rax
movsxd rax, dword [rsp + 0x50]
and rax, r11
add rdx, rax
lea eax, [r9 + r9]
movsxd rcx, eax
mov qword [rsi + rcx*8], rdx
mov rcx, qword [0x18002f8f0]
movsxd rdx, r12d
imul eax, dword [rcx + r15*4], 0xc7c
add dword [rcx + rdx*4], eax
mov eax, 0xb1f
sub eax, dword [r15*4 + 0xaed]
mov dword [r15*4 + 0xaed], eax
mov edi, dword [0x18002f8a0]
cmp edi, r12d
jne 0x1800173b0
mov r15, qword [rsp + 0x78]
movsxd rbx, edi
movsxd rax, dword [r15 + rbx*4]
xor qword [r10*8 + 0xc4e], rax
mov eax, dword [0x18002f914]
add eax, 0x1c
movsxd rcx, eax
movzx eax, r10w
and ax, word [0x18002f948]
or word [r14 + rcx*2], ax
movzx ecx, word [r14 + rbp*2]
movzx eax, di
imul ecx, eax
mov eax, edi
mov word [r14 + rbp*2], cx
sub eax, dword [0x18002f8a0]
mov r9, qword [0x18002f900]
movzx r11d, word [0x18002f940]
mov rdx, qword [0x18002f8e8]
mov ecx, dword [rbx*4 + 0xaed]
movsxd r8, eax
mov rax, qword [0x18002f920]
movsxd r10, dword [r9 + rax*4]
mov r9d, edi
movsxd rax, dword [0x18002f8c0]
and r10, rbx
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r10
mov qword [rsp + 0x20], r11
call fcn.18001ae44
mov r10, qword [rsp + 0x60]
inc edi
mov dword [0x18002f8c0], eax
mov r11d, eax
cmp edi, r12d
je 0x1800172f3
mov edi, dword [0x18002f8a0]
mov rbx, qword [rsp + 0x68]
mov r15b, byte [rsp + 0xf8]
jmp 0x1800173b7
mov r11d, dword [0x18002f8c0]
mov eax, dword [0x18002f8c4]
mov rcx, qword [rsp + 0xe8]
dec eax
mov r9, qword [0x18002f920]
mov dword [0x18002f8c4], eax
cdqe
movzx ecx, byte [rax + rcx]
movzx eax, word [0x18002f940]
cmp ecx, eax
je 0x180017416
mov r8d, ecx
sub r8, r9
sub eax, ecx
mov r10d, eax
xor edx, edx
movsxd rcx, r11d
mov rax, r8
inc r8
div qword [0x18002f930]
xor edx, edx
div rcx
mov dword [0x18002f8c0], eax
mov r11, rax
sub r10, 1
jne 0x1800173f0
mov r8, qword [0x18002f8f8]
movsxd rcx, dword [rbx + r8*4]
cmp rcx, qword [0x18002f8b0]
jne 0x180017854
mov rax, qword [rsp + 0xe0]
lea ecx, [rdi + rdi]
movsxd rdx, ecx
movzx ecx, byte [rsp + 0xc0]
mov r10d, ecx
movzx ecx, byte [rcx + rax + 8]
mov rax, qword [0x18002f8c8]
cmp rcx, qword [rax + rdx*8]
je 0x180017854
mov rdi, qword [0x18002f908]
dec r8
mov rax, qword [0x18002f918]
shl r10, 5
mov qword [0x18002f8f8], r8
movsxd rcx, dword [rdi + r8*8]
mov qword [rsp + 0x78], r10
cmp rcx, qword [r10 + rax]
je 0x180017854
movzx ecx, word [0x18002f8dc]
mov r8d, 0xffff
mov rax, qword [r9*8 + 0xc4e]
mov edx, ecx
add cx, r8w
mov word [0x18002f8dc], cx
cmp rax, rdx
jbe 0x180017854
dec r12d
mov eax, r12d
shl eax, 2
movsxd rcx, eax
mov rax, qword [rsp + 0xe0]
movzx edx, byte [rcx + rax]
mov rax, qword [0x18002f8e0]
mov rcx, rax
inc rax
mov qword [0x18002f8e0], rax
cmp rdx, rcx
jne 0x18001756c
cmp qword [0x18002f8e8], 0x1e5
jae 0x18001756c
movsxd rax, dword [rdi + r9*4]
cmp rax, qword [0x18002f928]
ja 0x18001756c
movsxd r8, dword [0x18002f8a4]
mov rax, qword [0x18002f8a8]
mov edx, dword [rax + r8*4]
dec r8d
mov dword [0x18002f8a4], r8d
cmp dword [rsp + 0x54], edx
jl 0x18001756c
imul rax, qword [0x18002f8b8], 0x1e7
movzx ecx, word [0x18002f938]
mov qword [0x18002f8b8], rax
imul eax, r11d, 0x1a3f
cdq
idiv ecx
lea eax, [rdx + 0xb79]
cdqe
sub rax, qword [rbp*8 + 0xc4e]
mov qword [rbp*8 + 0xc4e], rax
add r15b, 0xff
jmp 0x1800176a1
mov rax, qword [0x18002f8d0]
xor edx, edx
mov r10, qword [rsp + 0x70]
dec rax
movzx r8d, byte [rsp + 0x58]
mov r9b, byte [rsp + 0xf8]
mov qword [0x18002f8d0], rax
add r9b, 0xff
movzx ecx, word [r10 + r13*2]
div rcx
mov byte [rsp + 0xf8], r9b
mov word [r10 + r13*2], dx
movsxd rcx, dword [0x18002f914]
mov rax, qword [0x18002f900]
movzx ebp, word [0x18002f93c]
mov eax, dword [rax + rcx*4]
mov rcx, qword [rsp + 0xd0]
cdq
idiv r8d
mov r8, qword [0x18002f8e0]
movsxd r14, edx
movzx eax, r9b
movzx ecx, word [rcx + rax*2]
mov eax, dword [0x18002f8c4]
cdq
idiv ecx
movzx ecx, word [0x18002f940]
movsxd r9, eax
mov rax, qword [0x18002f928]
mov sil, al
inc rax
mov qword [0x18002f928], rax
and sil, 0x40
mov eax, dword [0x18002f8a0]
movzx ebx, word [r10 + 0x274c]
cdq
mov r10, qword [0x18002f920]
idiv ecx
mov rax, qword [0x18002f908]
mov cl, r15b
movsxd rdi, edx
xor edx, edx
movsxd r11, dword [rax + r10*4 + 0x60]
mov rax, qword [0x18002f930]
div r11
mov rdx, r14
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 0x774
mov byte [rsp + 0x28], sil
mov qword [rsp + 0x20], rbp
call fcn.180016164
mov rsi, qword [rsp + 0x100]
mov r14, qword [rsp + 0xc8]
mov rbx, qword [rsp + 0x68]
mov r10, qword [rsp + 0x78]
mov r15b, byte [rsp + 0xf8]
movsxd rdx, eax
mov rax, qword [0x18002f918]
movsxd rcx, r12d
inc r12d
mov qword [rax + rcx*8], rdx
mov rax, qword [0x18002f920]
movzx ecx, word [0x18002f8b0]
inc rax
movsxd rdx, dword [0x18002f948]
xor cx, ax
and cx, word [0x18002f944]
mov r9, qword [rsp + 0x60]
mov qword [0x18002f920], rax
sub cx, word [r14 + rdx*2]
mov word [r14 + rdx*2], cx
xor edx, edx
mov eax, dword [0x18002f8a4]
add eax, 0x19
movsxd rcx, eax
movsxd rax, dword [rcx*4 + 0xaed]
div qword [rsi + r9*8]
mov rcx, qword [rsp + 0xd0]
mov qword [rsi + r9*8], rdx
movsxd rdx, dword [0x18002f8a4]
movzx ecx, word [rcx + rdx*2]
dec edx
cmp ecx, dword [0x18002f910]
mov dword [0x18002f8a4], edx
jge 0x180017784
lea eax, [r12 + 0x16]
mov edx, 0xfc
movsxd rcx, eax
inc r12d
mov rax, qword [rsp + 0x70]
cmp word [rax + rcx*2], dx
ja 0x180017784
movzx r11d, byte [rsp + 0xc0]
movzx eax, word [r14 + r11*2]
cmp eax, dword [rsp + 0x50]
jne 0x18001778c
mov eax, 0x1ce9
movzx r8d, r15b
cdq
idiv dword [rbx + r13*4]
mov dword [rbx + r13*4], edx
xor edx, edx
mov rax, qword [r10 + 0xca6]
movzx ecx, word [0x18002f938]
mov r10, qword [rsp + 0xe8]
add rax, rcx
movzx ecx, byte [r8 + r10]
div rcx
mov byte [r8 + r10], al
jmp 0x18001778c
mov r11b, byte [rsp + 0xc0]
movsxd rax, r13d
mov edx, r13d
cmp rax, r13
jbe 0x1800177c8
movsxd r10, r12d
mov r8, qword [rsi + r10*8]
movsxd rax, dword [0x18002f914]
inc edx
movsxd rcx, dword [rax*4 + 0xaed]
add rcx, r9
imul rax, rcx, 0x6ac
and r8, rax
movsxd rax, edx
mov qword [rsi + r10*8], r8
cmp rax, r13
ja 0x18001779e
movzx ecx, word [0x18002f938]
mov eax, 0x9eefd57
mul ecx
sub ecx, edx
shr ecx, 1
lea eax, [rdx + rcx]
shr eax, 0xc
add qword [0x18002f8b0], rax
mov eax, dword [0x18002f8c0]
cdq
idiv dword [r9*4 + 0xb71]
movzx eax, r11b
mov dword [r9*4 + 0xb71], edx
xor edx, edx
mov rcx, qword [0x18002f920]
shl rcx, 5
lea r8d, [rax + rax]
mov rax, qword [0x18002f8c8]
mov rcx, qword [rcx + rax]
add rcx, 0xbf2
imul rax, rcx, 0x13b8
movzx ecx, word [r14 + r8*2]
div rcx
mov word [r14 + r8*2], dx
inc qword [0x18002f920]
imul rax, qword [0x18002f928], 0x1610
mov qword [0x18002f928], rax
jmp 0x180017875
lea eax, [r12 + 2]
movsxd rcx, eax
mov rax, qword [rsp + 0xf0]
movzx eax, byte [r9 + rax + 0x28]
xor qword [rsi + rcx*8], rax
dec qword [0x18002f920]
mov eax, dword [rbx + 0x19d4]
mov rbx, qword [rsp + 0xd8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret