Function at 0x4c7b4f
Capabilities:
Connect socket

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0xac
mov eax, dword [0x60b1e0]
xor eax, ebp
mov dword [ebp + 0x68], eax
mov eax, dword [ebp + 0x78]
push ebx
mov ebx, dword [ebp + 0x7c]
push esi
mov esi, edx
push edi
mov edi, dword [esi]
or dword [eax], 0xffffffff
mov dword [ebp - 0x38], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x70]
cmp eax, 2
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], eax
jne 0x4c7b9a
mov dword [ebp - 0x20], 0x11
jmp 0x4c7ba0
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x20], eax
mov edx, dword [ecx + 0x10]
mov eax, 0x80
cmp edx, eax
mov dword [ebp - 0x1c], edx
jbe 0x4c7bb2
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push dword [ecx + 0x18]
push eax
call fcn.0049e700
and dword [ebx], 0
mov eax, dword [edi + 0x174]
add esp, 0xc
test eax, eax
je 0x4c7be4
lea ecx, [ebp - 0x28]
push ecx
push 0
push dword [edi + 0x178]
call eax
add esp, 0xc
jmp 0x4c7bf3
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp - 0x28]
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp - 0x30], eax
jne 0x4c7c0f
xor eax, eax
mov ecx, dword [ebp + 0x68]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4df3
add ebp, 0x6c
leave
ret
lea ebx, [esi + 0x9a]
lea edi, [esi + 0xc8]
lea esi, [ebp - 0x18]
mov dword [ebp - 0x40], ebx
call fcn.004c792d
test eax, eax
jne 0x4c7c5c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x34]
call fcn.004d31c0
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x2c]
call fcn.004c71b1
add esp, 0x18
xor esi, esi
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
jmp 0x4c7bfd
mov ebx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x40]
push 0xb
lea eax, [ebx + 0x3c]
pop ecx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x2c]
push str.__Trying__s...
push esi
call fcn.004c713e
push ebx
call fcn.004c78de
add esp, 0x10
cmp dword [esi + 0x308], 0
je 0x4c7c9a
push dword [ebp - 0x30]
mov edi, ebx
call fcn.004c7aa2
pop ecx
mov edi, dword [ebp - 0x30]
push edi
call fcn.004c7af7
mov eax, dword [esi + 0x16c]
test eax, eax
pop ecx
je 0x4c7cc8
push 0
push edi
push dword [esi + 0x170]
call eax
add esp, 0xc
test eax, eax
mov dword [ebp - 0x34], eax
je 0x4c7cc8
push 0x2a
pop esi
jmp 0x4c7c4f
push dword [ebp - 0x28]
push edi
push ebx
call fcn.004c758a
add esp, 0xc
test eax, eax
je 0x4c7ce0
mov esi, eax
jmp 0x4c7c4f
push 1
push edi
call fcn.004d39c8
cmp dword [ebx + 0x70], 1
pop ecx
pop ecx
jne 0x4c7d2b
push dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x2c], eax
call fcn.004d1899
cmp dword [ebx + 0x220], 1
mov dword [ebx + 0x218], eax
mov dword [ebx + 0x21c], edx
jle 0x4c7d2f
push dword [ebx + 0x224]
push esi
call fcn.004d080b
pop ecx
pop ecx
jmp 0x4c7d2f
and dword [ebp - 0x2c], 0
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x4c7dd4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0xb
mov dword [ebp - 0x34], edi
je 0x4c7dba
cmp edi, 0x2732
jle 0x4c7d59
cmp edi, 0x2734
jle 0x4c7dba
push edi
push ebx
call fcn.004d31c0
push eax
lea eax, [ebx + 0x3c]
push eax
push str.Failed_to_connect_to__s:__s
push esi
call fcn.004c71b1
add esp, 0x18
mov dword [esi + 0x855c], edi
push dword [ebp - 0x30]
lea edi, [ebp - 0x34]
call fcn.004c787e
cmp dword [ebp - 0x2c], 0
pop ecx
jne 0x4c7df0
test eax, eax
je 0x4c7e08
mov eax, dword [ebp - 0x3c]
push str.connected_n
push esi
mov dword [eax], 1
call fcn.004c713e
mov esi, dword [ebp - 0x30]
push esi
push ebx
call fcn.004c7966
mov eax, dword [ebp - 0x38]
add esp, 0x10
mov dword [eax], esi
jmp 0x4c7bfb
push dword [ebp - 0x30]
mov eax, dword [ebp + 0x74]
push ebx
call fcn.004c7533
cmp eax, 3
pop ecx
pop ecx
mov dword [ebp - 0x2c], eax
je 0x4c7cc3
cmp dword [ebp - 0x2c], 1
jne 0x4c7d79
cmp dword [esi + 0x510], 2
jne 0x4c7d79
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x30]
mov dword [eax], ecx
jmp 0x4c7bfb
cmp dword [ebp - 0x2c], 1
jne 0x4c7e08
push str.Timeout_n
push esi
call fcn.004c713e
pop ecx
pop ecx
jmp 0x4c7c4d
mov eax, dword [ebp - 0x34]
push eax
push ebx
mov dword [esi + 0x855c], eax
call fcn.004d31c0
push eax
push 0x5a6fe8
push esi
call fcn.004c713e
add esp, 0x14
jmp 0x4c7c4d