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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, dword [0x751f00]
xor eax, esp
mov dword [esp + 0x60], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ebx
mov ebx, ecx
xor ecx, ecx
push esi
push edi
mov edi, dword [ebx]
mov dword [eax], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ecx
cmp dword [ebx + edx*4 + 0x2cc], ecx
je 0x40cfb8
mov dword [eax], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0055e7fd
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov eax, edx
imul eax, eax, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
mov esi, ecx
push 1
lea ecx, [esp + 0x24]
mov eax, edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], esi
call fcn.0040c6f0
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
test edx, edx
jg 0x40d034
jl 0x40d00e
test eax, eax
jae 0x40d034
push str.Connection_time_out
mov eax, edi
call fcn.0040f9d0
add esp, 4
mov eax, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0055e7fd
mov esp, ebp
pop ebp
ret
xor edi, edi
mov dword [esp + 0x10], edi
jmp 0x40d044
mov esi, dword [esp + 0x38]
mov eax, edi
xor eax, 1
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + edi*4 + 0x1a8]
cmp eax, 0xffffffff
je 0x40d25e
push 0
push 0
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.0040ef40
add esp, 0x14
test eax, eax
jne 0x40d1b6
mov ecx, dword [ebx + 0x32c]
mov edi, dword [ebx + 0x33c]
mov dword [esp + 0x14], eax
mov eax, esi
push 0
sub eax, ecx
cdq
push 0x3e8
push edx
push eax
call fcn.0056a120
mov esi, eax
mov eax, dword [esp + 0x28]
sub eax, dword [ebx + 0x328]
mov ecx, edx
imul eax, eax, 0x3e8
cdq
add esi, eax
adc ecx, edx
cmp ecx, edi
jl 0x40d0e1
jg 0x40d0c0
cmp esi, dword [ebx + 0x338]
jb 0x40d0e1
mov eax, dword [ebx + 0x338]
mov ecx, dword [esp + 0x18]
push edi
push eax
push str.After__ldms_connect_time__move_on__n
call fcn.0040f940
add esp, 0xc
mov dword [esp + 0x14], 0x274c
cmp dword [esp + 0x10], 0
jne 0x40d129
cmp dword [ebx + 0x54], 0
jne 0x40d129
mov ecx, dword [ebx + 0x32c]
mov edx, dword [ebx + 0x328]
mov eax, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push eax
push ecx
call fcn.004105f0
add esp, 0x10
test edx, edx
jl 0x40d129
jg 0x40d11b
cmp eax, 0xc8
jb 0x40d129
mov edx, dword [ebp + 8]
push 1
push edx
call fcn.0040cbf0
add esp, 8
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40d25e
mov edx, dword [esp + 0x18]
push eax
mov dword [edx + 0x8700], eax
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebx + edi*4 + 0x50]
test eax, eax
je 0x40d25e
mov ecx, dword [eax + 4]
sub ecx, 2
jne 0x40d173
mov eax, dword [eax + 0x18]
add eax, 4
push 0x2e
push eax
lea esi, [esp + 0x44]
call fcn.00431340
add esp, 8
mov edi, dword [esp + 0x14]
push ebx
call fcn.00431bd0
add esp, 4
push eax
mov eax, dword [ebx + 0x104]
push eax
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x24]
push str.connect_to__s_port__ld_failed:__s_n
call fcn.0040f940
mov esi, dword [esp + 0x20]
mov edx, dword [ebx + esi*4 + 0x50]
add esp, 0x10
cmp dword [edx + 0x1c], 0
jne 0x40d217
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
jmp 0x40d22a
cmp eax, 2
je 0x40d1e5
cmp dword [ebx + 0x310], 0
jne 0x40d1e5
test al, 4
je 0x40d12d
mov eax, dword [ebx + edi*4 + 0x1a8]
push eax
lea esi, [esp + 0x18]
call fcn.0040cb80
add esp, 4
jmp 0x40d12d
mov ecx, dword [ebx + edi*4 + 0x1a8]
push ecx
lea esi, [esp + 0x18]
call fcn.0040cb80
add esp, 4
test eax, eax
jne 0x40d2af
mov ecx, dword [esp + 0x18]
push str.Connection_failed_n
call fcn.0040f940
add esp, 4
jmp 0x40d12d
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push 0
push 2
push eax
push ecx
call fcn.0056a120
mov dword [ebx + 0x33c], edx
mov edx, dword [ebp + 8]
push esi
push edx
mov dword [ebx + 0x338], eax
call fcn.0040cbf0
add esp, 8
cmp eax, 7
jne 0x40d256
mov ecx, dword [esp + 0x2c]
cmp dword [ebx + ecx*4 + 0x1a8], 0xffffffff
jne 0x40d25a
mov dword [esp + 0x1c], eax
mov edi, dword [esp + 0x10]
inc edi
cmp edi, 2
mov dword [esp + 0x10], edi
jl 0x40d040
cmp dword [esp + 0x1c], 0
je 0x40d3dd
cmp dword [ebx + 0x54], 0
jne 0x40d297
mov ecx, dword [ebp + 8]
push 1
push ecx
call fcn.0040cbf0
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40d3dd
cmp dword [ebx + 0x2b4], 0
je 0x40d38e
mov esi, dword [ebx + 0xcc]
jmp 0x40d3b6
mov edx, dword [ebx + edi*4 + 0x1a8]
mov eax, dword [ebp + 8]
mov dword [ebx + eax*4 + 0x1a0], edx
mov ecx, dword [ebx + edi*4 + 0x50]
mov dword [ebx + 0x4c], ecx
mov dword [ebx + edi*4 + 0x1a8], 0xffffffff
mov edi, dword [esp + 0x2c]
mov eax, dword [ebx + edi*4 + 0x1a8]
cmp eax, 0xffffffff
je 0x40d2f4
mov esi, ebx
call fcn.0040da20
mov dword [ebx + edi*4 + 0x1a8], 0xffffffff
mov edi, dword [ebp + 8]
mov eax, ebx
call fcn.00408d40
test eax, eax
jne 0x40d3e1
mov edx, dword [esp + 0x30]
mov dword [ebx + edi*4 + 0x2cc], 1
mov dword [edx], 1
test edi, edi
jne 0x40d363
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov esi, dword [esp + 0x18]
shr edx, 6
mov eax, edx
imul eax, eax, 0x3e8
sub ecx, eax
mov eax, dword [esi + 0x614]
imul ecx, ecx, 0x3e8
push eax
mov eax, dword [esi + 0x610]
push eax
push ecx
push edx
call fcn.00410630
add esp, 0x10
fstp qword [esi + 0x5e0]
mov ecx, dword [ebx + edi*4 + 0x1a0]
push ebx
call fcn.0040cdc0
add esp, 4
mov eax, ebx
call fcn.00408e60
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0055e7fd
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x2b0], 0
je 0x40d39f
mov esi, dword [ebx + 0xec]
jmp 0x40d3b6
cmp dword [ebx + 0x2a4], 0
je 0x40d3b0
mov esi, dword [ebx + 0xac]
jmp 0x40d3b6
mov esi, dword [ebx + 0x98]
mov edi, dword [esp + 0x14]
push ebx
call fcn.00431bd0
mov edx, dword [ebx + 0x104]
add esp, 4
push eax
mov eax, dword [esp + 0x1c]
push edx
push esi
push str.Failed_to_connect_to__s_port__ld:__s
call fcn.0040f9d0
add esp, 0x10
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0055e7fd
mov esp, ebp
pop ebp
ret