Function at 0x576030
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x686dd6
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x78f694]
xor eax, esp
mov dword [esp + 0x88], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x78f694]
xor eax, esp
push eax
lea eax, [esp + 0xa0]
mov dword fs:[0], eax
mov eax, dword [esp + 0xb4]
mov ebx, dword [esp + 0xb0]
mov ebp, dword [esp + 0xbc]
mov edi, dword [esp + 0xc0]
mov esi, ecx
cmp dword [esi + 0xd0], 0x4901fb2a
mov dword [esp + 0x18], eax
jne 0x5760ef
movzx ecx, byte [edi + 0x121]
push ecx
push str.connect
push edi
lea ecx, [esp + 0x28]
call fcn.004b1880
mov eax, dword [esi + 0x294]
cmp eax, 0xffffffff
mov dword [esp + 0xa8], 0
jne 0x5760f6
mov dword [ebp + 0x28], 5
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Cannot_connect__invalid_socket
mov ecx, edi
call eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0xa8], 0xffffffff
call fcn.004b18c0
xor al, al
jmp 0x576370
mov ebx, dword [ebx + 0xc18]
test ebx, ebx
jne 0x576105
mov ebx, 0x1499700
lea ecx, [esp + 0x14]
push ecx
push 0x8004667e
push eax
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
call sub.KERNEL32.dll_GetTickCount
mov edx, dword [esp + 0xb8]
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x294]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp dword [esi + 0xd0], 0x4901fb2a
jne 0x5760db
test eax, eax
je 0x576233
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x5762c9
cmp byte [edi + 0x121], 0
je 0x576186
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
push str.Waiting_for_the_connect_to_complete...
mov ecx, edi
call eax
push ebx
push str.connectTimeoutMs
mov ecx, edi
call fcn.004b14c0
push edi
push ebp
push 1
push 0
push ebx
mov ecx, esi
call fcn.005737b0
mov ebx, 0x4901fb2a
cmp dword [esi + 0xd0], ebx
jne 0x5760db
test al, al
je 0x576294
mov eax, dword [esi + 0x294]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
push 0x1007
push 0xffff
push eax
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x576219
cmp dword [esp + 0x14], eax
je 0x576233
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.getsockopt_indicates_an_error.
mov ecx, edi
call eax
mov ecx, dword [esp + 0x14]
push edi
push 0
push ecx
call fcn.00572a30
add esp, 0xc
mov ecx, esi
mov dword [ebp + 0x28], 7
call fcn.00573ed0
jmp 0x5760db
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Failed_to_get_SO_ERROR_on_socket.
mov ecx, edi
call eax
cmp dword [esi + 0xd0], ebx
jne 0x5760db
cmp dword [esi + 0xd0], 0x4901fb2a
jne 0x5760db
mov byte [esi + 0x290], 1
mov byte [esi + 0x292], 0
cmp byte [edi + 0x121], 0
je 0x57632b
lea ecx, [esp + 0x28]
call fcn.00485650
cmp dword [esi + 0x298], 2
mov byte [esp + 0xa8], 1
mov dword [esp + 0x14], 0
push edi
jne 0x5762e7
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.00574680
jmp 0x5762f8
cmp byte [ebp + 0x15], 0
je 0x5762a3
mov dword [ebp + 0x28], 4
jmp 0x5762b0
mov cl, byte [ebp + 0x14]
neg cl
sbb ecx, ecx
add ecx, 7
mov dword [ebp + 0x28], ecx
push edi
push str.failedWaitToConnect
mov ecx, ebp
call fcn.00512100
mov ecx, esi
call fcn.00573ed0
jmp 0x5760db
push edi
push ebp
push eax
mov dword [ebp + 0x28], 7
call fcn.00572a30
add esp, 0xc
mov ecx, esi
call fcn.00573ed0
jmp 0x5760db
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x30]
push edx
mov ecx, esi
call fcn.005747b0
lea eax, [esp + 0x28]
push eax
push str.myIP
mov ecx, edi
call fcn.004b1210
mov ecx, dword [esp + 0x14]
push ecx
push str.myPort
mov ecx, edi
call fcn.004b14c0
lea ecx, [esp + 0x28]
mov byte [esp + 0xa8], 0
call fcn.00485710
push edi
lea ecx, [esi + 0xe0]
call fcn.005a5ea0
push edi
lea ecx, [esi + 0x128]
call fcn.005a5ea0
cmp byte [edi + 0x121], 0
je 0x57635a
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
push str.socket_connect_successful.
mov ecx, edi
call eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0xa8], 0xffffffff
call fcn.004b18c0
mov al, 1
mov ecx, dword [esp + 0xa0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0062cbd3
add esp, 0x98
ret 0x14