Function at 0x140041e70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp], 0xfffffffffffffffe
mov rsi, rdx
mov rdi, rcx
mov rbx, qword [rcx]
mov r14, qword [rcx + 8]
cmp rbx, r14
jne 0x140041edc
mov rax, qword [rsi + 0x20]
mov bl, 1
cmp rax, qword [rsi + 0x18]
jne 0x140041f24
jmp 0x1400420d7
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14009a7e4
mov qword [rbx + 0x18], 0
mov qword [rbx + 0x20], setsockopt
mov byte [rbx + 8], 0
add rbx, 0x28
cmp rbx, r14
je 0x140041f0d
mov rax, qword [rbx + 0x20]
cmp rax, 0x10
jb 0x140041ebf
mov rcx, qword [rbx + 8]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140041eba
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jb 0x140041eb0
call fcn.1400a4324
mov rax, qword [rdi]
mov qword [rdi + 8], rax
mov rax, qword [rsi + 0x20]
mov bl, 1
cmp rax, qword [rsi + 0x18]
je 0x1400420d7
movzx r14d, byte [rsi + 8]
mov rax, qword [rsi]
lea rdx, [rbp - 2]
mov r8d, 2
mov rcx, rsi
call qword [rax + ioctlsocket]
test r14b, r14b
jne 0x140041f53
test al, al
je 0x140041f53
movzx eax, word [rbp - 2]
rol ax, 8
mov word [rbp - 2], ax
jmp 0x140041f68
test r14b, r14b
sete cl
xor al, 1
or al, cl
je 0x140041f64
jmp 0x1400420d5
movzx eax, word [rbp - 2]
cmp ax, 4
jb 0x1400420d7
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x10], setsockopt
mov rax, qword [rsi]
lea rdx, [rbp - 0x30]
mov r8d, 2
mov rcx, rsi
call qword [rax + ioctlsocket]
test al, al
je 0x14004209a
rol word [rbp - 0x30], 8
lea r14, [rbp - 0x28]
movzx r15d, byte [rsi + 8]
mov rax, qword [rsi]
lea rdx, [rbp - 4]
mov r8d, 2
mov rcx, rsi
call qword [rax + ioctlsocket]
test r15b, r15b
jne 0x140041fdc
test al, al
je 0x140041fdc
movzx eax, word [rbp - 4]
rol ax, 8
mov word [rbp - 4], ax
jmp 0x140041fee
test r15b, r15b
setne cl
test cl, al
je 0x14004209a
movzx eax, word [rbp - 4]
movzx edx, ax
mov rcx, rsi
mov r8, r14
call fcn.1400205f0
test al, al
je 0x14004209a
movzx eax, word [rbp - 2]
sub ax, word [rbp - 0x18]
add eax, 0xfffffffc
mov word [rbp - 2], ax
mov rdx, qword [rdi + 8]
cmp rdx, qword [rdi + 0x10]
je 0x14004204a
movzx eax, word [rbp - 0x30]
mov word [rdx], ax
xorps xmm0, xmm0
movups xmmword [rdx + 0x18], xmm0
movups xmmword [rdx + 8], xmm0
movups xmm0, xmmword [r14]
movups xmm1, xmmword [r14 + 0x10]
movups xmmword [rdx + 8], xmm0
movups xmmword [rdx + 0x18], xmm1
add qword [rdi + 8], 0x28
jmp 0x140041f64
lea r8, [rbp - 0x30]
mov rcx, rdi
call fcn.140041330
mov rax, qword [rbp - 0x10]
cmp rax, 0x10
jb 0x140041f64
mov rcx, qword [rbp - 0x28]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140042090
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x1400420e6
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14009a7e4
jmp 0x140041f64
mov rax, qword [rbp - 0x10]
cmp rax, 0x10
jb 0x1400420d5
mov rcx, qword [rbp - 0x28]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1400420d0
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x1400420eb
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14009a7e4
xor ebx, ebx
mov eax, ebx
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret
call fcn.1400a4324
call fcn.1400a4324
int3