Function at 0x1400f5050
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rdi
push r13
sub rsp, 0x188
mov rax, qword [0x1403a8088]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rax, qword [rcx]
mov r13, r9
mov qword [rsp + 0x48], r9
mov rdi, rcx
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x50], rdx
mov dword [rax + 8], 0
call fcn.1400f4540
test eax, eax
jne 0x1400f50ad
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, rdi
mov edx, dword [rax + 8]
call fcn.1400f3ca0
xor eax, eax
jmp 0x1400f5611
mov r10, qword [rdi]
mov qword [rsp + 0x178], rbp
mov qword [rsp + 0x168], r12
mov qword [rsp + 0x160], r14
movsxd rax, dword [r10 + 8]
mov qword [rsp + 0x158], r15
mov r15d, 1
cmp eax, 3
jne 0x1400f50fe
cmp dword [rdi + 0x4850], eax
je 0x1400f50f9
cmp dword [rdi + 0x484c], 0
jne 0x1400f50fe
cmp dword [rdi + 0x4848], 0
jne 0x1400f50fe
mov r14d, r15d
jmp 0x1400f5101
xor r14d, r14d
xor ebp, ebp
mov qword [rsp + 0x180], rbx
mov qword [rsp + 0x170], rsi
xorps xmm0, xmm0
xorps xmm1, xmm1
mov r12, rax
movdqu xmmword [rsp + 0x60], xmm0
movdqu xmmword [rsp + 0x70], xmm1
test eax, eax
jle 0x1400f5207
lea rbx, [rsp + 0x9c]
lea rsi, [rdi + 0x46a4]
nop
mov ecx, dword [r10]
add ecx, 3
call fcn.140280918
mov qword [rsi + 0x44], rax
test rax, rax
je 0x1400f55b2
mov eax, dword [rdi + 0x4688]
mov r10, qword [rdi]
cdq
idiv dword [rsi]
mov dword [rbx + 0xc], 0
mov r9d, eax
mov dword [rbx - 4], eax
mov eax, dword [rdi + 0x468c]
cdq
idiv dword [rsi + 4]
xor edx, edx
mov ecx, eax
mov dword [rbx], eax
mov r8d, eax
sar ecx, 1
mov eax, dword [r10]
dec eax
mov dword [rbx + 8], ecx
mov rcx, qword [rsi + 0x2c]
add eax, r9d
div r9d
mov qword [rbx - 0xc], rcx
mov dword [rbx + 4], eax
mov qword [rbx - 0x14], rcx
cmp r9d, r15d
jne 0x1400f51c5
cmp r8d, r15d
jne 0x1400f51b6
lea rax, [0x1400f47a0]
jmp 0x1400f51ef
cmp r8d, 2
jne 0x1400f51c5
lea rax, [0x1400f47b0]
jmp 0x1400f51ef
cmp r9d, 2
jne 0x1400f51e8
cmp r8d, r15d
jne 0x1400f51d9
lea rax, [0x1400f4800]
jmp 0x1400f51ef
cmp r8d, 2
jne 0x1400f51e8
mov rax, qword [rdi + 0x4880]
jmp 0x1400f51ef
lea rax, [0x1400f4be0]
mov qword [rbx - 0x1c], rax
inc rbp
add rbx, 0x30
add rsi, 0x60
cmp rbp, r12
jl 0x1400f5140
mov rax, qword [rdi]
mov r9d, r15d
mov ecx, 4
mov ebx, dword [rax]
mov edx, ebx
mov r8d, dword [rax + 4]
call fcn.1400ef1b0
test eax, eax
je 0x1400f55b2
imul ebx, r8d
lea eax, [rbx*4 + 1]
movsxd rcx, eax
call fcn.140280918
mov qword [rsp + 0x40], rax
mov rbp, rax
test rax, rax
je 0x1400f55b2
mov rcx, qword [rdi]
xor edx, edx
mov dword [rsp + 0x30], edx
cmp dword [rcx + 4], edx
jbe 0x1400f556b
mov r15, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x60]
mov r8d, r14d
mov r14, qword [rsp + 0x68]
mov qword [rsp + 0x38], r8
nop dword [rax]
mov r13d, dword [rcx]
imul r13d, edx
shl r13d, 2
add r13, rbp
xor ebp, ebp
test r12, r12
jle 0x1400f534c
lea rsi, [rdi + 0x46c0]
lea rbx, [rsp + 0xa4]
nop dword [rax + rax]
mov r15d, dword [rbx - 8]
mov eax, r15d
mov r14d, dword [rbx]
sar eax, 1
cmp r14d, eax
jl 0x1400f52c7
mov r8, qword [rbx - 0x1c]
jmp 0x1400f52cb
mov r8, qword [rbx - 0x14]
cmp r14d, eax
jl 0x1400f52d6
mov rdx, qword [rbx - 0x14]
jmp 0x1400f52da
mov rdx, qword [rbx - 0x1c]
mov eax, dword [rbx - 0xc]
mov r9d, dword [rbx - 4]
mov rcx, qword [rsi + 0x28]
mov dword [rsp + 0x20], eax
call qword [rbx - 0x24]
mov qword [rsp + rbp*8 + 0x60], rax
lea eax, [r14 + 1]
mov dword [rbx], eax
cmp eax, r15d
jl 0x1400f531f
inc dword [rbx + 4]
mov eax, dword [rbx + 4]
mov rcx, qword [rbx - 0x14]
mov dword [rbx], 0
mov qword [rbx - 0x1c], rcx
cmp eax, dword [rsi]
jge 0x1400f531f
movsxd rax, dword [rsi + 4]
add rax, rcx
mov qword [rbx - 0x14], rax
inc rbp
add rbx, 0x30
add rsi, 0x60
cmp rbp, r12
jl 0x1400f52b0
mov r15, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x70]
mov r14, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x60]
mov edx, dword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
mov rax, qword [rdi]
mov ecx, dword [rax + 8]
cmp ecx, 3
jne 0x1400f53c5
test r8, r8
je 0x1400f53a0
xor r8d, r8d
cmp dword [rax], r8d
jbe 0x1400f5544
lea rdx, [r13 + 2]
nop dword [rax]
movzx eax, byte [r8 + rbx]
mov byte [rdx - 2], al
lea rdx, [rdx + 4]
movzx eax, byte [r8 + r14]
mov byte [rdx - 5], al
movzx eax, byte [r8 + rsi]
inc r8d
mov byte [rdx - 4], al
mov byte [rdx - 3], 0xff
mov rax, qword [rdi]
cmp r8d, dword [rax]
jb 0x1400f5370
jmp 0x1400f5540
mov eax, dword [rax]
mov r9, rsi
mov dword [rsp + 0x28], 4
mov r8, r14
mov dword [rsp + 0x20], eax
mov rdx, rbx
mov rcx, r13
call qword [rdi + 0x4878]
jmp 0x1400f5540
cmp ecx, 4
jne 0x1400f5510
mov ecx, dword [rdi + 0x484c]
test ecx, ecx
jne 0x1400f545c
xor r10d, r10d
cmp dword [rax], r10d
jbe 0x1400f5544
lea r9, [r13 + 2]
nop dword [rax]
movzx r8d, byte [r10 + r15]
lea r9, [r9 + 4]
movzx ecx, byte [r10 + rbx]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 6], al
movzx ecx, byte [r10 + r14]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 5], al
movzx ecx, byte [r10 + rsi]
inc r10d
mov byte [r9 - 3], 0xff
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 4], al
mov rax, qword [rdi]
cmp r10d, dword [rax]
jb 0x1400f53f0
jmp 0x1400f5540
mov eax, dword [rax]
cmp ecx, 2
mov dword [rsp + 0x28], 4
mov rcx, r13
mov dword [rsp + 0x20], eax
mov r9, rsi
mov r8, r14
mov rdx, rbx
jne 0x1400f53ba
call qword [rdi + 0x4878]
mov rax, qword [rdi]
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x1400f5540
lea r8, [r13 + 2]
nop dword [rax + rax]
movzx edx, byte [r9 + r15]
inc r9d
movzx eax, byte [r8 - 2]
lea r8, [r8 + 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 6], al
movzx eax, byte [r8 - 5]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 5], al
movzx eax, byte [r8 - 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 4], al
mov rax, qword [rdi]
cmp r9d, dword [rax]
jb 0x1400f54a0
jmp 0x1400f5540
xor r8d, r8d
cmp dword [rax], r8d
jbe 0x1400f5544
lea rdx, [r13 + 1]
nop dword [rax]
movzx ecx, byte [r8 + rbx]
inc r8d
mov byte [rdx + 1], cl
mov byte [rdx], cl
mov byte [rdx - 1], cl
mov byte [rdx + 2], 0xff
lea rdx, [rdx + 4]
mov rax, qword [rdi]
cmp r8d, dword [rax]
jb 0x1400f5520
mov edx, dword [rsp + 0x30]
mov rcx, qword [rdi]
inc edx
mov rbp, qword [rsp + 0x40]
mov r8, qword [rsp + 0x38]
mov dword [rsp + 0x30], edx
cmp edx, dword [rcx + 4]
jb 0x1400f5280
mov r13, qword [rsp + 0x48]
mov r15d, 1
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, rdi
mov edx, dword [rax + 8]
call fcn.1400f3ca0
mov rax, qword [rdi]
mov ecx, dword [rax]
mov rax, qword [rsp + 0x50]
mov dword [rax], ecx
mov rax, qword [rdi]
mov ecx, dword [rax + 4]
mov rax, qword [rsp + 0x58]
mov dword [rax], ecx
test r13, r13
je 0x1400f55ad
mov rax, qword [rdi]
mov ecx, 3
cmp dword [rax + 8], ecx
cmovge r15d, ecx
mov dword [r13], r15d
mov rax, rbp
jmp 0x1400f55e1
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, rdi
mov edx, dword [rax + 8]
call fcn.1400f3ca0
mov rax, qword gs:[0x58]
mov edx, reloc.WS2_32.dll_recv
mov rcx, qword [rax]
lea rax, str.outofmem
mov qword [rdx + rcx], rax
xor eax, eax
mov rsi, qword [rsp + 0x170]
mov rbx, qword [rsp + 0x180]
mov r12, qword [rsp + 0x168]
mov rbp, qword [rsp + 0x178]
mov r14, qword [rsp + 0x160]
mov r15, qword [rsp + 0x158]
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.14012a2b0
add rsp, 0x188
pop r13
pop rdi
ret