Function at 0x4040d0
Capabilities:
Create tcp socket
Create udp socket
Get socket status
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
mov eax, 0x11dc
call fcn.0042fee0
mov eax, dword [0x454314]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10ac], eax
cmp eax, 0xffffffff
jne 0x4043b7
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x404126
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 0x10ac]
push eax
call fcn.0041b8c0
add esp, 0xc
push 0x7f
xorps xmm0, xmm0
mov byte [ebp - 0x24], 0
lea eax, [ebp - 0xa7]
movq qword [ebp - 0x13], xmm0
push 0
push eax
movdqu xmmword [ebp - 0x23], xmm0
mov dword [ebp - 0xb], 0
mov word [ebp - 7], 0
mov byte [ebp - 5], 0
mov byte [ebp - 0xa8], 0
call fcn.00423d50
push 0x7ff
lea eax, [ebp - 0x8a7]
push 0
push eax
call fcn.00423d50
push 0x7ff
lea eax, [ebp - 0x10a7]
mov byte [ebp - 0x10a8], 0
push 0
push eax
call fcn.00423d50
add esp, 0x24
lea edx, [ebp - 0xa8]
mov ecx, esi
call fcn.00403d10
lea edx, [ebp - 0xa8]
mov dword [ebp - 0x10b0], 1
mov ebx, eax
mov dword [ebp - 0x8a8], 0x10000
mov dword [ebp - 0x8a4], pe_nt_image_headers32
mov esi, edx
mov dword [ebp - 0x8a0], 0
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x4041d0
lea edi, [ebp - 0x89c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4041e0
mov ecx, edx
lea eax, [ebx + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp eax, 0x800
jae 0x40440c
lea ecx, [eax + 2]
mov word [ebp + eax - 0x8a8], pe_nt_image_headers32
cmp ecx, 0x800
jae 0x40440c
xorps xmm0, xmm0
mov byte [ebp + ecx - 0x8a8], 0
push str.8.8.8.8
mov byte [ebp + eax - 0x8a5], 1
add ebx, 0x10
movdqu xmmword [ebp - 0x10c8], xmm0
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10c4], eax
mov eax, 2
push 0x35
mov word [ebp - 0x10c8], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0
push 2
push 2
mov word [ebp - 0x10c6], ax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
lea eax, [ebp - 0x10b0]
push eax
push 0x8004667e
push esi
mov dword [ebp - 0x11d4], esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x10
lea eax, [ebp - 0x10c8]
push eax
push 0
push ebx
lea eax, [ebp - 0x8a8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_sendto]
lea eax, [ebp - 0x10b8]
mov dword [ebp - 0x11cc], esi
push eax
push 0
push 0
lea eax, [ebp - 0x11d0]
mov dword [ebp - 0x11d0], 1
push eax
lea eax, [esi + 1]
mov dword [ebp - 0x10b8], 5
push eax
mov dword [ebp - 0x10b4], 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x4043f5
test eax, eax
je 0x4043f5
lea eax, [ebp - 0x11d0]
push eax
push esi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x4043ee
push 0
push 0
push 0
push 0x800
lea eax, [ebp - 0x10a8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
cmp ebx, edi
jge 0x4043ee
mov esi, 0xc
jmp 0x404340
mov cl, byte [ebp + ebx - 0x10a5]
mov dl, byte [ebp + ebx - 0x109d]
cmp cl, 1
jne 0x4043c8
movzx eax, byte [ebp + ebx - 0x10a7]
cmp eax, esi
jne 0x4043d8
cmp byte [ebp + ebx - 0x10a3], cl
jne 0x4043d8
movzx eax, byte [ebp + ebx - 0x1099]
push eax
movzx eax, byte [ebp + ebx - 0x109a]
push eax
movzx eax, byte [ebp + ebx - 0x109b]
push eax
movzx eax, byte [ebp + ebx - 0x109c]
push eax
lea eax, [ebp - 0x24]
push str._d._d._d._d
push eax
call fcn.00418e60
add esp, 0x18
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebp - 0x11d4]
mov esi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418e51
mov esp, ebp
pop ebp
ret
cmp cl, 5
jne 0x4043d8
lea eax, [ebx + 0xc]
mov dword [ebp - 0x11d8], eax
mov esi, eax
add ebx, 0xc
movzx eax, dl
add ebx, eax
cmp ebx, edi
jl 0x404340
mov esi, dword [ebp - 0x11d4]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10ac]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00418e51
mov esp, ebp
pop ebp
ret
call fcn.00419e99
int3