Function at 0x40ac59
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.00425e30
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push edi
push 1
push str.DownloadApp
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x40acac
push 0x45e4ac
push 0x466798
call fcn.0040c0d9
pop ecx
mov esi, eax
pop ecx
push 0xa
mov ecx, esi
call fcn.0040bcb9
mov ecx, esi
call fcn.0040bd80
xor al, al
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 8]
mov eax, dword [esi + 4]
cmp eax, edi
jne 0x40acbb
mov eax, 0x44b08c
push edi
push SysReAllocString
push edi
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
cmp eax, edi
mov dword [ebp - 8], eax
jne 0x40ad17
push 0x45e49c
push 0x466798
call fcn.0040c0d9
mov ebx, eax
mov eax, dword [esi + 4]
pop ecx
cmp eax, edi
pop ecx
jne 0x40acf3
mov eax, 0x44b08c
push eax
push ebx
call fcn.0040c0d9
pop ecx
pop ecx
push 0xa
mov ecx, ebx
call fcn.0040bcb9
mov ecx, ebx
call fcn.0040bd80
push dword [ebp - 4]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x40aca5
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + 4]
cmp eax, edi
jne 0x40ad26
mov eax, 0x44b08c
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x40ad91
push 0x45e48c
push 0x466798
call fcn.0040c0d9
mov esi, eax
mov eax, dword [ebx + 4]
pop ecx
cmp eax, edi
pop ecx
jne 0x40ad63
mov eax, 0x44b08c
push eax
push esi
call fcn.0040c0d9
pop ecx
pop ecx
push 0xa
mov ecx, esi
call fcn.0040bcb9
mov ecx, esi
call fcn.0040bd80
push dword [ebp - 8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 4]
call esi
jmp 0x40aca5
lea eax, [ebp - 0xc]
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
push eax
mov edi, 0x1000
lea eax, [ebp - 0x1014]
push edi
push eax
mov byte [ebp + 0xb], 1
push dword [ebp - 8]
call esi
mov ebx, 0x466798
test eax, eax
je 0x40ae33
cmp dword [ebp - 0xc], 0
jbe 0x40ae33
lea eax, [ebp - 0x14]
push 0
push eax
lea eax, [ebp - 0x1014]
push dword [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40adf8
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0xc]
jne 0x40adf8
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x1014]
push edi
push eax
push dword [ebp - 8]
call esi
jmp 0x40adb6
push 0x45e47c
push ebx
call fcn.0040c0d9
mov esi, eax
mov eax, dword [ebp + 0xc]
pop ecx
mov eax, dword [eax + 4]
pop ecx
test eax, eax
jne 0x40ae16
mov eax, 0x44b08c
push eax
push esi
call fcn.0040c0d9
pop ecx
pop ecx
push 0xa
mov ecx, esi
call fcn.0040bcb9
mov ecx, esi
call fcn.0040bd80
and byte [ebp + 0xb], 0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 4]
call esi
cmp byte [ebp + 0xb], 0
je 0x40aca5
push 0x45e46c
push ebx
call fcn.0040c0d9
mov esi, eax
mov eax, dword [ebp + 0xc]
pop ecx
mov eax, dword [eax + 4]
pop ecx
test eax, eax
jne 0x40ae74
mov eax, 0x44b08c
push eax
push esi
call fcn.0040c0d9
pop ecx
pop ecx
push 0xa
mov ecx, esi
call fcn.0040bcb9
mov ecx, esi
call fcn.0040bd80
mov al, 1
jmp 0x40aca7