Function at 0x1001b8e0
Capabilities:
Connect socket
Initialize winsock library
Read and send data from client to server
Read file on windows
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100366ab
mov eax, dword fs:[0]
push eax
sub esp, 0x214
mov eax, dword [0x1004b034]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x220]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1001b948
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push ecx
push ecx
push str.Error_al_inicializar_Winsock.
push edx
call fcn.10002ad0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor ebx, ebx
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x1015f3a4], eax
cmp eax, 0xffffffff
jne 0x1001b982
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push eax
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push str.Error_al_crear_el_socket.
push ecx
call fcn.10002ad0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edx, 2
push 0x1015e874
mov word [ebp - 0x58], dx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x54], eax
movzx eax, word [0x1015d474]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [0x1015f3a4]
push 0x10
lea ecx, [ebp - 0x58]
push ecx
push edx
mov word [ebp - 0x56], ax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1001b9f3
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push eax
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push str.Error_al_conectar_al_servidor.
push ecx
call fcn.10002ad0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edx, dword [0x1015f3a4]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xf
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x64], ebx
mov byte [ebp - 0x74], bl
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], eax
lea edi, [eax - 3]
mov eax, 0x1004157c
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.10002d20
push 0x10040aac
push 0x1004157c
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCR100.dll_fopen]
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x1001ba5d
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push eax
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push str.No_se_pudo_abrir_el_archivo.
push ecx
call fcn.10002ad0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push esi
call dword [sym.imp.MSVCR100.dll_feof]
add esp, 4
test eax, eax
jne 0x1001bb3d
mov edi, dword [sym.imp.MSVCR100.dll_fread]
lea edx, [ebp - 0x90]
push str.FNAME
push edx
lea ebx, [ebp - 0x2c]
mov word [0x1015fa00], 0xe302
mov byte [0x1015fa02], 0xc3
call fcn.1001fa80
push eax
mov eax, str.NAMEEND
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.100081a0
mov ebx, 0x10
add esp, 0xc
mov byte [ebp - 4], 1
cmp dword [ebp - 0x7c], ebx
jb 0x1001bacc
mov eax, dword [ebp - 0x90]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x34], ebx
jae 0x1001bad7
lea eax, [ebp - 0x48]
mov ecx, dword [ebp - 0x38]
push ecx
push eax
push 0x1015fa03
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push esi
push 0x10000
push 1
push 0x1015fac8
call edi
add esp, 0x10
test eax, eax
jle 0x1001bb19
mov edx, dword [0x1015f3a4]
push 0
add eax, 0xc8
push eax
push 0x1015fa00
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp dword [ebp - 0x34], ebx
jb 0x1001bb2b
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
push esi
call dword [sym.imp.MSVCR100.dll_feof]
add esp, 4
test eax, eax
je 0x1001ba75
push esi
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x1015f3a4]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp - 0x18], 0x10
jb 0x1001bb72
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10034620
mov esp, ebp
pop ebp
ret