Function at 0x1400227a0
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 0x140022845
mov edx, 3
mov rcx, qword [rsp + 0x58]
call fcn.140022410
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x58], rax
ja 0x140022cbc
mov eax, dword [rsp + 0x38]
and eax, 1
cmp eax, 1
jne 0x140022920
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 0x1400228d1
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 0x1400228d1
xor eax, eax
jmp 0x140022e43
mov eax, dword [rsp + 0x38]
shr eax, 1
bts eax, 0x1f
mov r8d, 4
mov rdx, qword [rsp + 0x50]
mov ecx, eax
call fcn.140022720
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.140022410
mov dword [rsp + 0x20], eax
mov ecx, dword [rsp + 0x20]
call fcn.140022ed0
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 0x140022c67
mov rax, qword [rsp + 0xc0]
cmp qword [rsp + 0x68], rax
je 0x140022c67
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
cmp rax, 2
jg 0x140022a30
mov rax, qword [rsp + 0x68]
inc rax
cmp qword [rsp + 0x58], rax
jne 0x140022c67
cmp dword [rsp + 0x48], 3
jb 0x140022c67
mov rax, qword [rsp + 0xc0]
add rax, 3
cmp qword [rsp + 0x58], rax
jbe 0x140022c67
mov rax, qword [rsp + 0x58]
sub rax, 3
mov edx, 6
mov rcx, rax
call fcn.140022e60
test eax, eax
je 0x140022c67
cmp dword [rsp + 0x60], 0
je 0x140022a8a
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.140022720
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 0x140022c4a
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 0x140022bd1
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 0x140022bd1
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 0x140022b56
mov qword [rsp + 0x98], 0xff
jmp 0x140022b66
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 0x140022bd1
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
cmp rax, qword [rsp + 0x88]
jae 0x140022bd1
mov rax, qword [rsp + 0x58]
inc rax
mov qword [rsp + 0x58], rax
jmp 0x140022b83
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 0x140022c1d
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.140022720
mov rax, qword [rsp + 0x28]
add rax, 2
mov qword [rsp + 0x28], rax
jmp 0x140022c4a
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.140022720
mov rax, qword [rsp + 0x28]
add rax, 3
mov qword [rsp + 0x28], rax
mov edx, 3
mov rcx, qword [rsp + 0x58]
call fcn.140022410
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x48], 0
jmp 0x140022cb7
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.140022410
mov dword [rsp + 0x20], eax
jmp 0x140022845
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x58], rax
ja 0x140022dc5
mov eax, dword [rsp + 0x38]
and eax, 1
cmp eax, 1
jne 0x140022d14
mov eax, dword [rsp + 0x38]
shr eax, 1
bts eax, 0x1f
mov r8d, 4
mov rdx, qword [rsp + 0x50]
mov ecx, eax
call fcn.140022720
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 0x140022d8d
mov edx, 3
mov rcx, qword [rsp + 0x58]
call fcn.140022410
mov dword [rsp + 0x90], eax
mov ecx, dword [rsp + 0x90]
call fcn.140022ed0
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 0x140022cbc
mov eax, dword [rsp + 0x38]
and eax, 1
cmp eax, 1
je 0x140022ddd
mov eax, dword [rsp + 0x38]
shr eax, 1
mov dword [rsp + 0x38], eax
jmp 0x140022dc5
mov eax, dword [rsp + 0x38]
shr eax, 1
bts eax, 0x1f
mov r8d, 4
mov rdx, qword [rsp + 0x50]
mov ecx, eax
call fcn.140022720
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x28]
sub rcx, rax
mov rax, rcx
cmp rax, 9
jge 0x140022e20
mov qword [rsp + 0xa0], 9
jmp 0x140022e3b
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