Function at 0x401307
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Get hostname
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffa50
pushal
push 0x18e
lea eax, [ebp - 0x18e]
push eax
call sub.kernel32.dll_RtlZeroMemory
lea eax, [ebp - 0x18e]
push eax
push 0x202
call sub.ws2_32.dll_WSAStartup
or eax, eax
je 0x401341
call sub.kernel32.dll_GetLastError
jmp 0x4015ae
push 1
push 0
push 0
push 0
push 3
push 2
call sub.ws2_32.dll_WSASocketA
mov dword [ebp - 0x1a8], eax
cmp dword [ebp - 0x1a8], 0xffffffff
jne 0x401375
call sub.ws2_32.dll_WSAGetLastError
push str.Socket_error_
call fcn.00401190
jmp 0x4015a9
mov dword [ebp - 0x5b0], 1
push 4
lea eax, [ebp - 0x5b0]
push eax
push 2
push 0
push dword [ebp - 0x1a8]
call sub.ws2_32.dll_setsockopt
or eax, eax
je 0x4013d0
push str.setsockopt_IPPROTO_IP_error._r_n
call fcn.00401190
call sub.ws2_32.dll_WSAGetLastError
push eax
push str.WSAGetLastError:__d_r_n
lea eax, [ebp - 0x5a8]
push eax
call sub.user32.dll_wsprintfA
add esp, 0xc
lea eax, [ebp - 0x5a8]
push eax
call fcn.00401190
jmp 0x4015a9
push 0x400
lea eax, [ebp - 0x5a8]
push eax
call sub.kernel32.dll_RtlZeroMemory
push 0x400
lea eax, [ebp - 0x5a8]
push eax
call sub.ws2_32.dll_gethostname
lea eax, [ebp - 0x5a8]
push eax
call sub.ws2_32.dll_gethostbyname
cmp eax, 0
je 0x40159e
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [0x414194], ecx
push ecx
push 0x10
lea eax, [ebp - 0x1a0]
push eax
call sub.kernel32.dll_RtlZeroMemory
mov word [ebp - 0x1a0], 2
pop eax
mov dword [ebp - 0x19c], eax
push 0
call sub.ws2_32.dll_htons
mov word [ebp - 0x19e], ax
push 0x10
lea eax, [ebp - 0x1a0]
push eax
push dword [ebp - 0x1a8]
call sub.ws2_32.dll_bind
cmp eax, 0xffffffff
jne 0x401469
push str.bind_port_error._r_n
call fcn.00401190
jmp 0x40159e
mov dword [ebp - 0x5b0], 1
push 0x400
lea eax, [ebp - 0x5a8]
push eax
call sub.kernel32.dll_RtlZeroMemory
mov eax, 0x80000000
or eax, 1
or eax, 0x18000000
mov ecx, eax
push 0
push 0
lea eax, [ebp - 0x5ac]
push eax
push 0x400
lea eax, [ebp - 0x5a8]
push eax
push 4
lea eax, [ebp - 0x5b0]
push eax
push ecx
push dword [ebp - 0x1a8]
call sub.ws2_32.dll_WSAIoctl
cmp eax, 0
jae 0x4014d3
push str.failed_in_WSAIoctl__._r_n
call fcn.00401190
jmp 0x40159e
push 0x400
lea eax, [ebp - 0x5a8]
push eax
call sub.kernel32.dll_RtlZeroMemory
push 0
push 0x400
lea eax, [ebp - 0x5a8]
push eax
push dword [ebp - 0x1a8]
call sub.ws2_32.dll_recv
cmp eax, 0xffffffff
jne 0x401534
push str.Recvfrom_socket_error._r_n
call fcn.00401190
call sub.ws2_32.dll_WSAGetLastError
push eax
push str.WSAGetLastError:__d_r_n
lea eax, [ebp - 0x5a8]
push eax
call sub.user32.dll_wsprintfA
add esp, 0xc
lea eax, [ebp - 0x5a8]
push eax
call fcn.00401190
jmp 0x401591
or eax, eax
jne 0x401544
push str.recv_temparay_bytes._r_n
call fcn.00401190
jmp 0x401591
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x5ac]
push eax
lea eax, [ebp - 0x5a8]
push eax
call fcn.00401274
cmp eax, 0xffffffff
je 0x401591
mov edx, eax
add eax, 4
movzx eax, word [eax]
cmp eax, 0xffff
je 0x40157e
push str.Not_My_style__r_n
call fcn.00401190
jmp 0x401591
add edx, 8
push edx
call fcn.00401190
push 0x40316e
call fcn.00401190
cmp dword [0x414198], 1
je 0x4014d3
push dword [ebp - 0x1a8]
call sub.ws2_32.dll_closesocket
call sub.ws2_32.dll_WSACleanup
popal
leave
ret