Function at 0x401864
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Resolve dns

Disassembly:
push rbp
push rsi
push rbx
mov rbp, rsp
sub rsp, 0xa0
mov qword [rbp + 0x20], rcx
mov eax, edx
mov byte [rbp + 0x28], al
mov dword [rbp - 8], 0x186a0
mov dword [rbp - 0xc], 0
mov dword [rbp - 0x10], 0
mov dword [rbp - 0x14], 0
mov dword [rbp - 0x18], 0
mov r8d, 1
mov edx, 3
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0xffffffffffffffff
jne 0x4018dd
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rcx, str.socket___error:_d_n
call sym.printf
jmp 0x401bbd
mov rcx, qword [rbp + 0x20]
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x40190a
mov rdx, qword [rbp + 0x20]
lea rcx, str.Host_not_found:_s_n
call sym.printf
jmp 0x401bbd
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rbp - 0x4c], eax
mov word [rbp - 0x50], 2
mov word [rbp - 0x4e], 0
mov eax, dword [0x00404014]
lea ebx, [rax + 2]
mov eax, dword [rbp - 0x4c]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_inet_ntoa]
call rax
mov r9d, ebx
mov r8, rax
mov rdx, qword [rbp + 0x20]
lea rcx, str._nPinging__s___s__with__d_bytes_of_data:_n
call sym.printf
mov dword [rbp - 4], 0
jmp 0x401ab6
cmp byte [rbp + 0x28], 0
je 0x401974
mov eax, dword [0x00404010]
add eax, 1
mov dword [0x00404010], eax
lea rdx, [rbp - 0x50]
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.SendRequest_unsigned_long_long__sockaddr_in_
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.WaitReply_unsigned_long_long_
mov dword [rbp - 0x2c], eax
cmp dword [rbp - 0x2c], 0xffffffff
jne 0x4019b5
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rcx, str.select___error:_d_n
call sym.printf
jmp 0x401ac5
cmp dword [rbp - 0x2c], 0
jne 0x4019d0
add dword [rbp - 0x18], 1
lea rcx, str._nRequest_time_out.
call sym.printf
jmp 0x401ab2
lea rcx, [rbp - 0x61]
lea rdx, [rbp - 0x60]
mov rax, qword [rbp - 0x20]
mov r8, rcx
mov rcx, rax
call sym.ReceiveReply_unsigned_long_long__sockaddr_in__unsigned_char_
mov dword [rbp - 0x30], eax
cmp dword [rbp - 0x30], 0
jne 0x401a05
lea rcx, [0x004050bf]
call sym.puts
add dword [rbp - 0x18], 1
jmp 0x401ab2
add dword [rbp - 0x14], 1
mov rax, qword [sym.imp.KERNEL32.dll_GetTickCount]
call rax
sub eax, dword [rbp - 0x30]
mov dword [rbp - 0x34], eax
mov eax, dword [rbp - 0xc]
cmp eax, dword [rbp - 0x34]
jae 0x401a26
mov eax, dword [rbp - 0x34]
mov dword [rbp - 0xc], eax
mov eax, dword [rbp - 8]
cmp eax, dword [rbp - 0x34]
jbe 0x401a34
mov eax, dword [rbp - 0x34]
mov dword [rbp - 8], eax
mov edx, dword [rbp - 0x10]
mov eax, dword [rbp - 0x34]
add eax, edx
mov dword [rbp - 0x10], eax
movzx eax, byte [rbp - 0x61]
movzx ebx, al
mov eax, dword [0x00404014]
lea esi, [rax + 2]
mov eax, dword [rbp - 0x5c]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_inet_ntoa]
call rax
mov rdx, rax
mov eax, dword [rbp - 0x34]
mov dword [rsp + 0x20], ebx
mov r9d, eax
mov r8d, esi
lea rcx, str._nReply_from__s:_bytes___d_time___ldms_TTL___d
call sym.printf
mov rax, qword [sym.imp.msvcrt.dll__kbhit]
call rax
test eax, eax
setne al
test al, al
je 0x401aa4
mov rax, qword [sym.imp.msvcrt.dll__getch]
call rax
mov byte [rbp - 0x35], al
cmp byte [rbp - 0x35], 2
sete al
test al, al
je 0x401ab2
jmp 0x401ac5
mov ecx, 0x3e8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
add dword [rbp - 4], 1
mov eax, dword [0x00404010]
cmp dword [rbp - 4], eax
jl 0x40195f
lea rcx, [0x00405101]
call sym.puts
mov eax, dword [rbp - 0x5c]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_inet_ntoa]
call rax
mov rdx, rax
lea rcx, str.Ping_statistics_for__s:_n
call sym.printf
pxor xmm0, xmm0
cvtsi2sd xmm0, dword [rbp - 0x18]
mov eax, dword [0x00404010]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
divsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
movss xmm1, dword [0x0040537c]
mulss xmm0, xmm1
cvtss2sd xmm2, xmm0
movq rax, xmm2
mov edx, dword [0x00404010]
mov r8d, dword [rbp - 0x18]
mov ecx, dword [rbp - 0x14]
mov qword [rsp + 0x20], rax
mov r9d, r8d
mov r8d, ecx
lea rcx, str._Packets:_Sent___d__Received___d__Lost___d___.f___loss___n
call sym.printf
cmp dword [rbp - 0x18], 0
jne 0x401b80
lea rcx, str.Approximate_round_trip_times_in_milli_seconds:
call sym.puts
mov esi, dword [0x00404010]
mov eax, dword [rbp - 0x10]
cdq
idiv esi
mov ecx, eax
mov edx, dword [rbp - 0xc]
mov eax, dword [rbp - 8]
mov r9d, ecx
mov r8d, edx
mov edx, eax
lea rcx, str._Mintime___dms__Maxtime___dms__Averagetime___dms_n
call sym.printf
lea rcx, [0x00405101]
call sym.puts
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov dword [rbp - 0x2c], eax
cmp dword [rbp - 0x2c], 0xffffffff
jne 0x401bbd
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
lea rcx, str.closesocket___error:_d_n
call sym.printf
nop
add rsp, 0xa0
pop rbx
pop rsi
pop rbp
ret