Function at 0x405bcc
Capabilities:
Create tcp socket
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x405bd4
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x405e96
push dword fs:[eax]
mov dword fs:[eax], esp
mov ecx, 0x405eac
mov dl, 8
mov eax, ebx
call fcn.004062b0
test byte [ebx + 0x1c], 0x10
jne 0x405e7b
xor eax, eax
push ebp
push 0x405e5b
push dword fs:[eax]
mov dword fs:[eax], esp
inc dword [0x470f68]
cmp dword [0x470f68], 1
jne 0x405d9c
lea eax, [ebx + 0x100d4]
push eax
push 0x101
call sub.WSOCK32.DLL_WSAStartup
push 0x405ecc
mov ax, word [ebx + 0x100d4]
call fcn.004095f0
and eax, 0xff
lea edx, [ebp - 0xc]
call fcn.0041aa50
push dword [ebp - 0xc]
push 0x405ee0
lea edx, [ebp - 0x10]
xor eax, eax
mov al, byte [ebx + 0x100d4]
call fcn.0041aa50
push dword [ebp - 0x10]
lea eax, [ebp - 8]
mov edx, 4
call fcn.0042c4c8
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x10088]
mov ecx, dword [eax]
call dword [ecx + 0x38]
push 0x405eec
mov ax, word [ebx + 0x100d6]
call fcn.004095f0
and eax, 0xff
lea edx, [ebp - 0x18]
call fcn.0041aa50
push dword [ebp - 0x18]
push 0x405ee0
lea edx, [ebp - 0x1c]
xor eax, eax
mov al, byte [ebx + 0x100d6]
call fcn.0041aa50
push dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.0042c4c8
mov edx, dword [ebp - 0x14]
mov eax, dword [ebx + 0x10088]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x24]
lea edx, [ebx + 0x100d8]
mov ecx, 0x101
call fcn.0042c3b8
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov edx, 0x405f04
call fcn.0042c454
mov edx, dword [ebp - 0x20]
mov eax, dword [ebx + 0x10088]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x2c]
lea edx, [ebx + 0x101d9]
mov ecx, 0x81
call fcn.0042c3b8
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
mov edx, 0x405f1c
call fcn.0042c454
mov edx, dword [ebp - 0x28]
mov eax, dword [ebx + 0x10088]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x34]
movzx eax, word [ebx + 0x1025a]
call fcn.0041aa50
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x30]
mov edx, 0x405f30
call fcn.0042c454
mov edx, dword [ebp - 0x30]
mov eax, dword [ebx + 0x10088]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x3c]
movzx eax, word [ebx + 0x1025c]
call fcn.0041aa50
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
mov edx, 0x405f48
call fcn.0042c454
mov edx, dword [ebp - 0x38]
mov eax, dword [ebx + 0x10088]
mov ecx, dword [eax]
call dword [ecx + 0x38]
xor eax, eax
push ebp
push 0x405e2e
push dword fs:[eax]
mov dword fs:[eax], esp
push 6
push 1
push 2
call sub.WSOCK32.DLL_socket
mov esi, eax
cmp esi, 0xffff
jbe 0x405dc4
call fcn.0042b55c
mov word [ebx + 0x10290], si
mov word [ebp - 4], 1
mov word [ebp - 2], 0
push 4
lea eax, [ebp - 4]
push eax
push 0x80
push 0xffff
movzx eax, si
push eax
call sub.WSOCK32.DLL_setsockopt
cmp word [ebx + 0x10290], 0xffff
jne 0x405e09
lea ecx, [ebp - 0x40]
mov dx, 0x2733
mov eax, ebx
call fcn.004061e4
push 0x3d
push 0x465
mov eax, dword [ebx + 0x10294]
push eax
movzx eax, word [ebx + 0x10290]
push eax
call sub.WSOCK32.DLL_WSAAsyncSelect
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x405e51
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x405e7b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405e9d
lea eax, [ebp - 0x40]
mov edx, 0xf
call fcn.0042c174
ret