Function at 0x4015cc
Capabilities:
Create tcp socket
Create udp socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x64
mov eax, dword [ebp + 8]
mov word [ebp - 0xa], ax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.WS2_32.DLL_inet_addr
sub esp, 4
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
jne 0x401651
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.WS2_32.DLL_gethostbyname
sub esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40162f
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.Host_desonocido___s__
call fcn.00401b24
mov dword [esp], eax
call fcn.004012d1
mov dword [ebp - 0x50], 0xfffffff7
jmp 0x40185b
mov eax, dword [ebp - 0x10]
movsx eax, word [eax + 0xa]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov dword [esp + 4], eax
lea eax, [ebp - 0x44]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [esp], eax
call sub.msvcrt.dll_srand
mov dword [ebp - 0x30], 0
call sub.msvcrt.dll_rand
push eax
fild dword [esp]
lea esp, [esp + 4]
fld qword [0x406098]
fmulp st(1)
fld qword [0x4060a0]
fdivp st(1)
fnstcw word [ebp - 0x46]
movzx eax, word [ebp - 0x46]
or ax, 0xc00
mov word [ebp - 0x48], ax
fldcw word [ebp - 0x48]
fistp dword [ebp - 0x4c]
fldcw word [ebp - 0x46]
mov eax, dword [ebp - 0x4c]
add eax, 0x32
mov dword [ebp - 0x2c], eax
call fcn.00401314
mov dword [ebp - 0x38], eax
mov ebx, dword [ebp + 0x10]
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.WS2_32.DLL_socket
sub esp, 0xc
mov dword [ebx], eax
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
jle 0x401755
mov dword [esp + 4], 0
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00401aac
mov dword [esp + 8], 4
mov dword [esp + 4], 0
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov word [ebp - 0x28], 2
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x24], eax
movzx eax, word [ebp - 0xa]
mov dword [esp], eax
call sub.WS2_32.DLL_htons
sub esp, 4
mov word [ebp - 0x26], ax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0040134a
mov dword [ebp - 0x34], eax
jmp 0x401791
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp + 8], eax
mov dword [esp + 4], str.DBG:_Socket_allocation_failed.___s__n
mov eax, dword [0x407010]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x407010]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [ebp - 0x34], 0xffffffff
call fcn.00401314
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x34], 0
jne 0x4017a1
jmp 0x4017f0
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x3c]
sub eax, edx
mov edx, eax
mov eax, dword [ebp - 0x2c]
sub eax, edx
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jle 0x4017ce
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call fcn.00401321
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x30]
add dword [eax], edx
jmp 0x4017dd
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x3c]
sub eax, edx
mov edx, eax
lea eax, [ebp - 0x30]
add dword [eax], edx
cmp dword [ebp - 0x34], 0
jns 0x4017f0
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 0x14]
jge 0x4017f0
jmp 0x40166c
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
jns 0x40180d
mov dword [esp], str.No_se_pudo_crear_socket_cliente
call fcn.004012d1
mov dword [ebp - 0x50], 0xfffffff6
jmp 0x40185b
cmp dword [ebp - 0x34], 0
jns 0x40183f
movzx eax, word [ebp - 0xa]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.No_fue_posible_realizar_conexion_al_servidor__s:_d
call fcn.00401b24
mov dword [esp], eax
call fcn.004012d1
mov dword [ebp - 0x50], 0xfffffff8
jmp 0x40185b
mov dword [esp + 4], 1
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00401aac
mov dword [ebp - 0x50], 1
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 4]
leave
ret