Function at 0x40a8a0
Capabilities:
Create raw socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x1cc
mov eax, dword [0x465fd4]
push ebx
push esi
mov dword [esp + 0x1d0], eax
lea eax, [esp + 0x40]
push eax
mov ebx, ecx
xor esi, esi
push 2
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], 0x10
mov dword [esp + 0x20], 0x1f4
mov dword [esp + 0x14], esi
mov byte [esp + 0x13], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40a8ff
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x1c8]
call fcn.00425d0f
add esp, 0x1cc
ret 4
push ebp
push edi
push 1
push 3
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
je 0x40aaba
push 4
lea ecx, [esp + 0x24]
push ecx
push 0x1005
push 0xffff
push ebp
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, dword [esp + 0x1e0]
xor edx, edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
push edi
mov dword [esp + 0x38], edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40aa21
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x40aab3
mov dword [esp + 0x2c], eax
mov word [esp + 0x28], 2
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push 0x400
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
push 0x400
push 8
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
test esi, esi
mov dword [esp + 0x14], eax
je 0x40aab3
xor eax, eax
mov ecx, 0x100
mov edi, esi
push 0x2c
rep stosd dword es:[edi], eax
push esi
mov ecx, ebx
call fcn.0040a780
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edi, edi
inc edi
mov word [esi + 2], 0
call ebx
mov ecx, dword [esp + 0x18]
push 0x2c
push esi
mov dword [esi + 8], eax
mov word [esi + 6], di
call fcn.0040a7d0
push 0x10
lea edx, [esp + 0x2c]
push edx
push 0
push 0x2c
push esi
push ebp
mov word [esi + 2], ax
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x40aa4a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x274c
jne 0x40aab3
jmp 0x40aaa2
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov esi, dword [edx]
mov edx, ecx
shr ecx, 2
lea edi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [eax + 8]
mov word [esp + 0x28], ax
jmp 0x40a977
mov ecx, dword [esp + 0x18]
push 0x258
lea eax, [esp + 0x20]
push eax
call fcn.0040a830
test al, al
je 0x40aa97
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0
push 0x400
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x40aa92
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x274c
je 0x40aaa2
jmp 0x40aa97
cmp eax, 0x20
jg 0x40aaae
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp di, 4
jb 0x40a9d3
jmp 0x40aab3
mov byte [esp + 0x13], 1
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
test esi, esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
je 0x40aad6
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40aaea
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov ecx, dword [esp + 0x1d8]
mov al, byte [esp + 0x13]
pop edi
pop ebp
pop esi
pop ebx
call fcn.00425d0f
add esp, 0x1cc
ret 4