Function at 0x409450
Capabilities:
Act as tcp client
Allocate or change rwx memory
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff90
push edi
push esi
push ebx
mov ebx, 0xffffffff
push 0x40
push 0x1000
push 0x3000
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 0x70], eax
push 0
push 0x50
lea eax, [ebp - 0x64]
push eax
call fcn.00408ae4
call fcn.00408afc
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x14], 0
je 0x40949c
push dword [ebp - 0x14]
push dword [ebp + 0x14]
call fcn.00408a90
jmp 0x4094a4
push dword [ebp - 0x14]
call fcn.0040db90
push 0
push 1
push 2
call sub.ws2_32.dll_socket
cmp eax, 0xffffffff
je 0x409670
mov dword [ebp - 0x6c], eax
mov word [ebp - 0x10], 2
push dword [ebp + 0x10]
call sub.ws2_32.dll_htons
mov word [ebp - 0xe], ax
push dword [ebp + 0xc]
call sub.ws2_32.dll_gethostbyname
or eax, eax
je 0x4094e2
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
jmp 0x4094ea
push dword [ebp + 0xc]
call sub.ws2_32.dll_inet_addr
cmp eax, 0xffffffff
je 0x409670
mov dword [ebp - 0xc], eax
push 0x10
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x6c]
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
je 0x409670
push dword [ebp - 0x70]
push 0x1b
push 0
push 0
call fcn.0040da70
push 0
push ecx
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_send
cmp eax, 0xffffffff
je 0x409670
push 0
push 0x300
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_recv
mov esi, eax
push eax
push dword [ebp - 0x70]
call fcn.0040dad0
lea eax, [edx + eax]
add esi, eax
cmp esi, 0x45
jne 0x409670
mov esi, dword [ebp - 0x70]
add esi, 0xa
push ecx
push esi
lea eax, [ebp - 0x64]
push eax
call fcn.00408b1c
push dword [ebp - 0x14]
lea eax, [ebp - 0x64]
push eax
push 0x20
call fcn.0040c3d0
lea eax, [ebp - 0x64]
push eax
call fcn.0040db40
push dword [ebp - 0x70]
push 9
push 0x20
lea eax, [ebp - 0x64]
push eax
call fcn.0040da70
push 0
push ecx
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_send
cmp eax, 0xffffffff
je 0x409670
push 0
push 0x3000
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_recv
mov esi, eax
push eax
push dword [ebp - 0x70]
call fcn.0040dad0
lea eax, [edx + eax]
add esi, eax
cmp esi, 0x14
jne 0x409670
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68], eax
push dword [ebp - 0x70]
push 0x1a
push 4
lea eax, [ebp - 0x68]
push eax
call fcn.0040da70
push 0
push ecx
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_send
push 0
push 0x3000
push dword [ebp - 0x70]
push dword [ebp - 0x6c]
call sub.ws2_32.dll_recv
push eax
push dword [ebp - 0x70]
call fcn.0040dad0
cmp edx, 0x1a
jne 0x40963e
push 0x8000
push 0
push dword [ebp - 0x70]
call sub.kernel32.dll_VirtualFree
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov eax, dword [ebp - 0x6c]
pop ebx
pop esi
pop edi
leave
ret 0x14
push 0x8000
push 0
push dword [ebp - 0x70]
call sub.kernel32.dll_VirtualFree
push 0x8000
push 0
push dword [ebp - 0x14]
call sub.kernel32.dll_VirtualFree
push dword [ebp - 0x6c]
call sub.ws2_32.dll_closesocket
mov eax, 6
pop ebx
pop esi
pop edi
leave
ret 0x14
push 0x8000
push 0
push dword [ebp - 0x14]
call sub.kernel32.dll_VirtualFree
push 0x8000
push 0
push dword [ebp - 0x70]
call sub.kernel32.dll_VirtualFree
push dword [ebp - 0x6c]
call sub.ws2_32.dll_closesocket
mov eax, ebx
pop ebx
pop esi
pop edi
leave
ret 0x14