Function at 0x140001ea0
Capabilities:
Initialize winsock library
Resolve dns
Send icmp echo request
Terminate process

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2a8
movaps xmmword [rsp + 0x290], xmm6
mov r14d, ecx
mov r15, rdx
call dbg.__main
cmp r14d, 1
je 0x14000235a
jbe 0x1400022e8
mov rbp, qword [sym.imp.ucrtbase.dll_atoi]
xor r12d, r12d
mov ebx, 0x20
mov esi, 0xfa0
mov edi, 1
mov r13d, 4
jmp 0x140001f4c
movzx eax, byte [rdx + 1]
cmp al, 0x6e
je 0x1400021c8
jg 0x140002180
cmp al, 0x3f
je 0x14000235a
cmp al, 0x6c
jne 0x140002388
lea eax, [r14 - 1]
cmp eax, edi
je 0x140002371
lea eax, [rdi + 1]
mov rcx, qword [r15 + rax*8]
mov rdi, rax
call rbp
mov ebx, eax
test eax, eax
je 0x1400023d4
add edi, 1
cmp r14d, edi
jbe 0x140001f70
mov eax, edi
mov rdx, qword [r15 + rax*8]
movzx eax, byte [rdx]
and eax, 0xfffffffd
cmp al, 0x2d
je 0x140001f00
test r12, r12
jne 0x1400023a8
add edi, 1
mov r12, rdx
cmp r14d, edi
ja 0x140001f4c
test r12, r12
je 0x1400022e8
lea rdx, [rsp + 0xf0]
mov ecx, 0x202
call qword [sym.imp.ws2_32.dll_WSAStartup]
mov dword [rsp + 0x58], eax
test eax, eax
jne 0x1400022b7
mov rcx, r12
call qword [sym.imp.ws2_32.dll_gethostbyname]
test rax, rax
je 0x1400022cf
mov rax, qword [rax + 0x18]
lea r15, [rsp + 0x80]
mov rax, qword [rax]
mov ecx, dword [rax]
call qword [sym.imp.ws2_32.dll_inet_ntoa]
mov rcx, r15
mov rdx, rax
call qword [sym.imp.ucrtbase.dll_strcpy]
mov rcx, r15
call qword [sym.imp.ws2_32.dll_inet_addr]
mov edi, eax
cmp eax, 0xffffffff
je 0x14000233e
call sym.IcmpCreateFile
mov edx, ebx
mov ecx, 1
mov rbp, rax
call qword [sym.imp.ucrtbase.dll_calloc]
lea ecx, [rbx + 0x30]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x4c], ecx
call qword [sym.imp.ucrtbase.dll_malloc]
mov r14, rax
test rax, rax
je 0x1400023eb
mov r9d, ebx
mov r8, r15
lea rcx, str.Pinging__s___s__with__d_bytes_of_data:_n
mov rdx, r12
call dbg.printf
lea ecx, [r13 - 1]
movzx eax, bx
mov dword [rsp + 0x54], esi
mov dword [rsp + 0x50], ecx
mov ecx, 0x7fffffff
mov rsi, rbp
pxor xmm6, xmm6
mov dword [rsp + 0x6c], ebx
mov rbp, qword [rsp + 0x60]
xor r12d, r12d
mov ebx, eax
mov qword [rsp + 0x60], r15
mov r15d, ecx
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x44], r13d
jmp 0x14000210e
mov r8d, dword [r14 + 8]
lea r13, [rsp + 0x70]
test r8d, r8d
je 0x140002208
lea rdx, str._ld
mov rcx, r13
call sym.sprintf.constprop.0
movzx eax, byte [r14 + 0x18]
mov r8d, dword [rsp + 0x6c]
mov r9, r13
lea rcx, str.Reply_from__s:_bytes_d_time_sms_TTL_d_n
mov rdx, qword [rsp + 0x60]
mov dword [rsp + 0x20], eax
call dbg.printf
mov eax, dword [r14 + 8]
mov ecx, dword [rsp + 0x48]
pxor xmm0, xmm0
cvtsi2ss xmm0, rax
cmp ecx, eax
cmovb ecx, eax
cmp r15d, eax
cmova r15d, eax
add dword [rsp + 0x5c], 1
mov dword [rsp + 0x48], ecx
addss xmm6, xmm0
cmp dword [rsp + 0x50], r12d
jbe 0x1400020ff
mov ecx, 0x3e8
call qword [sym.imp.kernel32.dll_Sleep]
add r12d, 1
cmp dword [rsp + 0x44], r12d
je 0x14000222e
mov eax, dword [rsp + 0x54]
mov r9d, ebx
mov r8, rbp
mov edx, edi
mov r13, qword gs:[0x30]
mov dword [r13 + 0x68], 0
mov rcx, rsi
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x4c]
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], 0
call sym.IcmpSendEcho
test eax, eax
jne 0x140002080
cmp dword [r13 + 0x68], 0x2b02
je 0x14000221c
lea rcx, str.PING:_transmit_failed._General_failure.
call qword [sym.imp.ucrtbase.dll_puts]
add dword [rsp + 0x68], 1
jmp 0x1400020ed
cmp al, 0x77
jne 0x140002388
lea eax, [r14 - 1]
cmp eax, edi
je 0x140002371
lea eax, [rdi + 1]
mov rcx, qword [r15 + rax*8]
mov rdi, rax
call rbp
mov esi, eax
test eax, eax
jne 0x140001f44
lea rcx, str.Bad_value_for_option__w._n
call dbg.printf
mov ecx, 1
call qword [sym.imp.ucrtbase.dll_exit]
nop dword [rax]
lea eax, [r14 - 1]
cmp eax, edi
je 0x140002371
lea eax, [rdi + 1]
mov rcx, qword [r15 + rax*8]
mov rdi, rax
call rbp
mov r13d, eax
test eax, eax
jne 0x140001f44
lea rcx, str.Bad_value_for_option__n__valid_range_is_from_1_to_4294967295._n
call dbg.printf
mov ecx, 1
call qword [sym.imp.ucrtbase.dll_exit]
nop word [rax + rax]
mov eax, 0x313c
mov byte [rsp + 0x72], 0
mov word [rsp + 0x70], ax
jmp 0x1400020a1
lea rcx, str.Request_timed_out.
call qword [sym.imp.ucrtbase.dll_puts]
jmp 0x140002170
mov rdx, qword [rsp + 0x60]
mov r13d, dword [rsp + 0x44]
lea rcx, str._nPing_statistics_for__s_n
call dbg.printf
mov r9d, dword [rsp + 0x68]
mov eax, r13d
mov edx, r13d
pxor xmm0, xmm0
pxor xmm1, xmm1
mov esi, dword [rsp + 0x5c]
lea rcx, str._tPackets:_Sent___d__Received___d__Lost___d___.0f___loss__n
cvtsi2ss xmm0, r9d
cvtsi2ss xmm1, rax
mov r8d, esi
divss xmm0, xmm1
mulss xmm0, dword [0x1400043f0]
cvtss2sd xmm0, xmm0
movsd qword [rsp + 0x20], xmm0
call dbg.printf
test esi, esi
jne 0x1400022fe
mov rcx, r14
call qword [sym.imp.ucrtbase.dll_free]
mov eax, dword [rsp + 0x58]
movaps xmm6, xmmword [rsp + 0x290]
add rsp, 0x2a8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov edx, eax
lea rcx, str.WSAStartup_failed:__d_n
call dbg.printf
mov dword [rsp + 0x58], 1
jmp 0x140002297
mov rdx, r12
lea rcx, str.Ping_request_could_not_find_host__s._Please_check_the_name_and_try_again._n
call dbg.printf
mov dword [rsp + 0x58], 1
jmp 0x140002297
lea rcx, str.Pass_a_host_name._n
call dbg.printf
mov dword [rsp + 0x58], 1
jmp 0x140002297
pxor xmm0, xmm0
lea rcx, str.Approximate_round_trip_times_in_milli_seconds:_n
cvtsi2ss xmm0, dword [rsp + 0x5c]
divss xmm6, xmm0
call dbg.printf
mov r8d, dword [rsp + 0x48]
pxor xmm3, xmm3
mov edx, r15d
lea rcx, str._tMinimum___dms__Maximum___dms__Average___.0fms_n
cvtss2sd xmm3, xmm6
movq r9, xmm3
call dbg.printf
jmp 0x14000228e
mov rdx, r12
lea rcx, str.Could_not_get_IP_address_of_host__s.
call dbg.printf
mov dword [rsp + 0x58], 1
jmp 0x140002297
lea rcx, str.Usage:_ping___n_count____w_timeout____l_buffer_length__target_name_n_nOptions:_n_____n__Number_of_echo_requests_to_send._n_____w__Timeout_in_milliseconds_to_wait_for_each_reply._n_____l__Length_of_send_buffer._n
call dbg.printf
mov ecx, 1
call qword [sym.imp.ucrtbase.dll_exit]
lea rcx, str.Missing_value_for_option__s_n
call dbg.printf
mov ecx, 1
call qword [sym.imp.ucrtbase.dll_exit]
lea rcx, str.Usage:_ping___n_count____w_timeout____l_buffer_length__target_name_n_nOptions:_n_____n__Number_of_echo_requests_to_send._n_____w__Timeout_in_milliseconds_to_wait_for_each_reply._n_____l__Length_of_send_buffer._n
call dbg.printf
test byte [section..data], 1
jne 0x1400023b6
mov ecx, 1
call qword [sym.imp.ucrtbase.dll_exit]
lea rcx, str.Bad_argument__s_n
call dbg.printf
jmp 0x14000239d
lea r9, str.this_command_currently_only_supports_the__n___w_and__l_parameters._n
lea r8, [0x1400043eb]
xor ecx, ecx
lea rdx, section..data
call sym.wine_dbg_log.constprop.0
jmp 0x14000239d
lea rcx, str.Bad_value_for_option__l._n
call dbg.printf
mov ecx, 1
call qword [sym.imp.ucrtbase.dll_exit]
lea rcx, str.Unable_to_allocate_memory_to_reply_buffer._n
call dbg.printf
mov dword [rsp + 0x58], 1
jmp 0x140002297