Function at 0x18001cf58
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov r14, qword [rsp + 0xb0]
lea rax, [rcx - 0x1a30]
mov edi, dword [0x18002f8b8]
mov r10, rcx
movzx r13d, word [0x18002f8dc]
inc r14
mov qword [rsp + 0x10], rax
mov r11, rdx
mov rax, rcx
movzx ebx, r8b
movsxd r8, dword [0x18002f8c4]
add rax, rax
mov qword [rsp + 0x30], rbx
mov r12, r8
movsxd rbp, dword [r11 + r10*4]
xor edi, 0x1ca7
mov rsi, r9
mov qword [rsp + 0xb0], r14
imul eax, dword [rdx + rax*8], 0x1315
mov qword [rsp + 0x20], rbp
movsxd r15, eax
mov rax, qword [0x18002f8e8]
xor rax, r14
mov qword [rsp + 0xa8], r15
mov qword [rsp], rax
movsxd rax, dword [0x18002f8a4]
mov r15, qword [rsp]
imul ecx, dword [rdx + rax*4], 0xfbb
mov rax, qword [0x18002f900]
mov eax, dword [rax + r10*8]
mov dword [rsp + 0x98], eax
lea rax, [r10 + 0x2a0]
mov qword [rsp + 0x28], rax
movzx eax, bx
xor ax, r10w
movsxd rdx, ecx
mov rcx, qword [0x18002f8c8]
add bl, 0xff
mov word [rsp + 0x90], ax
mov eax, r13d
or rax, 0x5c6
mov qword [rsp + 0x18], rdx
mov qword [rsp + 8], rax
mov eax, dword [0x18002f914]
inc eax
mov dword [0x18002f914], eax
cdqe
mov rcx, qword [rcx + rax*8]
movzx eax, bl
and r12, rax
mov qword [0x18002f8b8], rcx
movsxd rax, dword [0x18002f948]
or r12, rax
movsxd rax, dword [rdx + r10*4]
xor edx, edx
div qword [r14 + r15*8]
mov r15, qword [rsp + 0xa8]
sub eax, dword [0x18002f8a0]
cmp qword [0x18002f8e0], rcx
mov dword [0x18002f8a0], eax
jae 0x18001d642
mov eax, dword [r11 + 0x21d4]
dec r10
cmp dword [r11 + r10*4], eax
jg 0x18001d642
movzx eax, r13w
cmp dword [rsp + 0x98], eax
jl 0x18001d642
mov eax, dword [0x18002f914]
add eax, eax
movsxd rcx, eax
cmp dword [r11 + rcx*4], 0x1f00
jle 0x18001d161
mov r13, qword [0x18002f920]
mov rcx, qword [rsp + 0x18]
mov r8d, dword [0x18002f944]
cmp r8d, dword [rcx + r13*8]
jne 0x18001d161
movsxd rax, esi
cmp rax, r12
jae 0x18001d671
cmp dword [r11 + 0xe260], 0x1504
jle 0x18001d671
movzx edx, word [0x18002f940]
lea rax, [r10 + r10*2]
cmp dx, word [rbp + rax*2]
ja 0x18001d671
mov rbp, qword [0x18002f8b0]
cmp edi, dword [rcx + rbp*4]
jle 0x18001d142
lea eax, [rdi + rdi]
movsxd rcx, eax
cmp dword [r11 + rcx*4], 0x95
jl 0x18001d14e
movzx eax, dx
cmp rax, r10
jae 0x18001d671
mov eax, 0x23c
cmp word [0x18002f8dc], ax
jae 0x18001d1b7
jmp 0x18001d671
movsxd rcx, esi
xor edx, edx
imul eax, dword [r11 + rcx*4], 0x1802
mov dword [r11 + rcx*4], eax
mov rax, r12
movsxd rcx, dword [0x18002f8a0]
or rax, r10
div rsi
inc rsi
dec r12
add r9d, edx
mov rax, rsi
xor edx, edx
div rcx
mov rcx, qword [rsp]
mov eax, dword [r11 + rcx*4]
imul eax, edx
mov dword [r11 + rcx*4], eax
mov r8d, dword [0x18002f944]
mov r13, qword [0x18002f920]
mov rbp, qword [0x18002f8b0]
mov rax, qword [0x18002f928]
dec rsi
movzx ecx, bl
mov r15d, 0x1cf0
imul rax, rcx
sub r15, r12
mov qword [0x18002f928], rax
sub r15, rsi
mov rcx, qword [r14 + rbp*8]
mov rax, qword [rsp + 0x18]
movsxd rax, dword [rax + 0x1df4]
sub rcx, rax
sub rcx, r13
movzx r13d, word [rsp + 0x90]
add rcx, 0x199d
mov qword [0x18002f920], rcx
movzx ebp, byte [r15 + 0x5bf]
movsxd rax, dword [r11 + r13*4]
sub rax, 0xe26
mov qword [rsp + 0x18], rax
cmp rbp, r14
jne 0x18001d266
mov r8, qword [rsp + 0x10]
mov eax, 0xaf76eb19
mov ecx, ebp
imul ebp
add edx, ebp
inc ebp
sar edx, 9
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x2eb
sub ecx, eax
movsxd rax, ecx
add rax, rsi
imul r8, rax
movsxd rax, ebp
cmp rax, r14
je 0x18001d229
mov qword [rsp + 0x10], r8
mov r8d, dword [0x18002f944]
movsxd rdx, dword [0x18002f948]
mov rbp, qword [rsp + 8]
mov rax, qword [0x18002f8f8]
mov r12, qword [0x18002f8c8]
movzx ecx, byte [rdx + rbp]
cmp qword [r12 + rax*8], rcx
jb 0x18001d2df
cmp qword [0x18002f8e8], r14
jne 0x18001d2df
mov eax, 0x19c
cmp word [0x18002f93c], ax
jb 0x18001d2df
mov rax, qword [0x18002f918]
movsxd rdx, edi
mov rcx, qword [rax + 0x8f70]
mov eax, 0x893655e5
or rcx, rdx
imul edi
mov qword [r14 + r10*8], rcx
add edx, edi
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add edx, eax
sub dx, word [0x18002f940]
mov word [0x18002f940], dx
jmp 0x18001d671
cmp dword [r11 + r10*4], edx
jle 0x18001d481
mov eax, dword [0x18002f914]
xor edx, edx
mov r15, qword [rsp + 0x30]
add eax, eax
mov r12, qword [rsp + 0xa8]
movsxd rcx, eax
movzx ebx, r15b
mov eax, dword [r15 + r10*8]
dec r10
sub eax, dword [r11 + rcx*4]
mov dword [r11 + rcx*4], eax
mov eax, 0xb66
div qword [0x18002f8d0]
dec dword [0x18002f914]
mov eax, dword [rsp + 0x98]
add eax, 2
mov qword [0x18002f8d0], rdx
lea ecx, [rax + rax*2]
mov rax, qword [0x18002f918]
movsxd r8, ecx
lea rcx, [r10 + r10*2]
inc r10
mov dl, byte [rax + rcx*8]
xor dl, byte [0x18002f8e0]
sub dl, 0x6b
add byte [r8 + rbp], dl
movzx eax, word [r12 + r10*2 + 8]
add eax, edi
cdqe
or qword [r14 + r13*8], rax
mov eax, ebx
or rax, qword [rsp + 0x18]
xor qword [0x18002f8e8], rax
cmp dword [0x18002f944], 0x18a2
jge 0x18001d3ea
mov rcx, r10
movabs rax, 0x2774ed7639d9c4ff
or rcx, r14
add r9d, r9d
mul rcx
mov rax, rcx
sub rax, rdx
shr rax, 1
add rax, rdx
xor edx, edx
shr rax, 0xc
imul rax, rax, 0x1bba
sub rcx, rax
mov rax, qword [0x18002f8f8]
add dword [0x18002f8c0], ecx
mov ecx, 0xdbc
add si, cx
movzx ecx, bl
xor word [rax*4 + 0xe0b], si
mov eax, 0x5fd
div ecx
mov eax, edx
cdq
idiv edi
mov edi, edx
jmp 0x18001d4b4
xor edx, edx
lea rax, [rsi + r14]
inc bl
movzx r9d, bl
div r9
mov rdx, qword [rsp + 0x28]
movzx ecx, ax
movzx eax, word [rdx + r10*4 + 0xc]
imul eax, ecx
mov word [rdx + r10*4 + 0xc], ax
movzx eax, byte [r10 + 0x5bf]
mov r8, qword [0x18002f8b0]
imul eax, edi
movsxd rcx, eax
movabs rax, 0xd58f2c1bf23c45a9
mul rcx
mov rax, qword [r14 + r8*8]
shr rdx, 0xb
imul rax, rdx
xor edx, edx
mov qword [r14 + r8*8], rax
mov rcx, qword [0x18002f920]
movzx eax, byte [r10*4 + 0x5bf]
add rcx, rcx
add rax, r14
or rax, r9
div qword [r15 + rcx*8]
mov qword [r15 + rcx*8], rax
mov rax, qword [rsp]
dec qword [0x18002f920]
lea rax, [rax + rax*2]
and dword [r11 + rax*4], 0x19b4
jmp 0x18001d671
cmp qword [0x18002f930], 0x1798
jbe 0x18001d671
mov r12, qword [rsp + 0xa8]
dec r8d
mov dword [0x18002f944], r8d
mov eax, dword [r11 + r15*4]
imul eax, r8d
mov dword [r11 + r15*4], eax
add edi, dword [r11 + r10*4]
mov ebp, dword [0x18002f914]
mov r13, qword [rsp + 8]
cmp ebp, 0x997
jne 0x18001d57c
movzx r12d, word [rsp + 0x90]
mov r8, r10
shl r8, 4
add r8, r11
movzx r15d, bl
movzx r14d, bl
movzx eax, word [0x18002f940]
xor edx, edx
div qword [0x18002f920]
mov qword [0x18002f920], rax
movzx eax, r12w
lea ecx, [rax + rax*2]
movzx eax, r15w
and dword [r11 + rcx*4], 0xff645a2a
xor ax, r10w
sub ax, r12w
movzx r12d, ax
movzx eax, byte [r13 + 0xe8e]
xor eax, dword [r8]
lea r8, [r8 - 0x10]
or dword [r11 + r10*8], eax
mov eax, 0x68a
mov esi, dword [0x18002f8a4]
cdq
idiv ebp
dec r10
inc ebp
movsxd rax, edx
xor edx, edx
or rax, qword [0x18002f8e8]
div r14
or esi, edx
mov dword [0x18002f8a4], esi
cmp ebp, 0x997
je 0x18001d4e6
mov r14, qword [rsp + 0xb0]
mov word [rsp + 0x90], r12w
mov r12, qword [rsp + 0xa8]
jmp 0x18001d582
mov esi, dword [0x18002f8a4]
mov eax, dword [0x18002f944]
dec eax
mov dword [0x18002f944], eax
cdqe
cmp qword [rsp + 0x10], rax
jbe 0x18001d5bc
mov rdx, qword [rsp + 0x20]
mov eax, edi
shl eax, 2
movsxd rcx, eax
mov eax, 0x1eda
sub ax, word [r12 + rcx*2]
xor word [rdx + 0x3a60b18], ax
jmp 0x18001d671
movzx eax, word [0x18002f8dc]
cmp rax, r14
ja 0x18001d5f6
mov rdx, qword [rsp + 0x20]
lea eax, [rdi + rdi*2]
movsxd rcx, eax
movzx eax, byte [r10 + r13]
inc r10
cmp ax, word [rdx + rcx*2]
je 0x18001d5f6
movzx eax, word [rsp + 0x90]
mov rdx, qword [rsp + 0x28]
movzx ecx, word [rdx + rax*2]
cmp esi, ecx
jl 0x18001d60d
lea eax, [rdi + rdi*2]
movsxd rcx, eax
mov rax, qword [0x18002f8a8]
mov edx, dword [r11 + rcx*4]
cmp dword [rax + r10*4], edx
jg 0x18001d637
dec qword [0x18002f8f8]
dec r9d
mov eax, r9d
shl eax, 2
movsxd rcx, eax
movzx eax, bl
xor eax, dword [rsp + 0x98]
xor eax, r9d
sub eax, dword [r11 + rcx*4]
mov dword [r11 + rcx*4], eax
jmp 0x18001d671
mov rax, qword [rsp]
mov dword [r11 + rax*4 + 4], r14d
jmp 0x18001d671
movzx eax, word [0x18002f930]
lea rcx, [r10 + r10*2]
or esi, 0xe27
mov edx, 0x1b33
xor r8d, esi
or ax, dx
mov dword [0x18002f8c4], r8d
add word [r15 + rcx*2], ax
dec qword [0x18002f930]
movzx eax, bl
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret