Function at 0x140218910
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
mov eax, 0x16f8
call fcn.14016d973
sub rsp, rax
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x436
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1718]
mov rax, qword [0x1405033c0]
xor rax, rbp
mov qword [rbp + 0x16c0], rax
lea rcx, reloc.WS2_32.dll_accept
call fcn.140174d6d
nop
lea rax, [rbp + 0x30]
mov qword [rbp + 0x1048], rax
mov eax, dword [rbp + 0x1700]
mov rcx, qword [rbp + 0x16f0]
cmp qword [rcx], rax
jae 0x140218992
xor eax, eax
jmp 0x140218c01
mov rax, qword [rbp + 0x16f0]
mov rax, qword [rax]
sub rax, 0x1000
test rax, rax
jle 0x1402189c0
mov rax, qword [rbp + 0x16f0]
mov rax, qword [rax]
sub rax, 0x1000
mov qword [rbp + 0x16b8], rax
jmp 0x1402189cb
mov qword [rbp + 0x16b8], 0
mov rax, qword [rbp + 0x16b8]
mov qword [rbp + 8], rax
mov rax, qword [rbp + 0x16f0]
mov rcx, qword [rbp + 8]
mov rax, qword [rax]
sub rax, rcx
cmp rax, 0x1000
jbe 0x1402189fc
mov qword [rbp + 0x16b8], 0x1000
jmp 0x140218a14
mov rax, qword [rbp + 0x16f0]
mov rcx, qword [rbp + 8]
mov rax, qword [rax]
sub rax, rcx
mov qword [rbp + 0x16b8], rax
mov eax, dword [rbp + 0x16b8]
mov dword [rbp + 0x1084], eax
movsxd rax, dword [rbp + 0x1084]
mov r9, rax
mov r8, qword [rbp + 0x1048]
mov rdx, qword [rbp + 8]
mov rax, qword [rbp + 0x16f0]
mov rcx, qword [rax + 0x60]
mov rax, qword [rbp + 0x16f0]
call qword [rax + 0x48]
mov ecx, dword [rbp + 0x1084]
cmp rax, rcx
je 0x140218a5c
xor eax, eax
jmp 0x140218c01
mov eax, dword [rbp + 0x1084]
sub eax, 4
mov dword [rbp + 0x1064], eax
jmp 0x140218a7b
mov eax, dword [rbp + 0x1064]
dec eax
mov dword [rbp + 0x1064], eax
cmp dword [rbp + 0x1064], 0
jl 0x140218b62
movsxd rax, dword [rbp + 0x1064]
mov rcx, qword [rbp + 0x1048]
add rcx, rax
mov rax, rcx
mov ecx, 1
imul rcx, rcx, 0
movzx eax, byte [rax + rcx]
movsxd rcx, dword [rbp + 0x1064]
mov rdx, qword [rbp + 0x1048]
add rdx, rcx
mov rcx, rdx
mov edx, 1
imul rdx, rdx, 1
movzx ecx, byte [rcx + rdx]
shl ecx, 8
or eax, ecx
movsxd rcx, dword [rbp + 0x1064]
mov rdx, qword [rbp + 0x1048]
add rdx, rcx
mov rcx, rdx
mov edx, 1
imul rdx, rdx, 2
movzx ecx, byte [rcx + rdx]
shl ecx, 0x10
or eax, ecx
movsxd rcx, dword [rbp + 0x1064]
mov rdx, qword [rbp + 0x1048]
add rdx, rcx
mov rcx, rdx
mov edx, 1
imul rdx, rdx, 3
movzx ecx, byte [rcx + rdx]
shl ecx, 0x18
or eax, ecx
mov dword [rbp + 0x10a4], eax
mov eax, dword [rbp + 0x16f8]
cmp dword [rbp + 0x10a4], eax
jne 0x140218b5d
movsxd rax, dword [rbp + 0x1064]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov rcx, qword [rbp + 0x16f0]
mov rcx, qword [rcx]
sub rcx, rax
mov rax, rcx
mov ecx, dword [rbp + 0x1700]
cmp rax, rcx
jb 0x140218b5d
jmp 0x140218b62
jmp 0x140218a6d
cmp dword [rbp + 0x1064], 0
jl 0x140218b82
movsxd rax, dword [rbp + 0x1064]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 8], rax
jmp 0x140218bee
cmp qword [rbp + 8], 0
je 0x140218bad
mov rax, qword [rbp + 0x16f0]
mov rcx, qword [rbp + 8]
mov rax, qword [rax]
sub rax, rcx
mov ecx, dword [rbp + 0x1700]
add ecx, 0xffff
mov ecx, ecx
cmp rax, rcx
jb 0x140218bb1
xor eax, eax
jmp 0x140218c01
mov rax, qword [rbp + 8]
sub rax, 0xffd
test rax, rax
jbe 0x140218bd3
mov rax, qword [rbp + 8]
sub rax, 0xffd
mov qword [rbp + 0x16b8], rax
jmp 0x140218bde
mov qword [rbp + 0x16b8], 0
mov rax, qword [rbp + 0x16b8]
mov qword [rbp + 8], rax
jmp 0x1402189d6
mov rax, qword [rbp + 0x1708]
mov rcx, qword [rbp + 8]
mov qword [rax], rcx
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, reloc.WS2_32.dll_accept
call fcn.14017345e
mov rax, rdi
mov rcx, qword [rbp + 0x16c0]
xor rcx, rbp
call fcn.1401703e9
lea rsp, [rbp + 0x16d8]
pop rdi
pop rbp
ret