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.0043a7e0
mov eax, dword [0x46cd48]
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 0x4013be
push 0x45f5cc
push 0x470f58
call fcn.00402340
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401aa0
mov eax, dword [esi]
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
jmp 0x4015d3
cmp dword [esi + 0x18], 0x10
jb 0x4013c9
mov ecx, dword [esi + 4]
jmp 0x4013cc
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 0x401475
push esi
push ecx
push 0x45f5e4
push 0x470f58
call fcn.00402340
add esp, 0xc
push eax
call fcn.00402570
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401aa0
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
test byte [eax + 8], 6
jne 0x401434
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x401434
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x401455
mov eax, dword [ecx + 8]
or eax, edi
cmp dword [ecx + 0x28], 0
jne 0x40144d
or eax, 4
push 0
push eax
call fcn.00401200
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.00438ec6
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x18], 0x10
jb 0x401480
mov eax, dword [ebx + 4]
jmp 0x401483
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 0x40153b
push ebx
push ecx
push 0x45f5f4
push 0x470f58
call fcn.00402340
add esp, 0xc
push eax
call fcn.00402570
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401aa0
mov eax, dword [esi]
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
xor ebx, ebx
test byte [eax + 8], 6
jne 0x4014f5
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x4014f5
mov ebx, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test ebx, ebx
je 0x401516
mov eax, dword [ecx + 8]
or eax, ebx
cmp dword [ecx + 0x28], 0
jne 0x40150e
or eax, 4
push 0
push eax
call fcn.00401200
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.00438ec6
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 0x401589
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x401589
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 0x401557
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 0x45f604
push 0x470ff0
call fcn.00402340
add esp, 0xc
push eax
call fcn.00402570
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401aa0
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
xor edi, edi
test byte [eax + 8], 6
jne 0x4015f1
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x4015f1
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x401612
mov eax, dword [ecx + 8]
or eax, edi
cmp dword [ecx + 0x28], 0
jne 0x40160a
or eax, 4
push 0
push eax
call fcn.00401200
mov ecx, dword [esp + 0x1024]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00438ec6
mov esp, ebp
pop ebp
ret