Function at 0x551be0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bdf96
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x68683c]
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 0x551c86
movzx edx, byte [edi + 0x125]
push edx
push str.connect
push edi
lea ecx, [ebp - 0x98]
call fcn.0045a1f0
mov eax, dword [esi + 0x294]
mov dword [ebp - 4], 0
cmp eax, 0xffffffff
jne 0x551c8d
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.0045a240
xor al, al
jmp 0x551f2e
mov ecx, dword [ebp - 0x88]
mov ecx, dword [ecx + 0xc20]
mov dword [ebp - 0x88], ecx
test ecx, ecx
jne 0x551cad
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 0x551c74
test eax, eax
je 0x551de8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x551e83
cmp byte [edi + 0x125], 0
je 0x551d36
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.00459e10
mov ecx, dword [ebp - 0x88]
push edi
push ebx
push 1
push 0
push ecx
mov ecx, esi
call fcn.0054ec00
cmp dword [esi + 0xd0], 0x4901fb2a
jne 0x551c74
test al, al
je 0x551e4d
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 0x551dda
cmp dword [ebp - 0x88], eax
je 0x551de8
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.0054dde0
add esp, 0xc
mov ecx, esi
mov dword [ebx + 0x28], 7
call fcn.0054f330
jmp 0x551c74
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 0x551c74
mov byte [esi + 0x290], 1
mov byte [esi + 0x292], 0
cmp byte [edi + 0x125], 0
je 0x551eeb
lea ecx, [ebp - 0x84]
call fcn.0044f8c0
cmp dword [esi + 0x298], 2
mov byte [ebp - 4], 1
mov dword [ebp - 0x88], 0
push edi
jne 0x551ea1
lea edx, [ebp - 0x88]
push edx
lea eax, [ebp - 0x84]
push eax
mov ecx, esi
call fcn.0054fb80
jmp 0x551eb6
cmp byte [ebx + 0x15], 0
je 0x551e5c
mov dword [ebx + 0x28], 4
jmp 0x551e6a
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.004bac40
mov ecx, esi
call fcn.0054f330
jmp 0x551c74
push edi
push ebx
push eax
mov dword [ebx + 0x28], 7
call fcn.0054dde0
add esp, 0xc
mov ecx, esi
call fcn.0054f330
jmp 0x551c74
lea ecx, [ebp - 0x88]
push ecx
lea edx, [ebp - 0x84]
push edx
mov ecx, esi
call fcn.0054fca0
lea eax, [ebp - 0x84]
push eax
push str.myIP
mov ecx, edi
call fcn.00459a60
mov ecx, dword [ebp - 0x88]
push ecx
push str.myPort
mov ecx, edi
call fcn.00459e10
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 0
call fcn.0044f980
push edi
lea ecx, [esi + 0xe0]
call fcn.004facf0
push edi
lea ecx, [esi + 0x128]
call fcn.004facf0
cmp byte [edi + 0x125], 0
je 0x551f1a
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.0045a240
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.005a6cf8
mov esp, ebp
pop ebp
ret 0x14