Function at 0x413401
Capabilities:
Check http status code
Delete file
Download and write a file
Read data from internet
Read file on windows
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov eax, 0x42a130
call fcn.004271f0
sub esp, 0x914
push ebx
push esi
mov esi, ecx
push edi
lea eax, [ebp - 0x8c]
lea edi, [esi + 0x20]
push edi
push eax
mov dword [ebp - 0x38], edi
call fcn.0041b512
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.0041b253
or dword [ebp - 4], 0xffffffff
add esp, 0xc
lea ecx, [ebp - 0x8c]
push 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, dword [edi + 4]
cmp eax, ebx
jne 0x413455
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, ebx
mov dword [ebp - 0x18], eax
jne 0x4134e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00413936
push eax
lea eax, [ebp - 0x7c]
push str.Unable_to_create_file._Error:
push eax
mov dword [ebp - 4], 1
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
push 0x438590
push eax
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 2
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0x20
mov esi, eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_void_]
push esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP60.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__]
lea eax, [ebp - 0x34]
push 0x4310d8
push eax
mov dword [ebp - 0x34], vtable.HttpDownloaderException.0
mov byte [ebp - 4], 3
call sub.MSVCRT.dll__CxxThrowException
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x920]
push 0x800
push eax
mov eax, dword [ebp + 8]
push dword [eax]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x41354f
lea eax, [ebp - 0x4c]
push ebx
push eax
lea eax, [ebp - 0x920]
push dword [ebp - 0x10]
mov dword [ebp - 0x4c], ebx
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x10]
add dword [ebp - 0x14], eax
mov eax, dword [esi + 0x18]
cmp eax, ebx
je 0x413544
mov ecx, dword [esi + 0x1c]
cmp ecx, ebx
je 0x413544
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push ecx
call eax
add esp, 0xc
cmp dword [ebp - 0x10], ebx
je 0x4135de
jmp 0x4134ea
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi + 4]
cmp edi, ebx
jne 0x413565
mov edi, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00413936
push eax
lea eax, [ebp - 0x7c]
push str.Unable_to_recieve_data_from_server._Error:
push eax
mov dword [ebp - 4], 5
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
push 0x438590
push eax
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 6
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0x20
mov esi, eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 7
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_void_]
push esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 8
call dword [sym.imp.MSVCP60.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__]
lea eax, [ebp - 0x34]
push 0x4310d8
push eax
mov dword [ebp - 0x34], vtable.HttpDownloaderException.0
mov byte [ebp - 4], 7
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
mov ecx, esi
call fcn.00412920
cmp eax, 0xffffffff
je 0x413873
cmp eax, 0x190
jge 0x4138e5
cmp byte [esi + 0x41], bl
je 0x413862
push dword [ebp + 8]
lea eax, [ebp - 0x48]
mov ecx, esi
push eax
call fcn.0041295a
mov esi, dword [sym.imp.MSVCRT.dll_wcslen]
mov edi, str.application_octet_stream
push edi
mov dword [ebp - 4], 0x10
call esi
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::find_unsigned_short_int_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
cmp eax, dword [ecx]
jne 0x413853
mov edi, str.application_exe
push edi
call esi
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::find_unsigned_short_int_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
cmp eax, dword [ecx]
jne 0x413853
mov edi, str.application_x_msdownload
push edi
call esi
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::find_unsigned_short_int_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
cmp eax, dword [ecx]
jne 0x413853
mov edi, str.application_x_msdos_program
push edi
call esi
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::find_unsigned_short_int_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
cmp eax, dword [ecx]
jne 0x413853
mov edi, str.application_x_msi
push edi
call esi
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::find_unsigned_short_int_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
cmp eax, dword [ecx]
jne 0x413853
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.0041ba28
push eax
lea eax, [ebp - 0x9c]
push str.Wrong_content_type:
push eax
mov byte [ebp - 4], 0x11
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0x14
push 1
lea ecx, [ebp - 0x8c]
pop esi
mov byte [ebp - 4], 0x13
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [ebp - 0x38]
mov dword [ebp + 8], ebx
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x413727
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
lea eax, [ebp + 8]
push ebx
push eax
lea eax, [ebp - 0x120]
push 0x64
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp + 8], ebx
jbe 0x413829
cmp dword [ebp + 8], 0x64
ja 0x413829
lea eax, [ebp - 0x5c]
push 0x64
push eax
call fcn.004040a4
push eax
lea eax, [ebp - 0x7c]
push str.._First
push eax
mov byte [ebp - 4], 0x14
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
push str._bytes_of_response_is_
push eax
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 0x15
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
lea ecx, [ebp - 0x120]
mov byte [ebp - 4], 0x16
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
push 0x437f20
push eax
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 0x17
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0x38
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [ebp - 4], 0x18
push dword [ecx]
lea ecx, [ebp - 0x9c]
push ebx
push eax
call dword [sym.imp.MSVCP60.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__::append_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push esi
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 0x17
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0x16
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0x15
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 0x14
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0x13
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x9c]
lea ecx, [ebp - 0xb8]
push eax
call fcn.00412ca4
lea eax, [ebp - 0xb8]
push 0x4310d8
push eax
call sub.MSVCRT.dll__CxxThrowException
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00413936
push eax
lea eax, [ebp - 0x7c]
push str.Unable_to_get_HTTP_status:
push eax
mov dword [ebp - 4], 9
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
push 0x438590
push eax
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 0xa
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0x20
mov esi, eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0xb
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_void_]
push esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xc
call dword [sym.imp.MSVCP60.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__]
lea eax, [ebp - 0x34]
push 0x4310d8
push eax
mov dword [ebp - 0x34], vtable.HttpDownloaderException.0
mov byte [ebp - 4], 0xb
call sub.MSVCRT.dll__CxxThrowException
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.004040a4
push eax
lea eax, [ebp - 0x7c]
push str.Server_internal_error:
push eax
mov dword [ebp - 4], 0xd
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
push 0x438590
push eax
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 0xe
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0x20
push eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0xf
call fcn.00412ca4
lea eax, [ebp - 0x34]
push 0x4310d8
push eax
call sub.MSVCRT.dll__CxxThrowException