Function at 0x4104ec
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
and dword [ebp - 4], 0
mov esi, dword [edi]
or dword [eax], 0xffffffff
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0xc8]
push eax
push dword [ebp + 0xc]
push edi
call fcn.00410c90
add esp, 0x10
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x410735
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.0040ff8f
add esp, 0xc
test eax, eax
jne 0x41056a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push edi
call fcn.00412dfe
push eax
push ebx
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push esi
call fcn.0040e1fd
add esp, 0x18
xor esi, esi
jmp 0x41063f
lea eax, [ebp - 0x38]
push eax
push str.__Trying__s..._n
push esi
call fcn.0040e1a7
add esp, 0xc
cmp dword [ebp - 0xc8], 2
jne 0x410590
push 1
pop ebx
cmp dword [ebp - 0xc4], ebx
je 0x410594
xor ebx, ebx
jmp 0x4105a8
cmp dword [esi + 0x358], 0
je 0x4105a8
push dword [ebp + 8]
push edi
call fcn.004103e2
pop ecx
pop ecx
push dword [ebp + 8]
call fcn.00410437
test ebx, ebx
pop ecx
je 0x4105c9
cmp dword [esi + 0x474], 0
je 0x4105c9
push dword [ebp + 8]
push esi
call fcn.0041073c
pop ecx
pop ecx
mov eax, dword [esi + 0x1a8]
test eax, eax
je 0x4105ef
push 0
push dword [ebp + 8]
push dword [esi + 0x1ac]
call eax
add esp, 0xc
cmp eax, 2
jne 0x410638
mov dword [ebp - 4], 1
cmp dword [ebp - 0xc8], 2
jne 0x410658
lea eax, [ebp - 0xb8]
push eax
call fcn.00404eeb
push eax
push dword [ebp - 0xc8]
push dword [ebp + 8]
push edi
call fcn.004107f4
mov ebx, eax
add esp, 0x14
test ebx, ebx
mov dword [ebp + 0xc], ebx
je 0x410658
push dword [ebp + 8]
push edi
call fcn.00410c3b
pop ecx
cmp ebx, 1
pop ecx
jne 0x410651
push 7
pop eax
jmp 0x410737
test eax, eax
je 0x4105ef
push 0x2a
pop esi
push dword [ebp + 8]
push edi
call fcn.00410c3b
pop ecx
mov eax, esi
pop ecx
jmp 0x410737
mov eax, ebx
jmp 0x410737
push 1
push dword [ebp + 8]
call fcn.0041ee42
pop ecx
pop ecx
call fcn.0040e984
cmp dword [edi + 0x324], 1
mov dword [edi + 0x31c], eax
mov dword [edi + 0x320], edx
jle 0x41068c
push dword [edi + 0x328]
push esi
call fcn.0040e07c
pop ecx
pop ecx
cmp dword [ebp - 4], 0
jne 0x41072d
cmp dword [edi + 0x8c], 1
jne 0x41072d
cmp dword [edi + 0x310], 0
jne 0x4106c7
push dword [ebp - 0xbc]
lea eax, [ebp - 0xb8]
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x41071a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0xb
je 0x410716
cmp ebx, 0x2732
jle 0x4106e4
cmp ebx, 0x2734
jle 0x410716
push ebx
push edi
call fcn.00412dfe
push eax
lea eax, [ebp - 0x38]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.0040e1a7
mov dword [esi + 0x8628], ebx
push dword [ebp + 8]
push edi
call fcn.00410c3b
add esp, 0x20
mov dword [ebp + 0xc], 7
jmp 0x410728
and dword [ebp + 0xc], 0
cmp dword [ebp + 0xc], 0
jne 0x410728
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
jmp 0x410737
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret