Function at 0x14005ba10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x58
mov rax, qword [rcx + 0x20]
mov rbp, rcx
mov edi, r9d
mov rbx, r8
mov r9, rdx
movabs rsi, 0x7fffffffffff
mov rcx, qword [rax]
mov rax, rcx
sar rax, 0x2f
cmp eax, 0xfffffff5
jne 0x14005bab7
mov rdx, qword [rdx]
and rcx, rsi
movzx r8d, word [rcx + 0xa]
lea rax, [r8 + r8*2]
mov ecx, dword [rdx + rax*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
jne 0x14005ba88
nop dword [rax + rax]
movzx ecx, cx
lea rax, [rcx + rcx*2]
mov ecx, dword [rdx + rax*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
je 0x14005ba70
mov eax, ecx
movzx edx, cx
and eax, 0xf0000000
mov rcx, r9
cmp eax, 0x20000000
cmovne edx, r8d
mov r8d, edi
call fcn.140022de0
test rax, rax
jne 0x14005bb2f
mov r9, qword [rsp + 0x88]
mov rcx, qword [rbp + 0x20]
add rcx, 8
cmp rcx, qword [rbp + 0x28]
jae 0x14005bb42
mov rcx, qword [rcx]
mov rax, rcx
sar rax, 0x2f
cmp eax, 0xfffffff5
jne 0x14005bb42
mov rdx, qword [r9]
and rcx, rsi
movzx r8d, word [rcx + 0xa]
lea rax, [r8 + r8*2]
mov ecx, dword [rdx + rax*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
jne 0x14005bb0c
movzx ecx, cx
lea rax, [rcx + rcx*2]
mov ecx, dword [rdx + rax*8]
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x80000000
je 0x14005baf4
mov eax, ecx
movzx edx, cx
and eax, 0xf0000000
mov rcx, r9
cmp eax, 0x20000000
cmovne edx, r8d
mov r8d, edi
call fcn.140022de0
test rax, rax
je 0x14005bb42
mov rdx, rax
mov rcx, rbp
add rsp, 0x58
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14001d020
mov qword [rsp + 0x48], r14
xor esi, esi
mov qword [rsp + 0x40], r15
mov r15d, 0xffffffff
mov r14d, r15d
cmp edi, 4
jne 0x14005bb9a
mov rax, qword [rbx + 8]
cmp qword [rbx], rax
mov rax, qword [rbp + 0x28]
mov r14, qword [rsp + 0x48]
sete sil
mov r15, qword [rsp + 0x40]
inc rsi
shl rsi, 0x2f
not rsi
mov qword [rax - 8], rsi
mov rax, qword [rbp + 0x10]
mov qword [rax + 0xf0], rsi
lea eax, [rdi - 3]
add rsp, 0x58
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x90], r12
lea rax, [rsp + 0x30]
sub rax, rbx
mov qword [rsp + 0x50], r13
add rax, 0xffffffffffffffe8
lea rdi, [rbx + 0x18]
mov qword [rsp + 0x20], rax
lea r9, [0x1400ad770]
lea rax, [rsp + 0x28]
mov r12, 0xfffffffffffffff0
sub rax, rbx
sub r12, rbx
add rax, 0xffffffffffffffe8
mov r13, 0xffffffffffffffe8
mov qword [rsp + 0x80], rax
sub r13, rbx
movabs r10, 0x2aaaaaaaaaaaaaab
mov r8, qword [rdi - 8]
test r8, r8
je 0x14005bc6c
mov rax, qword [rbp + 0x20]
lea rdx, [rdi + r13]
mov rcx, qword [rdx + rax]
sar rcx, 0x2f
cmp ecx, 0xfffffff5
jne 0x14005bc70
mov ebx, dword [r8]
mov rcx, rbp
mov rax, qword [rsp + 0x88]
sub r8, qword [rax]
mov rax, r10
imul r8
xor r8d, r8d
sar rdx, 2
mov rax, rdx
shr rax, 0x3f
add rdx, rax
call fcn.140022fa0
add rax, 0x18
lea r9, [0x1400ad770]
and ebx, 0xf0000000
mov ecx, esi
cmp ebx, 0x50000000
movabs r10, 0x2aaaaaaaaaaaaaab
cmovne ecx, r15d
mov r15d, ecx
jmp 0x14005bc9c
lea rdx, [rdi + r13]
mov rax, qword [rbp + 0x20]
mov rcx, qword [rdx + rax]
mov eax, esi
sar rcx, 0x2f
cmp ecx, 0xfffffffb
cmovne eax, r14d
mov r14d, eax
cmp ecx, 0xfffffff2
ja 0x14005bc94
mov ecx, 0xd
jmp 0x14005bc96
not ecx
mov eax, ecx
mov rax, qword [r9 + rax*8]
mov rcx, qword [rsp + 0x80]
mov qword [rcx + rdi], rax
mov r8, qword [rdi]
test r8, r8
je 0x14005bd15
mov rax, qword [rbp + 0x20]
lea rdx, [r12 + rdi]
mov rcx, qword [rdx + rax]
sar rcx, 0x2f
cmp ecx, 0xfffffff5
jne 0x14005bd19
mov ebx, dword [r8]
mov rcx, rbp
mov rax, qword [rsp + 0x88]
sub r8, qword [rax]
mov rax, r10
imul r8
xor r8d, r8d
sar rdx, 2
mov rax, rdx
shr rax, 0x3f
add rdx, rax
call fcn.140022fa0
add rax, 0x18
lea ecx, [rsi + 1]
and ebx, 0xf0000000
lea r9, [0x1400ad770]
cmp ebx, 0x50000000
cmovne ecx, r15d
mov r15d, ecx
jmp 0x14005bd46
lea rdx, [rdi + r12]
mov rax, qword [rbp + 0x20]
mov rcx, qword [rdx + rax]
lea eax, [rsi + 1]
sar rcx, 0x2f
cmp ecx, 0xfffffffb
cmovne eax, r14d
mov r14d, eax
cmp ecx, 0xfffffff2
ja 0x14005bd3e
mov ecx, 0xd
jmp 0x14005bd40
not ecx
mov eax, ecx
mov rax, qword [r9 + rax*8]
mov rcx, qword [rsp + 0x20]
add esi, 2
movabs r10, 0x2aaaaaaaaaaaaaab
mov qword [rcx + rdi], rax
add rdi, 0x10
cmp esi, 2
jl 0x14005bbf5
mov r13, qword [rsp + 0x50]
mov eax, r14d
mov r12, qword [rsp + 0x90]
xor eax, r15d
cmp eax, 1
je 0x14005bdc3
mov eax, dword [rsp + 0x98]
cmp eax, 5
jne 0x14005bd94
mov edx, 0xceb
jmp 0x14005bdb0
cmp eax, 8
jne 0x14005bda0
mov edx, 0xd09
jmp 0x14005bdb0
cmp eax, 0xa
mov edx, 0xd2e
mov ecx, 0xd5d
cmovl edx, ecx
mov r9, qword [rsp + 0x30]
mov rcx, rbp
mov r8, qword [rsp + 0x28]
call fcn.140017b00
int3
movsxd r9, r15d
mov edx, 0xccf
movsxd r8, r14d
mov rcx, rbp
mov r9, qword [rsp + r9*8 + 0x28]
mov r8, qword [rsp + r8*8 + 0x28]
call fcn.140017b00
int3