Function at 0x140005540
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x120
mov rax, qword [rcx + 0x88]
mov rsi, rdx
mov r11, qword [rcx + 0x110]
mov r13, rcx
mov rdi, qword [rcx + 0xdef8]
xor ebx, ebx
movsxd r10, r8d
mov r12d, ebx
mov qword [rsp + 0x30], rax
lea rax, [rdx + 0x1000]
mov r9, qword [rax + r10*8]
lea rax, [rax + r10*8]
mov qword [rsp + 0x70], rax
mov r8, qword [rdx + r10*8 + 0x1030]
lea rax, [r10 + r10*2]
lea r15, [r10 + 2]
mov qword [rsp + 0x68], r11
shl r15, 9
lea rbp, [r10 + 5]
shl rbp, 9
add r15, rdx
add rbp, rdx
mov qword [rsp + 0x78], r10
mov qword [rsp + 0x58], r9
lea rdx, [rax + rax]
mov rax, qword [rsi + rdx*8 + 0x1060]
mov qword [rsp + 0x50], r8
movzx ecx, word [rax]
mov rax, qword [rsi + rdx*8 + 0x1068]
mov word [rsp + 0x160], cx
movzx ecx, word [rax]
mov word [rsp + 0x162], cx
test r8, r8
jle 0x140005836
lea r10, [r10 + r10*2]
mov qword [rsp + 0x118], r14
mov qword [rsp + 0x60], r10
mov rdx, qword [r9 + r12*8]
movzx ecx, bx
mov eax, ecx
mov qword [rsp + 0x48], rdx
shl ecx, 0x10
or ecx, eax
lea rax, [r11 + rdx*4]
mov qword [rsp + 0x38], rax
mov rdx, rbx
mov r11d, ebx
movd xmm0, ecx
mov ecx, dword [rax]
mov eax, ecx
pshufd xmm0, xmm0, 0
and eax, 0x700
cmp eax, 0x100
movups xmmword [rsp + 0x80], xmm0
setne dl
shr rcx, 2
and ecx, 0x3f
mov qword [rsp + 0x40], rdx
add rcx, r10
movups xmmword [rsp + 0x90], xmm0
movups xmmword [rsp + 0xa0], xmm0
lea rax, [rdx + rcx*2]
movups xmmword [rsp + 0xb0], xmm0
movups xmmword [rsp + 0xc0], xmm0
movups xmmword [rsp + 0xd0], xmm0
movups xmmword [rsp + 0xe0], xmm0
movups xmmword [rsp + 0xf0], xmm0
mov rax, qword [rsi + rax*8 + 0x1060]
mov qword [rsp + 0x178], rax
movsxd rax, r11d
mov r14d, r11d
lea rcx, [rax*8]
mov rax, qword [rcx + rbp]
lea rbx, [rcx + rbp]
test rax, rax
jne 0x1400057aa
movsxd r8, dword [rcx + r15]
lea rsi, [rcx + r15]
lea rax, [0x1400c2b40]
movzx r9d, byte [r8 + rdi]
inc r8d
mov r10d, dword [rax + r9*4]
cmp r9b, 0xf
jae 0x140005713
cmp r9b, 0xc
sbb ecx, ecx
and ecx, 0x15
cmp r9b, 2
sbb eax, eax
and eax, 0xfffffff3
add ecx, eax
movsxd rax, r8d
movzx edx, byte [rax + rdi]
shl edx, cl
add r10d, edx
inc r8d
mov eax, r10d
sar rax, 8
and eax, 0xfff
test r9b, r9b
jne 0x140005743
movsxd rcx, r8d
inc r8d
movzx edx, byte [rcx + rdi]
movabs rcx, 0x7fffffffffffffff
shl rdx, 8
add rax, rdx
cmove rax, rcx
movsxd rcx, r8d
mov edx, r10d
and edx, 0x100000
mov qword [rbx], rax
mov qword [rsi], rcx
neg edx
sar edx, 0x15
xor ebx, ebx
movzx ecx, r10b
add r11d, ecx
sar r10d, 0x15
mov rcx, qword [rsp + 0x178]
xor dx, r10w
movsxd r8, r11d
movsx edx, dx
movsx ecx, word [rcx + r8*2]
imul edx, ecx
mov rcx, qword [rsp + 0x30]
test rax, rax
movzx ecx, byte [r8 + rcx]
mov word [rsp + rcx*2 + 0x80], dx
mov ecx, ebx
sete cl
add r11d, ecx
cmp r11d, 0x40
jl 0x1400056b0
jmp 0x1400057b3
dec rax
mov qword [rcx + rbp], rax
xor ebx, ebx
mov rax, qword [rsp + 0x38]
lea r9, [rsp + 0x80]
mov r8d, dword [rsp + 0x170]
mov rcx, r13
mov rdx, qword [rsp + 0x48]
movzx eax, word [rax + 2]
mov word [rsp + 0x80], ax
mov rax, qword [rsp + 0x40]
movzx eax, word [rsp + rax*2 + 0x160]
mov word [rsp + 0x28], ax
mov dword [rsp + 0x20], r14d
call qword [r13 + 0x68]
mov r8, qword [rsp + 0x50]
inc r12
mov rsi, qword [rsp + 0x168]
mov r9, qword [rsp + 0x58]
mov r10, qword [rsp + 0x60]
mov r11, qword [rsp + 0x68]
cmp r12, r8
jl 0x140005611
mov rcx, qword [rsp + 0x70]
mov r10, qword [rsp + 0x78]
mov r14, qword [rsp + 0x118]
mov r9, qword [rcx]
jmp 0x140005841
lea rcx, [r10 + 0x200]
lea rcx, [rsi + rcx*8]
lea rax, [r9 + r8*8]
mov r8, qword [rsi + r10*8 + 0x1048]
mov qword [rcx], rax
mov r9d, 2
mov rax, r8
mov rcx, r13
neg rax
shl rax, 3
add qword [rsi + r10*8 + 0x1018], rax
mov eax, dword [rsp + 0x170]
mov rdx, qword [rsi + r10*8 + 0x1018]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 1
call qword [r13 + reloc.WS2_32.dll_WSASetLastError]
add rsp, 0x120
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret