Function at 0x401cb0
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, 0x1024
call fcn.00506d80
mov eax, dword [0x57cd60]
xor eax, esp
mov dword [esp + 0x1020], eax
push ebx
push esi
push edi
push 0
push 0
push 0
push 1
mov esi, ecx
mov edi, edx
push str.DownloadApp
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], edi
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ecx, eax
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x401d0e
push 0x55b7ec
push 0x584ec8
call fcn.00404890
jmp 0x4020ac
mov ebx, 0x10
cmp dword [esi + 0x14], ebx
jb 0x401d1c
mov eax, dword [esi]
jmp 0x401d1e
mov eax, esi
push 0
push SysReAllocString
push 0
push 0
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x401de8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push 0x55b804
push ecx
push esi
push ecx
push 0x55b810
push 0x584ec8
call fcn.00404890
add esp, 0xc
push eax
call fcn.00404b40
add esp, 0xc
push eax
call fcn.00404890
add esp, 0xc
push eax
call fcn.00402500
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004026e0
mov edx, dword [esi]
mov eax, dword [edx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x401da7
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x401da7
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x401dc8
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x401dc0
or eax, 4
push 0
push eax
call fcn.00401b10
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1020]
xor ecx, esp
call fcn.005048f5
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x14], ebx
jb 0x401df1
mov eax, dword [edi]
jmp 0x401df3
mov eax, edi
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x401ecd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push 0x55b804
push ecx
push edi
push ecx
push 0x55b820
push 0x584ec8
call fcn.00404890
add esp, 0xc
push eax
call fcn.00404b40
add esp, 0xc
push eax
call fcn.00404890
add esp, 0xc
push eax
call fcn.00402500
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004026e0
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x401e83
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x401e83
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x401ea4
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x401e9c
or eax, 4
push 0
push eax
call fcn.00401b10
mov edx, dword [esp + 0xc]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1020]
xor ecx, esp
call fcn.005048f5
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [esp + 0x18]
push ecx
push 0x1000
lea edx, [esp + 0x30]
push edx
push eax
call esi
mov ebx, eax
test ebx, ebx
je 0x401fdc
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [esp]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401fd4
push 0
lea ecx, [esp + 0x28]
push ecx
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x34]
push edx
push eax
call edi
test eax, eax
je 0x401f45
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x18]
push ecx
push 0x1000
lea edx, [esp + 0x30]
push edx
push eax
call esi
mov ebx, eax
test ebx, ebx
jne 0x401f00
jmp 0x401fdc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push 0x55b804
push ecx
mov ecx, dword [esp + 0x2c]
push ecx
push ecx
push 0x55b830
push 0x584ec8
call fcn.00404890
add esp, 0xc
push eax
call fcn.00404b40
add esp, 0xc
push eax
call fcn.00404890
add esp, 0xc
push eax
call fcn.00402500
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004026e0
mov edx, dword [esi]
mov eax, dword [edx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x401fb3
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x401fb3
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x401fd4
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x401fcc
or eax, 4
push 0
push eax
call fcn.00401b10
test ebx, ebx
jne 0x40206b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x20]
push eax
push ecx
push 0x55b804
push ecx
push edx
push ecx
push 0x55b840
push 0x584ec8
call fcn.00404890
add esp, 0xc
push eax
call fcn.00404b40
add esp, 0xc
push eax
call fcn.00404890
add esp, 0xc
push eax
call fcn.00402500
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004026e0
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x40204a
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40204a
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40206b
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x402063
or eax, 4
push 0
push eax
call fcn.00401b10
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
test ebx, ebx
je 0x402100
mov edx, dword [esp + 0x1c]
push edx
push ecx
push 0x55b850
push 0x584f80
call fcn.00404890
add esp, 0xc
push eax
call fcn.00404b40
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004026e0
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x4020df
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x4020df
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x402100
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x4020f8
or eax, 4
push 0
push eax
call fcn.00401b10
mov ecx, dword [esp + 0x102c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005048f5
mov esp, ebp
pop ebp
ret