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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x489d3e
push eax
mov dword fs:[0], esp
sub esp, 0xc8
mov eax, dword [esp + 0xe4]
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.004182d0
mov ebx, dword [esp + 0xe8]
cmp ebx, edi
jne 0x45592b
mov ecx, dword [esp + 0xf0]
mov dword [esi + 0xf8], 1
push str.Cannot_connect__hostname_is_NULL
mov edx, dword [ecx]
call dword [edx + 0x10]
jmp 0x455d8e
push ebx
lea ecx, [esp + 0x3c]
call fcn.00419050
lea ecx, [esp + 0x38]
mov dword [esp + 0xe0], edi
call fcn.00418050
lea ecx, [esp + 0x38]
call fcn.00422090
test eax, eax
jne 0x455972
mov ecx, dword [esp + 0xf0]
mov dword [esi + 0xf8], 1
push str.Cannot_connect__hostname_is_zero_length
mov eax, dword [ecx]
call dword [eax + 0x10]
jmp 0x455d7a
push str.localhost
lea ecx, [esp + 0x3c]
call fcn.0041a930
test al, al
je 0x4559b0
push str.127.0.0.1
mov ecx, ebp
call fcn.0041a2e0
push str.127.0.0.1
lea ecx, [esp + 0x3c]
call fcn.0041a2e0
lea ecx, [esp + 0x38]
call fcn.004220a0
mov dword [esp + 0xe8], eax
mov ebx, eax
mov al, byte [0x4b02f0]
mov edi, dword [esp + 0xf0]
test al, al
je 0x4559c9
push edi
call fcn.004547e0
add esp, 4
mov edx, dword [esp + 0xec]
xor ecx, ecx
mov dword [esp + 0x28], ecx
push edx
mov dword [esp + 0x30], ecx
mov word [esp + 0x2c], 2
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [esp + 0x2e], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
lea ecx, [esp + 0x60]
mov dword [esp + 0x2c], eax
call fcn.00419150
mov eax, dword [esp + 0x2c]
mov byte [esp + 0xe0], 1
cmp eax, 0xffffffff
mov dword [esp + 0x18], 0
jne 0x455b83
mov eax, dword [esi + 0xc4]
lea ecx, [esp + 0x88]
mov dword [esp + 0x1c], eax
mov byte [esp + 0x12], 0
mov byte [esp + 0x11], 0
call fcn.00429160
mov byte [esp + 0xe0], 2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esp + 0x11]
mov dword [esp + 0x24], eax
lea edx, [esp + 0x12]
push ecx
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x68]
push eax
mov eax, dword [esi + 0xc4]
lea edx, [esp + 0x94]
push ecx
mov ecx, dword [esi + 0x58]
push edx
push edi
push 0xc8
push eax
push 0
push ecx
push ebx
call fcn.00455370
add esp, 0x2c
lea edx, [esp + 0x60]
mov ecx, ebp
mov bl, al
push edx
call fcn.0041a370
test bl, bl
je 0x455b18
lea ecx, [esp + 0x60]
call fcn.00422090
test eax, eax
je 0x455b18
mov eax, dword [esp + 0x18]
test eax, eax
je 0x455b0c
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x2c], eax
test ebx, ebx
je 0x455aef
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x24]
cmp eax, ecx
jbe 0x455aef
sub eax, ecx
cmp eax, ebx
jb 0x455aef
mov dword [esi + 0xf8], 3
mov eax, dword [edi]
push str.Application_timeout_after_DNS
mov ecx, edi
call dword [eax + 0x10]
jmp 0x455b6a
lea ecx, [esp + 0x88]
mov byte [esp + 0xe0], 1
call fcn.004292a0
mov ebx, dword [esp + 0xe8]
jmp 0x455b8b
mov dword [esi + 0xf8], 2
jmp 0x455b6a
mov ecx, dword [esp + 0xf4]
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 + 0xe8]
mov ecx, edi
push eax
push str.hostname
call fcn.0044d1a0
mov al, byte [esp + 0x12]
test al, al
je 0x455b56
mov dword [esi + 0xf8], 4
jmp 0x455b6a
mov dl, byte [esp + 0x11]
xor ecx, ecx
test dl, dl
setne cl
add ecx, 2
mov dword [esi + 0xf8], ecx
lea ecx, [esp + 0x88]
mov byte [esp + 0xe0], 1
call fcn.004292a0
jmp 0x455d69
push ebx
mov ecx, ebp
call fcn.0041a2e0
push 1
push edi
mov ecx, esi
call fcn.00454a20
test al, al
je 0x455d53
mov eax, dword [esi + 0x54]
cmp eax, 0xffffffff
je 0x455d53
mov ecx, dword [esi + 0xc4]
mov dword [esp + 0x14], 1
test ecx, ecx
je 0x455bcc
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 + 0x28]
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 0x455cb9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
mov dword [esp + 0x24], ebp
je 0x455c5c
cmp ebp, 0x2726
jne 0x455c4f
mov ebp, dword [edi]
lea ecx, [esp + 0x60]
call fcn.004220a0
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 + 0x24]
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 0x455cb9
cmp ebp, 0x2733
jne 0x455cb9
lea ecx, [esp + 0x23]
lea edx, [esp + 0x13]
push ecx
push edx
push edi
push eax
mov ecx, esi
call fcn.004565a0
test al, al
je 0x455cb4
mov eax, dword [esi + 0x54]
mov dword [esp + 0x14], 0
cmp eax, 0xffffffff
je 0x455ca6
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.00465830
jmp 0x455d08
mov byte [esp + 0x13], 1
mov eax, dword [esi + 0xc4]
test eax, eax
je 0x455ce4
mov eax, dword [esi + 0x54]
mov dword [esp + 0x14], 0
cmp eax, 0xffffffff
je 0x455ce4
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 0x455d31
lea ecx, [esi + 0x5c]
mov byte [esi + 0x50], 1
call fcn.00465830
lea ecx, [esi + 0x10]
call fcn.00465840
lea ecx, [esi + 0x30]
call fcn.00465840
lea ecx, [esp + 0x60]
mov byte [esp + 0xe0], 0
call fcn.00419440
lea ecx, [esp + 0x38]
mov dword [esp + 0xe0], 0xffffffff
call fcn.00419440
mov al, 1
jmp 0x455d90
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.00455000
add esp, 8
jmp 0x455d69
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 + 0x60]
mov byte [esp + 0xe0], 0
call fcn.00419440
lea ecx, [esp + 0x38]
mov dword [esp + 0xe0], 0xffffffff
call fcn.00419440
xor al, al
mov ecx, dword [esp + 0xd8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xd4
ret 0x10