Function at 0x4ae450
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x577d56
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x641030]
xor eax, esp
mov dword [esp + 0x88], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
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 0x4ae50f
movzx ecx, byte [edi + 0x121]
push ecx
push str.connect
push edi
lea ecx, [esp + 0x28]
call fcn.00437770
mov eax, dword [esi + 0x294]
mov dword [esp + 0xa8], 0
cmp eax, 0xffffffff
jne 0x4ae516
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.004377b0
xor al, al
jmp 0x4ae791
mov ebx, dword [ebx + 0xc14]
test ebx, ebx
jne 0x4ae525
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 0x4ae4fb
test eax, eax
je 0x4ae653
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4ae6ea
cmp byte [edi + 0x121], 0
je 0x4ae5a6
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.004373b0
push edi
push ebp
push 1
push 0
push ebx
mov ecx, esi
call fcn.004abbd0
mov ebx, 0x4901fb2a
cmp dword [esi + 0xd0], ebx
jne 0x4ae4fb
test al, al
je 0x4ae6b4
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 0x4ae639
cmp dword [esp + 0x14], eax
je 0x4ae653
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.004aae50
add esp, 0xc
mov ecx, esi
mov dword [ebp + 0x28], 7
call fcn.004ac2f0
jmp 0x4ae4fb
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 0x4ae4fb
cmp dword [esi + 0xd0], 0x4901fb2a
jne 0x4ae4fb
mov byte [esi + 0x290], 1
mov byte [esi + 0x292], 0
cmp byte [edi + 0x121], 0
je 0x4ae74c
lea ecx, [esp + 0x28]
call fcn.0042d110
cmp dword [esi + 0x298], 2
mov byte [esp + 0xa8], 1
mov dword [esp + 0x14], 0
push edi
jne 0x4ae708
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.004aca90
jmp 0x4ae719
cmp byte [ebp + 0x15], 0
je 0x4ae6c3
mov dword [ebp + 0x28], 4
jmp 0x4ae6d1
xor ecx, ecx
cmp byte [ebp + 0x14], cl
sete cl
add ecx, 6
mov dword [ebp + 0x28], ecx
push edi
push str.failedWaitToConnect
mov ecx, ebp
call fcn.00472610
mov ecx, esi
call fcn.004ac2f0
jmp 0x4ae4fb
push edi
push ebp
push eax
mov dword [ebp + 0x28], 7
call fcn.004aae50
add esp, 0xc
mov ecx, esi
call fcn.004ac2f0
jmp 0x4ae4fb
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x30]
push edx
mov ecx, esi
call fcn.004acbc0
lea eax, [esp + 0x28]
push eax
push str.myIP
mov ecx, edi
call fcn.004370f0
mov ecx, dword [esp + 0x14]
push ecx
push str.myPort
mov ecx, edi
call fcn.004373b0
lea ecx, [esp + 0x28]
mov byte [esp + 0xa8], 0
call fcn.0042d1d0
push edi
lea ecx, [esi + 0xe0]
call fcn.004f45a0
push edi
lea ecx, [esi + 0x128]
call fcn.004f45a0
cmp byte [edi + 0x121], 0
je 0x4ae77b
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.004377b0
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.005550b0
add esp, 0x98
ret 0x14