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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x260
mov esi, dword [ecx]
mov edi, dword [ecx + 4]
call fcn.00401ae0
cmp esi, 1
je 0x4021a6
jbe 0x40212b
mov dword [ebp - 0x218], 0
mov ebx, 1
mov dword [ebp - 0x224], 0x20
mov dword [ebp - 0x220], 0xfa0
mov dword [ebp - 0x21c], 4
jmp 0x401c42
movzx eax, byte [edx + 1]
cmp al, 0x6e
je 0x401f78
jg 0x401f28
cmp al, 0x3f
je 0x4021a6
cmp al, 0x6c
jne 0x4021bf
lea eax, [esi - 1]
cmp eax, ebx
je 0x4021f3
mov eax, dword [edi + ecx + 4]
add ebx, 1
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_atoi]
mov dword [ebp - 0x224], eax
test eax, eax
je 0x402234
add ebx, 1
cmp ebx, esi
jae 0x401c71
mov edx, dword [edi + ebx*4]
lea ecx, [ebx*4]
movzx eax, byte [edx]
and eax, 0xfffffffd
cmp al, 0x2d
je 0x401bf0
mov eax, dword [ebp - 0x218]
test eax, eax
jne 0x4021e1
add ebx, 1
mov dword [ebp - 0x218], edx
cmp ebx, esi
jb 0x401c42
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x40212b
lea eax, [ebp - 0x1a0]
mov dword [esp], 0x202
mov dword [esp + 4], eax
call dword [sym.imp.ws2_32.dll_WSAStartup]
sub esp, 8
mov dword [ebp - 0x248], eax
test eax, eax
jne 0x402091
mov eax, dword [ebp - 0x218]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_gethostbyname]
push edi
test eax, eax
je 0x402110
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_inet_ntoa]
push ebx
mov dword [esp + 4], eax
lea eax, [ebp - 0x204]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcpy]
lea eax, [ebp - 0x204]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_inet_addr]
push esi
mov dword [ebp - 0x230], eax
add eax, 1
je 0x40213c
call sub.iphlpapi.dll_IcmpCreateFile
mov esi, dword [ebp - 0x224]
mov dword [ebp - 0x234], eax
mov dword [esp], 1
mov dword [esp + 4], esi
call dword [sym.imp.ucrtbase.dll_calloc]
mov dword [ebp - 0x238], eax
lea eax, [esi + 0x24]
mov dword [ebp - 0x23c], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
test eax, eax
je 0x40224d
mov edi, dword [ebp - 0x224]
lea eax, [ebp - 0x204]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edi
mov eax, dword [ebp - 0x218]
mov dword [esp], str.Pinging__s___s__with__d_bytes_of_data:_n
mov dword [esp + 4], eax
call fcn.00401000
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x402157
movzx ecx, di
sub eax, 1
xor ebx, ebx
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x240], ecx
xor ecx, ecx
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x228], ecx
mov dword [ebp - 0x250], ecx
mov dword [ebp - 0x24c], ecx
mov dword [ebp - 0x218], 0x7fffffff
jmp 0x401e98
mov eax, dword [esi + 8]
test eax, eax
je 0x401fc0
lea edi, [ebp - 0x214]
mov dword [esp + 8], eax
mov dword [esp + 4], str._ld
mov dword [esp], edi
call fcn.00401050
movzx eax, byte [esi + 0x14]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x224]
mov dword [esp], str.Reply_from__s:_bytes_d_time_sms_TTL_d_n
mov dword [esp + 8], eax
lea eax, [ebp - 0x204]
mov dword [esp + 4], eax
call fcn.00401000
mov eax, dword [esi + 8]
pxor xmm0, xmm0
pxor xmm1, xmm1
mov ecx, dword [ebp - 0x228]
mov edi, dword [ebp - 0x218]
movzx edx, ax
cmp ecx, eax
cvtsi2ss xmm1, edx
cmovb ecx, eax
cmp edi, eax
cmova edi, eax
shr eax, 0x10
cvtsi2ss xmm0, eax
mov dword [ebp - 0x228], ecx
mulss xmm0, dword [0x4043dc]
mov dword [ebp - 0x218], edi
add dword [ebp - 0x24c], 1
addss xmm0, xmm1
addss xmm0, dword [ebp - 0x22c]
movss dword [ebp - 0x22c], xmm0
mov eax, dword [ebp - 0x244]
cmp ebx, eax
jae 0x401e89
mov dword [esp], 0x3e8
call dword [sym.imp.kernel32.dll_Sleep]
sub esp, 4
add ebx, 1
cmp dword [ebp - 0x21c], ebx
je 0x401ff0
mov eax, dword [ebp - 0x220]
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x23c]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x240]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x238]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x230]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x234]
mov dword [esp], eax
call sub.iphlpapi.dll_IcmpSendEcho
sub esp, 0x20
test eax, eax
jne 0x401dc0
cmp dword [edi + 0x34], 0x2b02
je 0x401fde
mov dword [esp], str.PING:_transmit_failed._General_failure.
call dword [sym.imp.ucrtbase.dll_puts]
add dword [ebp - 0x250], 1
jmp 0x401e6f
cmp al, 0x77
jne 0x4021bf
lea eax, [esi - 1]
cmp eax, ebx
je 0x4021f3
mov eax, dword [edi + ecx + 4]
add ebx, 1
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_atoi]
mov dword [ebp - 0x220], eax
test eax, eax
jne 0x401c3b
mov dword [esp], str.Bad_value_for_option__w._n
call fcn.00401000
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
lea esi, [esi]
lea eax, [esi - 1]
cmp eax, ebx
je 0x4021f3
mov eax, dword [edi + ecx + 4]
add ebx, 1
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_atoi]
mov dword [ebp - 0x21c], eax
test eax, eax
jne 0x401c3b
mov dword [esp], str.Bad_value_for_option__n__valid_range_is_from_1_to_4294967295._n
call fcn.00401000
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
lea esi, [esi]
mov edx, 0x313c
mov byte [ebp - 0x212], 0
lea edi, [ebp - 0x214]
mov word [ebp - 0x214], dx
jmp 0x401de5
mov dword [esp], str.Request_timed_out.
call dword [sym.imp.ucrtbase.dll_puts]
jmp 0x401f17
lea eax, [ebp - 0x204]
mov dword [esp], str._nPing_statistics_for__s_n
mov dword [esp + 4], eax
call fcn.00401000
mov ecx, dword [ebp - 0x21c]
pxor xmm1, xmm1
pxor xmm2, xmm2
mov edi, dword [ebp - 0x250]
pxor xmm0, xmm0
mov edx, ecx
movzx eax, cx
shr edx, 0x10
cvtsi2ss xmm2, eax
mov dword [esp + 0xc], edi
cvtsi2ss xmm1, edx
mulss xmm1, dword [0x4043dc]
cvtsi2ss xmm0, edi
addss xmm1, xmm2
divss xmm0, xmm1
mulss xmm0, dword [0x4043e0]
cvtss2sd xmm0, xmm0
movsd qword [esp + 0x10], xmm0
mov edi, dword [ebp - 0x24c]
mov dword [esp + 4], ecx
mov dword [esp], str._tPackets:_Sent___d__Received___d__Lost___d___.0f___loss__n
mov dword [esp + 8], edi
call fcn.00401000
test edi, edi
jne 0x4020ad
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x248]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 4], eax
mov dword [esp], str.WSAStartup_failed:__d_n
call fcn.00401000
mov dword [ebp - 0x248], 1
jmp 0x40207f
pxor xmm1, xmm1
cvtsi2ss xmm1, dword [ebp - 0x24c]
movss xmm0, dword [ebp - 0x22c]
divss xmm0, xmm1
movss dword [ebp - 0x21c], xmm0
mov dword [esp], str.Approximate_round_trip_times_in_milli_seconds:_n
call fcn.00401000
movss xmm0, dword [ebp - 0x21c]
cvtss2sd xmm0, xmm0
movsd qword [esp + 0xc], xmm0
mov eax, dword [ebp - 0x228]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x218]
mov dword [esp], str._tMinimum___dms__Maximum___dms__Average___.0fms_n
mov dword [esp + 4], eax
call fcn.00401000
jmp 0x402076
mov eax, dword [ebp - 0x218]
mov dword [esp], str.Ping_request_could_not_find_host__s._Please_check_the_name_and_try_again._n
mov dword [esp + 4], eax
call fcn.00401000
jmp 0x4020a1
mov dword [esp], str.Pass_a_host_name._n
call fcn.00401000
jmp 0x4020a1
mov eax, dword [ebp - 0x218]
mov dword [esp], str.Could_not_get_IP_address_of_host__s.
mov dword [esp + 4], eax
call fcn.00401000
jmp 0x4020a1
lea eax, [ebp - 0x204]
mov dword [esp], str._nPing_statistics_for__s_n
mov dword [esp + 4], eax
call fcn.00401000
pxor xmm0, xmm0
divss xmm0, xmm0
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [esp], str._tPackets:_Sent___d__Received___d__Lost___d___.0f___loss__n
mulss xmm0, dword [0x4043e0]
cvtss2sd xmm0, xmm0
movsd qword [esp + 0x10], xmm0
call fcn.00401000
jmp 0x402076
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._n
call fcn.00401000
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_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._n
call fcn.00401000
test byte [section..data], 1
jne 0x402210
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
mov dword [esp + 4], edx
mov dword [esp], str.Bad_argument__s_n
call fcn.00401000
jmp 0x4021d4
mov dword [esp + 4], edx
mov dword [esp], str.Missing_value_for_option__s_n
call fcn.00401000
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
xor eax, eax
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], 0x403000
mov dword [esp], eax
call fcn.00401100
jmp 0x4021d4
mov dword [esp], str.Bad_value_for_option__l._n
call fcn.00401000
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
mov dword [esp], str.Unable_to_allocate_memory_to_reply_buffer._n
call fcn.00401000
jmp 0x4020a1