Function at 0x545e90
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b18b6
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x676664]
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 eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x18]
mov esi, ecx
cmp dword [esi + 0xd0], 0x4901fb2a
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x8c], ecx
jne 0x545f36
movzx edx, byte [edi + 0x125]
push edx
push str.connect
push edi
lea ecx, [ebp - 0x98]
call fcn.0044eca0
mov eax, dword [esi + 0x294]
mov dword [ebp - 4], 0
cmp eax, 0xffffffff
jne 0x545f3d
mov dword [ebx + 0x28], 5
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.Cannot_connect__invalid_socket
mov ecx, edi
call edx
lea ecx, [ebp - 0x98]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
xor al, al
jmp 0x5461de
mov ecx, dword [ebp - 0x88]
mov ecx, dword [ecx + 0xc20]
mov dword [ebp - 0x88], ecx
test ecx, ecx
jne 0x545f5d
mov dword [ebp - 0x88], 0x1499700
lea edx, [ebp - 0x9c]
push edx
push 0x8004667e
push eax
mov dword [ebp - 0x9c], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
call sub.KERNEL32.dll_GetTickCount
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x8c]
mov edx, dword [esi + 0x294]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
cmp dword [esi + 0xd0], 0x4901fb2a
jne 0x545f24
test eax, eax
je 0x546098
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x546133
cmp byte [edi + 0x125], 0
je 0x545fe6
mov eax, dword [edi]
mov edx, dword [eax + 0x18]
push str.Waiting_for_the_connect_to_complete...
mov ecx, edi
call edx
mov eax, dword [ebp - 0x88]
push eax
push str.connectTimeoutMs
mov ecx, edi
call fcn.0044e8c0
mov ecx, dword [ebp - 0x88]
push edi
push ebx
push 1
push 0
push ecx
mov ecx, esi
call fcn.00542ea0
cmp dword [esi + 0xd0], 0x4901fb2a
jne 0x545f24
test al, al
je 0x5460fd
mov ecx, dword [esi + 0x294]
lea edx, [ebp - 0x8c]
push edx
lea eax, [ebp - 0x88]
push eax
push 0x1007
push 0xffff
push ecx
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x8c], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x54608a
cmp dword [ebp - 0x88], eax
je 0x546098
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.getsockopt_indicates_an_error.
mov ecx, edi
call eax
mov ecx, dword [ebp - 0x88]
push edi
push 0
push ecx
call fcn.00542080
add esp, 0xc
mov ecx, esi
mov dword [ebx + 0x28], 7
call fcn.005435d0
jmp 0x545f24
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], 0x4901fb2a
jne 0x545f24
mov byte [esi + 0x290], 1
mov byte [esi + 0x292], 0
cmp byte [edi + 0x125], 0
je 0x54619b
lea ecx, [ebp - 0x84]
call fcn.00444390
cmp dword [esi + 0x298], 2
mov byte [ebp - 4], 1
mov dword [ebp - 0x88], 0
push edi
jne 0x546151
lea edx, [ebp - 0x88]
push edx
lea eax, [ebp - 0x84]
push eax
mov ecx, esi
call fcn.00543e20
jmp 0x546166
cmp byte [ebx + 0x15], 0
je 0x54610c
mov dword [ebx + 0x28], 4
jmp 0x54611a
xor ecx, ecx
cmp byte [ebx + 0x14], cl
sete cl
add ecx, 6
mov dword [ebx + 0x28], ecx
push edi
push str.failedWaitToConnect
mov ecx, ebx
call fcn.004aef60
mov ecx, esi
call fcn.005435d0
jmp 0x545f24
push edi
push ebx
push eax
mov dword [ebx + 0x28], 7
call fcn.00542080
add esp, 0xc
mov ecx, esi
call fcn.005435d0
jmp 0x545f24
lea ecx, [ebp - 0x88]
push ecx
lea edx, [ebp - 0x84]
push edx
mov ecx, esi
call fcn.00543f50
lea eax, [ebp - 0x84]
push eax
push str.myIP
mov ecx, edi
call fcn.0044e520
mov ecx, dword [ebp - 0x88]
push ecx
push str.myPort
mov ecx, edi
call fcn.0044e8c0
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 0
call fcn.00444450
push edi
lea ecx, [esi + 0xe0]
call fcn.004ef040
push edi
lea ecx, [esi + 0x128]
call fcn.004ef040
cmp byte [edi + 0x125], 0
je 0x5461ca
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
push str.socket_connect_successful.
mov ecx, edi
call eax
lea ecx, [ebp - 0x98]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
mov al, 1
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.0059af98
mov esp, ebp
pop ebp
ret 0x14