Function at 0x401000
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x101c
call fcn.00401ee0
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x1018], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0
push 0
push 0
push 1
push str.DownloadApp
mov edi, ecx
mov dword [esp + 0x24], eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x401068
mov ecx, dword [sym.imp.MSVCP90.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.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push ecx
push ecx
push 0x402190
push edx
call fcn.004014b0
add esp, 0xc
jmp 0x4011f2
cmp dword [edi + 0x18], 0x10
jb 0x401073
mov eax, dword [edi + 4]
jmp 0x401076
lea eax, [edi + 4]
push 0
push 0x80000000
push 0
push 0
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
jne 0x4010d8
mov eax, dword [sym.imp.MSVCP90.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 ecx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push eax
push edi
push 0x4021a8
push ecx
call fcn.004014b0
add esp, 8
push eax
call dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_ostream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.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 ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1018]
xor ecx, esp
call fcn.0040166c
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x18], 0x10
jb 0x4010e7
mov eax, dword [eax + 4]
jmp 0x4010ea
add eax, 4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40115d
mov edx, dword [sym.imp.MSVCP90.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 eax, dword [esp + 0x10]
mov ecx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push edx
push eax
push 0x4021b8
push ecx
call fcn.004014b0
add esp, 8
push eax
call dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_ostream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.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
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1018]
xor ecx, esp
call fcn.0040166c
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
lea edx, [esp + 0x14]
push edx
push 0x1000
lea eax, [esp + 0x28]
push eax
push esi
call ebx
test eax, eax
je 0x4011b2
lea esp, [esp]
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x4011b2
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x2c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x14]
push eax
push 0x1000
lea ecx, [esp + 0x28]
push ecx
push esi
call ebx
test eax, eax
jne 0x401180
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
mov eax, dword [sym.imp.MSVCP90.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 ecx, dword [esp + 0x10]
mov edx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
push ecx
push 0x4021c8
push edx
call fcn.004014b0
add esp, 8
push eax
call dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_ostream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.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 ecx, dword [esp + 0x1024]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040166c
mov esp, ebp
pop ebp
ret