Function at 0x140221790
Capabilities:
Encrypt data using rc4 prga
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xa8
mov r8, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0xe8]
call fcn.1402216f0
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0xb8]
cmp qword [rsp + 0x48], rax
jbe 0x1402217e6
mov eax, 0xfffffffb
jmp 0x140221aed
mov rdx, qword [rsp + 0xe8]
lea rcx, [rsp + 0x88]
call fcn.140221340
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x14022180f
mov eax, dword [rsp + 0x24]
jmp 0x140221aed
cmp dword [rsp + 0xd8], 0
jne 0x14022186d
mov eax, 1
mov word [rsp + 0x38], ax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x80], rax
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x80]
movsx eax, byte [rcx + rax]
cmp eax, 1
jne 0x140221854
mov dword [rsp + 0x3c], 0xffffffff
jmp 0x14022185c
mov dword [rsp + 0x3c], 1
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0xd8], eax
xor eax, eax
test eax, eax
jne 0x140221819
xor edx, edx
mov rax, qword [rsp + 0xe0]
mov ecx, 8
div rcx
mov rax, rdx
mov qword [rsp + 0x78], rax
mov byte [rsp + 0x20], 0xff
mov qword [rsp + 0x28], 0
jmp 0x1402218a4
mov rax, qword [rsp + 0x28]
inc rax
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x78]
cmp qword [rsp + 0x28], rax
jae 0x1402218de
mov eax, 7
sub rax, qword [rsp + 0x28]
mov ecx, 1
mov dword [rsp + 0x50], ecx
movzx ecx, al
mov eax, dword [rsp + 0x50]
shl eax, cl
movzx eax, al
movzx ecx, byte [rsp + 0x20]
xor ecx, eax
mov eax, ecx
mov byte [rsp + 0x20], al
jmp 0x140221897
xor edx, edx
mov rax, qword [rsp + 0xe0]
mov ecx, 8
div rcx
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x28], 0
jmp 0x14022190d
mov rax, qword [rsp + 0x28]
inc rax
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x48]
cmp qword [rsp + 0x28], rax
jae 0x140221ab9
mov qword [rsp + 0x30], 0
jmp 0x140221935
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xd0]
cmp qword [rsp + 0x30], rax
jae 0x140221ab4
cmp dword [rsp + 0xc8], 0xffffffff
jne 0x14022195e
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x60], rax
jmp 0x140221970
mov rax, qword [rsp + 0x48]
dec rax
sub rax, qword [rsp + 0x28]
mov qword [rsp + 0x60], rax
cmp dword [rsp + 0xd8], 0xffffffff
jne 0x140221986
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x68], rax
jmp 0x14022199b
mov rax, qword [rsp + 0xd0]
dec rax
sub rax, qword [rsp + 0x30]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x60]
imul rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xb0]
add rcx, rax
mov rax, rcx
add rax, qword [rsp + 0x68]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xd0]
sub rcx, rax
mov rax, rcx
cmp qword [rsp + 0x30], rax
jb 0x1402219e8
mov rax, qword [rsp + 0x70]
mov byte [rax], 0
jmp 0x140221928
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xd0]
sub rcx, rax
mov rax, rcx
dec rax
cmp qword [rsp + 0x30], rax
jne 0x140221a26
mov eax, 4
imul rax, rax, 0
movzx ecx, byte [rsp + 0x20]
mov rdx, qword [rsp + 0x98]
mov eax, dword [rdx + rax]
and eax, ecx
mov dword [rsp + 0x40], eax
jmp 0x140221a43
mov eax, 4
imul rax, rax, 0
mov rcx, qword [rsp + 0x98]
mov eax, dword [rcx + rax]
and eax, 0xff
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x70]
movzx ecx, byte [rsp + 0x40]
mov byte [rax], cl
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xd0]
sub rcx, rax
mov rax, rcx
dec rax
cmp qword [rsp + 0x30], rax
jne 0x140221a7c
mov eax, 8
sub rax, qword [rsp + 0x78]
mov dword [rsp + 0x44], eax
jmp 0x140221a84
mov dword [rsp + 0x44], 8
xor r9d, r9d
lea r8, [rsp + 0x88]
mov edx, dword [rsp + 0x44]
lea rcx, [rsp + 0x88]
call fcn.140221cd0
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x140221aaf
jmp 0x140221adc
jmp 0x140221928
jmp 0x140221900
cmp qword [rsp + 0xc0], 0
je 0x140221ad4
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x48]
mov qword [rax], rcx
mov dword [rsp + 0x24], 0
lea rcx, [rsp + 0x88]
call fcn.140220260
mov eax, dword [rsp + 0x24]
add rsp, 0xa8
ret