Function at 0x14004f0f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov rax, qword [rcx + 0x10]
mov r15d, r9d
mov r13, r8
mov r12, rdx
mov rsi, rcx
cmp dword [rax + 4], 0xfffffff5
jne 0x14004f180
mov eax, dword [rax]
mov rdx, qword [rdx]
movzx r9d, word [rax + 6]
mov eax, r9d
add rax, rax
mov ecx, dword [rdx + rax*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
jne 0x14004f157
nop word [rax + rax]
movzx ecx, cx
add rcx, rcx
mov ecx, dword [rdx + rcx*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
je 0x14004f140
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x20000000
jne 0x14004f169
movzx r9d, cx
mov r8d, r15d
mov edx, r9d
mov rcx, r12
call fcn.140018510
test rax, rax
jne 0x14004f211
mov rax, qword [rsi + 0x10]
lea r14, [rsi + 0x18]
lea rcx, [rax + 8]
cmp rcx, qword [rsi + 0x18]
jae 0x14004f229
cmp dword [rax + 0xc], 0xfffffff5
lea r14, [rsi + 0x18]
jne 0x14004f229
mov eax, dword [rcx]
lea r14, [rsi + 0x18]
mov r8, qword [r12]
movzx r9d, word [rax + 6]
mov eax, r9d
add rax, rax
mov ecx, dword [r8 + rax*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
jne 0x14004f1ec
nop dword [rax + rax]
movzx ecx, cx
add rcx, rcx
mov ecx, dword [r8 + rcx*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
je 0x14004f1d0
lea r14, [rsi + 0x18]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x20000000
jne 0x14004f1fe
movzx r9d, cx
mov r8d, r15d
mov edx, r9d
mov rcx, r12
call fcn.140018510
test rax, rax
je 0x14004f229
mov rdx, rax
mov rcx, rsi
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rsi
jmp fcn.140016db0
mov qword [rsp + 0x60], rbx
mov ebx, 0xffffffff
mov qword [rsp + 0x70], rdi
mov edi, ebx
cmp r15d, 4
jne 0x14004f27c
mov rax, qword [r13 + 8]
xor ecx, ecx
cmp qword [r13], rax
mov rax, qword [r14]
mov rbx, qword [rsp + 0x60]
setne cl
mov rdi, qword [rsp + 0x70]
add ecx, 0xfffffffd
mov dword [rax - 4], ecx
mov eax, dword [rsi + 8]
mov dword [rax + 0x9c], ecx
mov eax, 1
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rsi
ret
mov rdx, qword [r13 + 0x10]
lea r8, [0x1400b0130]
mov qword [rsp + 0x68], rbp
mov ebp, 0xd
test rdx, rdx
je 0x14004f2d2
mov rax, qword [rsi + 0x10]
cmp dword [rax + 4], 0xfffffff5
jne 0x14004f2d2
mov ebx, dword [rdx]
xor r8d, r8d
sub rdx, qword [r12]
mov rcx, rsi
sar rdx, 4
call fcn.1400186a0
and ebx, 0xf0000000
lea r8, [0x1400b0130]
sub ebx, 0x50000000
neg ebx
lea r14, [rax + 0x10]
sbb ebx, ebx
jmp 0x14004f30b
mov rax, qword [rsi + 0x10]
mov ecx, dword [rax + 4]
mov eax, ecx
sub eax, 0xfffffffb
neg eax
sbb edi, edi
cmp ecx, 0xfffeffff
ja 0x14004f2ee
mov ecx, ebp
jmp 0x14004f305
mov eax, ecx
and eax, 0xffff8000
cmp eax, 0xffff0000
jne 0x14004f303
mov ecx, 3
jmp 0x14004f305
not ecx
mov eax, ecx
mov r14, qword [r8 + rax*8]
mov rdx, qword [r13 + 0x18]
mov qword [rsp + 0x20], r14
test rdx, rdx
je 0x14004f350
mov rax, qword [rsi + 0x10]
cmp dword [rax + 0xc], 0xfffffff5
jne 0x14004f350
mov eax, dword [rdx]
mov ecx, 1
and eax, 0xf0000000
cmp eax, 0x50000000
cmove ebx, ecx
sub rdx, qword [r12]
sar rdx, 4
xor r8d, r8d
mov rcx, rsi
call fcn.1400186a0
lea r9, [rax + 0x10]
jmp 0x14004f36b
mov rax, qword [rsi + 0x10]
mov edx, dword [rax + 0xc]
cmp edx, 0xfffffffb
jne 0x14004f380
mov edi, 1
mov ebp, edx
not ebp
mov eax, ebp
mov r9, qword [r8 + rax*8]
mov rbp, qword [rsp + 0x68]
mov eax, edi
xor eax, ebx
mov qword [rsp + 0x28], r9
cmp eax, 1
je 0x14004f3d4
jmp 0x14004f39d
cmp edx, 0xfffeffff
jbe 0x14004f365
mov eax, edx
and eax, 0xffff8000
cmp eax, 0xffff0000
jne 0x14004f361
mov ebp, 3
jmp 0x14004f365
cmp r15d, 5
jne 0x14004f3aa
mov edx, 0xcf2
jmp 0x14004f3c8
cmp r15d, 8
jne 0x14004f3b7
mov edx, 0xd10
jmp 0x14004f3c8
cmp r15d, 0xa
mov edx, 0xd35
mov eax, 0xd64
cmovl edx, eax
mov r8, r14
mov rcx, rsi
call fcn.14000d160
int3
movsxd r9, ebx
mov edx, 0xcd6
movsxd r8, edi
mov rcx, rsi
mov r9, qword [rsp + r9*8 + 0x20]
mov r8, qword [rsp + r8*8 + 0x20]
call fcn.14000d160
int3