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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x638
mov eax, dword [0x43db90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
lea eax, [ebp - 0x614]
push eax
push 0x101
mov esi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor ebx, ebx
cmp eax, ebx
je 0x40ee5c
push eax
push 0xa
mov ecx, esi
call fcn.0040ec11
push ebx
push ebx
push dword [0x43f384]
push dword [esi + 0x14]
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x40f16d
push edi
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x24], eax
mov eax, dword [0x43b014]
push 0x10
mov dword [ebp - 0x618], eax
lea eax, [ebp - 0x34]
push ebx
push eax
call fcn.00415380
add esp, 0xc
push 2
pop eax
mov word [ebp - 0x34], ax
lea eax, [ebp - 0x61c]
push eax
mov ecx, esi
call fcn.0040ebdb
push eax
lea ecx, [ebp - 0x618]
call fcn.00402f12
lea ecx, [ebp - 0x61c]
call fcn.004017df
push 0x1f5
call fcn.00411513
pop ecx
push dword [ebp - 0x618]
movzx edi, ax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
jne 0x40eef6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0xc
mov ecx, esi
call fcn.0040ec11
push ebx
push ebx
push dword [0x43f384]
push dword [esi + 0x14]
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x40f161
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 0x30]
push eax
call fcn.004148b0
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x32], ax
push 0x10
lea eax, [ebp - 0x34]
push eax
push dword [esi + 0x24]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x40ef35
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0xd
jmp 0x40eed9
lea ecx, [ebp - 0x484]
call fcn.00408a38
push 0x18
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x480]
mov dword [ebp - 0x24], 0x248cf06a
mov dword [ebp - 0x20], 0xe251e2c8
mov dword [ebp - 0x1c], 0x248cf06a
mov dword [ebp - 0x18], 0xe251e2c8
mov dword [ebp - 0x14], 0x248cf06a
mov dword [ebp - 0x10], 0xe251e2c8
mov dword [ebp - 0xc], 0x248cf06a
mov dword [ebp - 8], 0xe251e2c8
call fcn.00412030
mov eax, dword [esi + 0x18]
mov eax, dword [eax - 8]
mov dword [ebp - 0x620], ebx
cmp eax, ebx
je 0x40eff6
add eax, 3
push eax
call fcn.00414d17
pop ecx
mov ecx, dword [esi + 0x18]
mov cx, word [ecx - 8]
inc cx
mov word [eax], cx
mov dword [ebp - 0x61c], eax
mov eax, dword [esi + 0x18]
mov eax, dword [eax - 8]
inc eax
push eax
push ebx
lea ecx, [esi + 0x18]
call fcn.0040257d
mov edi, dword [ebp - 0x61c]
push eax
lea eax, [edi + 2]
push eax
call fcn.004148b0
add esp, 0xc
push edi
lea ecx, [ebp - 0x480]
call fcn.00411e90
push edi
mov dword [ebp - 0x620], eax
call fcn.0041446f
pop ecx
push ebx
push ebx
push 0xf4
lea ecx, [ebp - 0x630]
call fcn.00405101
mov edi, dword [ebp - 0x620]
cmp edi, ebx
je 0x40f017
mov ax, word [edi]
jmp 0x40f019
xor eax, eax
mov word [ebp - 0x624], ax
push 2
lea eax, [ebp - 0x624]
push eax
lea ecx, [ebp - 0x630]
call fcn.00405146
movzx eax, word [edi]
push eax
add edi, 2
push edi
lea ecx, [ebp - 0x630]
call fcn.00405146
push ebx
push dword [ebp - 0x628]
push dword [ebp - 0x62c]
push dword [esi + 0x24]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40f08f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0xe
mov ecx, esi
call fcn.0040ec11
push ebx
push ebx
push dword [0x43f384]
push dword [esi + 0x14]
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, esi
call fcn.0040eae5
jmp 0x40f14a
xor edi, edi
inc edi
mov dword [ebp - 0x620], ebx
mov dword [ebp - 0x61c], ebx
mov dword [ebp - 0x638], edi
mov dword [ebp - 0x634], ebx
jmp 0x40f11a
cmp byte [esi + 0x11], bl
jne 0x40f11f
mov eax, dword [esi + 0x24]
lea ecx, [ebp - 0x638]
push ecx
push ebx
push ebx
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x134], eax
push ecx
inc eax
push eax
mov dword [ebp - 0x138], edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x40f116
lea eax, [ebp - 0x138]
push eax
push dword [esi + 0x24]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f107
lea eax, [ebp - 0x61c]
push eax
mov ecx, esi
call fcn.0040ec37
mov byte [esi + 0x11], al
cmp al, bl
jne 0x40f11a
jmp 0x40f116
inc dword [ebp - 0x620]
cmp dword [ebp - 0x620], 0x78
jb 0x40f11a
mov byte [esi + 0x10], 1
cmp byte [esi + 0x10], bl
je 0x40f0ac
mov ecx, esi
call fcn.0040eae5
push ebx
cmp byte [esi + 0x11], bl
je 0x40f13a
push dword [ebp - 0x61c]
push dword [0x43f38c]
jmp 0x40f141
push ebx
push dword [0x43f384]
push dword [esi + 0x14]
call dword [sym.imp.USER32.dll_PostMessageA]
push dword [ebp - 0x62c]
call fcn.0041446f
pop ecx
lea ecx, [ebp - 0x484]
call fcn.00408a4a
lea ecx, [ebp - 0x618]
call fcn.004017df
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00415106
leave
ret