Function at 0x14004b969
Capabilities:
Encrypt data using rc4 prga

Disassembly:
test rcx, rcx
je 0x14004bc0b
mov r11, rsp
push rbp
push rbx
push rdi
lea rbp, [r11 - 0xb68]
sub rsp, 0xc50
mov rax, qword [0x140063828]
xor rax, rsp
mov qword [rbp + 0xb20], rax
mov eax, dword [rcx + 0x24]
mov rbx, rdx
mov qword [r11 + 0x18], rsi
mov rdi, rcx
mov qword [r11 - 0x28], r13
mov qword [r11 - 0x30], r14
cmp eax, 1
je 0x14004b9c5
cmp eax, 2
jne 0x14004b9b7
cmp dword [rdx], 0
jne 0x14004b9b7
cmp byte [rdx + 8], al
jb 0x14004b9c5
mov edx, dword [rdx]
xor r14d, r14d
movzx ecx, byte [rbx + 8]
xor r13d, r13d
jmp 0x14004ba19
mov r14d, 1
lea rcx, [rbp + 0x720]
xor edx, edx
mov r13d, r14d
call fcn.140046260
xor edx, edx
lea rcx, [rsp + 0x20]
call fcn.140046260
mov eax, dword [rbx + 4]
mov edx, dword [rbx]
movzx ecx, byte [rbx + 8]
mov qword [rsp + 0x28], rax
mov eax, dword [rdi + 0x10]
mov qword [rsp + 0x38], rax
mov eax, dword [rdi + 0xc]
mov qword [rsp + 0x40], rax
movsxd rax, dword [rdi + 0x24]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x20], rdx
mov qword [rsp + 0x30], rcx
xor esi, esi
movzx eax, cl
test edx, edx
jne 0x14004ba6f
test cl, cl
jne 0x14004ba6f
lea esi, [rdx + 2]
test r14d, r14d
je 0x14004ba6f
inc qword [rsp + 0x50]
lea r8, [rbp + 0x320]
xor r9d, r9d
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x720]
call fcn.14004ae80
xor r9d, r9d
lea r8, [rbp + 0x320]
lea rdx, [rbp + 0x320]
lea rcx, [rbp + 0x720]
call fcn.14004ae80
movzx eax, byte [rbx + 8]
mov ecx, dword [rdi + 0x18]
xor edx, edx
mov r8d, dword [rdi + 0x14]
mov r14d, ecx
imul r14d, dword [rbx + 4]
movzx eax, al
imul eax, r8d
add eax, esi
add r14d, eax
mov eax, r14d
div ecx
test edx, edx
jne 0x14004ba9c
dec ecx
add ecx, r14d
jmp 0x14004baa0
lea ecx, [r14 - 1]
cmp esi, r8d
jae 0x14004bbda
mov qword [rsp + 0xc48], r12
mov qword [rsp + 0xc30], r15
nop dword [rax]
xor edx, edx
lea r15d, [r14 - 1]
mov eax, r14d
div dword [rdi + 0x18]
cmp edx, 1
cmovne r15d, ecx
test r13, r13
je 0x14004bb2a
test sil, 0x7f
jne 0x14004bb1b
inc qword [rsp + 0x50]
lea r8, [rbp + 0x320]
xor r9d, r9d
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x720]
call fcn.14004ae80
xor r9d, r9d
lea r8, [rbp + 0x320]
lea rdx, [rbp + 0x320]
lea rcx, [rbp + 0x720]
call fcn.14004ae80
mov eax, esi
and eax, 0x7f
mov r8, qword [rbp + rax*8 + 0x320]
jmp 0x14004bb38
mov rax, qword [rdi]
mov ecx, r15d
shl rcx, 0xa
mov r8, qword [rcx + rax]
mov ecx, dword [rdi + 0x1c]
xor edx, edx
mov rax, r8
shr rax, 0x20
div rcx
cmp dword [rbx], 0
mov r12, rdx
jne 0x14004bb59
cmp byte [rbx + 8], 0
jne 0x14004bb59
mov r12d, dword [rbx + 4]
mov eax, dword [rbx + 4]
xor r9d, r9d
cmp r12, rax
mov dword [rbx + 0xc], esi
mov rdx, rbx
mov rcx, rdi
sete r9b
call fcn.140046170
mov rdx, qword [rdi]
xor r9d, r9d
mov r10d, dword [rdi + 0x18]
imul r10, r12
mov eax, eax
add r10, rax
mov r8d, r14d
shl r10, 0xa
shl r8, 0xa
add r10, rdx
mov eax, r15d
add r8, rdx
shl rax, 0xa
cmp dword [rdi + 8], 0x10
je 0x14004bbac
cmp dword [rbx], r9d
setne r9b
lea rcx, [rdx + rax]
mov rdx, r10
call fcn.14004ae80
inc esi
lea ecx, [r15 + 1]
inc r14d
cmp esi, dword [rdi + 0x14]
jb 0x14004bac0
mov r15, qword [rsp + 0xc30]
mov r12, qword [rsp + 0xc48]
mov r13, qword [rsp + 0xc40]
mov rsi, qword [rsp + 0xc80]
mov r14, qword [rsp + 0xc38]
mov rcx, qword [rbp + 0xb20]
xor rcx, rsp
call fcn.14004c1b0
add rsp, 0xc50
pop rdi
pop rbx
pop rbp
ret