Function at 0x583130
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6379b8
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x717f80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi + 0xc8], 0x4901fb2a
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
je 0x583185
xor al, al
jmp 0x5832f2
movzx eax, byte [esi + 0x129]
lea ecx, [ebp - 0x28]
push eax
push str.connect
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push esi
movq qword [ebp - 0x28], xmm0
call fcn.004b24c0
mov ecx, dword [edi + 0x28c]
mov dword [ebp - 4], 0
cmp ecx, 0xffffffff
jne 0x5831d4
mov dword [ebx + 0x2c], 5
mov ecx, esi
mov eax, dword [esi]
push str.Cannot_connect__invalid_socket
call dword [eax + 0x14]
jmp 0x5832e6
mov eax, dword [ebp - 0x14]
mov edx, 0x1499700
mov dword [ebp - 0x1c], 1
mov eax, dword [eax + 0xc20]
test eax, eax
cmove eax, edx
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
push 0x8004667e
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
call sub.KERNEL32.dll_GetTickCount
push dword [ebp + 0x10]
push dword [ebp - 0x18]
push dword [edi + 0x28c]
call dword [sym.imp.WS2_32.dll_connect]
cmp dword [edi + 0xc8], 0x4901fb2a
jne 0x5832e6
test eax, eax
je 0x583338
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x5833d9
cmp byte [esi + 0x129], 0
je 0x583265
mov eax, dword [esi]
mov ecx, esi
push str.Waiting_for_the_connect_to_complete...
call dword [eax + 0x18]
push dword [ebp - 0x14]
mov ecx, esi
push str.connectTimeoutMs
call fcn.004b2d90
push esi
push ebx
push 1
push 0
push dword [ebp - 0x14]
mov ecx, edi
call fcn.00587b10
cmp dword [edi + 0xc8], 0x4901fb2a
jne 0x5832e6
test al, al
je 0x58339a
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x18], 4
push eax
push 0x1007
push 0xffff
push dword [edi + 0x28c]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x583318
cmp dword [ebp - 0x14], eax
je 0x583310
mov eax, dword [esi]
mov ecx, esi
push str.getsockopt_indicates_an_error.
call dword [eax + 0x14]
push esi
push 0
push dword [ebp - 0x14]
call fcn.00585780
add esp, 0xc
mov dword [ebx + 0x2c], 7
mov ecx, edi
call fcn.00584580
xor bl, bl
lea ecx, [ebp - 0x28]
call fcn.004b2630
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00622073
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [edi + 0xc8]
jmp 0x583331
mov eax, dword [esi]
mov ecx, esi
push str.Failed_to_get_SO_ERROR_on_socket.
call dword [eax + 0x14]
mov eax, dword [edi + 0xc8]
cmp eax, 0x4901fb2a
jne 0x5832e6
cmp eax, 0x4901fb2a
jne 0x5832e6
mov byte [edi + 0x288], 1
mov byte [edi + 0x28a], 0
cmp byte [esi + 0x129], 0
je 0x583426
push 0x74
lea eax, [ebp - 0x9c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x9c]
call fcn.00494a40
cmp dword [edi + 0x290], 2
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x9c]
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], 0
mov ecx, edi
push eax
jne 0x5833f0
call fcn.00582ea0
jmp 0x5833f5
cmp byte [ebx + 0x15], 0
je 0x5833b9
push esi
push str.failedWaitToConnect
mov ecx, ebx
mov dword [ebx + 0x2c], 4
call fcn.004d9190
jmp 0x5832df
xor eax, eax
mov ecx, ebx
cmp byte [ebx + 0x14], al
push esi
sete al
add eax, 6
push str.failedWaitToConnect
mov dword [ebx + 0x2c], eax
call fcn.004d9190
jmp 0x5832df
push esi
push ebx
push eax
mov dword [ebx + 0x2c], 7
call fcn.00585780
add esp, 0xc
jmp 0x5832df
call fcn.00582fd0
lea eax, [ebp - 0x9c]
mov ecx, esi
push eax
push str.myIP
call fcn.004b3100
push dword [ebp - 0x14]
mov ecx, esi
push str.myPort
call fcn.004b2d90
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 0
call fcn.00494a90
push esi
lea ecx, [edi + 0xd8]
call fcn.0057daf0
push esi
lea ecx, [edi + 0x120]
call fcn.0057daf0
cmp byte [esi + 0x129], 0
je 0x583453
mov eax, dword [esi]
mov ecx, esi
push str.socket_connect_successful.
call dword [eax + 0x18]
mov bl, 1
jmp 0x5832e8