Function at 0x1800515f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov r11, rsp
push rbx
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rdi, rcx
mov r14, r9
movzx ecx, byte [rcx]
mov r13d, r8d
shl ecx, 8
mov r12, rdx
movzx eax, byte [rdi + 1]
add ecx, eax
sub ecx, 1
je 0x18005181f
sub ecx, 1
je 0x180051765
mov qword [r11 + 8], rbp
mov qword [r11 + 0x10], rsi
mov qword [r11 + 0x18], r15
sub ecx, 1
je 0x180051705
sub ecx, 1
je 0x1800516a4
cmp ecx, 1
jne 0x1800516fe
movzx edx, byte [rdi + 3]
movzx eax, byte [rdi + 2]
shl eax, 0x10
shl edx, 8
add edx, eax
movzx eax, byte [rdi + 4]
add edx, eax
jne 0x18005166d
lea rbp, [0x1800bad40]
jmp 0x180051672
mov ebp, edx
add rbp, rdi
mov rdx, r12
mov rcx, rbp
call fcn.1800515f0
xor al, 1
mov rsi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x80]
mov r15, qword [rsp + 0x90]
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret
movzx r15d, byte [rdi + 2]
xor ebx, ebx
test r15d, r15d
je 0x1800516fe
lea rsi, [rdi + 5]
lea rbp, [0x1800bad40]
nop dword [rax + rax]
movzx edx, byte [rsi - 2]
movzx eax, byte [rsi - 1]
shl eax, 8
shl edx, 0x10
add edx, eax
movzx eax, byte [rsi]
add edx, eax
jne 0x1800516dc
mov rcx, rbp
jmp 0x1800516e1
mov ecx, edx
add rcx, rdi
mov r9, r14
mov r8d, r13d
mov rdx, r12
call fcn.1800515f0
test al, al
jne 0x18005175e
inc ebx
add rsi, 3
cmp ebx, r15d
jb 0x1800516c0
xor al, al
jmp 0x18005167f
movzx r15d, byte [rdi + 2]
xor ebx, ebx
test r15d, r15d
je 0x18005175e
lea rsi, [rdi + 5]
lea rbp, [0x1800bad40]
nop dword [rax]
movzx edx, byte [rsi - 2]
movzx eax, byte [rsi - 1]
shl eax, 8
shl edx, 0x10
add edx, eax
movzx eax, byte [rsi]
add edx, eax
jne 0x18005173c
mov rcx, rbp
jmp 0x180051741
mov ecx, edx
add rcx, rdi
mov r9, r14
mov r8d, r13d
mov rdx, r12
call fcn.1800515f0
test al, al
je 0x1800516fe
inc ebx
add rsi, 3
cmp ebx, r15d
jb 0x180051720
mov al, 1
jmp 0x18005167f
movzx edx, byte [rdi + 2]
mov eax, 0x100
movzx r10d, byte [rdi + 5]
mov rcx, qword [r9 + 8]
cwde
imul edx, eax
movzx eax, byte [rdi + 3]
shl r10d, 0x10
add dx, ax
movzx eax, byte [rdi + 6]
shl eax, 8
add r10d, eax
movsx ebx, dx
movzx eax, byte [rdi + 4]
shl eax, 0x18
add r10d, eax
movzx eax, byte [rdi + 7]
add r10d, eax
test rcx, rcx
je 0x1800517b4
mov edx, r10d
call fcn.1800251f0
mov r10d, eax
lea rcx, [r14 + 0x11]
mov eax, 0x10
test rcx, rcx
lea rdx, [rcx + 0xf]
cmove rdx, rax
cmp dword [rdx], 0
je 0x1800517fb
movsd xmm0, qword [r14 + 0x20]
mov edx, r10d
mov rax, qword [r14 + 0x28]
mov r8, qword [r14 + 0x18]
mov rcx, qword [r14]
movsd qword [rsp + 0x40], xmm0
mov r9d, dword [rsp + 0x40]
mov qword [rsp + 0x20], rax
call fcn.18001fb30
movaps xmm1, xmm0
jmp 0x1800517fe
xorps xmm1, xmm1
movd xmm0, ebx
cvtdq2ps xmm0, xmm0
addss xmm0, xmm1
cvttss2si eax, xmm0
test eax, eax
setg al
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret
movzx eax, byte [rdi + 3]
mov r8d, 0x100
movzx edx, byte [rdi + 2]
imul edx, r8d
add dx, ax
movzx eax, dx
cmp eax, r13d
jae 0x180051842
mov ebx, dword [r12 + rax*4]
jmp 0x180051844
xor ebx, ebx
movzx eax, byte [rdi + 5]
movzx edx, byte [rdi + 4]
movsx ecx, r8w
imul edx, ecx
add ax, dx
cwde
cmp eax, ebx
jg 0x180051881
movzx eax, byte [rdi + 7]
movzx edx, byte [rdi + 6]
movsx ecx, r8w
imul edx, ecx
add ax, dx
cwde
cmp ebx, eax
jg 0x180051881
mov al, 1
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret
xor al, al
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret