Function at 0x40fc00
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x47f160]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov eax, 0x470114
call fcn.0040edf0
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x40fd12
cmp dword [0x4905f8], ebx
jne 0x40fc36
call fcn.0040fb90
mov edi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov eax, 2
push edi
mov word [ebp - 0x18], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0x7f000001
mov word [ebp - 0x16], ax
call dword [sym.imp.WS2_32.dll_htonl]
push ebx
push 1
push 2
mov dword [ebp - 0x14], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x40fd26
test byte [0x4805a8], 0x80
je 0x40fcfa
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
mov ebx, dword [eax]
push 0x480590
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.socket_loopback_client
push str.sysdeps_win32.cpp
push str._s::_s__:
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call edi
push str.socket_loopback_client:_could_not_create_socket_n
mov dword [eax], ebx
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0xc
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov dword [eax], ebx
xor ebx, ebx
cmp dword [esi + 4], ebx
je 0x40fd12
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
push esi
call edx
add esp, 4
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi], ebx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00459991
mov esp, ebp
pop ebp
ret
push 0x10
lea ecx, [ebp - 0x18]
push ecx
push eax
mov dword [esi + 0xc], eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x40fdf4
test byte [0x4805a8], 0x80
je 0x40fdc4
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
mov ebx, dword [eax]
push 0x480590
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.socket_loopback_client
push str.sysdeps_win32.cpp
push str._s::_s__:
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call edi
mov edx, dword [ebp + 8]
push edx
push 0x4702f8
push str.socket_loopback_client:_could_not_connect_to__s:_d_n
mov dword [eax], ebx
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x14
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov dword [eax], ebx
xor ebx, ebx
cmp dword [esi + 4], ebx
je 0x40fd12
mov eax, dword [esi]
mov ecx, dword [eax + 4]
push esi
call ecx
add esp, 4
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi], ebx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00459991
mov esp, ebp
pop ebp
ret
push edi
push 0x46e90d
mov eax, esi
call fcn.0040edb0
push eax
push str._d_lo_client:_s_d_
lea edx, [esi + 0x18]
push 0x20
push edx
call dword [sym.imp.MSVCR100.dll__snprintf]
add esp, 0x18
test byte [0x4805a8], 0x80
je 0x40fea9
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
mov ebx, dword [eax]
push 0x480590
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.socket_loopback_client
push str.sysdeps_win32.cpp
push str._s::_s__:
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call edi
mov dword [eax], ebx
mov eax, esi
call fcn.0040edb0
push eax
mov eax, dword [ebp + 8]
push 0x4702f8
push eax
push str.socket_loopback_client:_port__d_type__s___fd__d_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x14
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov dword [eax], ebx
mov eax, esi
call fcn.0040edb0
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00459991
mov esp, ebp
pop ebp
ret