Function at 0x4d8590
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4
mov eax, dword [0x52f8b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ebx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xd0], ecx
mov ebx, dword [edi]
mov dword [ecx], 0xffffffff
lea ecx, [ebp - 0xc8]
push ecx
lea ecx, [ebp - 0xc4]
push ecx
push eax
push edi
mov dword [ebp - 0xcc], 0
call fcn.004d7d00
add esp, 0x10
test eax, eax
je 0x4d85f4
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a77c
mov esp, ebp
pop ebp
ret
push esi
lea eax, [ebp - 0xd4]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0xb4]
push eax
call fcn.004d8530
add esp, 0xc
test eax, eax
jne 0x4d8651
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.004dba00
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.004c9ac0
push dword [ebp - 0xc8]
push edi
call fcn.004d7640
add esp, 0x20
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a77c
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x34]
push eax
push str.__Trying__s..._n
push ebx
call fcn.004c9b60
mov esi, dword [ebp - 0xc8]
add esp, 0xc
cmp dword [ebx + 0x35c], 0
je 0x4d867c
push esi
push edi
call fcn.004d8930
add esp, 8
push esi
call fcn.004d7bf0
add esp, 4
cmp dword [ebx + 0x464], 0
je 0x4d8698
push esi
push ebx
call fcn.004d8850
add esp, 8
mov eax, dword [ebx + 0x1b0]
test eax, eax
je 0x4d86bf
push 0
push esi
push dword [ebx + 0x1b4]
call eax
add esp, 0xc
cmp eax, 2
jne 0x4d8702
mov dword [ebp - 0xcc], 1
push dword [ebp - 0xc4]
push esi
push edi
call fcn.004d8050
add esp, 0xc
mov dword [ebp - 0xc8], eax
test eax, eax
je 0x4d8726
push esi
push edi
call fcn.004d7640
mov eax, dword [ebp - 0xc8]
add esp, 8
xor ecx, ecx
pop esi
cmp eax, 1
pop edi
cmove eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a77c
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x4d86bf
push esi
push edi
call fcn.004d7640
add esp, 8
mov eax, 0x2a
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a77c
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.004f8400
add esp, 8
call fcn.004cf3e0
cmp dword [edi + 0x2b8], 1
mov dword [edi + 0x2b0], eax
mov dword [edi + 0x2b4], edx
jle 0x4d875a
push dword [edi + 0x2bc]
push ebx
call fcn.004cb790
add esp, 8
cmp dword [ebp - 0xcc], 0
jne 0x4d8829
cmp dword [edi + 0x8c], 1
jne 0x4d8829
push dword [ebp - 0xb8]
lea eax, [ebp - 0xb4]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4d880a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xcc], eax
cmp eax, 0xb
je 0x4d87ef
cmp eax, 0x2732
jle 0x4d87ac
cmp eax, 0x2734
jle 0x4d87ef
push eax
push edi
call fcn.004dba00
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push ebx
call fcn.004c9b60
mov eax, dword [ebp - 0xcc]
push esi
push edi
mov dword [ebx + 0x85fc], eax
call fcn.004d7640
add esp, 0x20
mov eax, 7
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a77c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xd0]
xor eax, eax
mov dword [ecx], esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a77c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xd0]
mov eax, dword [ebp - 0xc8]
mov dword [ecx], esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a77c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xd0]
xor eax, eax
mov dword [ecx], esi
mov ecx, dword [ebp - 4]
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.0041a77c
mov esp, ebp
pop ebp
ret