Function at 0x461e30
Capabilities:
Check for time delay via gettickcount
Connect socket
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x491ea0
push eax
mov dword fs:[0], esp
sub esp, 0x74
mov eax, dword [esp + 0x94]
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
lea ebp, [esi + 0xd0]
mov dword [esi + 0xf8], edi
mov ecx, ebp
mov byte [eax], 0
call fcn.0041ccb0
mov ebx, dword [esp + 0x94]
cmp ebx, edi
jne 0x461e98
mov ecx, dword [esp + 0x9c]
mov dword [esi + 0xf8], 1
push str.Cannot_connect__hostname_is_NULL
mov edx, dword [ecx]
call dword [edx + 0x10]
jmp 0x4622d4
push ebx
lea ecx, [esp + 0x38]
call fcn.0041d8e0
lea ecx, [esp + 0x34]
mov dword [esp + 0x8c], edi
call fcn.0041ca30
lea ecx, [esp + 0x34]
call fcn.0041c950
test eax, eax
jne 0x461edf
mov ecx, dword [esp + 0x9c]
mov dword [esi + 0xf8], 1
push str.Cannot_connect__hostname_is_zero_length
mov eax, dword [ecx]
call dword [eax + 0x10]
jmp 0x4622c0
push str.localhost
lea ecx, [esp + 0x38]
call fcn.0041f1c0
test al, al
je 0x461f1d
push str.127.0.0.1
mov ecx, ebp
call fcn.0041eb70
push str.127.0.0.1
lea ecx, [esp + 0x38]
call fcn.0041eb70
lea ecx, [esp + 0x34]
call fcn.0041c940
mov dword [esp + 0x94], eax
mov ebx, eax
mov al, byte [0x4bac40]
mov edi, dword [esp + 0x9c]
test al, al
je 0x461f36
push edi
call fcn.00460cd0
add esp, 4
mov edx, dword [esp + 0x98]
xor ecx, ecx
mov dword [esp + 0x24], ecx
push edx
mov dword [esp + 0x2c], ecx
mov word [esp + 0x28], 2
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ecx
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [esp + 0x2a], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x28], eax
call fcn.0041d9e0
mov eax, dword [esp + 0x28]
mov byte [esp + 0x8c], 1
cmp eax, 0xffffffff
mov dword [esp + 0x18], 0
jne 0x4620c0
mov eax, dword [esi + 0xc4]
mov byte [esp + 0x10], 0
mov dword [esp + 0x1c], eax
mov byte [esp + 0x11], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esp + 0x11]
mov dword [esp + 0x20], eax
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x1c]
push edx
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x64]
push eax
mov eax, dword [esi + 0xc4]
push ecx
mov ecx, dword [esi + 0x58]
push edx
push edi
push 0xc8
push eax
push 0
push ecx
push ebx
call fcn.004618e0
add esp, 0x2c
lea edx, [esp + 0x5c]
mov ecx, ebp
mov bl, al
push edx
call fcn.0041ec00
test bl, bl
je 0x462066
lea ecx, [esp + 0x5c]
call fcn.0041c950
test eax, eax
je 0x462066
mov eax, dword [esp + 0x18]
test eax, eax
je 0x462057
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
test ebx, ebx
je 0x4620ca
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jbe 0x4620ca
sub eax, ecx
cmp eax, ebx
jb 0x4620ca
mov dword [esi + 0xf8], 3
mov eax, dword [edi]
push str.Application_timeout_after_DNS
mov ecx, edi
call dword [eax + 0x10]
jmp 0x4622af
mov dword [esi + 0xf8], 2
jmp 0x4622af
mov ecx, dword [esp + 0xa4]
push str.Cannot_get_host_by_name..
mov byte [ecx], 1
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x10]
mov eax, dword [esp + 0x94]
mov ecx, edi
push eax
push str.hostname
call fcn.004596d0
mov al, byte [esp + 0x10]
test al, al
je 0x4620a7
mov dword [esi + 0xf8], 4
jmp 0x4622af
mov dl, byte [esp + 0x11]
xor ecx, ecx
test dl, dl
setne cl
add ecx, 2
mov dword [esi + 0xf8], ecx
jmp 0x4622af
push ebx
mov ecx, ebp
call fcn.0041eb70
jmp 0x4620d1
mov ebx, dword [esp + 0x94]
push 1
push edi
mov ecx, esi
call fcn.00460f10
test al, al
je 0x462299
mov eax, dword [esi + 0x54]
cmp eax, 0xffffffff
je 0x462299
mov ecx, dword [esi + 0xc4]
mov dword [esp + 0x14], 1
test ecx, ecx
je 0x462112
lea edx, [esp + 0x14]
push edx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esi + 0x54]
lea eax, [esp + 0x24]
push 0x10
push eax
push ecx
xor ebp, ebp
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x4621ff
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
mov dword [esp + 0x20], ebp
je 0x4621a2
cmp ebp, 0x2726
jne 0x462195
mov ebp, dword [edi]
lea ecx, [esp + 0x5c]
call fcn.0041c940
push eax
push str.IP_Address
mov ecx, edi
call dword [ebp + 0x28]
mov eax, dword [esp + 0x18]
mov edx, dword [edi]
push eax
push str.ipAddr
mov ecx, edi
call dword [edx + 0x34]
mov edx, dword [edi]
push ebx
push str.Hostname
mov ecx, edi
call dword [edx + 0x28]
mov ecx, dword [esi + 0x54]
mov eax, dword [edi]
push ecx
push str.SocketHandle
mov ecx, edi
call dword [eax + 0x34]
mov ebp, dword [esp + 0x20]
mov edx, dword [edi]
push ebp
push str.sockError
mov ecx, edi
call dword [edx + 0x2c]
mov eax, dword [esi + 0xc4]
test eax, eax
je 0x4621ff
cmp ebp, 0x2733
jne 0x4621ff
lea ecx, [esp + 0x13]
lea edx, [esp + 0x12]
push ecx
push edx
push edi
push eax
mov ecx, esi
call fcn.00462af0
test al, al
je 0x4621fa
mov eax, dword [esi + 0x54]
mov dword [esp + 0x14], 0
cmp eax, 0xffffffff
je 0x4621ec
lea ecx, [esp + 0x14]
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea ecx, [esi + 0x5c]
mov byte [esi + 0x50], 1
call fcn.00473b40
jmp 0x46224e
mov byte [esp + 0x12], 1
mov eax, dword [esi + 0xc4]
test eax, eax
je 0x46222a
mov eax, dword [esi + 0x54]
mov dword [esp + 0x14], 0
cmp eax, 0xffffffff
je 0x46222a
lea edx, [esp + 0x14]
push edx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x462277
lea ecx, [esi + 0x5c]
mov byte [esi + 0x50], 1
call fcn.00473b40
lea ecx, [esi + 0x10]
call fcn.00473b50
lea ecx, [esi + 0x30]
call fcn.00473b50
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 0
call fcn.0041dcd0
lea ecx, [esp + 0x34]
mov dword [esp + 0x8c], 0xffffffff
call fcn.0041dcd0
mov al, 1
jmp 0x4622d6
mov dword [esi + 0xf8], 7
mov eax, dword [edi]
push str.Connect_function_failed.
mov ecx, edi
call dword [eax + 0x10]
push edi
push ebp
call fcn.004614f0
add esp, 8
jmp 0x4622af
mov dword [esi + 0xf8], 5
mov edx, dword [edi]
push str.Cannot_connect__invalid_socket.
mov ecx, edi
call dword [edx + 0x10]
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 0
call fcn.0041dcd0
lea ecx, [esp + 0x34]
mov dword [esp + 0x8c], 0xffffffff
call fcn.0041dcd0
xor al, al
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x80
ret 0x14