Function at 0x401170
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
mov eax, 0x1014
call fcn.00402cf0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0
push 0
push 1
push str.DownloadApp
mov edi, edx
mov esi, ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ecx, eax
mov dword [ebp - 0x100c], ecx
test ecx, ecx
jne 0x4011cb
push 0x401b50
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, 0x40326c
call fcn.00401930
add esp, 4
jmp 0x401364
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x4011d5
mov eax, dword [esi]
push 0
push 0x80000000
push 0
push 0
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebx, eax
test ebx, ebx
jne 0x40123f
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, 0x403284
call fcn.00401930
cmp dword [esi + 0x14], 0xf
mov edx, esi
jbe 0x401208
mov edx, dword [esi]
push dword [esi + 0x10]
mov ecx, eax
call fcn.00401c40
add esp, 4
mov ecx, eax
push 0x401b50
call dword [sym.imp.MSVCP140.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 dword [ebp - 0x100c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401e28
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x14], 0xf
mov eax, edi
jbe 0x401249
mov eax, dword [edi]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4012bf
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, 0x403294
call fcn.00401930
cmp dword [edi + 0x14], 0xf
mov edx, edi
jbe 0x401283
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.00401c40
add esp, 4
mov ecx, eax
push 0x401b50
call dword [sym.imp.MSVCP140.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 esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [ebp - 0x100c]
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401e28
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1010]
push eax
push 0x1000
lea eax, [ebp - 0x1008]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x401320
nop dword [eax]
mov eax, dword [ebp - 0x1010]
test eax, eax
je 0x401320
push 0
lea ecx, [ebp - 0x1014]
push ecx
push eax
lea eax, [ebp - 0x1008]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x1010]
push eax
push 0x1000
lea eax, [ebp - 0x1008]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4012e0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [ebp - 0x100c]
call esi
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x4032a4
call fcn.00401930
cmp dword [edi + 0x14], 0xf
mov edx, edi
jbe 0x401352
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.00401c40
add esp, 4
push 0x401b50
mov ecx, eax
call dword [sym.imp.MSVCP140.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 [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401e28
mov esp, ebp
pop ebp
ret