Function at 0x14004f090
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push r13
sub rsp, 0x50
mov rax, qword [rcx + 0x10]
mov r13d, r9d
mov rbx, r8
mov r9, rdx
mov rbp, rcx
cmp dword [rax + 4], 0xfffffff5
jne 0x14004f123
mov eax, dword [rax]
mov rdx, qword [rdx]
movzx r8d, word [rax + 6]
mov eax, r8d
add rax, rax
mov ecx, dword [rdx + rax*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
jne 0x14004f0f7
nop dword [rax]
movzx ecx, cx
add rcx, rcx
mov ecx, dword [rdx + rcx*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
je 0x14004f0e0
mov eax, ecx
movzx edx, cx
and eax, 0xf0000000
mov rcx, r9
cmp eax, 0x20000000
cmovne edx, r8d
mov r8d, r13d
call fcn.140017df0
test rax, rax
jne 0x14004f19a
mov r9, qword [rsp + 0x78]
mov rax, qword [rbp + 0x10]
lea rcx, [rax + 8]
cmp rcx, qword [rbp + 0x18]
jae 0x14004f1ad
cmp dword [rax + 0xc], 0xfffffff5
jne 0x14004f1ad
mov eax, dword [rcx]
mov rdx, qword [r9]
movzx r8d, word [rax + 6]
mov eax, r8d
add rax, rax
mov ecx, dword [rdx + rax*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
jne 0x14004f177
nop dword [rax]
movzx ecx, cx
add rcx, rcx
mov ecx, dword [rdx + rcx*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
je 0x14004f160
mov eax, ecx
movzx edx, cx
and eax, 0xf0000000
mov rcx, r9
cmp eax, 0x20000000
cmovne edx, r8d
mov r8d, r13d
call fcn.140017df0
test rax, rax
je 0x14004f1ad
mov rdx, rax
mov rcx, rbp
add rsp, 0x50
pop r13
pop rbp
pop rbx
jmp fcn.140016780
mov qword [rsp + 0x48], rdi
xor edi, edi
mov qword [rsp + 0x40], r12
mov r12d, 0xffffffff
mov qword [rsp + 0x30], r15
mov r15d, r12d
cmp r13d, 4
jne 0x14004f208
mov rax, qword [rbx + 8]
cmp qword [rbx], rax
mov rax, qword [rbp + 0x18]
mov r15, qword [rsp + 0x30]
setne dil
add edi, 0xfffffffd
mov dword [rax - 4], edi
mov eax, dword [rbp + 8]
mov dword [rax + 0x9c], edi
lea eax, [r12 + 2]
mov r12, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x50
pop r13
pop rbp
pop rbx
ret
mov qword [rsp + 0x70], rsi
lea rax, [rsp + 0x20]
sub rbx, rax
mov qword [rsp + 0x38], r14
mov rsi, rdi
lea rdx, [0x1400ab100]
lea r13, [rbx + 0x10]
nop dword [rax + rax]
lea r14, [rsp + 0x20]
add r14, rsi
mov rcx, qword [r14 + r13]
test rcx, rcx
je 0x14004f289
mov rax, qword [rbp + 0x10]
cmp dword [rsi + rax + 4], 0xfffffff5
jne 0x14004f289
mov ebx, dword [rcx]
xor r8d, r8d
mov rax, qword [rsp + 0x78]
sub rcx, qword [rax]
sar rcx, 4
mov edx, ecx
mov rcx, rbp
call fcn.140017f70
add rax, 0x10
lea rdx, [0x1400ab100]
and ebx, 0xf0000000
mov ecx, edi
cmp ebx, 0x50000000
cmovne ecx, r12d
mov r12d, ecx
jmp 0x14004f2c9
mov rax, qword [rbp + 0x10]
mov ecx, dword [rsi + rax + 4]
cmp ecx, 0xfffffffb
mov eax, edi
cmovne eax, r15d
mov r15d, eax
cmp ecx, 0xfffeffff
ja 0x14004f2ac
mov ecx, 0xd
jmp 0x14004f2c3
mov eax, ecx
and eax, 0xffff8000
cmp eax, 0xffff0000
jne 0x14004f2c1
mov ecx, 3
jmp 0x14004f2c3
not ecx
mov eax, ecx
mov rax, qword [rdx + rax*8]
inc edi
mov qword [r14], rax
add rsi, 8
cmp edi, 2
jl 0x14004f230
mov r14, qword [rsp + 0x38]
mov eax, r15d
mov rsi, qword [rsp + 0x70]
xor eax, r12d
mov r13d, dword [rsp + 0x88]
cmp eax, 1
je 0x14004f336
cmp r13d, 5
jne 0x14004f305
mov edx, 0xcf2
jmp 0x14004f323
cmp r13d, 8
jne 0x14004f312
mov edx, 0xd10
jmp 0x14004f323
cmp r13d, 0xa
mov edx, 0xd35
mov eax, 0xd64
cmovl edx, eax
mov r9, qword [rsp + 0x28]
mov rcx, rbp
mov r8, qword [rsp + 0x20]
call fcn.14000d210
int3
movsxd r9, r12d
mov edx, 0xcd6
movsxd r8, r15d
mov rcx, rbp
mov r9, qword [rsp + r9*8 + 0x20]
mov r8, qword [rsp + r8*8 + 0x20]
call fcn.14000d210
int3