Function at 0x5a3710
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov r11d, pe_nt_image_headers64
movsxd rax, r11d
movsxd rdi, edx
mov byte [rcx], 0
mov r10, rcx
cmp edi, 0x80
cmovle rax, rdi
test r9d, r9d
jle 0x5a39be
mov ecx, 0x400
mov ebp, 0xff
mov ebx, 0x7f
cmp r9d, 0x400
cmovle ecx, r9d
lea r9d, [rcx + 7]
neg ecx
sar r9d, 3
and ecx, 7
sub r11d, r9d
sar ebp, cl
sub ebx, r9d
movsxd rsi, r11d
add rsi, r10
test edi, edi
jle 0x5a39dc
lea rcx, [r8 + 1]
mov rdx, r10
sub rdx, rcx
cmp rdx, 0xe
jbe 0x5a39e7
cmp edi, 7
jle 0x5a39e7
cmp edi, 0xf
jle 0x5a3a06
movdqu xmm1, xmmword [r8]
mov edx, eax
shr edx, 4
movups xmmword [r10], xmm1
cmp edx, 1
je 0x5a38e8
movdqu xmm2, xmmword [r8 + 0x10]
movups xmmword [r10 + 0x10], xmm2
cmp edx, 2
je 0x5a38e8
movdqu xmm3, xmmword [r8 + 0x20]
movups xmmword [r10 + 0x20], xmm3
cmp edx, 3
je 0x5a38e8
movdqu xmm4, xmmword [r8 + 0x30]
movups xmmword [r10 + 0x30], xmm4
cmp edx, 4
je 0x5a38e8
movdqu xmm5, xmmword [r8 + 0x40]
movups xmmword [r10 + 0x40], xmm5
cmp edx, 5
je 0x5a38e8
movdqu xmm0, xmmword [r8 + 0x50]
movups xmmword [r10 + 0x50], xmm0
cmp edx, 6
je 0x5a38e8
movdqu xmm5, xmmword [r8 + 0x60]
movups xmmword [r10 + 0x60], xmm5
cmp edx, 8
jne 0x5a38e8
movdqu xmm0, xmmword [r8 + 0x70]
movups xmmword [r10 + 0x70], xmm0
nop word [rax + rax]
movzx edx, byte [r10 + rax - 1]
lea r8, [0x00918460]
cmp edi, 0x7f
jg 0x5a3878
mov rdi, r10
lea r8, [0x00918460]
sub rdi, rax
nop
add dl, byte [rdi + rax]
movzx edx, dl
movzx edx, byte [r8 + rdx]
mov byte [r10 + rax], dl
add rax, 1
cmp eax, 0x7f
jle 0x5a3860
and bpl, byte [rsi]
movzx eax, bpl
movzx eax, byte [r8 + rax]
mov byte [rsi], al
test r11d, r11d
je 0x5a38b8
movsxd rcx, ebx
mov ebx, ebx
movsxd r9, r9d
lea r11, [r10 + rcx - 1]
lea rdx, [r10 + rcx]
sub r11, rbx
nop
xor al, byte [rdx + r9]
sub rdx, 1
movzx eax, al
movzx eax, byte [r8 + rax]
mov byte [rdx + 1], al
cmp rdx, r11
jne 0x5a38a0
mov eax, 0x7f
nop dword [rax]
movzx edx, byte [r10 + rax]
movzx ecx, byte [r10 + rax - 1]
shl edx, 8
or edx, ecx
mov dword [r10 + rax*2 - 2], edx
sub rax, 2
cmp rax, 0xffffffffffffffff
jne 0x5a38c0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov ecx, eax
and ecx, 0xfffffff0
mov edx, ecx
cmp ecx, eax
je 0x5a3840
lea r13d, [rax - 1]
mov r12d, eax
sub r13d, ecx
sub r12d, ecx
cmp r13d, 6
jbe 0x5a3923
mov r13, qword [r8 + rcx]
mov qword [r10 + rcx], r13
mov ecx, r12d
and ecx, 0xfffffff8
add edx, ecx
cmp ecx, r12d
je 0x5a3840
movsxd rcx, edx
movzx r12d, byte [r8 + rcx]
mov byte [r10 + rcx], r12b
lea ecx, [rdx + 1]
cmp eax, ecx
jle 0x5a3840
movsxd rcx, ecx
movzx r12d, byte [r8 + rcx]
mov byte [r10 + rcx], r12b
lea ecx, [rdx + 2]
cmp eax, ecx
jle 0x5a3840
movsxd rcx, ecx
movzx r12d, byte [r8 + rcx]
mov byte [r10 + rcx], r12b
lea ecx, [rdx + 3]
cmp eax, ecx
jle 0x5a3840
movsxd rcx, ecx
movzx r12d, byte [r8 + rcx]
mov byte [r10 + rcx], r12b
lea ecx, [rdx + 4]
cmp eax, ecx
jle 0x5a3840
movsxd rcx, ecx
movzx r12d, byte [r8 + rcx]
mov byte [r10 + rcx], r12b
lea ecx, [rdx + 5]
cmp eax, ecx
jle 0x5a3840
movsxd rcx, ecx
add edx, 6
movzx r12d, byte [r8 + rcx]
mov byte [r10 + rcx], r12b
cmp eax, edx
jle 0x5a3840
movsxd rdx, edx
movzx ecx, byte [r8 + rdx]
mov byte [r10 + rdx], cl
jmp 0x5a3840
mov rsi, rcx
mov ebx, 0xffffffff
mov ebp, 0xff
xor r11d, r11d
mov r9d, pe_nt_image_headers64
test edi, edi
jg 0x5a377a
movzx edx, byte [r10 + rax - 1]
jmp 0x5a3852
xor edx, edx
nop dword [rax]
movzx ecx, byte [r8 + rdx]
mov byte [r10 + rdx], cl
add rdx, 1
cmp eax, edx
jg 0x5a39f0
jmp 0x5a3840
xor ecx, ecx
xor edx, edx
jmp 0x5a38f7