Function at 0x40ac58
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffde4
mov eax, 0x441280
call fcn.0040eaa0
push 0x2300000
push 8
call sub.KERNEL32.DLL_GetProcessHeap
push eax
call sub.KERNEL32.DLL_HeapAlloc
mov dword [ebp - 0x68], eax
mov word [ebp - 0x5e], 0x101
lea edx, [ebp - 0x20c]
push edx
mov cx, word [ebp - 0x5e]
push ecx
call sub.WSOCK32.DLL_WSAStartup
mov word [ebp - 0x4c], 8
lea eax, [ebp - 8]
push eax
call fcn.00402f53
pop ecx
push eax
inc dword [ebp - 0x40]
push 0x447814
lea edx, [ebp - 0x20]
push edx
call fcn.00402a94
add esp, 0xc
add dword [ebp - 0x40], 4
lea ecx, [ebp - 0x20]
push ecx
lea eax, [ebp - 0x38]
push eax
call fcn.0040662c
add esp, 8
lea edx, [ebp - 0x38]
push edx
add dword [ebp - 0x40], 4
call fcn.00403012
pop ecx
push eax
call sub.WSOCK32.DLL_gethostbyname
mov dword [ebp - 0x6c], eax
sub dword [ebp - 0x40], 4
push 2
lea ecx, [ebp - 0x38]
push ecx
call fcn.00402eed
add esp, 8
sub dword [ebp - 0x40], 4
push 2
lea eax, [ebp - 0x20]
push eax
call fcn.00402eed
add esp, 8
dec dword [ebp - 0x40]
push 2
lea edx, [ebp - 8]
push edx
call fcn.00402f7a
add esp, 8
cmp dword [ebp - 0x6c], 0
jne 0x40ad40
call sub.WSOCK32.DLL_WSAGetLastError
mov dword [ebp - 0x64], eax
call sub.WSOCK32.DLL_WSACleanup
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x40ae73
push 6
push 1
push 2
call sub.WSOCK32.DLL_socket
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0xffffffff
jne 0x40ad72
call sub.WSOCK32.DLL_WSAGetLastError
mov dword [ebp - 0x64], eax
call sub.WSOCK32.DLL_WSACleanup
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x40ae73
mov word [ebp - 0x21c], 2
mov ecx, dword [ebp - 0x6c]
mov eax, dword [ecx + 0xc]
mov edx, dword [eax]
mov ecx, dword [edx]
mov dword [ebp - 0x218], ecx
mov ax, word [ebp + 0xc]
push eax
call sub.WSOCK32.DLL_htons
mov word [ebp - 0x21a], ax
push 0x10
lea edx, [ebp - 0x21c]
push edx
push dword [ebp - 0x70]
call sub.WSOCK32.DLL_connect
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0xffffffff
jne 0x40add4
call sub.WSOCK32.DLL_WSAGetLastError
mov dword [ebp - 0x64], eax
call sub.WSOCK32.DLL_WSACleanup
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x40ae73
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x78], ecx
push 0x440251
push dword [ebp - 0x78]
call fcn.00410af8
add esp, 8
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0
jne 0x40ae01
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x40ae73
push 0
push dword [ebp + 8]
call fcn.0040e824
pop ecx
push eax
push dword [ebp + 8]
push dword [ebp - 0x70]
call sub.WSOCK32.DLL_send
mov dword [ebp - 0x64], eax
push dword [ebp - 0x74]
push 0x2300000
push 1
push dword [ebp - 0x68]
call fcn.00410d38
add esp, 0x10
mov dword [ebp - 0x7c], eax
push 0
push dword [ebp - 0x7c]
push dword [ebp - 0x68]
push dword [ebp - 0x70]
call sub.WSOCK32.DLL_send
mov dword [ebp - 0x64], eax
push dword [ebp - 0x74]
call fcn.00410650
pop ecx
push dword [ebp - 0x68]
push 0
call sub.KERNEL32.DLL_GetProcessHeap
push eax
call sub.KERNEL32.DLL_HeapFree
push dword [ebp - 0x70]
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret