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

Disassembly:
sub esp, 0x54
mov eax, dword [0x6a21bc]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x5c]
push esi
xor edx, edx
push edi
mov edi, dword [esp + 0x60]
mov esi, dword [edi]
mov dword [eax], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], edx
cmp dword [edi + ecx*4 + 0x2a4], edx
je 0x5c3958
pop edi
mov dword [eax], 1
xor eax, eax
pop esi
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.005211a0
add esp, 0x54
ret
push ebx
push ebp
call fcn.005bf820
mov ebp, eax
mov eax, dword [esi + 0x1f8]
mov ebx, edx
xor ecx, ecx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0x10], 0x493e0
test eax, eax
jle 0x5c3984
mov ecx, 1
mov edx, dword [esi + 0x1fc]
test edx, edx
jle 0x5c3991
or ecx, 2
dec ecx
je 0x5c39a4
dec ecx
je 0x5c399e
dec ecx
jne 0x5c39a8
cmp eax, edx
jl 0x5c39a4
mov dword [esp + 0x10], edx
jmp 0x5c39a8
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x78c]
mov ecx, dword [esi + 0x788]
push eax
push ecx
push ebx
push ebp
call fcn.005bf850
add esp, 0x10
sub dword [esp + 0x10], eax
je 0x5c39cd
cmp dword [esp + 0x10], 0
jge 0x5c39f3
push str.Connection_time_out
push esi
call fcn.005bfec0
add esp, 8
pop ebp
pop ebx
pop edi
mov eax, 0x1c
pop esi
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.005211a0
add esp, 0x54
ret
xor ebx, ebx
jmp 0x5c3a00
mov eax, dword [edi + ebx*4 + 0x1a0]
mov ebp, ebx
xor ebp, 1
cmp eax, 0xffffffff
je 0x5c3b54
push 0
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.005b6790
add esp, 0x10
test eax, eax
jne 0x5c3aa5
mov edx, dword [edi + 0x304]
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x300]
push eax
push ecx
push edx
call fcn.005bf850
add esp, 0x10
cmp eax, dword [edi + 0x30c]
jl 0x5c3a5c
mov dword [esp + 0x14], 0x274c
test ebx, ebx
jne 0x5c3aed
cmp dword [edi + 0x5c], ebx
jne 0x5c3aed
mov eax, dword [edi + 0x304]
mov ecx, dword [edi + 0x300]
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
call fcn.005bf850
add esp, 0x10
cmp eax, 0xc8
jl 0x5c3aed
mov ecx, dword [esp + 0x20]
push 1
push ecx
call fcn.005c3830
add esp, 8
jmp 0x5c3aed
cmp eax, 2
je 0x5c3acd
cmp dword [edi + 0x2e8], 0
jne 0x5c3acd
test al, 4
je 0x5c3aed
mov edx, dword [edi + ebx*4 + 0x1a0]
push edx
lea esi, [esp + 0x18]
call fcn.005c2d40
add esp, 4
jmp 0x5c3ae9
mov eax, dword [edi + ebx*4 + 0x1a0]
push eax
lea esi, [esp + 0x18]
call fcn.005c2d40
add esp, 4
test eax, eax
jne 0x5c3ba2
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x5c3b54
push eax
mov dword [esi + 0x108a4], eax
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [edi + ebx*4 + 0x58]
test eax, eax
je 0x5c3b54
push 0x2e
lea ecx, [esp + 0x34]
push ecx
push eax
call fcn.005b7750
mov edx, dword [edi + ebx*4 + 0x58]
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp dword [edx + 0x1c], 0
je 0x5c3b2d
cdq
sub eax, edx
sar eax, 1
mov dword [edi + 0x30c], eax
mov eax, dword [esp + 0x20]
push ebx
push eax
call fcn.005c3830
add esp, 8
cmp eax, 7
jne 0x5c3b50
cmp dword [edi + ebp*4 + 0x1a0], 0xffffffff
jne 0x5c3b54
mov dword [esp + 0x1c], eax
inc ebx
cmp ebx, 2
jl 0x5c3a00
cmp dword [esp + 0x1c], 0
je 0x5c3c95
cmp dword [edi + 0x5c], 0
jne 0x5c3b8a
mov eax, dword [esp + 0x20]
push 1
push eax
call fcn.005c3830
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x5c3c32
cmp dword [edi + 0x28c], 0
je 0x5c3c47
mov esi, dword [edi + 0xc4]
jmp 0x5c3c6f
mov ecx, dword [edi + ebx*4 + 0x1a0]
mov esi, dword [esp + 0x20]
mov dword [edi + esi*4 + 0x198], ecx
mov edx, dword [edi + ebx*4 + 0x58]
mov dword [edi + 0x54], edx
mov dword [edi + ebx*4 + 0x1a0], 0xffffffff
mov eax, dword [edi + ebp*4 + 0x1a0]
cmp eax, 0xffffffff
je 0x5c3be7
push eax
push edi
call fcn.005c3210
add esp, 8
mov dword [edi + ebp*4 + 0x1a0], 0xffffffff
push esi
push edi
call fcn.005b8a40
add esp, 8
test eax, eax
jne 0x5c3c99
mov eax, dword [esp + 0x2c]
mov dword [edi + esi*4 + 0x2a4], 1
mov dword [eax], 1
test esi, esi
jne 0x5c3c21
mov ecx, dword [esp + 0x18]
push 4
push ecx
call fcn.005c74e0
add esp, 8
mov edx, dword [edi + esi*4 + 0x198]
push edx
push edi
call fcn.005c2eb0
add esp, 8
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.005211a0
add esp, 0x54
ret
cmp dword [edi + 0x288], 0
je 0x5c3c58
mov esi, dword [edi + 0xe4]
jmp 0x5c3c6f
cmp dword [edi + 0x27c], 0
je 0x5c3c69
mov esi, dword [edi + 0xb4]
jmp 0x5c3c6f
mov esi, dword [edi + 0xa0]
mov ecx, dword [esp + 0x14]
push ecx
push edi
call fcn.005d3360
mov edx, dword [edi + 0xfc]
push eax
mov eax, dword [esp + 0x24]
push edx
push esi
push str.Failed_to_connect_to__s_port__ld:__s
push eax
call fcn.005bfec0
add esp, 0x1c
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x60]
pop ebp
pop ebx
pop edi
pop esi
xor ecx, esp
call fcn.005211a0
add esp, 0x54
ret