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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x489d80
push eax
mov dword fs:[0], esp
sub esp, 0x78
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebx, ebx
lea edi, [esi + 0xd0]
mov dword [esi + 0xf8], ebx
mov ecx, edi
call fcn.004182d0
cmp dword [esp + 0xb0], ebx
je 0x456493
cmp dword [esp + 0xa0], ebx
je 0x456493
mov eax, dword [esp + 0xac]
mov ebp, dword [esp + 0x98]
cmp ebp, ebx
mov byte [eax], bl
jne 0x456043
mov ecx, dword [esp + 0xa8]
mov dword [esi + 0xf8], 1
push str.Cannot_connect__hostname_is_NULL
mov edx, dword [ecx]
call dword [edx + 0x10]
xor al, al
jmp 0x4564ba
push ebp
lea ecx, [esp + 0x3c]
call fcn.00419050
lea ecx, [esp + 0x38]
mov dword [esp + 0x90], ebx
call fcn.00418050
lea ecx, [esp + 0x38]
call fcn.00422090
test eax, eax
jne 0x45608a
mov ecx, dword [esp + 0xa8]
mov dword [esi + 0xf8], 1
push str.Cannot_connect__hostname_is_zero_length
mov eax, dword [ecx]
call dword [eax + 0x10]
jmp 0x456463
push str.localhost
lea ecx, [esp + 0x3c]
call fcn.0041a930
test al, al
je 0x4560c1
push str.127.0.0.1
mov ecx, edi
call fcn.0041a2e0
push str.127.0.0.1
lea ecx, [esp + 0x3c]
call fcn.0041a2e0
lea ecx, [esp + 0x38]
call fcn.004220a0
mov ebp, eax
mov al, byte [0x4b02f0]
mov edi, dword [esp + 0xa8]
cmp al, bl
je 0x4560da
push edi
call fcn.004547e0
add esp, 4
mov edx, dword [esp + 0x9c]
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 ebp
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 [esi + 0xc4]
mov byte [esp + 0x90], 1
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], ebx
jne 0x45625f
mov byte [esp + 0x13], bl
mov byte [esp + 0x14], bl
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], eax
lea edx, [esp + 0x13]
push ecx
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0xb8]
lea ecx, [esp + 0x68]
push eax
mov eax, dword [esp + 0xac]
push ecx
mov ecx, dword [esi + 0xc4]
push edx
mov edx, dword [esi + 0x58]
push edi
push eax
push ecx
push ebx
push edx
push ebp
call fcn.00455370
add esp, 0x2c
mov byte [esp + 0x15], al
lea eax, [esp + 0x60]
lea ecx, [esi + 0xd0]
push eax
call fcn.0041a370
cmp byte [esp + 0x15], bl
je 0x45620e
lea ecx, [esp + 0x60]
call fcn.00422090
test eax, eax
je 0x45620e
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4561ff
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
cmp ebp, ebx
je 0x45626f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x24]
cmp eax, ecx
jbe 0x45626f
sub eax, ecx
cmp eax, ebp
jb 0x4561fb
mov dword [esi + 0xf8], 3
mov edx, dword [edi]
push str.Application_timeout_after_DNS
mov ecx, edi
call dword [edx + 0x10]
jmp 0x456453
sub ebp, eax
jmp 0x45626f
mov dword [esi + 0xf8], 2
jmp 0x456453
mov eax, dword [esp + 0xac]
push str.Cannot_get_host_by_name.
mov ecx, edi
mov byte [eax], 1
mov edx, dword [edi]
call dword [edx + 0x10]
push ebp
push str.hostname
mov ecx, edi
call fcn.0044d1a0
cmp byte [esp + 0x13], bl
je 0x456246
mov dword [esi + 0xf8], 4
jmp 0x456453
mov dl, byte [esp + 0x14]
xor eax, eax
cmp dl, bl
setne al
add eax, 2
mov dword [esi + 0xf8], eax
jmp 0x456453
push ebp
lea ecx, [esi + 0xd0]
call fcn.0041a2e0
mov ebp, dword [esp + 0x20]
push 1
push edi
mov ecx, esi
call fcn.00454a20
cmp al, bl
je 0x45647b
mov eax, dword [esi + 0x54]
cmp eax, 0xffffffff
je 0x45647b
cmp ebp, ebx
mov dword [esp + 0x18], 1
je 0x4562aa
lea ecx, [esp + 0x18]
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esi + 0x54]
lea edx, [esp + 0x28]
push 0x10
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x4563c7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
mov dword [esp + 0x24], eax
je 0x4562e9
mov edx, dword [edi]
push eax
push str.sockError
mov ecx, edi
call dword [edx + 0x2c]
mov eax, dword [esp + 0x24]
cmp ebp, ebx
je 0x4563e8
cmp eax, 0x2733
jne 0x4563c7
lea eax, [esp + 0x16]
lea ecx, [esp + 0x17]
push eax
mov eax, dword [esp + 0xb4]
lea edx, [esp + 0x19]
push ecx
mov ecx, dword [esp + 0xac]
push edx
mov edx, dword [esp + 0xac]
push eax
push edi
push ebp
push ecx
push edx
mov ecx, esi
mov byte [esp + 0x35], bl
mov byte [esp + 0x37], bl
mov byte [esp + 0x36], bl
call fcn.004566b0
test al, al
je 0x45636a
mov eax, dword [esi + 0x54]
mov dword [esp + 0x18], ebx
cmp eax, 0xffffffff
je 0x456359
lea ecx, [esp + 0x18]
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 0x45640a
cmp byte [esp + 0x15], bl
je 0x45639c
mov eax, dword [esi + 0x54]
mov dword [esp + 0x18], ebx
cmp eax, 0xffffffff
je 0x45638d
lea edx, [esp + 0x18]
push edx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [esi + 0xf8], 4
jmp 0x456453
mov ecx, dword [esi + 0xc4]
mov dword [esi + 0xf8], 6
mov eax, dword [edi]
push ecx
push str.ConnectTimeoutMs
mov ecx, edi
call dword [eax + 0x2c]
push edi
push 0x2733
call fcn.00455000
add esp, 8
cmp ebp, ebx
je 0x4563e8
mov eax, dword [esi + 0x54]
mov dword [esp + 0x18], ebx
cmp eax, 0xffffffff
je 0x4563e8
lea edx, [esp + 0x18]
push edx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [esp + 0x20], ebx
jne 0x456435
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 + 0x90], bl
call fcn.00419440
lea ecx, [esp + 0x38]
mov dword [esp + 0x90], 0xffffffff
call fcn.00419440
mov al, 1
jmp 0x4564ba
cmp dword [esi + 0xf8], ebx
jne 0x456447
mov dword [esi + 0xf8], 7
mov eax, dword [edi]
push str.Connect_function_failed
mov ecx, edi
call dword [eax + 0x10]
lea ecx, [esp + 0x60]
mov byte [esp + 0x90], bl
call fcn.00419440
lea ecx, [esp + 0x38]
mov dword [esp + 0x90], 0xffffffff
call fcn.00419440
xor al, al
jmp 0x4564ba
mov dword [esi + 0xf8], 5
mov edx, dword [edi]
push str.Cannot_connect__invalid_socket.
mov ecx, edi
call dword [edx + 0x10]
jmp 0x456453
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0x9c]
push eax
mov eax, dword [esp + 0x9c]
push ecx
push edx
push eax
mov ecx, esi
call fcn.004558c0
mov ecx, dword [esp + 0x88]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x84
ret 0x1c