Function at 0x4100b0
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x47f160]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, 0x470114
mov dword [esp + 0x10], edi
call fcn.0040edf0
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x410111
cmp dword [0x4905f8], ebx
jne 0x4100ec
call fcn.0040fb90
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
cmp edi, ebx
jne 0x410126
cmp dword [esi + 4], ebx
je 0x410111
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 [esp + 0x18]
xor ecx, esp
call fcn.00459991
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dx, word [edi + 8]
push ebx
mov word [esp + 0x18], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x16], ax
movsx eax, word [edi + 0xa]
mov ecx, dword [edi + 0xc]
mov edx, dword [ecx]
push eax
push edx
lea eax, [esp + 0x20]
push eax
call sub.MSVCR100.dll_memcpy
movsx ecx, word [edi + 8]
add esp, 0xc
push 0
push 1
push ecx
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x4101ab
xor edi, edi
cmp dword [esi + 4], edi
je 0x410196
mov edx, dword [esi]
mov eax, dword [edx + 4]
push esi
call eax
add esp, 4
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi], edi
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.00459991
mov esp, ebp
pop ebp
ret
push 0x10
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esi + 0xc], eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x4101da
call fcn.0040ef10
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.00459991
mov esp, ebp
pop ebp
ret
push ebx
push 0x46e90d
mov eax, esi
call fcn.0040edb0
push eax
push str._d_net_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 0x410291
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_network_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
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [ebp + 8]
push 0x4702f8
push eax
push ecx
push str.socket_network_client:_host__s_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]
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x1c
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov dword [eax], ebx
mov eax, esi
call fcn.0040edb0
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00459991
mov esp, ebp
pop ebp
ret