Function at 0x58d880
Capabilities:
Connect socket

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x651733
push eax
mov dword fs:[0], esp
sub esp, 0x8c
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebp, 0x4901fb2a
cmp dword [edi + 0xd0], ebp
jne 0x58dad5
mov esi, dword [esp + 0xbc]
lea ecx, [esp + 0x14]
mov al, byte [esi + 0x121]
push eax
push str.connect
push esi
call fcn.004f03a0
mov eax, dword [edi + 0x294]
or ebx, 0xffffffff
cmp eax, ebx
mov dword [esp + 0xa4], 0
jne 0x58d918
mov ecx, dword [esp + 0xb8]
push str.Cannot_connect__invalid_socket
mov dword [ecx + 0x28], 5
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x14]
lea ecx, [esp + 0x14]
mov dword [esp + 0xa4], ebx
call fcn.004f03e0
xor al, al
jmp 0x58dbbe
mov eax, dword [esp + 0xac]
mov ebx, dword [eax + 0xc18]
test ebx, ebx
jne 0x58d92e
mov ebx, 0x1499700
mov ecx, edi
call fcn.0058b7c0
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esp + 0xb4]
mov edx, dword [esp + 0xb0]
mov eax, dword [edi + 0x294]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp dword [edi + 0xd0], ebp
jne 0x58dac1
test eax, eax
je 0x58dae1
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x58daa1
mov al, byte [esi + 0x121]
test al, al
je 0x58d99e
mov edx, dword [esi]
push str.Waiting_for_the_connect_to_complete...
mov ecx, esi
call dword [edx + 0x18]
push ebx
push str.connectTimeoutMs
mov ecx, esi
call fcn.004effe0
mov ebp, dword [esp + 0xb8]
push esi
push ebp
push 1
push 0
push ebx
mov ecx, edi
call fcn.0058ea10
mov ecx, dword [edi + 0xd0]
mov ebx, 0x4901fb2a
cmp ecx, ebx
jne 0x58dac1
test al, al
je 0x58da51
mov edx, dword [edi + 0x294]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x1007
push 0xffff
push edx
mov dword [esp + 0x24], 0
mov dword [esp + 0x38], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x58da37
mov eax, dword [esp + 0x10]
test eax, eax
je 0x58dadc
mov eax, dword [esi]
push str.getsockopt_indicates_an_error.
mov ecx, esi
call dword [eax + 0x14]
mov ecx, dword [esp + 0x10]
push esi
push 0
push ecx
call fcn.0058c2a0
add esp, 0xc
mov dword [ebp + 0x28], 7
jmp 0x58daba
mov edx, dword [esi]
push str.Failed_to_get_SO_ERROR_on_socket.
mov ecx, esi
call dword [edx + 0x14]
cmp dword [edi + 0xd0], ebx
je 0x58dadc
jmp 0x58dac1
mov al, byte [ebp + 0x15]
test al, al
je 0x58da6e
push esi
push str.failedWaitToConnect
mov ecx, ebp
mov dword [ebp + 0x28], 4
call fcn.00514d20
jmp 0x58daba
mov al, byte [ebp + 0x14]
test al, al
je 0x58da8b
push esi
push str.failedWaitToConnect
mov ecx, ebp
mov dword [ebp + 0x28], 6
call fcn.00514d20
jmp 0x58daba
push esi
push str.failedWaitToConnect
mov ecx, ebp
mov dword [ebp + 0x28], 7
call fcn.00514d20
jmp 0x58daba
mov ecx, dword [esp + 0xb8]
push esi
push ecx
push eax
mov dword [ecx + 0x28], 7
call fcn.0058c2a0
add esp, 0xc
mov ecx, edi
call fcn.0058fa50
lea ecx, [esp + 0x14]
mov dword [esp + 0xa4], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x58dbbe
mov ebp, 0x4901fb2a
cmp dword [edi + 0xd0], ebp
je 0x58db04
lea ecx, [esp + 0x14]
mov dword [esp + 0xa4], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x58dbbe
mov byte [edi + 0x290], 1
mov byte [edi + 0x292], 0
mov al, byte [esi + 0x121]
test al, al
je 0x58db7a
lea ecx, [esp + 0x28]
call fcn.004e57f0
lea eax, [esp + 0x20]
push esi
lea ecx, [esp + 0x2c]
push eax
push ecx
mov ecx, edi
mov byte [esp + 0xb0], 1
mov dword [esp + 0x2c], 0
call fcn.0058c9a0
lea edx, [esp + 0x28]
mov ecx, esi
push edx
push str.myIP
call fcn.004efcb0
mov eax, dword [esp + 0x20]
mov ecx, esi
push eax
push str.myPort
call fcn.004effe0
lea ecx, [esp + 0x28]
mov byte [esp + 0xa4], 0
call fcn.004e58d0
push esi
lea ecx, [edi + 0xe0]
call fcn.0061a8e0
push esi
lea ecx, [edi + 0x128]
call fcn.0061a8e0
mov al, byte [esi + 0x121]
test al, al
je 0x58dba8
mov edx, dword [esi]
push str.socket_connect_successful.
mov ecx, esi
call dword [edx + 0x18]
lea ecx, [esp + 0x14]
mov dword [esp + 0xa4], 0xffffffff
call fcn.004f03e0
mov al, 1
mov ecx, dword [esp + 0x9c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x98
ret 0x14