Function at 0x180198650
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xd0
mov rax, qword [0x1803fc9f0]
xor rax, rsp
mov qword [rbp + 0x17], rax
xor eax, eax
mov r9, rdx
mov qword [rbp - 0x79], rax
mov r8, rcx
mov qword [rbp - 0x71], rax
mov edx, 0x100
mov qword [rbp - 0x69], rax
mov qword [rbp - 0x61], rax
mov qword [rbp - 0x59], rax
mov qword [rbp - 0x51], rax
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], rax
nop dword [rax]
movzx eax, byte [r8 + rdx - 1]
mov ecx, eax
and eax, 0xf
shr rcx, 4
inc dword [rbp + rax*4 - 0x79]
inc dword [rbp + rcx*4 - 0x79]
sub rdx, 1
jne 0x1801986a0
cmp dword [rbp - 0x79], 0x1ff
jl 0x1801986ca
xor eax, eax
jmp 0x18019871d
movaps xmm0, xmmword [rbp - 0x79]
movaps xmm1, xmmword [rbp - 0x69]
mov rcx, qword [rbp - 0x3d]
movaps xmmword [rbp - 0x29], xmm0
movaps xmm0, xmmword [rbp - 0x59]
movaps xmmword [rbp - 0x19], xmm1
movaps xmm1, xmmword [rbp - 0x49]
movaps xmmword [rbp - 9], xmm0
movaps xmmword [rbp + 7], xmm1
mov qword [rsp + 0xc8], rsi
test cl, 1
jne 0x180198713
mov esi, recv
mov edx, esi
sar ecx, 1
sub rdx, 1
je 0x180198732
add ecx, dword [rbp + rdx*4 - 0x79]
test cl, 1
je 0x180198702
xor eax, eax
mov rsi, qword [rsp + 0xc8]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1802b85a0
add rsp, 0xd0
pop rbp
ret
cmp ecx, 1
jne 0x180198713
mov qword [rsp + 0xf0], rbx
lea rax, [rbp - 0x75]
mov qword [rsp + 0xc0], rdi
xor edx, edx
mov qword [rsp + 0xb8], r12
mov rcx, rsi
mov qword [rsp + 0xb0], r13
mov qword [rsp + 0xa8], r14
mov qword [rsp + 0xa0], r15
add dword [rax], edx
mov edx, dword [rax]
lea rax, [rax + 4]
sub rcx, 1
jne 0x180198770
mov r10, qword [rbp - 0x3d]
mov edx, 0x2000
mov r11d, r10d
nop word [rax + rax]
add edx, 0xfffffff0
movsxd rax, edx
sar rax, 5
movzx ecx, byte [rax + r8]
shr cl, 4
test cl, cl
je 0x1801987c0
movzx eax, cl
mov r10d, r11d
movzx ecx, cl
dec dword [rbp + rax*4 - 0x79]
movsxd rax, dword [rbp + rax*4 - 0x79]
or cx, dx
mov word [r9 + rax*2], cx
add edx, 0xfffffff0
movsxd rax, edx
sar rax, 5
movzx ecx, byte [rax + r8]
and cl, sil
je 0x1801987eb
movzx eax, cl
movzx ecx, cl
dec dword [rbp + rax*4 - 0x79]
movsxd rax, dword [rbp + rax*4 - 0x79]
or cx, dx
mov word [r9 + rax*2], cx
test edx, edx
jne 0x180198790
mov r11d, 0x800
movsxd rdi, r10d
mov edx, r11d
lea r14, [rbp + 0x13]
mov r8d, r11d
mov r13d, 0xffff8000
nop dword [rax + rax]
mov r15d, esi
mov r12d, esi
mov ebx, r11d
cmp edx, r11d
jle 0x180198846
or eax, 0xffffffff
mov ecx, edx
sub ecx, r11d
dec ecx
shr ecx, 1
sub eax, ecx
add r11d, eax
nop
sub edx, 2
dec r8
movzx eax, dx
or ax, r13w
mov word [r9 + r8*2], ax
cmp edx, ebx
jg 0x180198830
mov r10d, dword [r14]
sub r10d, 1
js 0x180198885
lea eax, [r10 + 1]
lea rdx, [r9 - 2]
mov ecx, eax
sub r11d, eax
lea rdx, [rdx + rdi*2]
sub rdi, rcx
nop dword [rax]
nop word [rax + rax]
movzx eax, word [rdx]
lea rdx, [rdx - 2]
dec r8
sub r10d, 1
mov word [r9 + r8*2], ax
jns 0x180198870
xor ecx, ecx
lea eax, [rsi - 0xb]
dec esi
sub r14, 4
cmp r12d, 0xb
mov edx, ebx
setl cl
shr eax, 0x1f
xor ecx, eax
xor eax, eax
cmp r15d, 0xb
sete al
or ecx, eax
je 0x180198810
mov r15, qword [rsp + 0xa0]
mov eax, 0x400
mov r14, qword [rsp + 0xa8]
mov r12, qword [rsp + 0xb8]
cmp ebx, r11d
jle 0x180198907
sub ebx, r11d
lea r8, [r9 + 0x800]
dec ebx
mov eax, 0x3ff
shr ebx, 1
sub eax, ebx
nop word [rax + rax]
sub edx, 2
lea r8, [r8 - 2]
movzx ecx, dx
or cx, r13w
mov word [r8], cx
cmp edx, r11d
jg 0x1801988f0
mov r13, qword [rsp + 0xb0]
mov rbx, qword [rsp + 0xf0]
test rdi, rdi
jle 0x180198963
lea r11, [r9 - 2]
movsxd r8, eax
lea r11, [r11 + rdi*2]
nop word [rax + rax]
movsx r10d, word [r11]
lea r11, [r11 - 2]
mov ecx, r10d
mov edx, 0x400
and ecx, 0xf
dec rdi
sar edx, cl
mov ecx, eax
sub ecx, edx
nop dword [rax]
dec r8
dec eax
mov word [r9 + r8*2], r10w
cmp eax, ecx
jne 0x180198950
test rdi, rdi
jg 0x180198930
mov rdi, qword [rsp + 0xc0]
mov eax, 1
jmp 0x180198715