Function at 0x1406f0ba0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x48
mov r10, qword [rdx]
mov rsi, rcx
mov r14, qword [rdx + 8]
mov eax, r9d
mov rcx, qword [rsp + 0xa0]
cdq
xor eax, edx
mov r9, r8
sub eax, edx
mov r11d, eax
lea r12, [r14 + r10*2]
mov edx, dword [rcx]
cmp eax, edx
mov rcx, qword [rsp + 0xa8]
mov ebx, dword [r9 + 4]
cmovl r11d, edx
mov dword [rsp + 0x20], r11d
mov r8d, dword [rcx]
cmp eax, r8d
mov ecx, dword [r9 + 8]
cmovl eax, r8d
mov dword [rsp + 0x88], r8d
sub ebx, ecx
mov dword [rsp + 0x24], eax
imul ebx, r11d
xor r13d, r13d
imul ecx, eax
lea edx, [r13 + 8]
add ebx, ecx
lea ecx, [rdx - 6]
sub ebx, dword [r9 + 0xc]
mov r9d, r13d
add ebx, r10d
lea eax, [rbx + 1]
movsxd r8, eax
call fcn.1406e4920
mov qword [rsi], rax
test rax, rax
jne 0x1406f0c4a
call fcn.14074ba20
mov rax, qword [rsi]
movsxd rcx, ebx
mov dword [rax + 4], ebx
mov r8, qword [rsi]
mov rax, qword [r8 + 0x10]
lea rdx, [rax + rcx*2]
mov word [rdx + r8], r13w
mov rcx, qword [rsi]
mov rdi, qword [rcx + 0x10]
add rdi, rcx
cmp r14, r12
je 0x1406f0e61
movzx ebx, word [rsp + 0xb0]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], r15
nop dword [rax + rax]
cmp word [r14], 0x25
mov rbp, r14
je 0x1406f0cab
nop word [rax + rax]
add r14, 2
cmp word [r14], 0x25
jne 0x1406f0ca0
movzx eax, word [r14 + 2]
mov rsi, r14
add r14, 2
xor r15b, r15b
cmp ax, 0x4c
jne 0x1406f0ccc
movzx eax, word [r14 + 2]
add r14, 2
mov r15b, 1
movzx ecx, ax
call fcn.1406edcb0
movsx r10d, word [rax + 2]
sar r10d, 0xb
cmp r10d, 0xffffffff
je 0x1406f0d0c
lea r11, [r14 + 2]
cmp r11, r12
je 0x1406f0d0c
movzx ecx, word [r11]
call fcn.1406edcb0
movsx ecx, word [rax + 2]
sar ecx, 0xb
cmp ecx, 0xffffffff
je 0x1406f0d0c
lea eax, [r10 + r10*4]
mov r14, r11
lea r10d, [rcx + rax*2]
mov rax, qword [rsp + 0x90]
mov rdx, rbp
mov rcx, rdi
cmp r10d, dword [rax]
je 0x1406f0d3b
mov rsi, r14
sub rsi, rbp
sar rsi, 1
add rsi, rsi
mov r8, rsi
call fcn.1408d9100
add rdi, rsi
jmp 0x1406f0e21
sub rsi, rbp
add r14, 2
sar rsi, 1
add rsi, rsi
mov r8, rsi
call fcn.1408d9100
mov rdx, qword [rsp + 0xa0]
add rdi, rsi
mov eax, dword [rsp + 0x20]
mov esi, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x88]
sub esi, ecx
movsxd rbp, dword [rdx]
sub eax, ebp
test r15b, r15b
cmove esi, eax
cmp dword [rsp + 0x98], 0
jle 0x1406f0da7
test esi, esi
je 0x1406f0da7
mov ecx, esi
nop word [rax + rax]
mov rax, rdi
add rdi, 2
mov word [rax], bx
sub rcx, 1
jne 0x1406f0d90
mov ecx, dword [rsp + 0x88]
test r15b, r15b
je 0x1406f0dcf
mov rax, qword [rsp + 0xa8]
movsxd r8, ecx
mov rcx, rdi
add r8, r8
mov rdx, qword [rax + 8]
call fcn.1408d9100
mov eax, dword [rsp + 0x88]
jmp 0x1406f0de3
mov rdx, qword [rdx + 8]
mov r8, rbp
add r8, r8
mov rcx, rdi
call fcn.1408d9100
mov eax, ebp
cmp dword [rsp + 0x98], 0
cdqe
lea rdi, [rdi + rax*2]
jge 0x1406f0e10
test esi, esi
je 0x1406f0e10
mov ecx, esi
nop dword [rax]
mov rax, rdi
add rdi, 2
mov word [rax], bx
sub rcx, 1
jne 0x1406f0e00
mov rax, qword [rsp + 0x90]
inc r13d
cmp r13d, dword [rax + 4]
je 0x1406f0e4a
cmp r14, r12
jne 0x1406f0c90
mov rax, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x40]
mov r15, qword [rsp + 0x38]
add rsp, 0x48
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
sub r12, r14
mov rdx, r14
sar r12, 1
mov rcx, rdi
lea r8, [r12 + r12]
call fcn.1408d9100
jmp 0x1406f0e2a
mov rax, rsi
add rsp, 0x48
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret