Function at 0x140018e60
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0xd0]
lea rax, [rax + rcx - 1]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0xc8]
add rax, 4
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x38], 0x80000000
mov rax, qword [rsp + 0x30]
sub rax, 0xa
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x20], 0
mov dword [rsp + 0x48], 0
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x58], rax
ja 0x140018f05
mov edx, 3
mov rcx, qword [rsp + 0x58]
call fcn.140018ad0
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x58], rax
ja 0x14001937c
mov eax, dword [rsp + 0x38]
and eax, 1
cmp eax, 1
jne 0x140018fe0
mov rax, qword [rsp + 0xd0]
shr rax, 1
mov rcx, qword [rsp + 0xc0]
add rcx, rax
mov rax, rcx
cmp qword [rsp + 0x58], rax
jbe 0x140018f91
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x28]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0xc0]
mov rdx, qword [rsp + 0x58]
sub rdx, rcx
mov rcx, rdx
mov rdx, qword [rsp + 0xc0]
mov r8, qword [rsp + 0x58]
sub r8, rdx
mov rdx, r8
sar rdx, 5
sub rcx, rdx
cmp rax, rcx
jle 0x140018f91
xor eax, eax
jmp 0x140019503
mov eax, dword [rsp + 0x38]
shr eax, 1
bts eax, 0x1f
mov r8d, 4
mov rdx, qword [rsp + 0x50]
mov ecx, eax
call fcn.140018de0
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x28]
add rax, 4
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x38], 0x80000000
mov edx, 3
mov rcx, qword [rsp + 0x58]
call fcn.140018ad0
mov dword [rsp + 0x20], eax
mov ecx, dword [rsp + 0x20]
call fcn.140019590
mov dword [rsp + 0x64], eax
mov eax, dword [rsp + 0x64]
mov rcx, qword [rsp + 0xd8]
mov eax, dword [rcx + rax*8 + 8]
mov ecx, dword [rsp + 0x20]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0x64]
mov rcx, qword [rsp + 0xd8]
mov edx, dword [rsp + 0x20]
mov dword [rcx + rax*8 + 8], edx
mov eax, dword [rsp + 0x64]
mov rcx, qword [rsp + 0xd8]
mov eax, dword [rcx + rax*8 + 0xc]
mov rcx, qword [rsp + 0xc0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x64]
mov rdx, qword [rsp + 0xd8]
mov dword [rdx + rcx*8 + 0xc], eax
mov eax, dword [rsp + 0x60]
and eax, 0xffffff
test eax, eax
jne 0x140019327
mov rax, qword [rsp + 0xc0]
cmp qword [rsp + 0x68], rax
je 0x140019327
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
cmp rax, 2
jg 0x1400190f0
mov rax, qword [rsp + 0x68]
inc rax
cmp qword [rsp + 0x58], rax
jne 0x140019327
cmp dword [rsp + 0x48], 3
jb 0x140019327
mov rax, qword [rsp + 0xc0]
add rax, 3
cmp qword [rsp + 0x58], rax
jbe 0x140019327
mov rax, qword [rsp + 0x58]
sub rax, 3
mov edx, 6
mov rcx, rax
call fcn.140019520
test eax, eax
je 0x140019327
cmp dword [rsp + 0x60], 0
je 0x14001914a
mov eax, dword [rsp + 0x64]
shl eax, 4
mov dword [rsp + 0x64], eax
mov eax, dword [rsp + 0x38]
shr eax, 1
bts eax, 0x1f
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x64]
or eax, 1
mov r8d, 2
mov rdx, qword [rsp + 0x28]
mov ecx, eax
call fcn.140018de0
mov rax, qword [rsp + 0x58]
add rax, 3
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x28]
add rax, 2
mov qword [rsp + 0x28], rax
jmp 0x14001930a
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x64]
shl eax, 4
mov dword [rsp + 0x64], eax
mov eax, dword [rsp + 0x38]
shr eax, 1
bts eax, 0x1f
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x58]
add rax, 4
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x68]
movzx eax, byte [rcx + rax]
mov rcx, qword [rsp + 0x58]
movzx ecx, byte [rcx]
cmp eax, ecx
jne 0x140019291
mov rax, qword [rsp + 0x58]
inc rax
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x68]
movzx eax, byte [rcx + rax]
mov rcx, qword [rsp + 0x58]
movzx ecx, byte [rcx]
cmp eax, ecx
jne 0x140019291
mov rax, qword [rsp + 0x30]
sub rax, 4
mov rcx, qword [rsp + 0x58]
sub rcx, 5
sub rax, rcx
inc rax
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0xff
jbe 0x140019216
mov qword [rsp + 0x98], 0xff
jmp 0x140019226
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x58]
inc rax
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x68]
movzx eax, byte [rcx + rax]
mov rcx, qword [rsp + 0x58]
movzx ecx, byte [rcx]
cmp eax, ecx
jne 0x140019291
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
cmp rax, qword [rsp + 0x88]
jae 0x140019291
mov rax, qword [rsp + 0x58]
inc rax
mov qword [rsp + 0x58], rax
jmp 0x140019243
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0x12
jae 0x1400192dd
mov rax, qword [rsp + 0x70]
sub rax, 2
or eax, dword [rsp + 0x64]
mov r8d, 2
mov rdx, qword [rsp + 0x28]
mov ecx, eax
call fcn.140018de0
mov rax, qword [rsp + 0x28]
add rax, 2
mov qword [rsp + 0x28], rax
jmp 0x14001930a
mov rax, qword [rsp + 0x70]
shl rax, 0x10
or eax, dword [rsp + 0x64]
mov r8d, 3
mov rdx, qword [rsp + 0x28]
mov ecx, eax
call fcn.140018de0
mov rax, qword [rsp + 0x28]
add rax, 3
mov qword [rsp + 0x28], rax
mov edx, 3
mov rcx, qword [rsp + 0x58]
call fcn.140018ad0
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x48], 0
jmp 0x140019377
mov eax, dword [rsp + 0x48]
inc eax
mov dword [rsp + 0x48], eax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x58]
movzx ecx, byte [rcx]
mov byte [rax], cl
mov rax, qword [rsp + 0x58]
inc rax
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x28]
inc rax
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x38]
shr eax, 1
mov dword [rsp + 0x38], eax
mov edx, 3
mov rcx, qword [rsp + 0x58]
call fcn.140018ad0
mov dword [rsp + 0x20], eax
jmp 0x140018f05
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x58], rax
ja 0x140019485
mov eax, dword [rsp + 0x38]
and eax, 1
cmp eax, 1
jne 0x1400193d4
mov eax, dword [rsp + 0x38]
shr eax, 1
bts eax, 0x1f
mov r8d, 4
mov rdx, qword [rsp + 0x50]
mov ecx, eax
call fcn.140018de0
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x28]
add rax, 4
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x38], 0x80000000
mov rax, qword [rsp + 0x30]
sub rax, 3
cmp qword [rsp + 0x58], rax
ja 0x14001944d
mov edx, 3
mov rcx, qword [rsp + 0x58]
call fcn.140018ad0
mov dword [rsp + 0x90], eax
mov ecx, dword [rsp + 0x90]
call fcn.140019590
mov dword [rsp + 0x94], eax
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x94]
mov rdx, qword [rsp + 0xd8]
mov dword [rdx + rcx*8 + 0xc], eax
mov eax, dword [rsp + 0x94]
mov rcx, qword [rsp + 0xd8]
mov edx, dword [rsp + 0x90]
mov dword [rcx + rax*8 + 8], edx
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x58]
movzx ecx, byte [rcx]
mov byte [rax], cl
mov rax, qword [rsp + 0x58]
inc rax
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x28]
inc rax
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x38]
shr eax, 1
mov dword [rsp + 0x38], eax
jmp 0x14001937c
mov eax, dword [rsp + 0x38]
and eax, 1
cmp eax, 1
je 0x14001949d
mov eax, dword [rsp + 0x38]
shr eax, 1
mov dword [rsp + 0x38], eax
jmp 0x140019485
mov eax, dword [rsp + 0x38]
shr eax, 1
bts eax, 0x1f
mov r8d, 4
mov rdx, qword [rsp + 0x50]
mov ecx, eax
call fcn.140018de0
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x28]
sub rcx, rax
mov rax, rcx
cmp rax, 9
jge 0x1400194e0
mov qword [rsp + 0xa0], 9
jmp 0x1400194fb
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x28]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0xa0]
add rsp, 0xb8
ret