Function at 0x14007a450
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbp
push rdi
push r12
push r15
sub rsp, 0x48
movsxd rax, edx
lea r12, [0x140000000]
shl rax, 4
lea r15, [r12 + 0x10f8d8]
add r15, rax
lea r8, [rsp + 0x80]
mov rdi, rcx
mov ecx, 0x7fff
mov edx, dword [r15]
bt edx, 8
movzx eax, dl
lea ebp, [rax - 1]
cmovae ebp, eax
test ebp, ebp
je 0x14007a4ac
mov ecx, dword [r8]
add r8, 8
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r14
cmp ebp, 1
jbe 0x14007a69f
lea r14, [r8 - 8]
mov r13d, 0x7ffd
movzx eax, word [r14 + 8]
lea r14, [r14 + 8]
mov word [rdi + 0xba], ax
dec ebp
mov word [rdi + 0xb8], cx
mov edx, 0x6400
mov ecx, dword [rdi + 0xa8]
mov eax, ecx
and eax, 0xfff0000
mov word [rdi + 0xbc], dx
cmp eax, 0x3ff0000
je 0x14007a521
bt ecx, 0x10
jb 0x14007a521
mov rcx, rdi
call fcn.14007d9c0
mov ecx, eax
jmp 0x14007a693
movzx r8d, byte [rdi + 0xbd]
movzx ecx, word [rdi + 0xb8]
mov r9d, dword [rdi + 0x28]
shl r8d, 0x11
cmp ecx, r9d
jb 0x14007a572
mov r10, qword [rdi + 0x20]
lea rdx, [rcx*8]
movzx eax, byte [rdx + r10 + 5]
shl eax, 0xa
add r8d, eax
mov rax, qword [rdx + r10]
mov qword [rdi + 0xc0], rax
cmp cx, r13w
jae 0x14007a572
mov rax, qword [rdx + r10 + 8]
mov qword [rdi + 0xc8], rax
movzx edx, word [rdi + 0xba]
cmp edx, r9d
jb 0x14007a5a7
mov r9, qword [rdi + 0x20]
mov rax, qword [r9 + rdx*8]
movzx ecx, byte [r9 + rdx*8 + 5]
mov qword [rdi + 0xd0], rax
cmp dx, r13w
jae 0x14007a5af
mov rax, qword [r9 + rdx*8 + 8]
mov qword [rdi + 0xd8], rax
jmp 0x14007a5af
mov ecx, edx
and ecx, 0x3ff
lea esi, [rcx + r8]
xor ebx, ebx
nop word [rax + rax]
mov r8d, ebx
mov eax, 0x5e1d27b
and r8d, 0x1ffff
or r8d, esi
mov ecx, r8d
ror ecx, 0xb
sub ecx, r8d
rol ecx, 0xe
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 9
imul eax, eax, 0x3e9
sub ecx, eax
mov edx, dword [r12 + rcx*4 + 0x111390]
mov eax, edx
and eax, 0xffffff
cmp eax, r8d
je 0x14007a61e
lea eax, [rcx + 1]
mov edx, dword [r12 + rax*4 + 0x111390]
mov eax, edx
and eax, 0xffffff
cmp eax, r8d
jne 0x14007a636
mov eax, edx
mov rcx, rdi
shr rax, 0x18
call qword [r12 + rax*8 + 0x110ea0]
movzx edx, ax
test edx, edx
jne 0x14007a654
cmp ebx, 0xfffff
je 0x14007a512
mov eax, ebx
shr eax, 0xa
or ebx, eax
xor ebx, 0xffc00
jmp 0x14007a5c0
cmp edx, 5
jae 0x14007a685
cmp edx, 1
je 0x14007a521
cmp edx, 2
jne 0x14007a679
mov edx, dword [rdi + 0xb8]
mov rcx, rdi
call fcn.14007ab80
mov ecx, eax
jmp 0x14007a693
cmp edx, 3
je 0x14007a6fb
mov ecx, 0xffff
jmp 0x14007a693
mov rax, qword [rdi + 0x20]
movzx ecx, byte [rax + rdx*8 + 4]
shl ecx, 0x18
add ecx, edx
cmp ebp, 1
ja 0x14007a4d3
mov edx, dword [r15]
mov eax, edx
and eax, 0xff000000
cmp eax, 0x62000000
jne 0x14007a6b7
mov byte [rdi + 0xb5], 1
mov edx, dword [r15]
movzx eax, word [rsp + 0x78]
shr edx, 0x10
mov word [rdi + 0xb8], cx
mov rcx, rdi
mov word [rdi + 0xbc], dx
mov word [rdi + 0xba], ax
call fcn.14007e000
mov r14, qword [rsp + 0x28]
mov r13, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x40]
add rsp, 0x48
pop r15
pop r12
pop rdi
pop rbp
ret
mov edx, 0x18
mov rcx, rdi
call fcn.1400877d0
int3