Function at 0x401cb0
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4069c3
mov eax, dword fs:[0]
push eax
sub esp, 0x32c
mov eax, dword [0x40a018]
xor eax, esp
mov dword [esp + 0x328], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x40a018]
xor eax, esp
push eax
lea eax, [esp + 0x340]
mov dword fs:[0], eax
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea eax, [esp + 0x58]
push eax
mov esi, ecx
mov byte [esp + 0x1f], 0
xor ebp, ebp
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
mov edi, 0x10
cmp dword [eax + 0x18], edi
jb 0x401d28
mov eax, dword [eax + 4]
jmp 0x401d2b
add eax, 4
lea ecx, [esp + 0x1c]
push ecx
push eax
call fcn.00403ce0
add esp, 8
test eax, eax
lea ecx, [esp + 0x58]
setne bl
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
test bl, bl
je 0x401d5c
lea esi, [esp + 0x1c]
call fcn.00404190
xor al, al
jmp 0x4020cc
lea edx, [esp + 0x3c]
push edx
mov ecx, esi
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
cmp dword [eax + 0x18], edi
jb 0x401d73
mov eax, dword [eax + 4]
jmp 0x401d76
add eax, 4
push eax
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
lea ecx, [esp + 0x3c]
mov esi, eax
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push 0x2f
push esi
call dword [sym.imp.MSVCR90.dll_strrchr]
push esi
mov byte [eax + 1], 0
call dword [sym.imp.MSVCR90.dll_free]
add esp, 0xc
mov dword [esp + 0x134], 0xffffffff
mov dword [esp + 0xac], vtable.KClientSocket.0
lea ecx, [esp + 0x90]
mov dword [esp + 0x348], ebp
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov byte [esp + 0x348], 1
push 0x40a50c
lea ecx, [esp + 0x78]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push str.file.txt
lea ecx, [esp + 0x78]
mov byte [esp + 0x34c], 2
call dword [0x4070a4]
mov eax, dword [esp + 0x78]
cmp dword [esp + 0x8c], edi
jae 0x401e14
lea eax, [esp + 0x78]
push 0x407294
push eax
call dword [sym.imp.MSVCR90.dll_fopen]
mov ebx, eax
add esp, 8
cmp ebx, ebp
jne 0x401e58
mov eax, dword [esp + 0x78]
cmp dword [esp + 0x8c], edi
jae 0x401e3a
lea eax, [esp + 0x78]
push eax
push str.cannt_save_the_file_list__s__n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x402071
lea eax, [esp + 0x34]
push eax
push ebp
lea ecx, [esp + 0x24]
push ebp
push ecx
lea ecx, [esp + 0xa0]
lea edx, [esp + 0xbc]
call fcn.00404280
add esp, 0x10
cmp eax, 2
je 0x401e9c
push str.cannt_connect_to_host_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
jmp 0x402071
mov eax, dword [esp + 0x134]
mov esi, dword [sym.imp.WS2_32.dll_recv]
push ebp
push 0x200
lea edx, [esp + 0x144]
push edx
push eax
call esi
cmp eax, ebp
jle 0x401ef6
mov edi, dword [sym.imp.MSVCR90.dll_fwrite]
push ebx
push eax
lea ecx, [esp + 0x144]
push 1
push ecx
call edi
mov eax, dword [esp + 0x144]
add esp, 0x10
push ebp
push 0x200
lea edx, [esp + 0x144]
push edx
push eax
call esi
cmp eax, ebp
jg 0x401ec4
mov edi, 0x10
push ebx
call dword [sym.imp.MSVCR90.dll_fclose]
mov eax, dword [esp + 0x7c]
add esp, 4
cmp dword [esp + 0x8c], edi
jae 0x401f11
lea eax, [esp + 0x78]
lea ecx, [esp + 0x1c]
push ebp
push ecx
call fcn.00401c60
add esp, 8
push 0x40a50c
lea ecx, [esp + 0x78]
mov byte [esp + 0x1f], al
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push str.update.txt
lea ecx, [esp + 0x78]
call dword [0x4070a4]
mov eax, dword [esp + 0x78]
cmp dword [esp + 0x8c], edi
jae 0x401f52
lea eax, [esp + 0x78]
push 0x407294
push eax
call dword [sym.imp.MSVCR90.dll_fopen]
mov ebx, eax
add esp, 8
cmp ebx, ebp
je 0x402071
mov edx, dword [0x40a490]
push edx
push 0x4073a4
push ebx
call dword [sym.imp.MSVCR90.dll_fprintf]
mov eax, dword [0x40a4e8]
mov esi, dword [eax]
mov edi, dword [0x40a4d4]
add esp, 0xc
mov edi, edi
mov ebp, dword [0x40a4e8]
test edi, edi
je 0x401fa2
cmp edi, dword [0x40a4d4]
je 0x401fa8
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp esi, ebp
je 0x402060
test edi, edi
jne 0x401fd8
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x401fc7
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 8]
add eax, 0x20
cmp dword [eax + 0x18], 0x10
jb 0x401fdc
mov ebp, dword [eax + 4]
jmp 0x401fdf
mov eax, dword [edi]
jmp 0x401fbc
lea ebp, [eax + 4]
test edi, edi
jne 0x40201b
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x401ff6
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
test edi, edi
jne 0x40201f
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x40200d
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 8]
cmp dword [eax + 0x18], 0x10
jb 0x402023
mov eax, dword [eax + 4]
jmp 0x402026
mov eax, dword [edi]
jmp 0x401feb
mov eax, dword [edi]
jmp 0x402002
add eax, 4
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 0x1c]
push ebp
push edx
push eax
push str._s_d_s_n
push ebx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x14
test edi, edi
jne 0x40205c
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x402055
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esi]
jmp 0x401f90
mov eax, dword [edi]
jmp 0x40204a
push 0x4073b4
push ebx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
xor ebp, ebp
lea esi, [esp + 0x1c]
call fcn.00404190
cmp ebx, ebp
je 0x402088
push ebx
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
lea ecx, [esp + 0x74]
mov byte [esp + 0x348], 1
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x90]
mov byte [esp + 0x348], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [esp + 0x134]
push eax
mov dword [esp + 0xb0], vtable.KClientSocket.0
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, byte [esp + 0x1b]
mov ecx, dword [esp + 0x340]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.00405b7b
add esp, 0x338
ret