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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x491ee0
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.0041ccb0
mov eax, dword [esp + 0xb0]
cmp eax, ebx
je 0x4629e5
cmp dword [esp + 0xa0], ebx
je 0x4629e5
mov eax, dword [esp + 0xac]
mov ebp, dword [esp + 0x98]
cmp ebp, ebx
mov byte [eax], bl
jne 0x462595
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 0x462a0d
push ebp
lea ecx, [esp + 0x3c]
call fcn.0041d8e0
lea ecx, [esp + 0x38]
mov dword [esp + 0x90], ebx
call fcn.0041ca30
lea ecx, [esp + 0x38]
call fcn.0041c950
test eax, eax
jne 0x4625dc
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 0x4629b5
push str.localhost
lea ecx, [esp + 0x3c]
call fcn.0041f1c0
test al, al
je 0x462613
push str.127.0.0.1
mov ecx, edi
call fcn.0041eb70
push str.127.0.0.1
lea ecx, [esp + 0x3c]
call fcn.0041eb70
lea ecx, [esp + 0x38]
call fcn.0041c940
mov ebp, eax
mov al, byte [0x4bac40]
mov edi, dword [esp + 0xa8]
cmp al, bl
je 0x46262c
push edi
call fcn.00460cd0
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.0041d9e0
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 0x4627b1
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.004618e0
add esp, 0x2c
mov byte [esp + 0x15], al
lea eax, [esp + 0x60]
lea ecx, [esi + 0xd0]
push eax
call fcn.0041ec00
cmp byte [esp + 0x15], bl
je 0x462760
lea ecx, [esp + 0x60]
call fcn.0041c950
test eax, eax
je 0x462760
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x462751
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
cmp ebp, ebx
je 0x4627c1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x24]
cmp eax, ecx
jbe 0x4627c1
sub eax, ecx
cmp eax, ebp
jb 0x46274d
mov dword [esi + 0xf8], 3
mov edx, dword [edi]
push str.Application_timeout_after_DNS
mov ecx, edi
call dword [edx + 0x10]
jmp 0x4629a5
sub ebp, eax
jmp 0x4627c1
mov dword [esi + 0xf8], 2
jmp 0x4629a5
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.004596d0
cmp byte [esp + 0x13], bl
je 0x462798
mov dword [esi + 0xf8], 4
jmp 0x4629a5
mov dl, byte [esp + 0x14]
xor eax, eax
cmp dl, bl
setne al
add eax, 2
mov dword [esi + 0xf8], eax
jmp 0x4629a5
push ebp
lea ecx, [esi + 0xd0]
call fcn.0041eb70
mov ebp, dword [esp + 0x20]
push 1
push edi
mov ecx, esi
call fcn.00460f10
cmp al, bl
je 0x4629cd
mov eax, dword [esi + 0x54]
cmp eax, 0xffffffff
je 0x4629cd
cmp ebp, ebx
mov dword [esp + 0x18], 1
je 0x4627fc
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 0x462919
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
mov dword [esp + 0x24], eax
je 0x46283b
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 0x46293a
cmp eax, 0x2733
jne 0x462919
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.00462c00
test al, al
je 0x4628bc
mov eax, dword [esi + 0x54]
mov dword [esp + 0x18], ebx
cmp eax, 0xffffffff
je 0x4628ab
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.00473b40
jmp 0x46295c
cmp byte [esp + 0x15], bl
je 0x4628ee
mov eax, dword [esi + 0x54]
mov dword [esp + 0x18], ebx
cmp eax, 0xffffffff
je 0x4628df
lea edx, [esp + 0x18]
push edx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [esi + 0xf8], 4
jmp 0x4629a5
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.004614f0
add esp, 8
cmp ebp, ebx
je 0x46293a
mov eax, dword [esi + 0x54]
mov dword [esp + 0x18], ebx
cmp eax, 0xffffffff
je 0x46293a
lea edx, [esp + 0x18]
push edx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [esp + 0x20], ebx
jne 0x462987
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 + 0x60]
mov byte [esp + 0x90], bl
call fcn.0041dcd0
lea ecx, [esp + 0x38]
mov dword [esp + 0x90], 0xffffffff
call fcn.0041dcd0
mov al, 1
jmp 0x462a0d
cmp dword [esi + 0xf8], ebx
jne 0x462999
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.0041dcd0
lea ecx, [esp + 0x38]
mov dword [esp + 0x90], 0xffffffff
call fcn.0041dcd0
xor al, al
jmp 0x462a0d
mov dword [esi + 0xf8], 5
mov edx, dword [edi]
push str.Cannot_connect__invalid_socket.
mov ecx, edi
call dword [edx + 0x10]
jmp 0x4629a5
mov ecx, dword [esp + 0xac]
mov edx, dword [esp + 0xa8]
push ecx
mov ecx, dword [esp + 0x9c]
push eax
mov eax, dword [esp + 0xa4]
push edx
push eax
push ecx
mov ecx, esi
call fcn.00461e30
mov ecx, dword [esp + 0x88]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x84
ret 0x1c