Function at 0x4106d0
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x480160]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, 0x4710f8
mov dword [esp + 0x10], edi
call fcn.0040f410
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x410731
cmp dword [0x491608], ebx
jne 0x41070c
call fcn.004101b0
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
cmp edi, ebx
jne 0x410746
cmp dword [esi + 4], ebx
je 0x410731
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.00459ce1
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 0x4107cb
xor edi, edi
cmp dword [esi + 4], edi
je 0x4107b6
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.00459ce1
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 0x4107fa
call fcn.0040f530
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
push ebx
push 0x46f8ad
mov eax, esi
call fcn.0040f3d0
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 [0x4815b8], 0x80
je 0x4108b1
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
mov ebx, dword [eax]
push 0x4815a0
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.0040f3d0
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [ebp + 8]
push 0x4712dc
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 0x4815a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov dword [eax], ebx
mov eax, esi
call fcn.0040f3d0
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret