Function at 0x14018aba0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
mov eax, reloc.WS2_32.dll_getservbyport
call fcn.14028b850
sub rsp, rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x10], rax
mov rax, qword [rsp + 0x10]
mov byte [rax], 0
cmp dword [rsp + 0x48], 0x80
jle 0x14018abe4
mov dword [rsp + 0x48], 0x80
cmp dword [rsp + 0x58], 0
jg 0x14018abf3
mov dword [rsp + 0x58], 0x400
cmp dword [rsp + 0x58], 0x400
jle 0x14018ac05
mov dword [rsp + 0x58], 0x400
mov dword [rsp], 0
jmp 0x14018ac17
mov eax, dword [rsp]
add eax, 1
mov dword [rsp], eax
mov eax, dword [rsp + 0x48]
cmp dword [rsp], eax
jge 0x14018ac3c
movsxd r8, dword [rsp]
movsxd rdx, dword [rsp]
mov rcx, qword [rsp + 0x10]
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + r8]
mov byte [rcx + rdx], al
jmp 0x14018ac0e
mov eax, dword [rsp + 0x48]
sub eax, 1
movsxd rcx, eax
mov rax, qword [rsp + 0x10]
movzx eax, byte [rax + rcx]
mov dword [rsp + 0x18], eax
mov dword [rsp + 0x20], 0
mov eax, dword [rsp + 0x48]
mov dword [rsp], eax
jmp 0x14018ac78
mov eax, dword [rsp]
add eax, 1
mov dword [rsp], eax
mov eax, dword [rsp + 0x20]
add eax, 1
mov dword [rsp + 0x20], eax
cmp dword [rsp], 0x80
jge 0x14018acbc
movsxd rcx, dword [rsp + 0x20]
mov rax, qword [rsp + 0x10]
movzx eax, byte [rax + rcx]
add eax, dword [rsp + 0x18]
and eax, 0xff
mov ecx, eax
lea rax, [0x1402e5fa0]
movzx eax, byte [rax + rcx]
mov dword [rsp + 0x18], eax
movsxd rdx, dword [rsp]
mov rcx, qword [rsp + 0x10]
movzx eax, byte [rsp + 0x18]
mov byte [rcx + rdx], al
jmp 0x14018ac64
mov eax, dword [rsp + 0x58]
add eax, 7
sar eax, 3
mov dword [rsp + 0x20], eax
mov eax, 0x80
sub eax, dword [rsp + 0x20]
mov dword [rsp], eax
mov ecx, dword [rsp + 0x58]
neg ecx
and ecx, 7
mov eax, 0xff
sar eax, cl
mov dword [rsp + 0x1c], eax
movsxd rcx, dword [rsp]
mov rax, qword [rsp + 0x10]
movzx eax, byte [rax + rcx]
and eax, dword [rsp + 0x1c]
mov ecx, eax
lea rax, [0x1402e5fa0]
movzx eax, byte [rax + rcx]
mov dword [rsp + 0x18], eax
movsxd rdx, dword [rsp]
mov rcx, qword [rsp + 0x10]
movzx eax, byte [rsp + 0x18]
mov byte [rcx + rdx], al
mov ecx, dword [rsp]
mov eax, dword [rsp]
sub eax, 1
mov dword [rsp], eax
test ecx, ecx
je 0x14018ad6a
mov ecx, dword [rsp + 0x20]
mov eax, dword [rsp]
add eax, ecx
movsxd rcx, eax
mov rax, qword [rsp + 0x10]
movzx eax, byte [rax + rcx]
xor eax, dword [rsp + 0x18]
mov ecx, eax
lea rax, [0x1402e5fa0]
movzx eax, byte [rax + rcx]
mov dword [rsp + 0x18], eax
movsxd rdx, dword [rsp]
mov rcx, qword [rsp + 0x10]
movzx eax, byte [rsp + 0x18]
mov byte [rcx + rdx], al
jmp 0x14018ad1d
mov rax, qword [rsp + 0x40]
add rax, 0xfc
mov qword [rsp + 8], rax
mov dword [rsp], 0x7f
jmp 0x14018ad8c
mov eax, dword [rsp]
sub eax, 2
mov dword [rsp], eax
cmp dword [rsp], 0
jl 0x14018add5
movsxd rcx, dword [rsp]
mov rax, qword [rsp + 0x10]
movzx edx, byte [rax + rcx]
shl edx, 8
mov eax, dword [rsp]
sub eax, 1
movsxd rcx, eax
mov rax, qword [rsp + 0x10]
movzx eax, byte [rax + rcx]
mov ecx, edx
or ecx, eax
and ecx, 0xffff
mov rax, qword [rsp + 8]
mov dword [rax], ecx
mov rax, qword [rsp + 8]
sub rax, 4
mov qword [rsp + 8], rax
jmp 0x14018ad83
add rsp, 0x38
ret