Function at 0x140012e14
Capabilities:
Access pe header
Allocate or change rwx memory
Delete file
Execute shellcode via indirect call
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x14000b0d0]
xor rax, rsp
mov qword [rbp + 8], rax
mov r13, qword [rbp + 0x80]
xor eax, eax
mov r15, qword [rbp + 0x88]
mov esi, eax
mov qword [rsp + 0x70], r13
mov r14d, eax
mov r12, r8
mov qword [rbp - 0x48], rdx
mov rbx, rdx
mov qword [rsp + 0x68], rcx
call qword [sym.imp.ntoskrnl.exe_PsGetProcessWow64Process]
lea edx, [r14 + 0x58]
mov r8d, 0x74616731
mov qword [rsp + 0x78], rax
lea ecx, [rdx - 0x57]
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
xor edx, edx
lea r8d, [r14 + 0x58]
mov rcx, rax
mov rdi, rax
call fcn.140007ec0
lea rcx, [rdi + 0x30]
mov rdx, rbx
call fcn.140015244
lea rdx, [rdi + 0x20]
lea rcx, [rdi + 0x30]
call fcn.14001532c
mov eax, dword [rbp + 0x78]
lea rcx, [r13 + 0x20]
mov dword [rdi + 0x4c], eax
lea rdx, [rdi + 0x20]
xor eax, eax
cmp qword [rsp + 0x78], rax
mov r8d, eax
sete r8b
mov dword [rdi + 0x48], r8d
call fcn.140013844
mov rbx, rax
test rax, rax
je 0x140012f53
lea rcx, [rdi + 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlFreeUnicodeString]
mov edx, 0x74616731
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
movups xmm0, xmmword [rbx]
xor eax, eax
movups xmmword [r15], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [r15 + 0x10], xmm1
movups xmm0, xmmword [rbx + 0x20]
movups xmmword [r15 + 0x20], xmm0
movups xmm1, xmmword [rbx + 0x30]
movups xmmword [r15 + 0x30], xmm1
movups xmm0, xmmword [rbx + 0x40]
movups xmmword [r15 + 0x40], xmm0
movsd xmm1, qword [rbx + 0x50]
movsd qword [r15 + 0x50], xmm1
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.140007e50
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r13, [rdi + 0x18]
mov ebx, 0xc000007b
test r12, r12
jne 0x140012f77
mov rcx, qword [rbp - 0x48]
mov rdx, r13
call fcn.1400136b4
xor edx, edx
mov esi, eax
test eax, eax
js 0x140012f90
jmp 0x140012f7b
mov qword [r13], r12
mov rcx, qword [r13]
call qword [sym.imp.ntoskrnl.exe_RtlImageNtHeader]
xor edx, edx
mov r14, rax
test rax, rax
cmove esi, ebx
mov eax, dword [rbp + 0x78]
mov r9d, 0x10b
and eax, 0x8000
test esi, esi
js 0x140013380
test eax, eax
jne 0x140013139
mov rcx, qword [r13]
lea r8, [rsp + 0x60]
mov dword [rsp + 0x60], edx
mov qword [rbp - 0x80], rdx
lea rdx, [rbp - 0x80]
call fcn.140013594
xor edx, edx
mov rbx, rax
test rax, rax
je 0x140013139
mov esi, dword [rsp + 0x60]
test esi, esi
je 0x140013139
test r12, r12
je 0x140013124
xorps xmm0, xmm0
mov qword [rsp + 0x60], rdx
xorps xmm1, xmm1
mov dword [rbp - 0x74], edx
mov dword [rbp - 0x5c], edx
lea rcx, [rbp - 0x48]
mov r12d, 0x200
mov edx, r12d
movups xmmword [rbp - 0x18], xmm0
movups xmmword [rbp - 0x48], xmm1
movups xmmword [rbp - 0x38], xmm0
call fcn.1400151c8
lea rdx, [0x140015530]
lea rcx, [rbp - 0x18]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
xor eax, eax
mov dword [rbp - 0x60], r12d
xor r12d, r12d
mov qword [rbp - 0x70], rax
mov dword [rsp + 0x50], r12d
lea rax, [rbp - 0x18]
mov qword [rsp + 0x48], r12
lea r9, [rbp - 0x38]
mov dword [rsp + 0x40], 0x20
lea r8, [rbp - 0x78]
mov dword [rsp + 0x38], r12d
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x30], 1
xorps xmm0, xmm0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov edx, 0x110002
mov qword [rsp + 0x20], r12
mov dword [rbp - 0x78], 0x30
mov qword [rbp - 0x68], rax
movdqu xmmword [rbp - 0x58], xmm0
call qword [sym.imp.ntoskrnl.exe_ZwCreateFile]
test eax, eax
js 0x14001310e
mov eax, dword [rbp - 0x80]
xor r9d, r9d
mov rcx, qword [rsp + 0x60]
xor r8d, r8d
mov qword [rsp + 0x40], r12
xor edx, edx
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], eax
lea rax, [rbp - 0x38]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwWriteFile]
mov rcx, qword [rsp + 0x60]
mov ebx, eax
call qword [sym.imp.ntoskrnl.exe_ZwClose]
test ebx, ebx
js 0x14001310e
lea r9, [0x140015580]
movabs r8, 0xfffff78000000030
lea rdx, [0x1400155b0]
lea rcx, [rbp - 0x48]
call fcn.140001878
mov r9, qword [rsp + 0x70]
lea rcx, [rbp - 0x48]
mov r8d, esi
xor edx, edx
call fcn.1400138b0
lea rcx, [rbp - 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwDeleteFile]
lea rcx, [rbp - 0x48]
call qword [sym.imp.ntoskrnl.exe_RtlFreeUnicodeString]
jmp 0x140013137
mov r9, qword [rsp + 0x70]
mov r8d, esi
mov rcx, qword [rbp - 0x48]
mov dl, 1
call fcn.1400138b0
xor edx, edx
mov r12d, dword [rbp + 0x78]
test r12b, 0x10
je 0x1400131b4
mov rbx, qword [rsp + 0x68]
xorps xmm0, xmm0
mov rcx, rbx
mov qword [rbp - 0x38], rdx
mov dword [rbp - 0x20], edx
mov word [rbp - 0x1a], dx
movups xmmword [rbp - 0x48], xmm0
call qword [sym.imp.ntoskrnl.exe_PsGetProcessId]
mov word [rbp - 0x1c], 0x101
lea r8, [rbp - 0x48]
mov dword [rbp - 0x28], eax
lea rdx, [rbp - 0x38]
mov dword [rbp - 0x24], 0x40
mov rcx, rbx
mov eax, dword [r14 + 0x50]
mov qword [rbp - 0x30], rax
call fcn.140014ae0
xor edx, edx
mov esi, eax
test eax, eax
js 0x140013301
mov rcx, qword [rbp - 0x48]
lea r12, [rdi + 0x10]
mov qword [r12], rcx
lea rbx, [r14 + 0x18]
mov rcx, qword [rbp - 0x40]
mov qword [rdi + 0x40], rcx
jmp 0x140013243
lea rbx, [r14 + 0x18]
mov eax, 0x20b
cmp word [rbx], ax
jne 0x1400131c8
mov rax, qword [r14 + 0x30]
jmp 0x1400131cc
mov eax, dword [r14 + 0x34]
lea r12, [rdi + 0x10]
mov dword [rsp + 0x28], 0x40
mov qword [r12], rax
lea r9, [rdi + 0x40]
mov eax, dword [r14 + 0x50]
xor r8d, r8d
mov rdx, r12
mov qword [rdi + 0x40], rax
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x20], 0x1000
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
mov esi, eax
xor eax, eax
test esi, esi
jns 0x140013243
mov qword [r12], rax
lea r9, [rdi + 0x40]
mov eax, dword [r14 + 0x50]
xor r8d, r8d
mov dword [rsp + 0x28], 0x40
mov rdx, r12
or rcx, 0xffffffffffffffff
mov qword [r9], rax
mov dword [rsp + 0x20], 0x1000
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
xor edx, edx
mov esi, eax
test eax, eax
js 0x1400132f8
mov r8d, dword [r14 + 0x54]
mov rdx, qword [r13]
mov rcx, qword [r12]
call fcn.1400080c0
mov r9d, 0x10b
lea r13, [r14 + 0x108]
cmp word [rbx], r9w
jne 0x14001326e
lea r13, [r14 + 0xf8]
movzx eax, word [r14 + 6]
lea rcx, [rax + rax*4]
lea rax, [rcx*8]
add rax, r13
cmp r13, rax
jae 0x1400132d7
lea rbx, [r13 + 0x10]
test dword [rbx + 0x14], 0xe0000000
je 0x1400132b0
mov eax, dword [rbx]
test eax, eax
je 0x1400132b0
mov edx, dword [rbx + 4]
mov r8d, eax
mov ecx, dword [rbx - 4]
add rdx, qword [rdi + 0x18]
add rcx, qword [r12]
call fcn.1400080c0
movzx eax, word [r14 + 6]
add rbx, 0x28
lea rcx, [rax + rax*4]
lea rdx, [rcx*8]
add rdx, r13
lea rax, [rbx - 0x10]
cmp rax, rdx
jb 0x14001328b
mov r9d, 0x10b
xor edx, edx
test esi, esi
js 0x140013380
mov rcx, qword [r12]
mov r9d, 0xc000007b
lea r8d, [r9 - 0x63]
call fcn.1400012d4
mov esi, eax
xor edx, edx
mov rbx, qword [rsp + 0x68]
mov r12d, dword [rbp + 0x78]
mov r9d, 0x10b
mov r8, qword [rsp + 0x70]
lea rcx, [r8 + 0x20]
mov rax, qword [rcx]
cmp qword [rax + 8], rcx
jne 0x14001358a
mov qword [rdi], rax
mov qword [rdi + 8], rcx
mov qword [rax + 8], rdi
mov qword [rcx], rdi
test esi, esi
js 0x14001346d
cmp word [r14 + 0x18], r9w
lea r13, [rdi + 0x10]
mov rcx, qword [r13]
sete r9b
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r8
xor edx, edx
mov r8, rbx
call fcn.140013fbc
xor edx, edx
mov esi, eax
test eax, eax
js 0x140013468
test r12b, 0x10
je 0x14001338e
mov rdx, qword [r13]
xor r8d, r8d
mov rcx, rbx
call fcn.1400154b0
mov esi, eax
jmp 0x140013457
mov r12d, dword [rbp + 0x78]
mov rbx, qword [rsp + 0x68]
jmp 0x140013307
mov eax, dword [r14 + 0x54]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x20], rdx
mov r9d, 2
mov rdx, r13
mov qword [rsp + 0x60], rax
or rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwProtectVirtualMemory]
mov esi, eax
lea r12, [r14 + 0x108]
mov eax, 0x10b
cmp word [r14 + 0x18], ax
jne 0x1400133d0
lea r12, [r14 + 0xf8]
movzx eax, word [r14 + 6]
lea rcx, [rax + rax*4]
lea rax, [r12 + rcx*8]
cmp r12, rax
jae 0x140013453
lea rbx, [r12 + 0xc]
mov ecx, dword [rbx + 0x18]
xor edx, edx
call fcn.140012a40
mov ecx, dword [rbx]
lea r8, [rsp + 0x60]
add rcx, qword [r13]
lea rdx, [rbp - 0x48]
mov qword [rbp - 0x48], rcx
mov ecx, dword [rbx - 4]
mov qword [rsp + 0x60], rcx
or rcx, 0xffffffffffffffff
cmp eax, 1
je 0x140013428
and qword [rsp + 0x20], 0
mov r9d, eax
call qword [sym.imp.ntoskrnl.exe_ZwProtectVirtualMemory]
or esi, eax
jmp 0x140013434
mov r9d, 0x4000
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
movzx eax, word [r14 + 6]
add rbx, 0x28
lea rcx, [rax + rax*4]
lea rdx, [r12 + rcx*8]
lea rax, [rbx - 0xc]
cmp rax, rdx
jb 0x1400133e7
mov rbx, qword [rsp + 0x68]
mov r12d, dword [rbp + 0x78]
xor edx, edx
test esi, esi
js 0x140013468
mov rcx, qword [r13]
call fcn.140012a9c
xor edx, edx
mov r8, qword [rsp + 0x70]
bt r12d, 0xc
jb 0x14001348b
test esi, esi
js 0x14001348b
cmp qword [rsp + 0x78], rdx
jne 0x14001348b
mov rdx, qword [rdi + 0x10]
mov rcx, r8
call fcn.140012b48
mov rcx, qword [rdi + 0x18]
xor r14d, r14d
test rcx, rcx
je 0x1400134a6
mov edx, 0x74616731
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov qword [rdi + 0x18], r14
test esi, esi
js 0x1400134ee
test r15, r15
je 0x140013583
movups xmm0, xmmword [rdi]
movups xmmword [r15], xmm0
movups xmm1, xmmword [rdi + 0x10]
movups xmmword [r15 + 0x10], xmm1
movups xmm0, xmmword [rdi + 0x20]
movups xmmword [r15 + 0x20], xmm0
movups xmm1, xmmword [rdi + 0x30]
movups xmmword [r15 + 0x30], xmm1
movups xmm0, xmmword [rdi + 0x40]
movups xmmword [r15 + 0x40], xmm0
movsd xmm1, qword [rdi + 0x50]
movsd qword [r15 + 0x50], xmm1
jmp 0x140013583
mov rcx, qword [rdi]
cmp qword [rcx + 8], rdi
jne 0x14001358a
mov rax, qword [rdi + 8]
cmp qword [rax], rdi
jne 0x14001358a
mov qword [rax], rcx
lea rdx, [rdi + 0x10]
mov qword [rcx + 8], rax
cmp qword [rdx], r14
je 0x14001356b
test r12b, 0x10
je 0x140013551
xorps xmm0, xmm0
mov rcx, rbx
movups xmmword [rbp - 0x18], xmm0
movups xmmword [rbp - 8], xmm0
movups xmmword [rbp - 0x38], xmm0
call qword [sym.imp.ntoskrnl.exe_PsGetProcessId]
lea r8, [rbp - 0x38]
mov word [rbp + 4], 0x100
lea rdx, [rbp - 0x18]
mov dword [rbp - 8], eax
mov rcx, rbx
call fcn.140014ae0
jmp 0x14001356b
mov r9d, 0x8000
mov qword [rsp + 0x78], r14
lea r8, [rsp + 0x78]
or rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
lea rcx, [rdi + 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlFreeUnicodeString]
mov edx, 0x74616731
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, esi
jmp 0x140012f2c
mov ecx, 3
int 0x29
int3