Function at 0x4030e0
Capabilities:
Get process heap flags
Initialize winsock library
Resolve dns
Send icmp echo request

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x288
mov eax, dword [ecx]
mov esi, dword [ecx + 4]
mov edi, eax
mov dword [ebp - 0x238], eax
call dbg.__main
cmp edi, 1
je 0x4034a4
jbe 0x40369d
mov eax, dword [ebp - 0x238]
xor edi, edi
mov dword [ebp - 0x244], 0x20
mov dword [ebp - 0x240], 0xfa0
mov ebx, 1
mov dword [ebp - 0x23c], 4
sub eax, 1
mov dword [ebp - 0x230], eax
mov edx, dword [esi + ebx*4]
lea ecx, [ebx*4]
movzx eax, byte [edx]
and eax, 0xfffffffd
cmp al, 0x2d
jne 0x4031c0
movzx eax, byte [edx + 1]
cmp al, 0x6c
je 0x403522
jle 0x4034a0
cmp al, 0x6e
je 0x4034e1
cmp al, 0x77
jne 0x4034bc
cmp dword [ebp - 0x230], ebx
je 0x403748
mov eax, dword [esi + ecx + 4]
add ebx, 1
mov dword [esp], eax
call sym._atoi
test eax, eax
mov dword [ebp - 0x240], eax
jne 0x4031ca
mov dword [esp], str.Bad_value_for_option__w.
call sym._puts
mov dword [esp], 1
call sym._exit
nop
test edi, edi
jne 0x403733
mov edi, edx
add ebx, 1
cmp ebx, dword [ebp - 0x238]
jb 0x40314c
test edi, edi
je 0x40369d
lea eax, [ebp - 0x1a8]
mov dword [esp], 0x202
mov dword [esp + 4], eax
call sym._WSAStartup_8
test eax, eax
push esi
mov dword [ebp - 0x26c], eax
push esi
jne 0x40367e
mov dword [esp], edi
call sym._gethostbyname_4
test eax, eax
push ebx
je 0x40358c
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp], eax
call sym._inet_ntoa_4
push edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x20c]
mov dword [esp], eax
call sym._strcpy
lea eax, [ebp - 0x20c]
mov dword [esp], eax
call sym._inet_addr_4
mov dword [ebp - 0x238], eax
add eax, 1
push ecx
je 0x4036f9
call sym._IcmpCreateFile_0
mov ebx, dword [ebp - 0x244]
mov dword [esp + 4], 8
mov dword [ebp - 0x250], eax
mov eax, dword fs:[0x18]
mov dword [esp + 8], ebx
mov esi, eax
mov dword [ebp - 0x268], eax
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym._HeapAlloc_12
mov dword [ebp - 0x258], eax
mov eax, ebx
sub esp, 0xc
add eax, 0x24
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [ebp - 0x254], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym._HeapAlloc_12
sub esp, 0xc
test eax, eax
mov esi, eax
je 0x403718
mov eax, dword [ebp - 0x244]
lea ecx, [ebp - 0x20c]
mov dword [esp + 4], edi
mov dword [esp], str.Pinging__s___s__with__d_bytes_of_data:_n
xor ebx, ebx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call sym._printf
movzx eax, word [ebp - 0x244]
fldz
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x274], 0
mov dword [ebp - 0x270], 0
fstp dword [ebp - 0x24c]
mov dword [ebp - 0x230], 0x7fffffff
mov edi, dword [ebp - 0x268]
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp - 0x23c]
sub eax, 1
mov dword [ebp - 0x260], eax
jmp 0x403418
mov eax, dword [esi + 8]
test eax, eax
je 0x4035b8
lea edx, [ebp - 0x21c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4052c8
mov dword [esp], edx
mov dword [ebp - 0x268], edx
call sym._sprintf
mov edx, dword [ebp - 0x268]
movzx eax, byte [esi + 0x14]
mov dword [esp + 0xc], edx
mov dword [esp], str.Reply_from__s:_bytes_d_time_sms_TTL_d_n
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x244]
mov dword [esp + 8], eax
lea eax, [ebp - 0x20c]
mov dword [esp + 4], eax
call sym._printf
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 0x248]
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x268], eax
cmp eax, ecx
fild qword [ebp - 0x268]
cmova ecx, eax
mov dword [ebp - 0x248], ecx
mov ecx, dword [ebp - 0x230]
fadd dword [ebp - 0x24c]
cmp eax, ecx
cmovb ecx, eax
add dword [ebp - 0x270], 1
mov dword [ebp - 0x230], ecx
fstp dword [ebp - 0x24c]
cmp dword [ebp - 0x260], ebx
jbe 0x403409
mov dword [esp], 0x3e8
call sym._Sleep_4
push eax
add ebx, 1
cmp dword [ebp - 0x23c], ebx
je 0x4035e4
mov eax, dword [ebp - 0x240]
mov dword [edi + 0x34], 0
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x254]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x25c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x258]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x238]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x250]
mov dword [esp], eax
call sym._IcmpSendEcho_32
sub esp, 0x20
test eax, eax
jne 0x403349
cmp dword [edi + 0x34], 0x2b02
je 0x4035d3
mov dword [esp], str.PING:_transmit_failed._General_failure.
call sym._puts
add dword [ebp - 0x274], 1
jmp 0x4033f4
cmp al, 0x3f
jne 0x4034bc
mov dword [esp], 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.
call sym._puts
mov dword [esp], 1
call sym._exit
mov dword [esp], 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.
call sym._puts
test byte [0x404004], 1
jne 0x403563
mov dword [esp], 1
call sym._exit
cmp dword [ebp - 0x230], ebx
je 0x403748
mov eax, dword [esi + ecx + 4]
add ebx, 1
mov dword [esp], eax
call sym._atoi
test eax, eax
mov dword [ebp - 0x23c], eax
jne 0x4031ca
mov dword [esp], str.Bad_value_for_option__n__valid_range_is_from_1_to_4294967295.
call sym._puts
mov dword [esp], 1
call sym._exit
cmp dword [ebp - 0x230], ebx
je 0x403748
mov eax, dword [esi + ecx + 4]
add ebx, 1
mov dword [esp], eax
call sym._atoi
test eax, eax
mov dword [ebp - 0x244], eax
jne 0x4031ca
mov dword [esp], str.Bad_value_for_option__l.
call sym._puts
mov dword [esp], 1
call sym._exit
mov dword [esp + 0xc], str.this_command_currently_only_supports_the__n___w_and__l_parameters._n
mov dword [esp + 8], str.main
mov dword [esp + 4], 0x404004
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x4034d5
mov dword [esp + 4], edi
mov dword [esp], str.Ping_request_could_not_find_host__s._Please_check_the_name_and_try_again._n
call sym._printf
mov dword [ebp - 0x26c], 1
mov eax, dword [ebp - 0x26c]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
lea edx, [ebp - 0x21c]
mov word [ebp - 0x21c], 0x313c
mov byte [ebp - 0x21a], 0
jmp 0x40337a
mov dword [esp], str.Request_timed_out.
call sym._puts
jmp 0x40348f
lea eax, [ebp - 0x20c]
mov dword [esp], str._nPing_statistics_for__s_n
mov dword [esp + 4], eax
call sym._printf
mov edi, dword [ebp - 0x274]
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x234], 0
mov dword [esp], str._tPackets:_Sent___d__Received___d__Lost___d___.0f___loss__n
mov dword [ebp - 0x238], edi
mov dword [esp + 0xc], edi
fild dword [ebp - 0x238]
mov dword [ebp - 0x238], eax
mov edi, dword [ebp - 0x270]
mov dword [esp + 4], eax
fild qword [ebp - 0x238]
fdivp st(1)
mov dword [esp + 8], edi
fmul dword [0x4053f8]
fstp qword [esp + 0x10]
call sym._printf
test edi, edi
jne 0x4036b8
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym._HeapFree_12
sub esp, 0xc
jmp 0x4035a6
mov dword [esp + 4], eax
mov dword [esp], str.WSAStartup_failed:__d_n
call sym._printf
mov dword [ebp - 0x26c], 1
jmp 0x4035a6
mov dword [esp], str.Pass_a_host_name.
call sym._puts
mov dword [ebp - 0x26c], 1
jmp 0x4035a6
mov dword [esp], str.Approximate_round_trip_times_in_milli_seconds:
call sym._puts
fild dword [ebp - 0x270]
mov eax, dword [ebp - 0x248]
mov dword [esp], str._tMinimum___dms__Maximum___dms__Average___.0fms_n
fdivr dword [ebp - 0x24c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x230]
mov dword [esp + 4], eax
fstp qword [esp + 0xc]
call sym._printf
jmp 0x403656
mov dword [esp + 4], edi
mov dword [esp], str.Could_not_get_IP_address_of_host__s.
call sym._printf
mov dword [ebp - 0x26c], 1
jmp 0x4035a6
mov dword [esp], str.Unable_to_allocate_memory_to_reply_buffer.
call sym._puts
mov dword [ebp - 0x26c], 1
jmp 0x4035a6
mov dword [esp + 4], edx
mov dword [esp], str.Bad_argument__s_n
call sym._printf
jmp 0x4034d5
mov dword [esp + 4], edx
mov dword [esp], str.Missing_value_for_option__s_n
call sym._printf
mov dword [esp], 1
call sym._exit
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop