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

Disassembly:
sub esp, 0x50
mov eax, dword [0x1003b064]
xor eax, esp
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x64]
mov esi, dword [edi]
xor ebx, ebx
xor ebp, ebp
mov dword [eax], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebp
cmp dword [edi + ecx*4 + 0x1ec], ebx
je 0x10002d7a
mov dword [eax], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.10031292
add esp, 0x50
ret
call fcn.10029080
mov dword [esp + 0x20], edx
push 1
lea edx, [esp + 0x20]
push edx
push esi
mov dword [esp + 0x28], eax
call fcn.10001e70
add esp, 0xc
cmp eax, ebx
mov dword [esp + 0x24], eax
jge 0x10002dd0
push str.Connection_time_out
push esi
call fcn.10021a60
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1c
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.10031292
add esp, 0x50
ret
mov eax, dword [edi + ebx*4 + 0x158]
cmp eax, 0xffffffff
je 0x10002f4a
push 0
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.10021060
add esp, 0x10
test eax, eax
jne 0x10002e86
mov eax, dword [edi + 0x230]
mov ecx, dword [edi + 0x22c]
mov edx, dword [esp + 0x20]
mov esi, dword [edi + 0x238]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push eax
call fcn.100290b0
add esp, 0x10
cmp eax, esi
jl 0x10002e3d
mov ecx, dword [esp + 0x10]
push esi
push str.After__ldms_connect_time__move_on__n
push ecx
call fcn.100219d0
mov ebp, 0x274c
add esp, 0xc
mov dword [esp + 0x14], ebp
test ebx, ebx
jne 0x10002ed7
cmp dword [edi + 0x54], ebx
jne 0x10002ed7
mov edx, dword [edi + 0x230]
mov eax, dword [edi + 0x22c]
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
call fcn.100290b0
add esp, 0x10
cmp eax, 0xc8
jl 0x10002ed7
mov eax, dword [esp + 0x68]
push 1
push eax
call fcn.10002c70
add esp, 8
jmp 0x10002ed7
cmp eax, 2
jne 0x10002ebb
mov ecx, dword [edi + ebx*4 + 0x158]
push ecx
lea esi, [esp + 0x18]
call fcn.10002330
add esp, 4
test eax, eax
jne 0x10002f94
mov edx, dword [esp + 0x10]
push str.Connection_failed_n
push edx
call fcn.100219d0
add esp, 8
jmp 0x10002ed3
test al, 4
je 0x10002ed7
mov eax, dword [edi + ebx*4 + 0x158]
push eax
lea esi, [esp + 0x18]
call fcn.10002330
add esp, 4
mov ebp, dword [esp + 0x14]
test ebp, ebp
je 0x10002f4a
mov esi, dword [esp + 0x10]
push ebp
mov dword [esi + 0x85dc], ebp
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov edx, dword [edi + ebx*4 + 0x50]
push 0x2e
lea ecx, [esp + 0x30]
push ecx
push edx
call fcn.1000f5d0
push ebp
push edi
call fcn.10025e30
push eax
mov eax, dword [edi + 0xb0]
push eax
lea ecx, [esp + 0x48]
push ecx
push str.connect_to__s_port__ld_failed:__s_n
push esi
call fcn.100219d0
mov edx, dword [edi + ebx*4 + 0x50]
mov eax, dword [esp + 0x4c]
add esp, 0x28
cmp dword [edx + 0x1c], 0
je 0x10002f32
cdq
sub eax, edx
sar eax, 1
mov dword [edi + 0x238], eax
mov eax, dword [esp + 0x68]
push ebx
push eax
call fcn.10002c70
add esp, 8
mov dword [esp + 0x18], eax
inc ebx
cmp ebx, 2
jl 0x10002dd0
cmp dword [esp + 0x18], 0
je 0x1000306c
cmp dword [edi + 0x54], 0
jne 0x10002f7c
mov eax, dword [esp + 0x68]
push 1
push eax
call fcn.10002c70
add esp, 8
test eax, eax
je 0x10002d65
cmp dword [edi + 0x1d0], 0
je 0x10003044
mov esi, dword [edi + 0xa8]
jmp 0x1000304a
mov ecx, dword [edi + ebx*4 + 0x158]
mov ebp, dword [esp + 0x68]
mov dword [edi + ebp*4 + 0x150], ecx
mov edx, dword [edi + ebx*4 + 0x50]
mov esi, ebx
xor esi, 1
mov dword [edi + 0x4c], edx
mov dword [edi + ebx*4 + 0x158], 0xffffffff
mov eax, dword [edi + esi*4 + 0x158]
cmp eax, 0xffffffff
je 0x10002fde
push eax
push edi
call fcn.100027e0
add esp, 8
mov dword [edi + esi*4 + 0x158], 0xffffffff
push ebp
push edi
call fcn.1002b570
add esp, 8
test eax, eax
jne 0x10003070
mov eax, dword [esp + 0x28]
mov dword [edi + ebp*4 + 0x1ec], 1
mov dword [eax], 1
test ebp, ebp
jne 0x10003018
mov ecx, dword [esp + 0x10]
push 2
push ecx
call fcn.1001f5e0
add esp, 8
mov edx, dword [edi + ebp*4 + 0x150]
push edx
push edi
call fcn.10002440
push edi
call fcn.1002b600
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.10031292
add esp, 0x50
ret
mov esi, dword [edi + 0x98]
push ebp
push edi
call fcn.10025e30
mov ecx, dword [edi + 0xb0]
mov edx, dword [esp + 0x18]
push eax
push ecx
push esi
push str.Failed_to_connect_to__s_port__ld:__s
push edx
call fcn.10021a60
add esp, 0x1c
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10031292
add esp, 0x50
ret