Function at 0x180020420
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0xc8], rbx
mov rax, qword [0x180094ac0]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rdi, r9
mov r13, r8
mov qword [rsp + 0x28], rdx
mov rsi, rcx
movzx r10d, byte [r9]
test r10b, r10b
je 0x180020483
movzx eax, r10b
nop dword [rax + rax]
cmp al, r10b
jne 0x180020478
inc r13
inc r9
movzx eax, byte [r9]
test al, al
jne 0x180020470
mov qword [rsp + 0x50], 0xf
mov qword [rsp + 0x48], 0
mov byte [rsp + 0x38], 0
xor r8d, r8d
mov rdx, r13
lea rcx, [rsp + 0x38]
call fcn.180017790
nop
mov eax, 0xfffffffe
lea r12d, [rax + 3]
mov r15, qword [rsp + 0x50]
mov dword [rsp + 0x20], eax
xor r14b, r14b
xor ebx, ebx
xor ebp, ebp
test r13, r13
je 0x18002066d
nop dword [rax]
movzx eax, byte [rbx + rdi]
test al, al
je 0x1800204ef
movzx ecx, byte [rdi]
nop dword [rax + rax]
cmp al, cl
je 0x1800204ef
inc rbx
movzx eax, byte [rbx + rdi]
test al, al
jne 0x1800204e0
lea rax, [rsp + 0x38]
cmp r15, 0x10
mov rcx, qword [rsp + 0x38]
cmovae rax, rcx
cmp byte [rax + rbp], 0
je 0x180020525
lea rax, [rsp + 0x38]
cmp r15, 0x10
cmovae rax, rcx
movsx rax, byte [rax + rbp]
add rbx, rax
mov eax, dword [rsp + 0x20]
jmp 0x1800205f0
add rbx, r12
movzx eax, byte [rbx + rdi]
cmp al, byte [rdi]
je 0x1800205c6
test al, al
je 0x1800205c6
mov rdx, qword [rsp + 0x28]
mov rcx, rsi
call fcn.1800207d0
test al, al
jne 0x1800205a2
cmp byte [rsi + 8], al
jne 0x180020590
mov rcx, qword [rsi]
test rcx, rcx
je 0x180020585
mov rdx, qword [rcx + 0x40]
cmp qword [rdx], 0
je 0x180020575
mov rax, qword [rcx + 0x58]
cmp dword [rax], 0
jle 0x180020575
mov rax, qword [rdx]
movzx eax, byte [rax]
jmp 0x18002057b
mov rax, qword [rcx]
call qword [rax + 0x30]
cmp eax, 0xffffffff
je 0x180020585
mov byte [rsi + 9], al
jmp 0x18002058c
mov qword [rsi], 0
mov byte [rsi + 8], 1
movzx eax, byte [rsi + 9]
cmp byte [rbx + rdi], al
jne 0x1800205a2
mov r14b, 1
mov eax, dword [rsp + 0x20]
jmp 0x1800205f0
lea rdx, [rsp + 0x38]
cmp r15, 0x10
cmovae rdx, qword [rsp + 0x38]
mov ecx, 0x7f
movzx eax, r12b
cmp r12, rcx
cmovb ecx, eax
mov eax, dword [rsp + 0x20]
jmp 0x1800205e8
lea rdx, [rsp + 0x38]
cmp r15, 0x10
cmovae rdx, rcx
mov ecx, 0x7f
movzx eax, r12b
cmp r12, rcx
cmovb ecx, eax
mov eax, ebp
mov dword [rsp + 0x20], eax
mov byte [rdx + rbp], cl
mov r15, qword [rsp + 0x50]
inc rbp
cmp rbp, r13
jb 0x1800204d0
test r14b, r14b
je 0x18002066d
mov rdx, qword [rsp + 0x28]
mov rcx, rsi
call fcn.1800207d0
test al, al
jne 0x180020669
inc r12
mov rcx, qword [rsi]
test rcx, rcx
je 0x180020656
mov rax, qword [rcx + 0x40]
cmp qword [rax], 0
je 0x180020645
mov rax, qword [rcx + 0x58]
cmp dword [rax], 0
jle 0x180020645
dec dword [rax]
mov rcx, qword [rcx + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
movzx eax, byte [rdx]
jmp 0x18002064b
mov rax, qword [rcx]
call qword [rax + 0x38]
cmp eax, 0xffffffff
je 0x180020656
mov byte [rsi + 8], 0
jmp 0x180020661
mov qword [rsi], 0
mov byte [rsi + 8], 1
or eax, 0xffffffff
jmp 0x1800204b9
mov eax, dword [rsp + 0x20]
cmp r15, 0x10
jb 0x180020681
mov rcx, qword [rsp + 0x38]
call fcn.180030154
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.180030170
mov rbx, qword [rsp + 0xc8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret