Function at 0x14004a470
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x30
mov rax, qword [0x1401ff028]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov r14, qword [rcx + 0x10]
test r14, r14
je 0x14004a7c5
mov rdi, rcx
lea rax, [rcx + 0x28]
cmp r14, rax
je 0x14004a4ce
movsxd rcx, dword [rdi + 0x18]
add rcx, r14
add rcx, 0xfffffffffffffff0
mov qword [rdi + 8], rcx
mov qword [rdi + 0x10], rax
cmp qword [rdi + 0x48], 1
jne 0x14004a7c5
mov qword [rdi + 0x48], 2
jmp 0x14004a7c5
mov rax, qword [rdi + 8]
movups xmm0, xmmword [rax]
movups xmmword [r14], xmm0
cmp dword [rdi + 0x54], 0
jle 0x14004a770
test r8d, r8d
js case.default.0x14004a5ae
cmp edx, 0xf
jg case.default.0x14004a5ae
lea r10, [rdi + 0x38]
movsxd rcx, edx
lea rdx, [rdi + rcx]
add rdx, 0x28
lea r9, [0x14004a7e4]
movzx ebx, byte [rdx]
lea rsi, [rdx + 1]
test bl, bl
jns 0x14004a581
movzx eax, byte [rdx + 1]
mov ecx, eax
shl ecx, 7
add ebx, ecx
add ebx, 0xffffff80
lea rcx, [rdx + 2]
test al, al
js 0x14004a531
mov rsi, rcx
jmp 0x14004a581
movzx eax, byte [rcx]
mov ecx, eax
shl ecx, 0xe
add ebx, ecx
add ebx, 0xffffc000
test al, al
js 0x14004a54b
add rsi, 2
jmp 0x14004a581
movzx eax, byte [rdx + 3]
mov ecx, eax
shl ecx, 0x15
add ebx, ecx
add ebx, 0xffe00000
test al, al
js 0x14004a566
add rsi, 3
jmp 0x14004a581
movzx edx, byte [rdx + 4]
test dl, dl
js case.default.0x14004a5ae
shl edx, 0x1c
add ebx, edx
add ebx, 0xf0000000
add rsi, 4
test rsi, rsi
je case.default.0x14004a5ae
cmp rsi, r10
ja case.default.0x14004a5ae
test ebx, ebx
je 0x14004a770
and ebx, 7
cmp ebx, 5
ja case.default.0x14004a5ae
movsxd rax, dword [r9 + rbx*4]
add rax, r9
jmp rax
lea rbx, [rsi + 1]
cmp byte [rsi], 0
jns 0x14004a6fd
lea rcx, [rsi + 2]
cmp byte [rsi + 1], 0
js 0x14004a622
mov rbx, rcx
jmp 0x14004a6fd
add rsi, 8
jmp 0x14004a705
movzx ebx, byte [rsi]
lea rdx, [rsi + 1]
test bl, bl
jns 0x14004a6a8
movzx eax, byte [rdx]
mov ecx, eax
shl ecx, 7
add ebx, ecx
add ebx, 0xffffff80
test al, al
js 0x14004a630
inc rdx
jmp 0x14004a6a8
inc r8d
jmp 0x14004a705
test r8d, r8d
jle 0x14004a770
dec r8d
jmp 0x14004a705
add rsi, 4
jmp 0x14004a705
cmp byte [rcx], 0
js 0x14004a64b
add rbx, 2
jmp 0x14004a6fd
movzx eax, byte [rsi + 2]
mov ecx, eax
shl ecx, 0xe
add ebx, ecx
add ebx, 0xffffc000
test al, al
js 0x14004a65a
add rdx, 2
jmp 0x14004a6a8
cmp byte [rsi + 3], 0
js 0x14004a675
add rbx, 3
jmp 0x14004a6fd
movzx eax, byte [rsi + 3]
mov ecx, eax
shl ecx, 0x15
add ebx, ecx
add ebx, 0xffe00000
test al, al
js 0x14004a681
add rdx, 3
jmp 0x14004a6a8
cmp byte [rsi + 4], 0
js 0x14004a6c3
add rbx, 4
jmp 0x14004a6fd
movzx edx, byte [rsi + 4]
cmp edx, 7
ja case.default.0x14004a5ae
shl edx, 0x1c
add ebx, edx
add ebx, 0xf0000000
cmp ebx, 0x7fffffef
ja case.default.0x14004a5ae
add rsi, 5
mov rdx, rsi
test rdx, rdx
je case.default.0x14004a5ae
movsxd rbx, ebx
mov rax, r10
sub rax, rdx
cmp rax, rbx
jl case.default.0x14004a5ae
add rdx, rbx
mov rsi, rdx
jmp 0x14004a705
cmp byte [rsi + 5], 0
js 0x14004a6cf
add rbx, 5
jmp 0x14004a6fd
cmp byte [rsi + 6], 0
js 0x14004a6db
add rbx, 6
jmp 0x14004a6fd
cmp byte [rsi + 7], 0
js 0x14004a6e7
add rbx, 7
jmp 0x14004a6fd
cmp byte [rsi + 8], 0
js 0x14004a6f3
add rbx, 8
jmp 0x14004a6fd
cmp byte [rsi + 9], 0
js case.default.0x14004a5ae
add rbx, 9
mov rsi, rbx
test rbx, rbx
je case.default.0x14004a5ae
mov rdx, rsi
cmp rsi, r10
jb 0x14004a50b
movabs rax, 0xaaaaaaaaaaaaaaaa
lea r15, [rsp + 0x20]
mov qword [r15], rax
lea rsi, [rdi + 0x18]
mov rcx, qword [rdi + 0x20]
mov rax, qword [rcx]
mov rdx, r15
mov r8, rsi
call qword [rax + 8]
test al, al
je 0x14004a769
mov ebx, dword [rdi + 0x18]
sub dword [rdi + 0x54], ebx
cmp ebx, 0x11
jge 0x14004a79b
test ebx, ebx
jle 0x14004a727
lea rcx, [rdi + 0x38]
mov rdx, qword [rsp + 0x20]
mov r8, rbx
call fcn.140108990
mov qword [rdi + 0x10], r14
lea rax, [rdi + rbx]
add rax, 0x28
jmp 0x14004a7af
mov dword [rdi + 0x54], 0
cmp qword [rdi + 0x48], 2
jne 0x14004a782
mov rax, qword [rdi + 8]
sub rax, r14
mov qword [rdi + 0x48], rax
mov qword [rdi + 0x10], 0
lea rax, [rdi + 0x38]
mov qword [rdi + 8], rax
mov dword [rdi + 0x18], 0
jmp 0x14004a7c5
lea rax, [rdi + 0x38]
mov rcx, qword [rsp + 0x20]
movups xmm0, xmmword [rcx]
movups xmmword [rdi + 0x38], xmm0
mov qword [rdi + 0x10], rcx
mov qword [rdi + 8], rax
cmp qword [rdi + 0x48], 1
jbe 0x14004a7c5
add rdi, 0x48
mov qword [rdi], 1
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140106510
mov rax, r14
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret