Function at 0x402c70
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, 0x1024
call fcn.0055afa0
mov eax, dword [0x5ee000]
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 ebx, ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ecx, eax
mov dword [ebp - 0x100c], ecx
test ecx, ecx
jne 0x402cc1
mov edx, 0x5ccc00
mov ecx, 0x5f72c0
call fcn.00404dc0
jmp 0x402f80
cmp dword [ebx + 0x14], 0xf
mov eax, ebx
jbe 0x402ccb
mov eax, dword [ebx]
push 0
push SysReAllocString
push 0
push 0
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
mov dword [ebp - 0x101c], esi
test esi, esi
jne 0x402d56
mov edx, 0x5ccc24
mov ecx, 0x5f72c0
call fcn.00404dc0
cmp dword [ebx + 0x14], 0xf
mov edx, ebx
jbe 0x402d03
mov edx, dword [ebx]
push dword [ebx + 0x10]
mov ecx, eax
call fcn.004062d0
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
mov edx, 0x5ccc18
mov ecx, esi
call fcn.00404dc0
add esp, 4
mov ecx, eax
call fcn.00403430
push eax
call fcn.00405060
add esp, 4
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.0055ab65
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x14], 0xf
mov eax, edi
jbe 0x402d60
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 dword [ebp - 0x1018], eax
cmp eax, 0xffffffff
jne 0x402dfa
mov edx, 0x5ccc34
mov ecx, 0x5f72c0
call fcn.00404dc0
cmp dword [edi + 0x14], 0xf
mov edx, edi
jbe 0x402d9d
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.004062d0
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
mov edx, 0x5ccc18
mov ecx, esi
call fcn.00404dc0
add esp, 4
mov ecx, eax
call fcn.00403430
push eax
call fcn.00405060
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 4
push dword [ebp - 0x101c]
call esi
push dword [ebp - 0x100c]
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055ab65
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1008]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, eax
mov dword [ebp - 0x1010], ecx
test ecx, ecx
je 0x402ee0
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [ebp - 0x1014]
test eax, eax
je 0x402edc
push 0
lea ecx, [ebp - 0x1020]
push ecx
push eax
lea eax, [ebp - 0x1008]
push eax
push dword [ebp - 0x1018]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402e87
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1008]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, eax
mov dword [ebp - 0x1010], ecx
test ecx, ecx
jne 0x402e30
jmp 0x402ee0
mov edx, 0x5ccc44
mov ecx, 0x5f72c0
call fcn.00404dc0
cmp dword [edi + 0x14], 0xf
mov edx, edi
jbe 0x402ea0
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.004062d0
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
mov edx, 0x5ccc18
mov ecx, esi
call fcn.00404dc0
add esp, 4
mov ecx, eax
call fcn.00403430
push eax
call fcn.00405060
mov ecx, dword [ebp - 0x1010]
add esp, 4
test ecx, ecx
jne 0x402f2f
mov edx, 0x5ccc54
mov ecx, 0x5f72c0
call fcn.00404dc0
cmp dword [ebx + 0x14], 0xf
mov edx, ebx
jbe 0x402ef9
mov edx, dword [ebx]
push dword [ebx + 0x10]
mov ecx, eax
call fcn.004062d0
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
mov edx, 0x5ccc18
mov ecx, esi
call fcn.00404dc0
add esp, 4
mov ecx, eax
call fcn.00403430
push eax
call fcn.00405060
add esp, 4
push dword [ebp - 0x1018]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x101c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x100c]
call esi
cmp dword [ebp - 0x1010], 0
je 0x402f89
mov edx, 0x5ccc64
mov ecx, 0x5f7380
call fcn.00404dc0
cmp dword [edi + 0x14], 0xf
mov edx, edi
jbe 0x402f73
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.004062d0
add esp, 4
push eax
call fcn.00405060
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055ab65
mov esp, ebp
pop ebp
ret