Function at 0x140138710
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov rax, rsp
push rbp
push rbx
push rdi
push r14
mov rbp, rsp
sub rsp, 0x58
mov r14, qword [rcx + 8]
xor r11d, r11d
mov qword [rax + 0x10], rsi
mov r10, rdx
mov qword [rax + 0x18], r12
mov rbx, r8
mov qword [rax + 0x20], r13
mov r8d, r11d
movsxd rax, dword [rdx + 4]
mov r13d, 1
movsd xmm0, qword [r10]
test eax, eax
mov r9, rax
movsd qword [rbp - 0x38], xmm0
mov rax, qword [rcx]
cmovs r9, r11
mov rcx, r9
movzx edx, byte [rax]
cmp dl, 0x30
setbe r8b
add rax, r8
sub r14, r8
sub rcx, r14
mov qword [rbp - 0x28], rax
mov eax, dword [r10 + 8]
cmp r14, r9
mov dword [rbp - 0x30], eax
movzx eax, byte [rbp - 0x38]
cmovae rcx, r11
sub al, 2
mov qword [rbp - 0x20], r14
cmp al, r13b
ja 0x1401387cb
cmp dl, 0x2d
jne 0x1401387a3
lea r12, [0x14052b5cc]
mov edi, r13d
jmp 0x1401387d1
mov rax, qword [rbp - 0x38]
shr rax, 8
test al, 2
je 0x1401387bb
lea r12, [0x14052b5d0]
mov rdi, r13
jmp 0x1401387d1
test al, 4
je 0x1401387cb
lea r12, [0x14051417c]
mov rdi, r13
jmp 0x1401387d1
mov r12, r11
mov rdi, r11
mov eax, dword [r10 + 8]
mov r8, rcx
sub r8, rdi
movsd qword [rbp - 0x38], xmm0
cmp rdi, rcx
mov dword [rbp - 0x30], eax
mov rax, qword [rbp - 0x38]
movzx ecx, byte [rbp - 0x38]
cmovae r8, r11
shr rax, 8
test al, 8
jne 0x140138803
cmp cl, 0x11
je 0x140138803
xor dl, dl
jmp 0x140138807
movzx edx, r13b
lea eax, [rcx - 6]
cmp al, r13b
jbe 0x140138818
cmp cl, 0x11
je 0x140138818
xor al, al
jmp 0x14013881c
movzx eax, r13b
mov qword [rsp + 0x50], r15
test dl, dl
je 0x14013885b
test al, al
je 0x14013885b
test r14, r14
je 0x14013885b
cmp cl, 7
lea rax, [0x1404d4528]
lea r15, [0x1404d4524]
mov rsi, 0xffffffffffffffff
cmove r15, rax
nop word [rax + rax]
inc rsi
cmp byte [r15 + rsi], r11b
jne 0x140138850
jmp 0x140138861
mov rsi, r11
mov r15, r11
mov ecx, dword [r10 + 8]
mov r9, r8
sub r9, rsi
cmp rsi, r8
cmovae r9, r11
mov r11d, ecx
shr r11d, 0x1f
xor r11b, r13b
cmove ecx, r13d
movzx r13d, byte [r10 + 1]
mov edx, ecx
test r13b, 8
je 0x1401388ac
cmp byte [r10], 4
jne 0x1401388ac
test r14, r14
je 0x1401388a1
mov rax, qword [rbp - 0x28]
cmp byte [rax], 0x30
je 0x1401388ac
lea eax, [r14 + 1]
mov edx, ecx
cmp ecx, eax
cmovl edx, eax
movsxd rax, edx
mov rcx, r9
mov r8, rax
mov edx, 0
sub r8, r14
cmp r14, rax
movzx eax, r13b
cmovae r8, rdx
sub rcx, r8
cmp r8, r9
cmovae rcx, rdx
and al, 1
cmove rdx, rcx
xor r9d, r9d
test r13b, 1
mov r13, r8
cmovne r9, rcx
mov qword [rbp + 0x28], r9
test r11b, r11b
jne 0x1401388fc
test byte [r10 + 1], 0x10
je 0x1401388fc
lea r13, [r8 + rdx]
xor edx, edx
mov r8b, 0x20
mov rcx, rbx
call fcn.140138630
mov qword [rbp - 0x18], r12
mov qword [rbp - 0x10], rdi
test rdi, rdi
je 0x140138972
mov rcx, qword [rbx + 0x18]
mov rax, rbx
add qword [rbx + 0x10], rdi
sub rax, rcx
add rax, 0x420
cmp rdi, rax
jb 0x140138963
sub rcx, rbx
lea rdi, [rbx + 0x20]
sub rcx, 0x20
mov qword [rbp - 0x38], rdi
mov qword [rbp - 0x30], rcx
lea rdx, [rbp - 0x38]
mov rcx, qword [rbx]
call qword [rbx + reloc.WS2_32.dll_htonl]
movaps xmm0, xmmword [rbp - 0x18]
lea rdx, [rbp - 0x18]
mov qword [rbx + 0x18], rdi
mov rcx, qword [rbx]
movdqa xmmword [rbp - 0x18], xmm0
call qword [rbx + reloc.WS2_32.dll_htonl]
jmp 0x140138972
mov r8, rdi
mov rdx, r12
call fcn.14039b2e0
add qword [rbx + 0x18], rdi
mov r12, qword [rsp + 0x90]
test rsi, rsi
je 0x1401389dc
mov rcx, qword [rbx + 0x18]
mov rax, rbx
add qword [rbx + 0x10], rsi
sub rax, rcx
add rax, 0x420
cmp rsi, rax
jb 0x1401389cd
sub rcx, rbx
lea rdi, [rbx + 0x20]
sub rcx, 0x20
mov qword [rbp - 0x18], rdi
mov qword [rbp - 0x10], rcx
lea rdx, [rbp - 0x18]
mov rcx, qword [rbx]
call qword [rbx + reloc.WS2_32.dll_htonl]
mov qword [rbx + 0x18], rdi
lea rdx, [rbp - 0x18]
mov rcx, qword [rbx]
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x10], rsi
call qword [rbx + reloc.WS2_32.dll_htonl]
jmp 0x1401389dc
mov r8, rsi
mov rdx, r15
call fcn.14039b2e0
add qword [rbx + 0x18], rsi
mov r8b, 0x30
mov rdx, r13
mov rcx, rbx
call fcn.140138630
mov r15, qword [rsp + 0x50]
mov r13, qword [rsp + 0x98]
mov rsi, qword [rsp + 0x88]
test r14, r14
je 0x140138a63
mov rcx, qword [rbx + 0x18]
mov rax, rbx
add qword [rbx + 0x10], r14
sub rax, rcx
add rax, 0x420
cmp r14, rax
jb 0x140138a53
sub rcx, rbx
lea rdi, [rbx + 0x20]
sub rcx, 0x20
mov qword [rbp - 0x18], rdi
mov qword [rbp - 0x10], rcx
lea rdx, [rbp - 0x18]
mov rcx, qword [rbx]
call qword [rbx + reloc.WS2_32.dll_htonl]
movaps xmm0, xmmword [rbp - 0x28]
lea rdx, [rbp - 0x18]
mov qword [rbx + 0x18], rdi
mov rcx, qword [rbx]
movdqa xmmword [rbp - 0x18], xmm0
call qword [rbx + reloc.WS2_32.dll_htonl]
jmp 0x140138a63
mov rdx, qword [rbp - 0x28]
mov r8, r14
call fcn.14039b2e0
add qword [rbx + 0x18], r14
mov rdx, qword [rbp + 0x28]
mov r8b, 0x20
mov rcx, rbx
call fcn.140138630
mov al, 1
add rsp, 0x58
pop r14
pop rdi
pop rbx
pop rbp
ret