Function at 0x406c80
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Reference google public dns server
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64c
mov eax, dword [0x43c008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x5e8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x406cf6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov edx, str._nFailed_to_initialize_the_WinSock2_DLL_n
mov ecx, 0x43d520
call fcn.00408d10
push ecx
mov edx, str.error_code:
mov ecx, eax
call fcn.00408d10
add esp, 4
mov ecx, eax
call fcn.004074d0
push eax
call fcn.00409290
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409c84
mov esp, ebp
pop ebp
ret
push str.8.8.8.8
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
cmp edi, 0xffffffff
jne 0x406dcc
push str.8.8.8.8
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x406d67
mov eax, dword [eax + 0xc]
mov ebx, str._hops._n
mov eax, dword [eax]
mov edi, dword [eax]
push edi
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, str._nTracing_route_to
mov ecx, 0x43d470
mov esi, eax
call fcn.00408d10
mov edx, str.8.8.8.8
mov ecx, eax
call fcn.00408d10
mov edx, 0x438600
mov ecx, eax
call fcn.00408d10
mov edx, esi
mov ecx, eax
call fcn.00408d10
mov edx, 0x438328
jmp 0x406de5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov edx, str._nCould_not_resolve_the_host_name
mov ecx, 0x43d520
call fcn.00408d10
mov edx, str.8.8.8.8
mov ecx, eax
call fcn.00408d10
mov dl, 0xa
mov ecx, eax
call fcn.00408fc0
push ecx
mov edx, str.error_code:
mov ecx, eax
call fcn.00408d10
add esp, 4
mov ecx, eax
call fcn.004074d0
push eax
call fcn.00409290
add esp, 4
call dword [sym.imp.WS2_32.dll_WSACleanup]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409c84
mov esp, ebp
pop ebp
ret
mov edx, str.Tracing_route_to
mov ecx, 0x43d470
mov ebx, str._hops.
call fcn.00408d10
mov edx, str.8.8.8.8
mov ecx, eax
call fcn.00408d10
mov edx, str._with_a_maximum_of
mov ecx, eax
call fcn.00408d10
push 0x1e
mov ecx, eax
call fcn.004074d0
mov edx, ebx
mov ecx, eax
call fcn.00408d10
push eax
call fcn.00409290
add esp, 4
mov eax, 2
xorps xmm0, xmm0
movups xmmword [ebp - 0x448], xmm0
mov word [ebp - 0x448], ax
push 1
push 0
push 0
push 1
push 3
push eax
mov dword [ebp - 0x444], edi
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [ebp - 0x5f0], eax
cmp eax, 0xffffffff
jne 0x406e66
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov edx, str._nFailed_to_create_a_raw_socket_n
mov ecx, 0x43d520
call fcn.00408d10
jmp 0x406d92
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [ebp - 0x438]
push 4
push ecx
push 0x1006
push 0xffff
push eax
mov dword [ebp - 0x438], 0xbb8
call ebx
cmp eax, 0xffffffff
jne 0x406ed8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, str._nFailed_to_set_recv_timeout_n
push eax
mov ecx, 0x43d520
call fcn.00408d10
push ecx
mov edx, str.error_code:
mov ecx, eax
call fcn.00408d10
add esp, 4
mov ecx, eax
call fcn.004074d0
push eax
call fcn.00409290
add esp, 4
push dword [ebp - 0x5f0]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x406db2
push 0x400
xorps xmm0, xmm0
lea eax, [ebp - 0x430]
push 0
push eax
movups xmmword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x1c], xmm0
movq qword [ebp - 0xc], xmm0
call fcn.0040bfa0
add esp, 0xc
mov word [ebp - 0x2c], 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
movaps xmm0, xmmword [str.EEEEEEEEEEEEEEEE]
xor esi, esi
mov word [ebp - 0x28], ax
mov ecx, 0x1e
movups xmmword [ebp - 0x24], xmm0
mov dword [ebp - 0x5f4], 0
movups xmmword [ebp - 0x14], xmm0
mov dword [ebp - 0x5ec], 1
nop dword [eax + eax]
mov eax, ecx
dec ecx
mov dword [ebp - 0x600], ecx
test eax, eax
je 0x4071a4
push 4
lea eax, [ebp - 0x5ec]
push eax
push 4
push 0
push dword [ebp - 0x5f0]
call ebx
push 0
lea eax, [ebp - 0x618]
push 3
push eax
call fcn.0040b3bb
mov ecx, dword [0x43d470]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
add ecx, 0x43d470
push ecx
call eax
add esp, 0xc
mov ecx, 0x43d470
push dword [ebp - 0x5ec]
call fcn.004074d0
mov ecx, eax
call fcn.00406490
xor eax, eax
push esi
mov word [ebp - 0x2a], ax
call dword [sym.imp.WS2_32.dll_htons]
inc esi
lea edx, [ebp - 0x2c]
mov bx, ax
mov dword [ebp - 0x604], esi
mov word [ebp - 0x26], bx
xor esi, esi
mov edi, 0x14
movzx ecx, word [edx]
lea edx, [edx + 2]
add esi, ecx
sub edi, 1
jne 0x406fd2
mov ecx, esi
movzx eax, si
shr ecx, 0x10
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
not eax
mov word [ebp - 0x2a], ax
movzx eax, bx
mov dword [ebp - 0x5f8], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [ebp - 0x5f0]
push 0x10
mov dword [ebp - 0x5fc], eax
lea eax, [ebp - 0x448]
push eax
push edi
push 0x28
lea eax, [ebp - 0x2c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x4072d1
lea eax, [ebp - 0x434]
mov dword [ebp - 0x434], 0x10
push eax
lea eax, [ebp - 0x458]
push eax
push edi
push 0x400
lea eax, [ebp - 0x430]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edx, eax
cmp edx, 0xffffffff
je 0x407111
nop dword [eax + eax]
movzx ecx, byte [ebp - 0x430]
and ecx, 0xf
shl ecx, 2
lea eax, [ecx + 8]
cmp edx, eax
jl 0x4070de
lea esi, [ebp - 0x430]
add esi, ecx
mov al, byte [esi]
test al, al
jne 0x40709c
movzx edi, word [esi + 4]
movzx ebx, word [esi + 6]
jmp 0x4070b8
cmp al, 0xb
jne 0x4070de
lea eax, [ebp - 0x428]
add ecx, eax
movzx eax, byte [ecx]
and eax, 0xf
movzx edi, word [ecx + eax*4 + 4]
movzx ebx, word [ecx + eax*4 + 6]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp di, ax
jne 0x4070de
cmp bx, word [ebp - 0x5f8]
jne 0x4070de
mov al, byte [esi]
test al, al
je 0x4071e1
cmp al, 0xb
je 0x4071e1
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x458]
push eax
push 0
push 0x400
lea eax, [ebp - 0x430]
push eax
push dword [ebp - 0x5f0]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edx, eax
cmp edx, 0xffffffff
jne 0x407070
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x274c
jne 0x4072c5
push 0
lea eax, [ebp - 0x648]
push 9
push eax
call fcn.0040b3bb
mov ecx, dword [0x43d470]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
add ecx, 0x43d470
push ecx
call eax
add esp, 0xc
mov dl, 0x2a
mov ecx, 0x43d470
call fcn.00408fc0
mov dl, 9
mov ecx, eax
call fcn.00408fc0
mov edx, str.Request_timed_out.
mov ecx, eax
call fcn.00408d10
push eax
call fcn.00409290
mov ebx, dword [ebp - 0x5f4]
inc dword [ebp - 0x5ec]
add esp, 4
mov ecx, dword [ebp - 0x600]
test ebx, ebx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, dword [ebp - 0x604]
je 0x406f40
mov ecx, 0x43d470
mov edx, str._nTrace_complete._n
call fcn.00408d10
push eax
call fcn.00409290
add esp, 4
push dword [ebp - 0x5f0]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409c84
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
push 0
push 6
sub esi, dword [ebp - 0x5fc]
je 0x407234
lea eax, [ebp - 0x628]
push eax
call fcn.0040b3bb
mov ecx, dword [0x43d470]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
add ecx, 0x43d470
push ecx
call eax
add esp, 0xc
mov ecx, 0x43d470
push esi
call fcn.00407310
jmp 0x40726f
lea eax, [ebp - 0x638]
push eax
call fcn.0040b3bb
mov ecx, dword [0x43d470]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
add ecx, 0x43d470
push ecx
call eax
add esp, 0xc
mov edx, 0x438700
mov ecx, 0x43d470
call fcn.00408d10
mov edx, 0x4386fc
mov ecx, eax
call fcn.00408d10
mov ecx, eax
call fcn.00406490
cmp edi, dword [ebp - 0x444]
mov eax, 1
mov ebx, dword [ebp - 0x5f4]
cmove ebx, eax
push edi
mov dword [ebp - 0x5f4], ebx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov dl, 9
mov ecx, 0x43d470
mov esi, eax
call fcn.00408fc0
mov edx, esi
mov ecx, eax
call fcn.00408d10
push eax
call fcn.00409290
jmp 0x407181
call esi
mov edx, str._nFailed_to_call_recvfrom_n
jmp 0x406e9c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2751
jne 0x4071bc
push 0x2f74
mov ecx, 0x43d470
call fcn.004074d0
mov edx, str.Destination_host_unreachable._n
mov ecx, eax
call fcn.00408d10
mov ecx, eax
jmp 0x4071a9