Function at 0x180009ba0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
mov r10, qword [0x18002f918]
mov rsi, rdx
mov rax, qword [0x18002f8f8]
mov rbx, r9
movzx r11d, word [0x18002f8dc]
xor edx, edx
mov rdi, rcx
add r11, r9
mov r13d, 1
mov r14, r8
mov rcx, qword [r10 + rax*8]
add rdi, r13
mov r10, qword [0x18002f8e8]
mov rax, r9
mov r9, qword [0x18002f8b8]
xor rax, 0x16d7
mov qword [rsp + 0x40], rax
sub r9, r13
movzx eax, word [0x18002f920]
movzx ebp, r10w
sub ax, word [0x18002f930]
mov r15, rdi
mov dword [rsp + 0x20], eax
movsxd rax, dword [0x18002f910]
mov qword [0x18002f8b8], r9
sub r9, rax
mov eax, 0x109b
mov qword [rsp + 0x18], rcx
mov rcx, qword [0x18002f8a8]
xor bp, ax
movsxd rax, dword [r8 + rbx*4]
div rbx
mov qword [rsp + 0x48], r10
mov qword [rsp + 0x50], rax
movzx eax, word [rsi + rdi*4]
cdq
idiv dword [r8 + rbx*4]
mov r8d, dword [0x18002f914]
mov dword [rsp], eax
mov eax, r8d
cdq
add r8d, r13d
idiv dword [rcx + rbx*4]
mov ecx, dword [0x18002f8c4]
movsxd rax, edx
mov dword [0x18002f914], r8d
mov qword [rsp + 0x30], rax
lea ecx, [rcx*2 + 0xe]
movsxd rdx, ecx
movzx eax, word [rsi + rdx*2]
mov dword [rsp + 0x38], eax
movsxd rax, dword [r14 + rbx*4]
sub rbx, r13
sub r15, rax
movzx eax, word [0x18002f93c]
mov qword [rsp + 0x10], r15
movzx r12d, word [rsi + rbx*2 + 0x1a]
add r12d, 0xa40
mov qword [rsp + 0x68], r12
cmp word [rsi + rbx*2], ax
jne 0x180009cfa
movzx edx, bp
lea rax, [rdx + rdx*2]
movsxd rcx, dword [r14 + rax*4 + 0x8c]
cmp qword [0x18002f928], rcx
ja 0x180009cfa
sub r8d, r13d
mov dword [0x18002f914], r8d
movzx eax, word [r10 + rdx*4]
cmp eax, r8d
jne 0x180009d37
lea rax, [rdi + rdi*2]
movzx ecx, word [r12 + rax*2]
mov eax, r10d
sub ecx, dword [0x18002f8d8]
xor eax, edi
mov dword [0x18002f8d8], ecx
movzx ecx, word [r9 + rbx*8]
add ecx, eax
sub ecx, dword [r14 + rdi*4 + 0x20]
add ecx, dword [0x18002f948]
mov dword [r14 + rdi*4 + 0x20], ecx
movzx eax, word [r12 + rbx*2]
add qword [r11 + rdi*8], rax
add rdi, r13
movzx eax, word [r12 + rbx*2 + 0xe]
lea r8, [rdi + rdi*2]
mov rcx, qword [0x18002f8f0]
cdq
sub rbx, r13
movzx r11d, bp
add bp, r13w
idiv dword [rcx + r8*4]
lea r9, [rbx + rbx*2]
mov dword [rcx + r8*4], edx
lea r10d, [r11 + r11]
mov rax, qword [0x18002f8f8]
xor edx, edx
mov r8, qword [0x18002f908]
imul rax, rbx
sub rbx, 2
mov qword [0x18002f8f8], rax
mov rax, qword [0x18002f920]
add rax, r13
mov qword [0x18002f920], rax
movsxd rcx, dword [r8 + r9*4]
div rcx
mov dword [r8 + r9*4], edx
movzx eax, word [rsi + rbx*2]
mov r9, qword [0x18002f918]
mov r8d, dword [0x18002f8a0]
sub r8d, eax
mov eax, dword [0x18002f8a4]
lea ecx, [rax + rax*2]
mov rax, qword [0x18002f900]
movsxd rdx, ecx
mov ecx, 0x1a48
imul r8d, dword [rax + rdx*4]
movsxd rax, r8d
sub rax, qword [r9 + r10*8]
mov qword [r9 + r10*8], rax
lea eax, [r11 + 1]
mov r9d, dword [rsp]
lea eax, [rax + rax*2]
movzx r10d, r9b
or word [rsi + rax*2], cx
mov r11d, r10d
cmp r10, qword [0x18002f930]
mov dword [rsp + 0x24], r10d
ja 0x18000a317
lea eax, [r10 + 0x3ec]
lea r12, [rbx + 4]
mov dword [rsp + 8], eax
lea eax, [r10 + r10]
lea r8, [rsi + 0xe]
mov dword [rsp + 4], eax
lea r12, [rbx + r12*2]
lea r13, [r14 + 0x20]
lea r8, [r8 + rbx*2]
lea r12, [r14 + r12*4]
lea r13, [r13 + rbx*4]
mov rax, qword [0x18002f8f8]
xor edx, edx
mov rcx, qword [rsp + 0x30]
mov word [rsp + 0xc0], bp
movzx ecx, word [rcx + rax*4]
mov rax, qword [0x18002f8e0]
div rcx
mov rcx, qword [rsp + 0x40]
xor edx, edx
movzx ecx, word [rcx + rdi*8 + 0xe]
div rcx
mov rax, qword [rsp + 0x40]
mov word [rax + rdi*8 + 0xe], dx
sub rdi, 2
movzx eax, word [0x18002f8dc]
inc qword [0x18002f8f8]
inc qword [0x18002f8e0]
lea rcx, [rax + rax*2]
mov rax, qword [0x18002f8c8]
mov rdx, qword [rax + rcx*8]
mov ecx, dword [0x18002f944]
sub rdx, r11
sub rdx, qword [0x18002f920]
mov al, cl
sub al, r9b
mov qword [0x18002f920], rdx
dec ecx
add al, 0x3a
mov dword [0x18002f944], ecx
mov r9b, al
or byte [r15 + rbx*2], dil
mov dword [rsp], r9d
cmp dword [rsp + 0x38], r10d
jne 0x180009ee0
movzx eax, word [rsp + 0x20]
cmp eax, dword [r14 + rbx*8]
jg 0x18000a32d
mov rcx, qword [rsp + 0x40]
movzx eax, word [rsi + r11*2]
movzx r15d, bp
cmp ax, word [rcx + r15*2]
je 0x18000a168
mov rcx, qword [rsp + 0x48]
mov edx, 0xfe
cmp word [rcx + r15*4], dx
je 0x18000a168
movsxd rcx, dword [rsp + 4]
inc rbx
add r8, 2
mov qword [rsp + 0xd8], rbx
mov eax, r10d
mov qword [rsp + 0x28], r8
cdq
add r13, 4
idiv dword [r14 + rcx*4]
mov ecx, dword [0x18002f948]
add r12, 0xc
mov dword [rsp + 0x20], eax
movzx eax, word [0x18002f938]
sub rax, rbx
lea edx, [rcx + rcx*2]
mov rcx, qword [0x18002f8f0]
movsxd r8, edx
xor edx, edx
movsxd r9, dword [rcx + r8*4]
movsxd rcx, dword [0x18002f910]
div rcx
movzx ecx, word [rsi + rbx*4]
imul r9, rdx
xor edx, edx
mov rax, r9
movzx r9d, bp
div rcx
mov rcx, qword [rsp + 0x30]
xor edx, edx
mov word [rsi + rbx*4], ax
lea r8d, [r9 + r9*2]
mov rax, qword [0x18002f8f8]
add rax, 0xffffffffffffecfd
movzx ecx, word [rcx + r8*2]
div rcx
mov rax, qword [rsp + 0x30]
mov word [rax + r8*2], dx
xor edx, edx
movsxd rax, dword [0x18002f8c0]
add rax, rbx
div r11
movabs rax, 0xabe5cffd5068c00b
mov rcx, rdx
mul rdx
shr rdx, 0xb
imul rax, rdx, 0xbea
sub rcx, rax
movzx eax, cx
movzx ecx, word [rsi + r15*2]
imul ecx, eax
mov eax, 0x1ce3
cdq
idiv r10d
mov word [rsi + r15*2], cx
mov edx, 0xf49
or ax, r10w
mov word [rsi + rbx*2], ax
mov rax, rdi
mov rcx, qword [0x18002f8d0]
xor rax, 0x6f5
imul rcx, rax
mov eax, 0xffff
mov qword [0x18002f8d0], rcx
add bp, ax
lea ecx, [r9 + r9]
cmp word [rsi + rcx*2], dx
jne 0x18000a2e3
mov rcx, qword [rsp + 0x50]
mov r8, qword [rsp + 0x18]
movzx eax, bp
mov r9d, r8d
movzx ebp, word [rsp + 0xc0]
mov word [rsp + 0xc0], bp
add dword [rcx + rax*4], r10d
mov eax, r10d
movzx ecx, word [0x18002f8dc]
cdq
idiv ecx
movzx eax, di
mov ecx, ebp
mov word [0x18002f8dc], dx
xor edx, edx
imul ecx, eax
mov rax, r11
div rdi
add word [rsi + r11*2], cx
xor dl, byte [0x18002f93c]
mov rax, qword [rsp + 0x10]
sub dl, byte [rax + rbx*2]
mov byte [rax + rbx*2], dl
cmp r8d, dword [r12]
jg 0x18000a2ea
mov r14, qword [rsp + 0x48]
lea rax, [r11 + rbx]
movsxd rbx, dword [rsp + 4]
and eax, 0x70c
mov qword [rsp + 0x18], rax
mov eax, dword [rsp + 8]
mov rsi, qword [rsp + 0x18]
add eax, 0xfffffc22
cdqe
mov qword [rsp + 0x58], rax
lea rax, [r15 + r15*2]
mov r15, qword [rsp + 0x10]
mov rbp, rax
mov r10, qword [rsp + 0x58]
mov rax, qword [0x18002f930]
xor edx, edx
dec rax
inc rdi
mov qword [0x18002f930], rax
movsxd rcx, dword [r13]
div r11
mov rax, rdx
xor edx, edx
div rcx
mov dword [r13], edx
mov byte [r10 + r15], 0
movzx ecx, word [0x18002f8d0]
movsxd rdx, r9d
inc r9d
mov rax, rdx
xor rax, rsi
xor r8, rax
mov rax, qword [0x18002f8f0]
sub cx, word [rax + rbp*4]
mov word [r14 + rbx*2], cx
mov rax, qword [0x18002f8c8]
add qword [rax + rdi*8], rdx
cmp r9d, dword [r12]
jle 0x18000a0d4
mov rbx, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0xc8]
mov r10d, dword [rsp + 0x24]
movzx ebp, word [rsp + 0xc0]
mov r14, qword [rsp + 0xd0]
mov qword [rsp + 0x18], r8
jmp 0x18000a2ed
add ax, word [0x18002f8a4]
xor edx, edx
mov word [rsi + r11*2], ax
add r8, 2
mov rcx, qword [0x18002f920]
inc rbx
dec rcx
mov qword [rsp + 0x28], r8
mov qword [0x18002f920], rcx
add r13, 4
movzx eax, word [rsi + 0x2956]
add r12, 0xc
div rdi
xor dx, cx
movzx ecx, word [r8]
and dx, word [r14 + r11*4]
movzx eax, dx
imul ecx, eax
movzx eax, bp
add eax, eax
mov qword [rsp + 0xd8], rax
mov word [r8], cx
mov ecx, 0x1769
add word [rsi + rax*2], cx
movsxd rax, dword [0x18002f8a4]
mov rcx, qword [rsp + 0x50]
xor dword [rcx + rax*4], r10d
mov rdx, qword [0x18002f8b0]
dec dword [0x18002f8a4]
dec rdx
movzx ecx, r9b
mov qword [0x18002f8b0], rdx
cmp rcx, rdx
je 0x18000a265
movzx ecx, r9b
cmp ecx, 0x1745
jb 0x18000a265
mov r15, qword [rsp + 0x10]
xor edx, edx
mov rax, r11
dec rbx
div qword [0x18002f8d0]
inc rdi
sub r13, 4
sub edx, dword [0x18002f944]
sub r12, 0xc
mov dword [0x18002f944], edx
sub r8, 2
mov al, byte [rsi + 0x1508]
add al, r10b
add al, bl
xor r9b, al
mov eax, dword [rsp + 8]
imul eax, dword [0x18002f8a4]
movsxd rcx, eax
sub rcx, rdi
and qword [rsp + 0x18], rcx
jmp 0x18000a2f6
xor edx, edx
movzx eax, bp
lea r8d, [rax + rax*2]
mov rax, qword [rsp + 0x68]
movzx ecx, word [rsi + r8*2]
movzx eax, word [rax + 0x362]
div ecx
mov rcx, qword [rsp + 0x30]
mov word [rsi + r8*2], dx
mov r8d, 0x1788
movzx eax, word [0x18002f938]
add word [rsi + rbx*2], ax
movzx eax, word [rcx + r15*2]
neg ax
mov word [rcx + r15*2], ax
mov rcx, qword [0x18002f920]
mov rax, qword [0x18002f918]
dec rcx
mov r15, qword [rsp + 0x10]
mov qword [0x18002f920], rcx
movzx edx, word [rax + rcx*8]
mov rax, qword [rsp + 0xd8]
add dx, r8w
or dx, r10w
and dx, bp
and word [rsi + rax*2], dx
jmp 0x18000a2f1
mov r15, qword [rsp + 0x10]
jmp 0x18000a2ed
mov r15, rax
mov r9d, dword [rsp]
mov r8, qword [rsp + 0x28]
add dword [rsp + 4], 2
inc r10d
inc dword [rsp + 8]
movsxd r11, r10d
cmp r11, qword [0x18002f930]
mov dword [rsp + 0x24], r10d
jbe 0x180009e34
xor rdi, rbx
mov eax, edi
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
sub r10w, word [rsi + rbx*2]
xor edx, edx
movzx r8d, bp
mov eax, 0x17af
mov word [rsi + rbx*2], r10w
movzx ecx, word [rsi + r8*2]
div ecx
lea rax, [rbx - 1]
mov word [rsi + r8*2], dx
xor rax, rdi
jmp 0x18000a31c