Function at 0x140050e00
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x1400d6910]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rax, qword [rdx + 0x10]
xor r12d, r12d
mov r14, qword [rdx]
or esi, 0xffffffff
mov r15, rdx
mov rdi, rcx
mov r8d, r12d
movsxd rbp, dword [rax + 0x14]
mov r10, qword [rax]
lea r13d, [rsi + 2]
mov dword [rcx + 0x1494], r12d
mov dword [rcx + 0x1498], 0x23d
test ebp, ebp
jle 0x140050eed
mov edx, r12d
cmp word [r14 + rdx*4], r12w
je 0x140050e8c
movsxd rcx, dword [rdi + 0x1494]
mov esi, r8d
lea eax, [rcx + 1]
mov dword [rdi + 0x1494], eax
mov dword [rdi + rcx*4 + 0xba4], r8d
mov byte [rdi + rdx + 0x149c], r12b
jmp 0x140050e92
mov word [r14 + rdx*4 + 2], r12w
add r8d, r13d
add rdx, r13
cmp rdx, rbp
jl 0x140050e60
jmp 0x140050eed
cmp esi, 2
lea eax, [rdx + 1]
mov dword [rdi + 0x1494], eax
lea ecx, [rsi + 1]
movsxd rax, edx
mov r8d, ecx
cmovge ecx, r12d
cmovge r8d, esi
mov dword [rdi + rax*4 + 0xba4], ecx
movsxd rax, ecx
mov word [r14 + rax*4], r13w
mov byte [rax + rdi + 0x149c], r12b
dec dword [rdi + 0x16f8]
test r10, r10
je 0x140050eea
movzx eax, word [r10 + rax*4 + 2]
sub dword [rdi + 0x16fc], eax
mov esi, r8d
mov edx, dword [rdi + 0x1494]
cmp edx, 2
jl 0x140050e9f
mov dword [r15 + 8], esi
mov eax, dword [rdi + 0x1494]
cdq
sub eax, edx
sar eax, 1
mov ebx, eax
cmp eax, r13d
jl 0x140050f24
mov r8d, ebx
mov rdx, r14
mov rcx, rdi
call fcn.1400517d4
sub ebx, r13d
cmp ebx, r13d
jge 0x140050f0e
movsxd rdx, dword [rdi + 0x1494]
mov r8d, r13d
movsxd rbx, dword [rdi + 0xba4]
mov ecx, dword [rdi + rdx*4 + 0xba0]
lea eax, [rdx - 1]
mov dword [rdi + 0xba4], ecx
mov rdx, r14
mov rcx, rdi
mov dword [rdi + 0x1494], eax
call fcn.1400517d4
movsxd rcx, dword [rdi + 0x1498]
mov r8d, r13d
movsxd rdx, dword [rdi + 0xba4]
mov r9, rdx
lea eax, [rcx - 1]
mov dword [rdi + 0x1498], eax
mov dword [rdi + rcx*4 + 0xb9c], ebx
movsxd rcx, dword [rdi + 0x1498]
lea eax, [rcx - 1]
mov dword [rdi + 0x1498], eax
mov dword [rdi + rcx*4 + 0xb9c], edx
movzx eax, word [r14 + rbx*4]
add ax, word [r14 + r9*4]
movsxd rdx, ebp
mov word [r14 + rdx*4], ax
movzx ecx, byte [rbx + rdi + 0x149c]
movzx eax, byte [r9 + rdi + 0x149c]
cmp cl, al
cmovb ecx, eax
add cl, r13b
mov byte [rdx + rdi + 0x149c], cl
mov rdx, r14
mov word [r14 + r9*4 + 2], bp
mov rcx, rdi
mov word [r14 + rbx*4 + 2], bp
mov dword [rdi + 0xba4], ebp
add ebp, r13d
call fcn.1400517d4
cmp dword [rdi + 0x1494], 2
jge 0x140050f24
movsxd rcx, dword [rdi + 0x1498]
mov rdx, r15
lea eax, [rcx - 1]
mov dword [rdi + 0x1498], eax
mov eax, dword [rdi + 0xba4]
mov dword [rdi + rcx*4 + 0xb9c], eax
mov rcx, rdi
call fcn.140051548
lea rax, [rsp + 0x22]
movzx ecx, r12w
sub rdi, rax
mov rdx, r13
lea rax, [rdi + rdx*2]
add cx, word [rsp + rax + 0xba0]
add cx, cx
mov word [rsp + rdx*2 + 0x20], cx
add rdx, r13
cmp rdx, 0xf
jle 0x140051027
movsxd r10, esi
test esi, esi
js 0x140051094
mov rdx, r12
movzx r8d, word [r14 + rdx*4 + 2]
lea eax, [r8 - 1]
cmp eax, 0xe
ja 0x14005108c
movzx r9d, word [rsp + r8*2 + 0x20]
mov ecx, r12d
lea eax, [r9 + r13]
mov word [rsp + r8*2 + 0x20], ax
mov eax, r9d
sub r8d, r13d
and eax, r13d
shr r9d, 1
or ecx, eax
add ecx, ecx
test r8d, r8d
jg 0x140051070
shr ecx, 1
mov word [r14 + rdx*4], cx
add rdx, r13
cmp rdx, r10
jle 0x14005104e
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14001bf00
mov rbx, qword [rsp + 0xa0]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret