Function at 0x180005ca4
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov eax, dword [0x18002f8b0]
lea edi, [rdx - 1]
mov dword [rsp + 0xa8], eax
mov rsi, rcx
movsxd rax, dword [rcx + 0x3b54]
mov qword [rsp + 0xa0], rax
lea eax, [rdi + rdi]
movsxd r8, eax
movsxd rax, edi
mov eax, dword [rcx + rax*4]
cdq
idiv dword [rcx + r8*4]
movsxd r8, dword [0x18002f8a4]
lea eax, [rdi + 0x20]
movsxd rcx, eax
mov eax, 0x622
movsxd r15, edx
cdq
idiv dword [0x18002f8d8]
movzx r14d, word [rsi + rcx*4]
lea eax, [rdi - 1]
shl eax, 2
sub edi, 2
movsxd rcx, eax
sub r14w, r8w
mov eax, dword [0x18002f944]
dec eax
movsxd r11, edx
xor edx, edx
movsxd r12, dword [rsi + rcx*4]
mov dword [0x18002f944], eax
or r12, r8
cdqe
dec r8d
mov dword [0x18002f8a4], r8d
movsxd rbp, dword [rsi + 0x3510]
and rbp, rax
mov rax, qword [0x18002f8f0]
mov ecx, dword [rax + 0x5a1c]
mov eax, 0x1eaa
add ecx, 0x683
movsxd r13, ecx
movzx ecx, word [0x18002f938]
div ecx
cdqe
mov qword [rsp + 0xb0], rax
mov rax, qword [0x18002f8f8]
movsxd r8, dword [rsi + rax*4 + 4]
movzx eax, word [r11 + 0x38d6]
cmp r8d, eax
je 0x180005e08
movsxd rdx, edi
lea r9, [r15 + r8*8]
movzx r10d, r14w
movzx ecx, word [rdx + rdx + 0x1c99]
mov eax, 0xb3f
imul ecx, eax
inc edi
mov eax, 0x1674
inc r8d
mov word [rdx*2 + 0x1c99], cx
movzx edx, byte [rbp]
movzx ecx, di
imul ecx, eax
xor word [rdx + rdx + 0x140], cx
mov rax, qword [0x18002f8c8]
movsxd rdx, edi
mov qword [rax + rdx*8], r10
movzx eax, word [r9]
lea r9, [r9 + 8]
or eax, 0x7dc
sub eax, 0x12d6
cdqe
mov qword [0x18002f8d0], rax
movzx eax, word [r11 + 0x38d6]
cmp r8d, eax
jne 0x180005d9e
movzx eax, word [0x18002f8dc]
xor edx, edx
movzx ecx, di
add cx, word [0x18002f914]
mov word [rax*2 + 0x16e], cx
mov eax, 0x1acb
div qword [0x18002f8e0]
mov r10, qword [r12 + 0xc438]
xor edx, edx
movsxd r9, dword [rsi + 0x7608]
mov rbx, rax
movsxd rcx, edi
mov eax, 0x171f
or r9, 0x163c
movzx r8d, word [r15 + rcx*2]
movsxd r11, dword [rsi + rcx*4]
mov ecx, 0x1722
div r8d
mov r8d, 0xfb1
movsxd rdx, eax
mov eax, 0x1d6f
mov qword [rsp + 0x50], rdx
sub eax, edi
mov qword [rsp + 0x48], 0x6a0
mov edx, 0x1694
cdqe
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r10
mov word [rsp + 0x30], cx
movzx ecx, bx
mov qword [rsp + 0x28], r11
mov byte [rsp + 0x20], 0x77
call fcn.1800061c8
mov ecx, dword [rsp + 0xa8]
mov r11d, 1
mov word [0x18002f938], ax
sub edi, r11d
movzx eax, byte [rbp]
mov r10d, 0x1c99
movsxd r9, edi
or word [rax*4 + 0xa5c], cx
dec byte [rbp]
movzx ecx, byte [rbp]
mov eax, dword [0x18002f928]
and dword [rsi + rcx*4], eax
mov rax, qword [0x18002f8f0]
movzx edx, word [r10]
mov ecx, dword [rax + r9*4]
cmp dword [rsi + rdx*4], ecx
je 0x180005f51
mov eax, 0x146b
mov r8d, 0xffff
add word [0x18002f8dc], r8w
cdq
idiv edi
xor edx, edx
movsxd rcx, eax
mov eax, 0x322
sub rax, qword [0x18002f8e8]
or qword [0x18002f8b0], rcx
movsxd rcx, dword [rsi + 0x17b8]
div rcx
mov qword [0x18002f8b8], rax
mov eax, edi
shl eax, 2
movsxd rcx, eax
or qword [rcx*8 + 1], 0xfffffffffffff4fe
jmp 0x1800060b0
sub qword [0x18002f920], r11
movzx ecx, byte [rbp]
movzx eax, word [0x18002f940]
cmp dword [rsi + rcx*8], eax
jne 0x18000612b
mov rax, qword [0x18002f8f8]
mov ecx, 0xd35
sub rax, r11
mov qword [0x18002f8f8], rax
add word [rax + rax + 0x1c99], cx
mov eax, 0x1036
movzx r8d, byte [rbp]
movzx ecx, r14w
imul ecx, eax
movzx eax, cx
mov rcx, qword [0x18002f8a8]
cdq
idiv dword [rcx + r8*4]
add dword [rsi + r8*4 + 0xc], edx
cmp qword [0x18002f8e8], 0x1e81
ja 0x1800060bc
mov r8d, 0xffff
add word [r10], r8w
movzx eax, word [r10]
cmp dword [rsi + rax*4], 0xd03
jle 0x1800060bc
mov eax, dword [0x18002f8c4]
add edi, r11d
sub eax, r11d
mov dword [rsp + 0xa8], edi
movsxd rcx, eax
mov dword [0x18002f8c4], eax
movzx eax, word [r13 + 0x14fe]
or word [rcx + rcx + 0xa32], ax
movzx edx, word [0x18002f8dc]
movsxd rax, edi
mov ecx, dword [rsi + rax*4]
and dword [0x18002f8d8], ecx
mov rcx, qword [0x18002f930]
add rcx, qword [0x18002f8b0]
mov qword [0x18002f930], rcx
movsxd r9, dword [rsi + rdx*4]
add dx, r8w
mov word [0x18002f8dc], dx
cmp r9, rcx
je 0x180006197
lea eax, [rdi + 4]
mov ecx, 0x1c6c
sub ecx, edi
movsxd r10, eax
mov edi, 0x138
movzx eax, byte [rbp]
mov edx, 0x1be
add r9d, r11d
mov word [r13 + rax*2 + 8], dx
mov eax, dword [0x18002f944]
add eax, r11d
mov dword [0x18002f944], eax
cdq
idiv dword [rsi + r10*4]
mov dword [0x18002f944], eax
movsxd rax, dword [0x18002f948]
mov dword [rsi + rax*4], ecx
add word [rdi], r8w
movzx eax, word [rdi]
mov dword [rsi + rax*4], 0xa05
movsxd rax, r9d
cmp rax, qword [0x18002f930]
jne 0x180006059
mov edi, dword [rsp + 0xa8]
movzx edx, word [0x18002f8dc]
jmp 0x180006197
sub edi, r11d
lea eax, [rdi + 8]
movsxd rcx, eax
mov rax, qword [rsp + 0xa0]
or dword [rsi + rcx*4], 0x487
mov ecx, dword [rax + 0xc150]
mov rdx, qword [0x18002f8f8]
add ecx, 0xf25
mov rax, qword [rsp + 0xb0]
movzx eax, byte [rax + 0x19b4]
imul ecx, eax
sub ecx, dword [rsi + rdx*4 + 0x88]
mov dword [rsi + rdx*4 + 0x88], ecx
mov eax, dword [0x18002f8a4]
sub qword [0x18002f8f8], r11
add eax, 0x1a
movsxd rcx, eax
add dword [rsi + rcx*4], 0x1836
movzx r8d, word [0x18002f8dc]
jmp 0x18000619b
mov eax, dword [0x18002f8a0]
mov rcx, qword [0x18002f900]
add eax, 0xa
movsxd r8, eax
mov eax, 0xee0
cdq
idiv dword [rcx + r8*4]
xor edx, edx
mov dword [rcx + r8*4], eax
movzx ecx, byte [rbp]
movzx eax, word [rsi + r9*4]
mov word [r15 + rcx*2], ax
mov eax, 0x10d0
mov rcx, qword [0x18002f8b0]
div qword [r12 + rcx*8]
mov qword [r12 + rcx*8], rax
mov eax, 0xa0e
movzx ecx, word [0x18002f8dc]
cdq
idiv dword [rsi + rcx*4 + 0x30]
mov dword [rsi + rcx*4 + 0x30], edx
movzx edx, word [0x18002f8dc]
add dx, r11w
mov word [0x18002f8dc], dx
movzx r8d, dx
mov rbx, qword [rsp + 0xb8]
lea eax, [rdi + 0x23]
movsxd rcx, eax
mov rax, qword [0x18002f908]
mov eax, dword [rax + rcx*4]
cdq
idiv r8d
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret