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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x470ccb
push eax
mov dword fs:[0], esp
sub esp, 0xac
mov eax, dword [esp + 0xc8]
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
lea ebp, [esi + 0xc4]
mov dword [esi + 0xe0], edi
mov ecx, ebp
mov byte [eax], 0
call fcn.00413a90
mov ebx, dword [esp + 0xcc]
cmp ebx, edi
jne 0x44790b
mov ecx, dword [esp + 0xd4]
mov dword [esi + 0xe0], 1
push str.Cannot_connect__hostname_is_NULL
mov edx, dword [ecx]
call dword [edx + 0x10]
jmp 0x447d7b
push ebx
lea ecx, [esp + 0x38]
call fcn.004145b0
lea ecx, [esp + 0x34]
mov dword [esp + 0xc4], edi
call fcn.004138b0
lea ecx, [esp + 0x34]
call fcn.00443b10
test eax, eax
jne 0x447952
mov ecx, dword [esp + 0xd4]
mov dword [esi + 0xe0], 1
push str.Cannot_connect__hostname_is_zero_length
mov eax, dword [ecx]
call dword [eax + 0x10]
jmp 0x447d67
push str.localhost
lea ecx, [esp + 0x38]
call fcn.00415c30
test al, al
je 0x447990
push str.127.0.0.1
mov ecx, ebp
call fcn.00415650
push str.127.0.0.1
lea ecx, [esp + 0x38]
call fcn.00415650
lea ecx, [esp + 0x34]
call fcn.00443b00
mov dword [esp + 0xcc], eax
mov ebx, eax
mov al, byte [0x490a38]
mov edi, dword [esp + 0xd4]
test al, al
je 0x4479a9
push edi
call fcn.00446980
add esp, 4
mov edx, dword [esp + 0xd0]
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 + 0x50]
mov dword [esp + 0x28], eax
call fcn.004146b0
mov eax, dword [esp + 0x28]
mov byte [esp + 0xc4], 1
cmp eax, 0xffffffff
mov dword [esp + 0x1c], 0
jne 0x447b57
mov eax, dword [esi + 0xbc]
lea ecx, [esp + 0x6c]
mov dword [esp + 0x18], eax
mov byte [esp + 0x12], 0
mov byte [esp + 0x11], 0
call fcn.00421060
mov byte [esp + 0xc4], 2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esp + 0x11]
mov dword [esp + 0x20], eax
lea edx, [esp + 0x12]
push ecx
lea eax, [esp + 0x20]
push edx
lea ecx, [esp + 0x58]
push eax
mov eax, dword [esi + 0xbc]
lea edx, [esp + 0x78]
push ecx
mov ecx, dword [esi + 0x50]
push edx
push edi
push 0xc8
push eax
push 0
push ecx
push ebx
call fcn.004473c0
add esp, 0x2c
lea edx, [esp + 0x50]
mov ecx, ebp
mov bl, al
push edx
call fcn.004156e0
test bl, bl
je 0x447aef
lea ecx, [esp + 0x50]
call fcn.00443b10
test eax, eax
je 0x447aef
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x447ae3
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x28], eax
test ebx, ebx
je 0x447ac9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jbe 0x447ac9
sub eax, ecx
cmp eax, ebx
jb 0x447ac9
mov dword [esi + 0xe0], 3
mov eax, dword [edi]
push str.Application_timeout_after_DNS
mov ecx, edi
call dword [eax + 0x10]
jmp 0x447b41
lea ecx, [esp + 0x6c]
mov byte [esp + 0xc4], 1
call fcn.00421130
mov ebx, dword [esp + 0xcc]
jmp 0x447b5f
mov dword [esi + 0xe0], 2
jmp 0x447b41
mov ecx, dword [esp + 0xd8]
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 + 0xcc]
mov ecx, edi
push eax
push str.hostname
call fcn.0043f490
mov al, byte [esp + 0x12]
test al, al
je 0x447b2d
mov dword [esi + 0xe0], 4
jmp 0x447b41
mov dl, byte [esp + 0x11]
xor ecx, ecx
test dl, dl
setne cl
add ecx, 2
mov dword [esi + 0xe0], ecx
lea ecx, [esp + 0x6c]
mov byte [esp + 0xc4], 1
call fcn.00421130
jmp 0x447d56
push ebx
mov ecx, ebp
call fcn.00415650
push 1
push edi
mov ecx, esi
call fcn.00446b50
test al, al
je 0x447d40
mov eax, dword [esi + 0x4c]
cmp eax, 0xffffffff
je 0x447d40
mov ecx, dword [esi + 0xbc]
mov dword [esp + 0x14], 1
test ecx, ecx
je 0x447ba0
lea edx, [esp + 0x14]
push edx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esi + 0x4c]
lea eax, [esp + 0x24]
push 0x10
push eax
push ecx
xor ebp, ebp
mov byte [esp + 0x1f], 0
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
mov dword [esp + 0x18], eax
je 0x447c82
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
mov dword [esp + 0x20], ebp
je 0x447c35
cmp ebp, 0x2726
jne 0x447c28
mov ebp, dword [edi]
lea ecx, [esp + 0x50]
call fcn.00443b00
push eax
push str.IP_Address
mov ecx, edi
call dword [ebp + 0x28]
mov eax, dword [esp + 0x1c]
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 + 0x4c]
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 + 0xbc]
test eax, eax
je 0x447c82
cmp ebp, 0x2733
jne 0x447c82
push edi
push eax
mov ecx, esi
call fcn.00448350
test al, al
je 0x447c7e
mov ecx, dword [esi + 0x4c]
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x20], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea ecx, [esi + 0x54]
mov byte [esi + 0x48], 1
call fcn.00457ff0
jmp 0x447cd0
mov bl, 1
jmp 0x447c86
mov bl, byte [esp + 0x13]
mov eax, dword [esi + 0xbc]
test eax, eax
je 0x447cac
mov eax, dword [esi + 0x4c]
lea edx, [esp + 0x14]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x20], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x447cfc
lea ecx, [esi + 0x54]
mov byte [esi + 0x48], 1
call fcn.00457ff0
lea ecx, [esi + 8]
call fcn.00458000
lea ecx, [esi + 0x28]
call fcn.00458000
lea ecx, [esp + 0x50]
mov byte [esp + 0xc4], 0
call fcn.004149a0
lea ecx, [esp + 0x34]
mov dword [esp + 0xc4], 0xffffffff
call fcn.004149a0
mov al, 1
jmp 0x447d7d
test bl, bl
je 0x447d1f
mov eax, dword [esi + 0xbc]
mov edx, dword [edi]
push eax
push str.ConnectTimeoutMs
mov ecx, edi
call dword [edx + 0x2c]
mov dword [esi + 0xe0], 6
jmp 0x447d29
mov dword [esi + 0xe0], 7
mov edx, dword [edi]
push str.Connect_function_failed.
mov ecx, edi
call dword [edx + 0x10]
push edi
push ebp
mov ecx, esi
call fcn.00447030
jmp 0x447d56
mov dword [esi + 0xe0], 5
mov eax, dword [edi]
push str.Cannot_connect__invalid_socket.
mov ecx, edi
call dword [eax + 0x10]
lea ecx, [esp + 0x50]
mov byte [esp + 0xc4], 0
call fcn.004149a0
lea ecx, [esp + 0x34]
mov dword [esp + 0xc4], 0xffffffff
call fcn.004149a0
xor al, al
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xb8
ret 0x10