Function at 0x1801a0fb9
Capabilities:
Encrypt data using rc4 prga

Disassembly:
test rcx, rcx
je 0x1801a125b
mov r11, rsp
push rbp
push rbx
push rdi
lea rbp, [r11 - 0xb68]
sub rsp, 0xc50
mov rax, qword [0x18029e198]
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 0x1801a1015
cmp eax, 2
jne 0x1801a1007
cmp dword [rdx], 0
jne 0x1801a1007
cmp byte [rdx + 8], al
jb 0x1801a1015
mov edx, dword [rdx]
xor r14d, r14d
movzx ecx, byte [rbx + 8]
xor r13d, r13d
jmp 0x1801a1069
mov r14d, 1
lea rcx, [rbp + 0x720]
xor edx, edx
mov r13d, r14d
call fcn.18019ddf0
xor edx, edx
lea rcx, [rsp + 0x20]
call fcn.18019ddf0
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 0x1801a10bf
test cl, cl
jne 0x1801a10bf
lea esi, [rdx + 2]
test r14d, r14d
je 0x1801a10bf
inc qword [rsp + 0x50]
lea r8, [rbp + 0x320]
xor r9d, r9d
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x720]
call fcn.1801a1260
xor r9d, r9d
lea r8, [rbp + 0x320]
lea rdx, [rbp + 0x320]
lea rcx, [rbp + 0x720]
call fcn.1801a1260
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 0x1801a10ec
dec ecx
add ecx, r14d
jmp 0x1801a10f0
lea ecx, [r14 - 1]
cmp esi, r8d
jae 0x1801a122a
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 0x1801a117a
test sil, 0x7f
jne 0x1801a116b
inc qword [rsp + 0x50]
lea r8, [rbp + 0x320]
xor r9d, r9d
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x720]
call fcn.1801a1260
xor r9d, r9d
lea r8, [rbp + 0x320]
lea rdx, [rbp + 0x320]
lea rcx, [rbp + 0x720]
call fcn.1801a1260
mov eax, esi
and eax, 0x7f
mov r8, qword [rbp + rax*8 + 0x320]
jmp 0x1801a1188
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 0x1801a11a9
cmp byte [rbx + 8], 0
jne 0x1801a11a9
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.18019dd20
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 0x1801a11fc
cmp dword [rbx], r9d
setne r9b
lea rcx, [rdx + rax]
mov rdx, r10
call fcn.1801a1260
inc esi
lea ecx, [r15 + 1]
inc r14d
cmp esi, dword [rdi + 0x14]
jb 0x1801a1110
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.1801e67e0
add rsp, 0xc50
pop rdi
pop rbx
pop rbp
ret