Function at 0x140004fe0
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 r10, qword [rcx + 0x110]
mov rsi, qword [rcx + 0xdef8]
movsxd rdi, r8d
mov qword [rsp + 0x70], rax
mov rbx, rdx
mov r8, qword [rdx + rdi*8 + 0x1030]
mov r11, qword [rdx + rdi*8 + 0x1000]
lea rax, [rdi + rdi*2]
mov r13, rcx
lea r15, [rdi + 2]
lea r14, [rdi + 5]
shl r15, 9
shl r14, 9
xor ebp, ebp
add r15, rdx
add r14, rdx
lea rdx, [rax + rax]
mov rax, qword [rbx + rdx*8 + 0x1060]
mov qword [rsp + 0x48], r10
mov qword [rsp + 0x68], rdi
movzx ecx, word [rax]
mov rax, qword [rbx + rdx*8 + 0x1068]
mov qword [rsp + 0x58], r11
mov word [rsp + 0x160], cx
movzx ecx, word [rax]
mov qword [rsp + 0x30], r8
mov r12d, ebp
mov word [rsp + 0x162], cx
test r8, r8
jle 0x140005282
lea r9, [rdi + rdi*2]
mov qword [rsp + 0x38], r9
nop
mov rdx, qword [r11 + r12*8]
movsx rax, bp
lea rdi, [rsp + 0x80]
mov qword [rsp + 0x50], rdx
mov ecx, reloc.OLEAUT32.dll_VarI4FromDisp
lea r8, [0x1400d26f0]
rep stosw word [rdi], ax
lea rax, [r10 + rdx*4]
mov ecx, ebp
mov edx, dword [rax]
mov qword [rsp + 0x40], rax
mov eax, edx
and eax, 0x700
cmp eax, 0x100
setne cl
shr rdx, 2
and edx, 0x3f
movsxd rax, ecx
add rdx, r9
mov qword [rsp + 0x60], rax
lea rax, [rax + rdx*2]
xor edx, edx
mov rax, qword [rbx + rax*8 + 0x1060]
mov r10d, edx
mov qword [rsp + 0x178], rax
nop dword [rax + rax]
movsxd rax, r10d
mov ebp, r10d
lea r11, [r14 + rax*8]
mov rcx, qword [r11]
test rcx, rcx
jne 0x140005203
movsxd rdi, dword [r15 + rax*8]
lea rbx, [r15 + rax*8]
movzx r9d, byte [rdi + rsi]
inc edi
mov r8d, dword [r8 + r9*4]
cmp r9, 0xf
jae 0x14000516b
mov eax, edx
mov ecx, edx
cmp r9d, 0xc
setl cl
neg ecx
and ecx, 0x15
cmp r9d, 2
setl al
neg eax
and eax, 0xfffffff3
add ecx, eax
movsxd rax, edi
movzx edx, byte [rax + rsi]
shl edx, cl
add r8d, edx
inc edi
mov eax, r8d
sar rax, 8
and eax, 0xfff
test r9d, r9d
jne 0x14000519c
movsxd rcx, edi
inc edi
movzx edx, byte [rcx + rsi]
shl edx, 8
movsxd rcx, edx
add rax, rcx
movabs rcx, 0x7fffffffffffffff
cmove rax, rcx
movsxd rcx, edi
mov rdi, qword [rsp + 0x178]
mov edx, r8d
and edx, 0x100000
mov qword [r11], rax
mov qword [rbx], rcx
neg edx
movzx ecx, r8b
sar r8d, 0x15
add r10d, ecx
sar edx, 0x15
xor dx, r8w
movsxd rcx, r10d
lea r8, [0x1400d26f0]
imul dx, word [rdi + rcx*2]
mov rdi, qword [rsp + 0x70]
movzx ecx, byte [rcx + rdi]
mov word [rsp + rcx*2 + 0x80], dx
xor edx, edx
test rax, rax
mov ecx, edx
sete cl
add r10d, ecx
cmp r10d, 0x40
jl 0x140005110
jmp 0x14000520d
movsxd rax, r10d
dec rcx
mov qword [r14 + rax*8], rcx
mov rax, qword [rsp + 0x40]
mov r8d, dword [rsp + 0x170]
mov rdx, qword [rsp + 0x50]
movzx eax, word [rax + 2]
lea r9, [rsp + 0x80]
mov rcx, r13
mov word [rsp + 0x80], ax
mov rax, qword [rsp + 0x60]
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 + 0x30]
mov rbx, qword [rsp + 0x168]
mov r9, qword [rsp + 0x38]
mov r10, qword [rsp + 0x48]
mov r11, qword [rsp + 0x58]
inc r12
mov ebp, 0
cmp r12, r8
jl 0x1400050a0
mov rdi, qword [rsp + 0x68]
lea rax, [r8*8]
mov r8, qword [rbx + rdi*8 + 0x1048]
mov r9d, 2
add qword [rbx + rdi*8 + 0x1000], rax
mov rax, r8
mov rcx, r13
neg rax
shl rax, 3
add qword [rbx + rdi*8 + 0x1018], rax
mov eax, dword [rsp + 0x170]
mov rdx, qword [rbx + 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