Function at 0x491e60
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, dword [0x5bc324]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], 0
mov ecx, dword [ebp + 8]
mov eax, edx
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], ecx
mov esi, dword [edi]
mov dword [ecx], ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x28], ebx
cmp dword [edi + eax*4 + 0x270], ebx
je 0x491ebf
mov dword [ecx], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [esp + 0x14], 0x493e0
mov eax, 0x10624dd3
mul ecx
mov eax, edx
mov edx, dword [esi + 0x220]
shr eax, 6
mov dword [esp + 0x24], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2c], eax
xor eax, eax
test edx, edx
setg al
cmp dword [esi + 0x224], ebx
jle 0x491f15
or eax, 2
mov dword [esp + 0x10], ecx
sub eax, 1
je 0x491f33
sub eax, 1
je 0x49206a
sub eax, 1
jne 0x491f3b
mov eax, dword [esi + 0x224]
cmp edx, eax
cmovge edx, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esi + 0x570]
sub esi, dword [esp + 0x10]
sub ecx, dword [eax + 0x574]
mov eax, 0x10624dd3
imul ecx
imul eax, esi, 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
mov ecx, dword [esp + 0x14]
add ecx, eax
mov dword [esp + 0x14], ecx
je 0x492396
test ecx, ecx
js 0x492396
xor esi, esi
mov dword [esp + 0x10], esi
nop word [eax + eax]
mov eax, dword [edi + esi*4 + 0x15c]
cmp eax, 0xffffffff
je 0x4921c6
push 0
push eax
or edx, 0xffffffff
or ecx, 0xffffffff
call fcn.00492e70
add esp, 8
test eax, eax
jne 0x492079
mov ecx, dword [esp + 0x2c]
mov eax, 0x10624dd3
sub ecx, dword [edi + 0x2b4]
imul ecx
mov eax, dword [esp + 0x24]
sub eax, dword [edi + 0x2b0]
sar edx, 6
imul eax, eax, 0x3e8
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
mov eax, dword [edi + 0x2bc]
cmp ecx, eax
jl 0x49200b
push eax
push str.After__ldms_connect_time__move_on__n
push dword [esp + 0x20]
call fcn.00490900
mov ebx, 0x274c
add esp, 0xc
mov dword [esp + 0x28], ebx
test esi, esi
jne 0x492120
cmp dword [edi + 0x54], esi
jne 0x492120
mov ecx, dword [esp + 0x2c]
mov eax, 0x10624dd3
sub ecx, dword [edi + 0x2b4]
imul ecx
mov eax, dword [esp + 0x24]
sub eax, dword [edi + 0x2b0]
sar edx, 6
imul eax, eax, 0x3e8
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
cmp ecx, 0xc8
jl 0x492120
mov edx, dword [esp + 0x1c]
mov ecx, edi
push 1
call fcn.00491ad0
add esp, 4
jmp 0x492120
mov eax, dword [esi + 0x224]
mov dword [esp + 0x14], eax
jmp 0x491f37
cmp eax, 2
jne 0x492108
mov esi, dword [edi + esi*4 + 0x15c]
push 0
push 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 4
call dword [sym.imp.KERNEL32.dll_SleepEx]
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x34]
push eax
push 0x1007
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x4920cc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
jmp 0x4920d0
mov ebx, dword [esp + 0x30]
test ebx, ebx
je 0x4920e0
cmp ebx, 0x2748
je 0x4920e0
xor eax, eax
jmp 0x4920e5
mov eax, 1
mov dword [esp + 0x28], ebx
test eax, eax
jne 0x492216
push str.Connection_failed_n
push dword [esp + 0x1c]
call fcn.00490900
mov esi, dword [esp + 0x18]
add esp, 8
jmp 0x492120
test al, 4
je 0x492120
mov ecx, dword [edi + esi*4 + 0x15c]
lea edx, [esp + 0x28]
call fcn.00491a60
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x4921c6
mov eax, dword [esp + 0x18]
push ebx
mov dword [eax + 0x863c], ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov edx, dword [edi + esi*4 + 0x50]
test edx, edx
je 0x4921c6
mov eax, dword [edx + 4]
sub eax, 2
jne 0x492167
mov edx, dword [edx + 0x18]
lea eax, [esp + 0x3c]
push 0x2e
push eax
add edx, 4
mov ecx, 2
call fcn.004aa740
add esp, 8
mov edx, ebx
mov ecx, edi
call fcn.0048cc00
push eax
push dword [edi + 0xb0]
lea eax, [esp + 0x44]
push eax
push str.connect_to__s_port__ld_failed:__s_n
push dword [esp + 0x28]
call fcn.00490900
mov eax, dword [esp + 0x28]
add esp, 0x14
mov esi, dword [edi + esi*4 + 0x50]
cdq
sub eax, edx
mov edx, dword [esp + 0x1c]
mov ecx, eax
mov eax, dword [esp + 0x14]
sar ecx, 1
cmp dword [esi + 0x1c], 0
mov esi, dword [esp + 0x10]
cmovne eax, ecx
mov ecx, edi
push esi
mov dword [edi + 0x2bc], eax
call fcn.00491ad0
add esp, 4
mov dword [esp + 0x20], eax
jmp 0x4921ca
mov eax, dword [esp + 0x20]
inc esi
mov dword [esp + 0x10], esi
cmp esi, 2
jl 0x491f90
test eax, eax
je 0x4923ac
cmp dword [edi + 0x54], 0
jne 0x4921fe
mov edx, dword [esp + 0x1c]
mov ecx, edi
push 1
call fcn.00491ad0
add esp, 4
test eax, eax
je 0x491eab
cmp dword [edi + 0x254], 0
je 0x492358
mov esi, dword [edi + 0xa8]
jmp 0x49235e
mov ecx, dword [esp + 0x10]
mov esi, ecx
mov ebx, dword [esp + 0x1c]
xor esi, 1
mov eax, dword [edi + ecx*4 + 0x15c]
mov dword [edi + ebx*4 + 0x154], eax
mov eax, dword [edi + ecx*4 + 0x50]
mov dword [edi + 0x4c], eax
mov dword [edi + ecx*4 + 0x15c], 0xffffffff
mov edx, dword [edi + esi*4 + 0x15c]
cmp edx, 0xffffffff
je 0x492261
mov ecx, edi
call fcn.00492cd0
mov dword [edi + esi*4 + 0x15c], 0xffffffff
cmp dword [edi + 0x254], 0
je case.default.0x49227c
test ebx, ebx
jne case.default.0x49227c
mov eax, dword [edi + 0x138]
add eax, 0xfffffffc
cmp eax, 3
ja case.default.0x49227c
jmp dword [eax*4 + 0x4923c0]
mov edx, dword [edi + 0x134]
mov ecx, dword [edi + 0x130]
push edi
push 0
push dword [edi + 0xb4]
push dword [edi + 0x98]
call fcn.004afc80
jmp 0x4922c5
push 0
jmp 0x4922ab
push 1
mov edx, dword [edi + 0x98]
mov ecx, dword [edi + 0x130]
push edi
push 0
push dword [edi + 0xb4]
call fcn.004af5c0
add esp, 0x10
test eax, eax
jne 0x4923ac
mov ecx, dword [esp + 0x38]
mov dword [edi + ebx*4 + 0x270], 1
mov dword [ecx], 1
test ebx, ebx
jne 0x49232f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [esp + 0x18]
mov esi, eax
mov eax, 0x10624dd3
mul esi
push dword [ebx + 0x574]
shr edx, 6
push dword [ebx + 0x570]
imul ecx, edx, 0x3e8
sub esi, ecx
imul eax, esi, 0x3e8
push eax
push edx
call fcn.0049df90
movsd qword [ebx + 0x540], xmm0
add esp, 0x10
mov ebx, dword [esp + 0x1c]
mov edx, dword [edi + ebx*4 + 0x154]
mov ecx, edi
call fcn.00491c90
mov ecx, edi
call fcn.004982a0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
mov esi, dword [edi + 0x98]
mov edx, ebx
mov ecx, edi
call fcn.0048cc00
push eax
push dword [edi + 0xb0]
push esi
push str.Failed_to_connect_to__s_port__ld:__s
push dword [esp + 0x28]
call fcn.004909c0
mov eax, dword [esp + 0x34]
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
push str.Connection_time_out
push dword [esp + 0x1c]
call fcn.004909c0
add esp, 8
mov eax, 0x1c
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret