Function at 0x4b7c97
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
mov eax, dword [0x5d4074]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
xor edx, edx
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push edi
mov edi, dword [ecx]
mov dword [ebp - 0x154], edx
or dword [ebx], 0xffffffff
mov byte [ebp - 0x146], dl
lea edx, [ebp - 0x14c]
push edx
lea edx, [ebp - 0x144]
mov dword [ebp - 0x150], ecx
push edx
push eax
push ecx
mov dword [ebp - 0x15c], ebx
mov dword [ebp - 0x158], edi
call fcn.004b7482
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x4b7cff
xor eax, eax
jmp 0x4b7fa0
push esi
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x134]
push eax
call fcn.004b7c3d
add esp, 0xc
test al, al
jne 0x4b7d61
call fcn.00531bbb
mov esi, eax
call fcn.00531bbb
mov edi, eax
lea eax, [ebp - 0xb4]
push 0x80
push eax
push dword [esi]
call fcn.004d8d93
push eax
push dword [edi]
mov edi, dword [ebp - 0x158]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push edi
call fcn.004b62b1
mov esi, dword [ebp - 0x14c]
add esp, 0x1c
jmp 0x4b7e71
lea eax, [ebp - 0x34]
push eax
push str.__Trying__s..._n
push edi
call fcn.004b6387
add esp, 0xc
cmp dword [ebp - 0x144], 2
jne 0x4b7d89
cmp dword [ebp - 0x140], 1
jne 0x4b7d89
mov al, 1
jmp 0x4b7d8b
xor al, al
mov esi, dword [ebp - 0x14c]
mov byte [ebp - 0x145], al
test al, al
je 0x4b7db2
test byte [edi + 0xa90], 8
je 0x4b7db2
push esi
push dword [ebp - 0x150]
call fcn.004b8080
pop ecx
pop ecx
push esi
call fcn.004b73f6
cmp byte [ebp - 0x145], 0
pop ecx
je 0x4b7dd7
test dword [edi + 0xa90], 0x2000
je 0x4b7dd7
push esi
push edi
call fcn.004b7fb0
pop ecx
pop ecx
cmp dword [edi + 0x610], 0
je 0x4b7e1a
push 1
push edi
call fcn.004a9c93
push 0
push esi
push dword [edi + 0x614]
call dword [edi + 0x610]
push 0
push edi
mov dword [ebp - 0x154], eax
call fcn.004a9c93
mov eax, dword [ebp - 0x154]
add esp, 0x1c
cmp eax, 2
jne 0x4b7e63
mov byte [ebp - 0x146], 1
cmp dword [ebp - 0x144], 2
jne 0x4b7e8a
lea eax, [ebp - 0x134]
push eax
call fcn.00402260
mov edi, dword [ebp - 0x150]
push eax
push dword [ebp - 0x144]
push esi
push edi
call fcn.004b77fa
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x4b7e8a
push esi
push edi
call fcn.004b6c1c
pop ecx
pop ecx
push 7
cmp ebx, 1
pop eax
cmove ebx, eax
jmp 0x4b7f8b
test eax, eax
je 0x4b7e1a
mov dword [ebp - 0x154], 0x2a
push esi
push dword [ebp - 0x150]
call fcn.004b6c1c
mov eax, dword [ebp - 0x154]
pop ecx
pop ecx
jmp 0x4b7f9f
push 1
push esi
call fcn.004d960f
lea eax, [ebp - 0x170]
push eax
call fcn.004b8d1f
mov ecx, dword [ebp - 0x150]
mov esi, eax
add esp, 0xc
cmp dword [ecx + 0x298], 1
lea edi, [ecx + 0x288]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x158]
jle 0x4b7edf
push 3
push dword [ecx + 0x2a4]
push dword [ecx + 0x2a0]
push edi
call fcn.004a95d6
mov ecx, dword [ebp - 0x150]
add esp, 0x10
cmp byte [ebp - 0x146], 0
jne 0x4b7f8f
cmp dword [ecx + 0x90], 1
jne 0x4b7f8f
test dword [ecx + 0x284], 0x8000000
mov esi, dword [ebp - 0x14c]
jne 0x4b7f24
push dword [ebp - 0x138]
lea eax, [ebp - 0x134]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4b7f7f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0xb
je 0x4b7f7d
cmp ebx, 0x2732
jle 0x4b7f41
cmp ebx, 0x2734
jle 0x4b7f7d
push 0x80
lea eax, [ebp - 0xb4]
push eax
push ebx
call fcn.004d8d93
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push edi
call fcn.004b6387
push esi
push dword [ebp - 0x150]
mov dword [edi + 0xcac], ebx
call fcn.004b6c1c
add esp, 0x24
push 7
pop ebx
jmp 0x4b7f8b
xor ebx, ebx
test ebx, ebx
jne 0x4b7f8b
mov eax, dword [ebp - 0x15c]
mov dword [eax], esi
mov eax, ebx
jmp 0x4b7f9f
mov eax, dword [ebp - 0x15c]
mov esi, dword [ebp - 0x14c]
mov dword [eax], esi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004a0c7f
mov esp, ebp
pop ebp
ret