Function at 0x140036af0
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call
Get common file path
Hash data with crc32
Parse pe header
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1200]
mov eax, 0x1300
call fcn.14003e3c0
sub rsp, rax
mov rax, qword [0x140050080]
xor rax, rsp
mov qword [rbp + 0x11f0], rax
cmp dword [rcx + 0x14], 0
mov rsi, rcx
jne 0x1400371b1
xor r14d, r14d
test byte [rcx + 0x10], 1
je 0x140036cb9
cmp dword [rcx + 0x18], 6
jb 0x140036cb9
cmp dword [rcx + 0x1c], 1
jb 0x140036cb9
mov edx, 0x104
mov dword [rsp + 0x40], r14d
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea rcx, [0x140043628]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.ZwQuerySystemInformation
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
test rax, rax
je 0x140036dd2
xor edx, edx
lea r9, [rsp + 0x40]
xor r8d, r8d
lea ecx, [rdx + 0xb]
call rbx
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x140036dd2
mov edx, eax
lea ecx, [r14 + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x40]
mov rdx, rax
lea ecx, [r14 + 0xb]
mov r15, rax
call rbx
test eax, eax
jne 0x140036dd2
mov rdi, r15
lea r12, str.SystemRoot_system32_
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [r12 + rbx], r14b
jne 0x140036bf0
mov eax, dword [rsp + 0x40]
cmp rax, rbx
je 0x140036c38
nop dword [rax]
nop word [rax + rax]
mov r8, rbx
mov rdx, r12
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
je 0x140036c38
mov edx, dword [rsp + 0x40]
inc rdi
mov rax, rdi
sub rdx, rbx
sub rax, r15
cmp rax, rdx
jb 0x140036c10
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
lea rcx, [rsi + 0x3c]
mov r9, rax
lea rax, [rbp - 0x20]
mov r8, rcx
sub r8, rax
lea rdx, [rbp - 0x20]
nop word [rax + rax]
movzx eax, byte [rdx]
mov byte [r8 + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140036c60
lea rdx, [rcx - 1]
cmp byte [rdx + 1], r14b
lea rdx, [rdx + 1]
jne 0x140036c73
movzx eax, word [0x1400419e8]
dec rcx
mov word [rdx], ax
nop word [rax + rax]
cmp byte [rcx + 1], r14b
lea rcx, [rcx + 1]
jne 0x140036c90
xor edx, edx
nop dword [rax]
movzx eax, byte [r9 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140036ca0
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test byte [rsi + 0x10], 2
lea r12, [0x140041550]
mov ebx, 0xffffffff
mov edi, 0x5a4d
je 0x140036e0a
mov rcx, qword [rsi + 8]
mov edx, 8
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x140036e0a
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x140036e4d
cmp word [rcx], di
jne 0x140036e4d
call qword [sym.imp.imagehlp.dll_ImageNtHeader]
mov r13, rax
test rax, rax
je 0x140036e4d
cmp dword [rax], 0x4550
jne 0x140036e4d
movzx r15d, word [rax + 0x14]
lea rdi, [rsi + 0x140]
mov rax, qword [rdi]
add r15, 0x24
cmp rax, qword [rdi + 8]
je 0x140036d3c
mov qword [rdi + 8], rax
mov r12, r14
cmp r14w, word [r13 + 6]
jae 0x140036dfe
add r15, r13
nop dword [rax]
mov eax, dword [r15 + 0x18]
and eax, 0xc0000000
cmp eax, 0x40000000
jne 0x140036de9
mov eax, dword [r15 - 4]
mov edx, ebx
mov r8d, dword [r15]
add r8, qword [rsi + 8]
mov qword [rsp + 0x60], r8
mov dword [rsp + 0x68], eax
test eax, eax
je 0x140036db3
mov r9d, eax
lea rdi, [0x140041550]
nop dword [rax + rax]
movzx ecx, byte [r8]
lea r8, [r8 + 1]
mov eax, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
xor edx, dword [rdi + rax*4]
sub r9, 1
jne 0x140036d90
lea rdi, [rsi + 0x140]
not edx
mov dword [rsp + 0x6c], edx
mov rdx, qword [rdi + 8]
cmp rdx, qword [rdi + 0x10]
je 0x140036ddc
movups xmm0, xmmword [rsp + 0x60]
movups xmmword [rdx], xmm0
add qword [rdi + 8], 0x10
jmp 0x140036de9
mov eax, 1
jmp 0x1400371b3
lea r8, [rsp + 0x60]
mov rcx, rdi
call fcn.140037750
movzx eax, word [r13 + 6]
add r15, 0x28
inc r12
cmp r12, rax
jb 0x140036d50
mov edi, 0x5a4d
lea r12, [0x140041550]
test byte [rsi + 0x10], 4
je 0x1400371b1
cmp dword [rsi + 0x20], r14d
je 0x140036e6d
lea rcx, [0x140043628]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.ZwQueryInformationProcess
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x158], rax
test rax, rax
jne 0x140036e57
mov eax, 4
jmp 0x1400371b3
mov eax, 2
jmp 0x1400371b3
lea rcx, [0x140043628]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
sub qword [rsi + 0x158], rax
jmp 0x140036e6e
int3
lea rcx, [0x140043628]
cmp dword [rsi + 0x20], r14d
je 0x140036f12
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov r8d, 0x1000
lea rcx, [rbp + 0x1f0]
mov rdx, rax
call sub.VCRUNTIME140.dll_memcpy
cmp word [rbp + 0x1f0], di
jne 0x1400371e3
movsxd rax, dword [rbp + 0x22c]
lea r8, [rbp + 0x1f0]
add r8, rax
cmp dword [r8], 0x4550
jne 0x1400371e3
movzx ecx, word [r8 + 0x14]
mov rdx, r14
movzx r10d, word [r8 + 6]
add rcx, 0x18
add rcx, r8
test r10, r10
je 0x140036f75
mov r9, qword [rsi + 0x158]
nop dword [rax]
mov r8d, dword [rcx + 0xc]
cmp r8, r9
ja 0x140036f04
mov eax, dword [rcx + 8]
add eax, r8d
cmp r9, rax
jbe 0x140036f75
add rcx, 0x28
inc rdx
cmp rdx, r10
jb 0x140036ef0
jmp 0x140036f75
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp word [rax], di
jne 0x1400371e3
movsxd r8, dword [rax + 0x3c]
add r8, rax
cmp dword [r8], 0x4550
jne 0x1400371e3
movzx ecx, word [r8 + 0x14]
mov rdx, r14
movzx r10d, word [r8 + 6]
add rcx, 0x18
add rcx, r8
test r10, r10
je 0x140036f75
mov r9, qword [rsi + 0x158]
mov r8d, dword [rcx + 0xc]
cmp r8, r9
ja 0x140036f69
mov eax, dword [rcx + 8]
add eax, r8d
cmp r9, rax
jbe 0x140036f75
add rcx, 0x28
inc rdx
cmp rdx, r10
jb 0x140036f55
mov edi, dword [rcx + 0x14]
sub edi, dword [rcx + 0xc]
add edi, dword [rsi + 0x158]
test edi, edi
je 0x1400371e3
xor edx, edx
lea rcx, [rbp - 0x20]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov edx, 0x104
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rcx, [rbp - 0x20]
sub rcx, 2
cmp word [rcx + 2], r14w
lea rcx, [rcx + 2]
jne 0x140036fb1
mov eax, dword [0x1400436a8]
xor r9d, r9d
movups xmm0, xmmword [str._ntdll.dll]
mov qword [rsp + 0x30], r14
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
movups xmmword [rcx], xmm0
mov dword [rcx + 0x10], eax
lea r8d, [r9 + 1]
movzx eax, word [0x1400436ac]
mov word [rcx + 0x14], ax
lea rcx, [rbp - 0x20]
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x140037017
lea eax, [r15 + 4]
jmp 0x1400371b3
mov r9d, 1
xor r8d, r8d
mov edx, edi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov r8d, 0x64
lea rdx, [rsp + 0x70]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15d, dword [rsi + 0x20]
lea rdi, [rsp + 0x70]
nop dword [rax + rax]
mov r8d, r15d
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.1400378e0
mov eax, eax
cmp rax, 5
jne 0x14003707d
cmp byte [rdi], 0xb8
je 0x140037082
add rdi, rax
jmp 0x140037060
mov eax, dword [rdi + 1]
xor edx, edx
mov r8d, dword [rsi + 0x2c]
mov r9d, 0x1000
mov dword [rsi + 0x160], eax
mov byte [rsp + 0x48], 0xb8
lea rcx, [rdx - 1]
mov dword [rsp + 0x4d], 0x3e8
mov dword [rsp + 0x51], 0x14c200
mov dword [rsp + 0x55], 0x340fd48b
mov byte [rsp + 0x59], 0xc3
mov byte [rsp + 0x60], 0xb8
mov dword [rsp + 0x65], 0xfd18b4c
mov byte [rsp + 0x69], 5
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsi + 0x30], rax
test rax, rax
jne 0x1400370f0
mov eax, 5
jmp 0x1400371b3
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov rdi, qword [rsi + 0x30]
cmp dword [rsi + 0x2c], r14d
jbe 0x14003711d
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov byte [rdi + r14], al
inc r14
mov eax, dword [rsi + 0x2c]
cmp r14, rax
jb 0x140037108
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov ecx, dword [rsi + 0x2c]
xor edx, edx
sub rcx, 0x1d
cdqe
div rcx
mov eax, dword [rsi + 0x160]
mov rcx, qword [rsi + 0x30]
add rcx, rdx
mov dword [rsp + 0x49], eax
movups xmm0, xmmword [rsp + 0x48]
mov qword [rsi + 0x168], rcx
mov dword [rsp + 0x61], eax
movzx eax, word [rsp + 0x58]
movups xmmword [rcx], xmm0
mov word [rcx + 0x10], ax
add rcx, 0x12
movzx eax, word [rsp + 0x68]
movsd xmm0, qword [rsp + 0x60]
mov qword [rsi + 0x170], rcx
movsd qword [rcx], xmm0
mov word [rcx + 8], ax
mov byte [rcx + 0xa], 0xc3
mov eax, dword [rsi + 0x2c]
test eax, eax
je 0x1400371ac
mov rdx, qword [rsi + 0x30]
mov r8d, eax
nop
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
mov ecx, ebx
shr ebx, 8
xor rcx, rax
movzx eax, cl
xor ebx, dword [r12 + rax*4]
sub r8, 1
jne 0x140037190
not ebx
mov dword [rsi + 0x38], ebx
xor eax, eax
mov rcx, qword [rbp + 0x11f0]
xor rcx, rsp
call fcn.14003d6b0
lea r11, [rsp + 0x1300]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov eax, 6
jmp 0x1400371b3