Function at 0x414ede
Capabilities:
Connect socket

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0xb0
mov eax, dword [0x441040]
xor eax, ebp
mov dword [ebp + 0x68], eax
mov eax, dword [ebp + 0x78]
and dword [ebp - 0x38], 0
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 - 0x3c], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x6c]
cmp eax, 2
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], eax
jne 0x414f2d
mov dword [ebp - 0x20], 0x11
jmp 0x414f33
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 0x414f45
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push dword [ecx + 0x18]
push eax
call sub.MSVCR80.dll_memcpy
and dword [ebx], 0
mov eax, dword [edi + 0x174]
add esp, 0xc
test eax, eax
je 0x414f77
lea ecx, [ebp - 0x28]
push ecx
push 0
push dword [edi + 0x178]
call eax
add esp, 0xc
jmp 0x414f86
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 0x414fa2
xor eax, eax
mov ecx, dword [ebp + 0x68]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042b108
add ebp, 0x6c
leave
ret
lea ebx, [esi + 0x96]
lea edi, [esi + 0xc4]
lea esi, [ebp - 0x18]
mov dword [ebp - 0x40], ebx
call fcn.00414cbc
test eax, eax
jne 0x414fef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x34]
call fcn.0042754d
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x2c]
call fcn.004144d7
add esp, 0x18
xor esi, esi
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
jmp 0x414f90
mov ebx, dword [ebp - 0x34]
push 0x2e
push dword [ebp - 0x40]
lea esi, [ebx + 0x38]
push esi
call sub.MSVCR80.dll_memcpy
push esi
mov esi, dword [ebp - 0x2c]
push str.__Trying__s...
push esi
call fcn.0041446d
push ebx
call fcn.00414c6a
add esp, 0x1c
cmp dword [esi + 0x308], 0
je 0x41502c
push dword [ebp - 0x30]
mov edi, ebx
call fcn.00414e31
pop ecx
push dword [ebp - 0x30]
call fcn.00414e86
mov eax, dword [esi + 0x16c]
test eax, eax
pop ecx
je 0x41505e
push 0
push dword [ebp - 0x30]
push dword [esi + 0x170]
call eax
add esp, 0xc
cmp eax, 2
mov dword [ebp - 0x34], eax
jne 0x415076
mov dword [ebp - 0x38], 1
push dword [ebp - 0x28]
push dword [ebp - 0x30]
call fcn.00414949
test eax, eax
pop ecx
pop ecx
je 0x415082
mov esi, eax
jmp 0x414fe2
test eax, eax
je 0x41505e
push 0x2a
pop esi
jmp 0x414fe2
mov edi, dword [ebp - 0x30]
push 1
push edi
call fcn.00427cc2
cmp dword [ebp - 0x38], 0
pop ecx
pop ecx
jne 0x4150d6
cmp dword [ebx + 0x6c], 1
jne 0x4150d6
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.00415f6c
cmp dword [ebx + 0x1fc], 1
mov dword [ebx + 0x1f4], eax
mov dword [ebx + 0x1f8], edx
jle 0x4150da
push dword [ebx + 0x200]
push esi
call fcn.0040a3f8
pop ecx
pop ecx
jmp 0x4150da
and dword [ebp - 0x2c], 0
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x41517d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
mov dword [ebp - 0x34], eax
je 0x415165
cmp eax, 0x2732
jle 0x415100
cmp eax, 0x2734
jle 0x415165
push eax
push ebx
call fcn.0042754d
push eax
lea eax, [ebx + 0x38]
push eax
push str.Failed_to_connect_to__s:__s
push esi
call fcn.004144d7
mov eax, dword [ebp - 0x34]
add esp, 0x18
mov dword [esi + 0x855c], eax
cmp dword [ebp - 0x38], 0
jne 0x415139
push edi
lea edi, [ebp - 0x34]
call fcn.00414c0a
mov edi, dword [ebp - 0x30]
pop ecx
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x2c], 0
jne 0x415196
cmp dword [ebp - 0x38], 0
je 0x4151ae
mov eax, dword [ebp - 0x44]
push str.connected_n
push esi
mov dword [eax], 1
call fcn.0041446d
push edi
push ebx
call fcn.00414cf5
add esp, 0x10
jmp 0x41518c
mov eax, dword [ebp + 0x74]
push edi
push ebx
call fcn.004148f2
cmp eax, 3
pop ecx
pop ecx
mov dword [ebp - 0x2c], eax
je 0x41507a
cmp dword [ebp - 0x2c], 1
jne 0x415123
cmp dword [esi + 0x510], 2
jne 0x415123
mov eax, dword [ebp - 0x3c]
mov dword [eax], edi
jmp 0x414f8e
cmp dword [ebp - 0x2c], 1
jne 0x4151ae
push str.Timeout_n
push esi
call fcn.0041446d
pop ecx
pop ecx
jmp 0x414fe0
mov eax, dword [ebp - 0x34]
push eax
push ebx
mov dword [esi + 0x855c], eax
call fcn.0042754d
push eax
push 0x4375d0
push esi
call fcn.0041446d
add esp, 0x14
jmp 0x414fe0