Function at 0x401350
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.004205f0
mov eax, dword [0x44a640]
xor eax, esp
mov dword [esp + 0x1018], eax
push ebx
push esi
push edi
push 0
push 0
push 0
push 1
mov ebx, edx
push str.DownloadApp
mov esi, ecx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4013b9
push 0x440098
call fcn.004021e0
add esp, 4
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401940
mov eax, dword [esi]
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
jmp 0x4015bf
cmp dword [esi + 0x18], 0x10
jb 0x4013c4
mov ecx, dword [esi + 4]
jmp 0x4013c7
lea ecx, [esi + 4]
push 0
push SysReAllocString
push 0
push 0
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edi, eax
test edi, edi
jne 0x40146b
push esi
push ecx
push 0x4400b0
call fcn.004021e0
add esp, 8
push eax
call fcn.00402430
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401940
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
test byte [eax + 8], 6
jne 0x40142a
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x40142a
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40144b
mov eax, dword [ecx + 8]
or eax, edi
cmp dword [ecx + 0x28], 0
jne 0x401443
or eax, 4
push 0
push eax
call fcn.004011b0
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1018]
xor ecx, esp
call fcn.0041eea1
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x18], 0x10
jb 0x401476
mov eax, dword [ebx + 4]
jmp 0x401479
lea eax, [ebx + 4]
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 0x40152c
push ebx
push ecx
push 0x4400c0
call fcn.004021e0
add esp, 8
push eax
call fcn.00402430
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401940
mov eax, dword [esi]
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
xor ebx, ebx
test byte [eax + 8], 6
jne 0x4014e6
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x4014e6
mov ebx, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test ebx, ebx
je 0x401507
mov eax, dword [ecx + 8]
or eax, ebx
cmp dword [ecx + 0x28], 0
jne 0x4014ff
or eax, 4
push 0
push eax
call fcn.004011b0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1018]
xor ecx, esp
call fcn.0041eea1
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [esp + 0x14]
push eax
push 0x1000
lea ecx, [esp + 0x28]
push ecx
push edi
call ebx
test eax, eax
je 0x40157a
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x40157a
push 0
lea edx, [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x14]
push ecx
push 0x1000
lea edx, [esp + 0x28]
push edx
push edi
call ebx
test eax, eax
jne 0x401548
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
push ecx
push 0x4400d0
call fcn.004021e0
add esp, 8
push eax
call fcn.00402430
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401940
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
xor edi, edi
test byte [eax + 8], 6
jne 0x4015dd
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x4015dd
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x4015fe
mov eax, dword [ecx + 8]
or eax, edi
cmp dword [ecx + 0x28], 0
jne 0x4015f6
or eax, 4
push 0
push eax
call fcn.004011b0
mov ecx, dword [esp + 0x1024]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041eea1
mov esp, ebp
pop ebp
ret