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

Disassembly:
sub esp, 0x54
mov eax, dword [0x100d95f0]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x5c]
push ebp
push esi
xor ebp, ebp
push edi
mov edi, dword [esp + 0x64]
mov esi, dword [edi]
mov dword [eax], ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], ebp
cmp dword [edi + ecx*4 + 0x270], ebp
je 0x1005caaa
pop edi
pop esi
mov dword [eax], 1
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.10088aee
add esp, 0x54
ret
push ebx
call fcn.100590a0
mov ebx, eax
mov eax, dword [esi + 0x1e0]
xor ecx, ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], 0x493e0
cmp eax, ebp
jle 0x1005cad3
mov ecx, 1
mov edx, dword [esi + 0x1e4]
test edx, edx
jle 0x1005cae0
or ecx, 2
dec ecx
je 0x1005caf3
dec ecx
je 0x1005caed
dec ecx
jne 0x1005caf7
cmp eax, edx
jl 0x1005caf3
mov dword [esp + 0x10], edx
jmp 0x1005caf7
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x52c]
mov ecx, dword [esi + 0x528]
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
push ebx
call fcn.100590d0
add esp, 0x10
sub dword [esp + 0x10], eax
je 0x1005cb1f
cmp dword [esp + 0x10], ebp
jge 0x1005cb45
push str.Connection_time_out
push esi
call fcn.10059590
add esp, 8
pop ebx
pop edi
pop esi
mov eax, 0x1c
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.10088aee
add esp, 0x54
ret
xor ebx, ebx
jmp 0x1005cb50
mov eax, dword [edi + ebx*4 + 0x15c]
cmp eax, 0xffffffff
je 0x1005cccc
push 0
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.1004ed10
add esp, 0x10
test eax, eax
jne 0x1005cc07
mov eax, dword [edi + 0x2b4]
mov ecx, dword [edi + 0x2b0]
mov edx, dword [esp + 0x28]
mov esi, dword [edi + 0x2bc]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
call fcn.100590d0
add esp, 0x10
cmp eax, esi
jl 0x1005cbbd
mov ecx, dword [esp + 0x14]
push esi
push str.After__ldms_connect_time__move_on__n
push ecx
call fcn.10059500
mov ebp, 0x274c
add esp, 0xc
mov dword [esp + 0x18], ebp
test ebx, ebx
jne 0x1005cc58
cmp dword [edi + 0x54], ebx
jne 0x1005cc58
mov edx, dword [edi + 0x2b4]
mov eax, dword [edi + 0x2b0]
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
call fcn.100590d0
add esp, 0x10
cmp eax, 0xc8
jl 0x1005cc58
mov eax, dword [esp + 0x1c]
push 1
push eax
push edi
call fcn.1005c990
add esp, 0xc
jmp 0x1005cc58
cmp eax, 2
jne 0x1005cc3c
mov ecx, dword [edi + ebx*4 + 0x15c]
push ecx
lea esi, [esp + 0x1c]
call fcn.1005bf70
add esp, 4
test eax, eax
jne 0x1005cd17
mov edx, dword [esp + 0x14]
push str.Connection_failed_n
push edx
call fcn.10059500
add esp, 8
jmp 0x1005cc54
test al, 4
je 0x1005cc5c
mov eax, dword [edi + ebx*4 + 0x15c]
push eax
lea esi, [esp + 0x1c]
call fcn.1005bf70
add esp, 4
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
test ebp, ebp
je 0x1005cccc
push ebp
mov dword [esi + 0x85ec], ebp
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov edx, dword [edi + ebx*4 + 0x50]
push 0x2e
lea ecx, [esp + 0x34]
push ecx
push edx
call fcn.10050290
push ebp
push edi
call fcn.1004d0b0
push eax
mov eax, dword [edi + 0xb0]
push eax
lea ecx, [esp + 0x4c]
push ecx
push str.connect_to__s_port__ld_failed:__s_n
push esi
call fcn.10059500
mov edx, dword [edi + ebx*4 + 0x50]
mov eax, dword [esp + 0x38]
add esp, 0x28
cmp dword [edx + 0x1c], 0
je 0x1005ccb3
cdq
sub eax, edx
sar eax, 1
mov dword [edi + 0x2bc], eax
mov eax, dword [esp + 0x1c]
push ebx
push eax
push edi
call fcn.1005c990
add esp, 0xc
mov dword [esp + 0x20], eax
inc ebx
cmp ebx, 2
jl 0x1005cb50
cmp dword [esp + 0x20], 0
je 0x1005cdef
cmp dword [edi + 0x54], 0
jne 0x1005ccff
mov eax, dword [esp + 0x1c]
push 1
push eax
push edi
call fcn.1005c990
add esp, 0xc
test eax, eax
je 0x1005cdb2
cmp dword [edi + 0x254], 0
je 0x1005cdc7
mov esi, dword [edi + 0xa8]
jmp 0x1005cdcd
mov ecx, dword [edi + ebx*4 + 0x15c]
mov ebp, dword [esp + 0x1c]
mov dword [edi + ebp*4 + 0x154], ecx
mov edx, dword [edi + ebx*4 + 0x50]
mov esi, ebx
xor esi, 1
mov dword [edi + 0x4c], edx
mov dword [edi + ebx*4 + 0x15c], 0xffffffff
mov eax, dword [edi + esi*4 + 0x15c]
cmp eax, 0xffffffff
je 0x1005cd61
push eax
push edi
call fcn.1005c470
add esp, 8
mov dword [edi + esi*4 + 0x15c], 0xffffffff
push ebp
push edi
call fcn.10051330
add esp, 8
test eax, eax
jne 0x1005cdf3
mov eax, dword [esp + 0x2c]
mov dword [edi + ebp*4 + 0x270], 1
mov dword [eax], 1
test ebp, ebp
jne 0x1005cd9b
mov ecx, dword [esp + 0x14]
push 2
push ecx
call fcn.1005f840
add esp, 8
mov edx, dword [edi + ebp*4 + 0x154]
push edx
push edi
call fcn.1005c0b0
push edi
call fcn.100513c0
add esp, 0xc
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.10088aee
add esp, 0x54
ret
mov esi, dword [edi + 0x98]
push ebp
push edi
call fcn.1004d0b0
mov ecx, dword [edi + 0xb0]
mov edx, dword [esp + 0x1c]
push eax
push ecx
push esi
push str.Failed_to_connect_to__s_port__ld:__s
push edx
call fcn.10059590
add esp, 0x1c
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x60]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.10088aee
add esp, 0x54
ret