Function at 0x40c8c6
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10670
call fcn.0040fc90
and dword [ebp - 0x10424], 0
and dword [ebp - 0x1065c], 0
and dword [ebp - 0x10658], 0
and dword [ebp - 0x10654], 0
or dword [ebp - 4], 0xffffffff
mov eax, dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov dword [ebp - 0x40c], eax
lea eax, [ebp - 0x105b8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40c91e
jmp 0x40cb59
push 0x10
push 0
lea eax, [ebp - 0x41c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
mov word [ebp - 0x41c], ax
push 0x10
push 0
lea eax, [ebp - 0x1066c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
mov word [ebp - 0x1066c], ax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10668], eax
push 1
push 3
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x40c986
jmp 0x40cb59
mov dword [ebp - 0x10654], 0x80
push 4
lea eax, [ebp - 0x10654]
push eax
push 4
push 0
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x10
lea eax, [ebp - 0x41c]
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40c9c7
jmp 0x40cb59
push 0x400
push 0
lea eax, [ebp - 0x408]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x14
push 0
lea eax, [ebp - 0x105cc]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0x105bc], eax
mov dword [ebp - 0x1065c], 0x80
lea eax, [ebp - 0x105cc]
push eax
lea eax, [ebp - 0x1065c]
push eax
lea eax, [ebp - 0x10650]
push eax
push 0xffff
lea eax, [ebp - 0x10420]
push eax
push dword [ebp - 4]
call fcn.0040c86d
mov byte [ebp - 0x408], 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov word [ebp - 0x404], ax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x400], eax
push 0x20
push 0x45
lea eax, [ebp - 0x3fc]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x10658], 0x2c
and dword [ebp - 0x10670], 0
jmp 0x40ca82
mov eax, dword [ebp - 0x10670]
inc eax
mov dword [ebp - 0x10670], eax
cmp dword [ebp - 0x10670], 2
jge 0x40cb59
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov word [ebp - 0x402], ax
push dword [ebp - 0x10658]
lea eax, [ebp - 0x408]
push eax
call fcn.0040c806
mov word [ebp - 0x406], ax
push 0x10
lea eax, [ebp - 0x1066c]
push eax
push 0
push dword [ebp - 0x10658]
lea eax, [ebp - 0x408]
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x40cb0a
push dword [ebp + 0xc]
push dword [ebp - 0x105bc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40cb0a
mov eax, dword [ebp - 0x1064c]
cmp eax, dword [ebp - 0x10668]
jne 0x40cb0a
mov dword [ebp - 0x10424], 1
jmp 0x40cb59
push dword [ebp - 0x105bc]
call dword [ebp - 0x40c]
mov dword [ebp - 0x1065c], 0x80
lea eax, [ebp - 0x105cc]
push eax
lea eax, [ebp - 0x1065c]
push eax
lea eax, [ebp - 0x10650]
push eax
push 0xffff
lea eax, [ebp - 0x10420]
push eax
push dword [ebp - 4]
call fcn.0040c86d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40ca75
cmp dword [ebp - 4], 0xffffffff
je 0x40cb68
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x10424]
leave
ret 8