Function at 0x1000290c
Capabilities:
Get hostname
Get networking parameters
Initialize winsock library
Reference google public dns server
Resolve dns
Send icmp echo request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
push ebx
push esi
push edi
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
lea ebx, [ecx + 8]
push ebx
mov dword [ebp - 0x24], ebx
call edi
cmp eax, 0xffffffff
je 0x10002934
test eax, eax
jne 0x10002bce
push 0x100
lea eax, [ebp - 0x1a0]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x1a0]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ecx, dword [eax + 0xc]
cmp dword [ecx], 0
je 0x10002bce
movsx eax, word [eax + 0xa]
push eax
push dword [ecx]
lea eax, [ebp - 0x28]
push eax
call fcn.10017fb0
add esp, 0xc
push 0x14
push dword [ebp - 0x28]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push ebx
call fcn.10017fb0
add esp, 0xc
push ebx
call fcn.1000288d
cmp eax, 1
je 0x10002bce
test eax, eax
jne 0x10002bce
and dword [ebp - 4], eax
xorps xmm0, xmm0
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0x248
push 0x40
movdqu xmmword [ebp - 0x20], xmm0
call ebx
mov esi, eax
mov dword [ebp - 4], 0x248
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.IPHLPAPI.DLL_GetNetworkParams]
cmp eax, 0x6f
jne 0x100029e1
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp - 4]
push 0x40
call ebx
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.IPHLPAPI.DLL_GetNetworkParams]
neg eax
sbb eax, eax
neg eax
je 0x10002a14
push eax
push str.0x02__GetNetworkParams_failed:_08x
call fcn.10001dcc
push str.8.8.8.8
lea eax, [ebp - 0x20]
push 0x10
push eax
call fcn.1001864a
add esp, 0x14
jmp 0x10002a56
lea eax, [esi + 0x110]
push eax
lea eax, [ebp - 0x20]
push 0x10
push eax
call fcn.1001864a
lea eax, [ebp - 0x20]
push eax
call fcn.10018710
add esp, 0x10
test eax, eax
je 0x10002a43
lea eax, [ebp - 0x20]
push eax
call fcn.1000288d
test eax, eax
jne 0x10002a56
push str.8.8.8.8
lea eax, [ebp - 0x20]
push 0x10
push eax
call fcn.1001864a
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
push str.0x02__DNS:_s
call fcn.10001dcc
pop ecx
pop ecx
lea eax, [ebp - 0x330]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10002a8c
push str.0x02__WSAStartup_failed.
call fcn.10001dcc
pop ecx
jmp 0x10002bce
lea eax, [ebp - 0x20]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x10002abf
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x10002ab8
lea eax, [ebp - 0x20]
push eax
push str.0x02__Invalid_IP_or_domain_name:__s
call fcn.10001dcc
pop ecx
jmp 0x10002a86
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov esi, dword [eax]
call dword [sym.imp.IPHLPAPI.DLL_IcmpCreateFile]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10002ad3
push str.0x02__Unable_to_open_ICMP_file.
jmp 0x10002a81
push 8
lea eax, [ebp - 0x10]
push 0
push eax
call fcn.10017e80
push 0x20
lea eax, [ebp - 0x9c]
mov byte [ebp - 0x10], 1
push 0x30
push eax
call fcn.10017e80
add esp, 0x18
mov dword [ebp - 8], 1
push 0xa
pop ecx
mov eax, ecx
dec ecx
mov dword [ebp - 0x2c], ecx
test eax, eax
je 0x10002bc1
push 0xbb8
push 0x3c
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x20
lea eax, [ebp - 0x9c]
push eax
push esi
push ebx
call dword [sym.imp.IPHLPAPI.DLL_IcmpSendEcho]
test eax, eax
je 0x10002b9c
push dword [ebp - 0x7c]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
movzx eax, byte [ebp - 0x10]
push eax
push str.0x02___d:_s
call fcn.10001dcc
mov byte [ebp - 0x40], 0
lea edi, [ebp - 0x3f]
xor eax, eax
add esp, 0xc
stosd dword es:[edi], eax
push 0x14
push dword [ebp - 0x7c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10017fb0
add esp, 0xc
lea eax, [ebp - 0x40]
push eax
call fcn.1000288d
cmp eax, 1
je 0x10002bae
cmp dword [ebp - 0x7c], esi
jne 0x10002b9c
push str.Trace_complete.
call fcn.10001dcc
xor eax, eax
pop ecx
mov dword [ebp - 8], eax
jmp 0x10002b9f
mov eax, dword [ebp - 8]
inc byte [ebp - 0x10]
test eax, eax
je 0x10002bc1
mov ecx, dword [ebp - 0x2c]
jmp 0x10002b01
push 0x14
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x24]
call fcn.10017fb0
add esp, 0xc
jmp 0x10002bce
push ebx
call dword [sym.imp.IPHLPAPI.DLL_IcmpCloseHandle]
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret