Function at 0x140004eb0
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 r14
push r15
sub rsp, 0x118
mov rax, qword [rcx + 0x88]
mov rsi, rdx
mov r10, qword [rcx + 0x110]
mov r13, rcx
mov rbx, qword [rcx + 0xdef8]
xor ebp, ebp
movsxd rdi, r8d
mov r12d, ebp
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x60], r10
mov qword [rsp + 0x70], rdi
mov r8, qword [rdx + rdi*8 + 0x1030]
lea r15, [rdi + 2]
mov r11, qword [rdx + rdi*8 + 0x1000]
lea r14, [rdi + 5]
shl r15, 9
add r15, rdx
shl r14, 9
add r14, rdx
mov qword [rsp + 0x68], r11
lea rdx, [rdi + rdi*2]
mov qword [rsp + 0x50], r8
add rdx, rdx
mov rax, qword [rsi + rdx*8 + 0x1060]
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 0x14000513c
lea r9, [rdi + rdi*2]
mov qword [rsp + 0x58], r9
nop
mov rdx, qword [r11 + r12*8]
lea rdi, [rsp + 0x80]
movsx rax, bp
mov ecx, reloc.OLEAUT32.dll_VarI4FromDisp
rep stosw word [rdi], ax
mov ecx, dword [r10 + rdx*4]
lea rax, [r10 + rdx*4]
mov qword [rsp + 0x38], rax
mov r10d, ebp
mov eax, ecx
mov qword [rsp + 0x48], rdx
and eax, 0x700
mov rdx, rbp
cmp eax, 0x100
setne dl
shr rcx, 2
and ecx, 0x3f
mov qword [rsp + 0x40], rdx
add rcx, r9
lea rax, [rdx + rcx*2]
mov rax, qword [rsi + rax*8 + 0x1060]
mov qword [rsp + 0x178], rax
movsxd rax, r10d
mov ebp, r10d
mov rcx, qword [r14 + rax*8]
lea r11, [r14 + rax*8]
test rcx, rcx
jne 0x1400050bd
movsxd rdi, dword [r15 + rax*8]
lea rsi, [r15 + rax*8]
lea rax, [0x1401395f0]
movzx r8d, byte [rdi + rbx]
inc edi
mov r9d, dword [rax + r8*4]
cmp r8d, 0xf
jae 0x14000502b
cmp r8d, 0xc
sbb ecx, ecx
and ecx, 0x15
cmp r8d, 2
sbb eax, eax
and eax, 0xfffffff3
add ecx, eax
movsxd rax, edi
movzx edx, byte [rax + rbx]
shl edx, cl
add r9d, edx
inc edi
mov eax, r9d
sar rax, 8
and eax, 0xfff
test r8d, r8d
jne 0x14000505a
movsxd rcx, edi
inc edi
movzx edx, byte [rcx + rbx]
movabs rcx, 0x7fffffffffffffff
shl rdx, 8
add rax, rdx
cmove rax, rcx
movsxd rcx, edi
mov edx, r9d
and edx, 0x100000
mov qword [r11], rax
mov qword [rsi], rcx
neg edx
sar edx, 0x15
movzx ecx, r9b
add r10d, ecx
sar r9d, 0x15
mov rcx, qword [rsp + 0x178]
xor dx, r9w
movsxd rdi, r10d
movsx edx, dx
movsx ecx, word [rcx + rdi*2]
imul edx, ecx
mov rcx, qword [rsp + 0x30]
movzx ecx, byte [rdi + rcx]
mov word [rsp + rcx*2 + 0x80], dx
xor ecx, ecx
test rax, rax
sete cl
add r10d, ecx
cmp r10d, 0x40
jl 0x140004fd2
jmp 0x1400050c7
movsxd rax, r10d
dec rcx
mov qword [r14 + rax*8], rcx
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], ebp
call qword [r13 + 0x68]
mov r8, qword [rsp + 0x50]
inc r12
mov rsi, qword [rsp + 0x168]
mov ebp, 0
mov r9, qword [rsp + 0x58]
mov r10, qword [rsp + 0x60]
mov r11, qword [rsp + 0x68]
cmp r12, r8
jl 0x140004f70
mov rdi, qword [rsp + 0x70]
lea rax, [r8*8]
mov r9d, 2
add qword [rsi + rdi*8 + 0x1000], rax
mov rcx, r13
mov r8, qword [rsi + rdi*8 + 0x1048]
mov rax, r8
neg rax
shl rax, 3
add qword [rsi + rdi*8 + 0x1018], rax
mov eax, dword [rsp + 0x170]
mov rdx, qword [rsi + rdi*8 + 0x1018]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 1
call qword [r13 + reloc.WS2_32.dll_WSASetLastError]
add rsp, 0x118
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret