Function at 0x40912a
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c8
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x361]
test al, al
je 0x409159
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x31c]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
mov eax, dword [ebp + 8]
mov byte [eax + 0x361], 0
mov eax, dword [ebp + 8]
lea edx, [eax + 0x306]
mov dword [esp + 8], 0x10
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._strncpy
mov eax, dword [ebp + 8]
mov byte [eax + 0x315], 0
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov dword [eax + 0x318], edx
mov word [ebp - 0x12], 2
movzx eax, word [ebp - 0x12]
lea edx, [ebp - 0x1b4]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._WSAStartup_8
sub esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jns 0x409221
mov eax, dword [ebp + 8]
mov byte [eax + 0x320], 1
mov eax, dword [ebp + 8]
add eax, 0x321
mov dword [esp + 4], str.Could_not_start_winsock2
mov dword [esp], eax
call sym._wsprintfA
mov eax, dword [ebp + 8]
add eax, 0x321
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], 0x4147a7
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
call sym._WSACleanup_0
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x361]
jmp 0x409450
mov eax, dword [ebp - 0x1b4]
cmp al, 2
jne 0x409239
mov eax, dword [ebp - 0x1b4]
shr ax, 8
test al, al
je 0x409299
mov eax, dword [ebp + 8]
mov byte [eax + 0x320], 1
mov eax, dword [ebp + 8]
add eax, 0x321
mov dword [esp + 4], str.This_application_requires_winsock_2.0
mov dword [esp], eax
call sym._wsprintfA
mov eax, dword [ebp + 8]
add eax, 0x321
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], 0x4147a7
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
call sym._WSACleanup_0
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x361]
jmp 0x409450
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._socket_12
sub esp, 0xc
mov edx, dword [ebp + 8]
mov dword [edx + 0x31c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x31c]
cmp eax, 0xffffffff
jne 0x40932f
mov eax, dword [ebp + 8]
mov byte [eax + 0x320], 1
mov eax, dword [ebp + 8]
add eax, 0x321
mov dword [esp + 4], str.Could_not_create_network_socket
mov dword [esp], eax
call sym._wsprintfA
mov eax, dword [ebp + 8]
add eax, 0x321
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], 0x4147a7
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
call sym._WSACleanup_0
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x361]
jmp 0x409450
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x24]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x24], 2
mov eax, dword [ebp + 8]
add eax, 0x306
mov dword [esp], eax
call sym._inet_addr_4
sub esp, 4
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x318]
movzx eax, ax
mov dword [esp], eax
call sym._htons_4
sub esp, 4
mov word [ebp - 0x22], ax
lea edx, [ebp - 0x24]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x31c]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._connect_12
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jns 0x40943d
mov eax, dword [ebp + 8]
mov byte [eax + 0x320], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x318]
mov edx, dword [ebp + 8]
lea ecx, [edx + 0x306]
mov edx, dword [ebp + 8]
add edx, 0x321
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], str.Could_not_connect_to_server:_s_port:_d
mov dword [esp], edx
call sym._wsprintfA
mov eax, dword [ebp + 8]
add eax, 0x321
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], 0x4147a7
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x31c]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x361]
jmp 0x409450
mov eax, dword [ebp + 8]
mov byte [eax + 0x361], 1
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x361]
leave
ret