Function at 0x1800a2a50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
imul eax, dword [rsp + 0x90], 3
mov ecx, 0x200010
mov dword [rsp + 0x44], ecx
movzx ecx, al
mov eax, dword [rsp + 0x44]
shl eax, cl
mov rcx, qword [rsp + 0x78]
mov ecx, dword [rcx]
and ecx, eax
mov eax, ecx
imul ecx, dword [rsp + 0x90], 3
mov edx, 0x10
shl edx, cl
mov ecx, edx
cmp eax, ecx
jne 0x1800a3005
imul eax, dword [rsp + 0x90], 3
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x50], rcx
movzx ecx, al
mov rax, qword [rsp + 0x50]
mov eax, dword [rax]
shr eax, cl
mov ecx, eax
call fcn.18009d8c0
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x20]
lea rax, [rcx + rax*8 + 0x28]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0xc0], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov eax, dword [rax]
mov ecx, dword [rcx + 4]
sub ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x20]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x20]
mov eax, dword [rax]
shr eax, 0x10
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0xc0]
mov rcx, qword [rcx]
cmp eax, dword [rcx]
jae 0x1800a2d3a
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov eax, dword [rax]
cmp dword [rcx + 4], eax
jae 0x1800a2ba7
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov eax, dword [rax]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0xc0]
mov rax, qword [rax + 8]
mov qword [rcx], rax
jmp 0x1800a2c11
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov eax, dword [rax]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
cmp dword [rax + 4], 0
jne 0x1800a2bdf
mov dword [rsp + 0x34], 1
jmp 0x1800a2be7
mov dword [rsp + 0x34], 0
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0xc0]
mov rax, qword [rax + 0x10]
mov qword [rcx], rax
mov rax, qword [rsp + 0x20]
cmp dword [rax + 8], 0
jne 0x1800a2cef
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
movzx eax, byte [rax + 1]
mov dword [rsp + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
movzx eax, byte [rax]
cmp eax, 0xff
jne 0x1800a2cb9
cmp dword [rsp + 0x2c], 0x8f
jbe 0x1800a2c81
mov rax, qword [rsp + 0x20]
mov eax, dword [rax]
add eax, 0xff00
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov dword [rax + 8], 8
mov rax, qword [rsp + 0x20]
mov eax, dword [rax + 0xc]
inc eax
mov rcx, qword [rsp + 0x20]
mov dword [rcx + 0xc], eax
jmp 0x1800a2cb7
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
inc rax
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
mov eax, dword [rsp + 0x2c]
shl eax, 9
mov rcx, qword [rsp + 0x20]
add eax, dword [rcx]
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov dword [rax + 8], 7
jmp 0x1800a2cef
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
inc rax
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
mov eax, dword [rsp + 0x2c]
shl eax, 8
mov rcx, qword [rsp + 0x20]
add eax, dword [rcx]
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov dword [rax + 8], 8
mov rax, qword [rsp + 0x20]
mov eax, dword [rax + 4]
shl eax, 1
mov rcx, qword [rsp + 0x20]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x20]
mov eax, dword [rax]
shl eax, 1
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov eax, dword [rax + 8]
dec eax
mov rcx, qword [rsp + 0x20]
mov dword [rcx + 8], eax
mov rax, qword [rsp + 0x20]
cmp dword [rax + 4], 0x8000
jb 0x1800a2c11
jmp 0x1800a2f57
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov eax, dword [rax]
shl eax, 0x10
mov rcx, qword [rsp + 0x20]
mov ecx, dword [rcx]
sub ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov eax, dword [rax + 4]
and eax, 0x8000
test eax, eax
jne 0x1800a2f41
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov eax, dword [rax]
cmp dword [rcx + 4], eax
jae 0x1800a2de3
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
cmp dword [rax + 4], 0
jne 0x1800a2daf
mov dword [rsp + 0x38], 1
jmp 0x1800a2db7
mov dword [rsp + 0x38], 0
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0xc0]
mov rax, qword [rax + 0x10]
mov qword [rcx], rax
jmp 0x1800a2e1b
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0xc0]
mov rax, qword [rax + 8]
mov qword [rcx], rax
mov rax, qword [rsp + 0x20]
cmp dword [rax + 8], 0
jne 0x1800a2ef9
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
movzx eax, byte [rax + 1]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
movzx eax, byte [rax]
cmp eax, 0xff
jne 0x1800a2ec3
cmp dword [rsp + 0x30], 0x8f
jbe 0x1800a2e8b
mov rax, qword [rsp + 0x20]
mov eax, dword [rax]
add eax, 0xff00
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov dword [rax + 8], 8
mov rax, qword [rsp + 0x20]
mov eax, dword [rax + 0xc]
inc eax
mov rcx, qword [rsp + 0x20]
mov dword [rcx + 0xc], eax
jmp 0x1800a2ec1
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
inc rax
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
mov eax, dword [rsp + 0x30]
shl eax, 9
mov rcx, qword [rsp + 0x20]
add eax, dword [rcx]
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov dword [rax + 8], 7
jmp 0x1800a2ef9
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
inc rax
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
mov eax, dword [rsp + 0x30]
shl eax, 8
mov rcx, qword [rsp + 0x20]
add eax, dword [rcx]
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov dword [rax + 8], 8
mov rax, qword [rsp + 0x20]
mov eax, dword [rax + 4]
shl eax, 1
mov rcx, qword [rsp + 0x20]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x20]
mov eax, dword [rax]
shl eax, 1
mov rcx, qword [rsp + 0x20]
mov dword [rcx], eax
mov rax, qword [rsp + 0x20]
mov eax, dword [rax + 8]
dec eax
mov rcx, qword [rsp + 0x20]
mov dword [rcx + 8], eax
mov rax, qword [rsp + 0x20]
cmp dword [rax + 4], 0x8000
jb 0x1800a2e1b
jmp 0x1800a2f57
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0xc0]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x28], eax
imul eax, dword [rsp + 0x90], 0
mov eax, eax
mov rcx, qword [rsp + 0x80]
cmp dword [rcx + rax*4], 0
jge 0x1800a2f79
mov dword [rsp + 0x3c], 1
jmp 0x1800a2f81
mov dword [rsp + 0x3c], 0
mov eax, dword [rsp + 0x3c]
mov ecx, dword [rsp + 0x28]
xor ecx, eax
mov eax, ecx
test eax, eax
je 0x1800a2f9e
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x40], eax
jmp 0x1800a2fab
mov eax, dword [rsp + 0x88]
neg eax
mov dword [rsp + 0x40], eax
imul eax, dword [rsp + 0x90], 0
mov eax, eax
mov rcx, qword [rsp + 0x80]
mov eax, dword [rcx + rax*4]
add eax, dword [rsp + 0x40]
imul ecx, dword [rsp + 0x90], 0
mov ecx, ecx
mov rdx, qword [rsp + 0x80]
mov dword [rdx + rcx*4], eax
imul eax, dword [rsp + 0x90], 3
mov ecx, 0x100000
mov dword [rsp + 0x4c], ecx
movzx ecx, al
mov eax, dword [rsp + 0x4c]
shl eax, cl
mov rcx, qword [rsp + 0x78]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x78]
mov dword [rcx], eax
add rsp, 0x68
ret