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
and esp, 0xfffffff8
mov eax, 0x1014
call fcn.00402890
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x1010], 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 [esp + 0xc], ecx
test ecx, ecx
jne 0x4011d0
push 0x401870
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x403204
call fcn.00401650
add esp, 4
jmp 0x40135d
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x4011da
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 0x401247
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x40321c
call fcn.00401650
cmp dword [esi + 0x14], 0x10
mov edx, esi
jb 0x40120d
mov edx, dword [esi]
push 0x401870
push ecx
push dword [esi + 0x10]
mov ecx, eax
call fcn.00401960
add esp, 8
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_____]
push dword [esp + 0xc]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1010]
xor ecx, esp
call fcn.00401b48
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x401251
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 0x4012ca
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x40322c
call fcn.00401650
cmp dword [edi + 0x14], 0x10
mov edx, edi
jb 0x40128b
mov edx, dword [edi]
push 0x401870
push ecx
push dword [edi + 0x10]
mov ecx, eax
call fcn.00401960
add esp, 8
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 esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [esp + 0xc]
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1010]
xor ecx, esp
call fcn.00401b48
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
push eax
push 0x1000
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40131a
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40131a
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
lea eax, [esp + 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x10]
push eax
push 0x1000
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4012e4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [esp + 0xc]
call esi
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x40323c
call fcn.00401650
cmp dword [edi + 0x14], 0x10
mov edx, edi
jb 0x40134a
mov edx, dword [edi]
push 0x401870
push ecx
push dword [edi + 0x10]
mov ecx, eax
call fcn.00401960
add esp, 8
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 [esp + 0x101c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401b48
mov esp, ebp
pop ebp
ret