Function at 0x14004a540
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor ebp, ebp
mov rsi, r8
mov r14d, ebp
mov r15, rdx
mov rbx, rcx
movabs r13, 0x28f5c28f5c28f5c
movabs r12, 0x47ae147ae147ae15
nop
mov edx, reloc.WS2_32.dll_recv
mov rcx, rsi
call fcn.1400098d0
imul rax, qword [rbx + 0x18]
mov rdi, qword [rbx + 0x38]
mov r10, qword [rbx + 0x28]
mov rcx, rax
mov r9d, dword [rbx + 0x48]
shr rcx, 0x21
xor rax, rcx
mov ecx, dword [rbx + 0x4c]
mov r8, rax
shr rax, 5
and r8d, 0x1f
and rax, rdi
shr r8, cl
add r8d, r9d
movzx ecx, byte [r10 + rax]
cmp r8d, ecx
jae 0x14004a5e1
nop dword [rax]
movzx ecx, byte [r10 + rax + 1]
inc rax
add r8d, r9d
cmp r8d, ecx
jb 0x14004a5d0
movzx ecx, byte [r10 + rax]
cmp r8d, ecx
jne 0x14004a621
mov rcx, qword [rbx + 0x20]
mov r11, qword [rsi]
lea rdx, [rcx + rax*8]
mov rcx, qword [rdx]
cmp r11, qword [rcx]
jne 0x14004a60c
mov rcx, qword [rcx + 8]
cmp qword [rsi + 8], rcx
je 0x14004a725
movzx ecx, byte [r10 + rax + 1]
inc rax
add rdx, 8
add r8d, r9d
cmp r8d, ecx
je 0x14004a5f6
mov r11, qword [rbx + 0x30]
cmp r11, qword [rbx + 0x40]
jb 0x14004a735
test rdi, rdi
jne 0x14004a644
lea edx, [rdi + 8]
mov rcx, rbx
call fcn.1400140a0
jmp 0x14004a70d
lea rcx, [rdi + 1]
mov rax, r12
cmp rcx, r13
ja 0x14004a66a
lea rcx, [rcx + rcx*4]
shl rcx, 4
mul rcx
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 6
jmp 0x14004a682
mul rcx
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 6
lea rcx, [rcx + rcx*4]
shl rcx, 4
cmp r11, rcx
jae 0x14004a693
mov rcx, rbx
call fcn.1400141c0
test al, al
jne 0x14004a70d
mov r8, qword [rbx + 0x38]
mov rax, r12
lea r9, [r8 + 1]
cmp r9, r13
ja 0x14004a6bd
lea rcx, [r9 + r9*4]
shl rcx, 4
mul rcx
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 6
jmp 0x14004a6d8
mul r9
mov rax, r9
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 6
lea rcx, [rax + rax*4]
shl rcx, 4
mov rax, qword [rbx + 0x30]
add rax, rax
cmp rax, rcx
jae 0x14004a6f7
movabs rax, 0xc4ceb9fe1a85ec54
mov r8b, 1
add qword [rbx + 0x18], rax
jmp 0x14004a702
lea r9, [r8*2 + 2]
xor r8b, r8b
mov rdx, r9
mov rcx, rbx
call fcn.1400470f0
inc r14d
cmp r14d, 0x100
jl 0x14004a580
mov qword [r15], rbp
jmp 0x14004a7e6
mov qword [r15], rax
mov dword [r15 + 8], 1
jmp 0x14004a7ea
lea ecx, [r9 + r8]
mov r11, rax
cmp ecx, 0xff
jbe 0x14004a748
mov qword [rbx + 0x40], rbp
cmp byte [r10 + rax], bpl
je 0x14004a7cd
mov r9, rax
inc rax
cmp byte [r10 + rax], bpl
jne 0x14004a752
cmp rax, r11
je 0x14004a7cd
mov rcx, qword [rbx + 0x20]
lea rdx, [rcx + rax*8]
mov rcx, qword [rcx + rax*8 - 8]
mov qword [rdx], rcx
cmp r9, r11
je 0x14004a797
nop dword [rax + rax]
mov rcx, qword [rbx + 0x20]
lea rdx, [rcx + r9*8]
dec r9
mov rcx, qword [rdx - 8]
mov qword [rdx], rcx
cmp r9, r11
jne 0x14004a780
mov r9, qword [rbx + 0x28]
mov rdx, rax
nop
movzx ecx, byte [r9 + rdx - 1]
add cl, byte [rbx + 0x48]
mov byte [r9 + rdx], cl
mov r9, qword [rbx + 0x28]
movzx ecx, byte [r9 + rdx]
add ecx, dword [rbx + 0x48]
cmp ecx, 0xff
jbe 0x14004a7c5
mov qword [rbx + 0x40], rbp
dec rdx
cmp rdx, r11
jne 0x14004a7a0
mov rcx, qword [rbx + 0x28]
mov qword [r15], r11
mov byte [r11 + rcx], r8b
inc qword [rbx + 0x30]
cmp rax, r11
setne bpl
add ebp, 2
mov dword [r15 + 8], ebp
mov rbx, qword [rsp + 0x50]
mov rax, r15
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret