Function at 0x40128a
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:
jmp 0x419170
mov eax, 0x1010
call fcn.004345a0
push ebx
push ebp
push esi
push edi
push 0
push 0
push 0
push 1
push str.DownloadApp
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x18], ebp
jne 0x4191cc
push 0x4cbc64
push 0x4d56d0
call fcn.00401901
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.004012da
mov ecx, esi
call fcn.004017c6
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1010
ret
mov edi, dword [esp + 0x1024]
mov eax, dword [edi + 4]
test eax, eax
jne 0x4191df
mov eax, 0x4ab2e0
push 0
push SysReAllocString
push 0
push 0
push eax
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x14], ebx
jne 0x419279
push 0x4cbc54
push 0x4d56d0
call fcn.00401901
mov esi, eax
mov eax, dword [edi + 4]
add esp, 8
test eax, eax
jne 0x41921c
mov eax, 0x4ab2e0
push eax
push esi
call fcn.00401901
add esp, 8
mov ecx, esi
push 0xa
call fcn.004012da
mov eax, dword [esi]
xor edi, edi
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
mov cl, byte [ecx + esi + 4]
test cl, 6
jne 0x419256
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x419256
mov edi, 4
mov eax, dword [esi]
push 0
push edi
mov ecx, dword [eax + 4]
add ecx, esi
call fcn.004019fb
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1010
ret
mov edi, dword [esp + 0x1028]
mov eax, dword [edi + 4]
test eax, eax
jne 0x41928c
mov eax, 0x4ab2e0
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x41933f
push 0x4cbc40
push 0x4d56d0
call fcn.00401901
mov esi, eax
mov eax, dword [edi + 4]
add esp, 8
test eax, eax
jne 0x4192d0
mov eax, 0x4ab2e0
push eax
push esi
call fcn.00401901
add esp, 8
mov ecx, esi
push 0xa
call fcn.004012da
mov ecx, dword [esi]
xor edi, edi
mov edx, dword [ecx + 4]
mov cl, byte [edx + esi + 4]
test cl, 6
lea eax, [edx + esi]
jne 0x41930a
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x41930a
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x419322
mov edx, dword [ecx + 4]
push 0
or edx, edi
push edx
call fcn.004016b8
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1010
ret
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push 0x1000
push edx
push eax
mov bl, 1
call esi
test eax, eax
je 0x419436
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
test eax, eax
jbe 0x419436
lea ecx, [esp + 0x1c]
push 0
push ecx
lea edx, [esp + 0x28]
push eax
push edx
push ebp
call edi
test eax, eax
je 0x4193b6
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
jne 0x4193b6
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push 0x1000
push edx
push eax
call esi
test eax, eax
jne 0x41936b
jmp 0x419436
push 0x4cbc2c
push 0x4d56d0
call fcn.00401901
mov ecx, dword [esp + 0x1030]
mov esi, eax
add esp, 8
mov eax, dword [ecx + 4]
test eax, eax
jne 0x4193dd
mov eax, 0x4ab2e0
push eax
push esi
call fcn.00401901
add esp, 8
mov ecx, esi
push 0xa
call fcn.004012da
mov edx, dword [esi]
xor edi, edi
mov eax, dword [edx + 4]
add eax, esi
test byte [eax + 4], 6
jne 0x419413
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x419413
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x419434
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x28]
or eax, edi
test edx, edx
jne 0x41942c
or al, 4
push 0
push eax
call fcn.004476c0
xor bl, bl
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
test bl, bl
je 0x4191bf
push 0x4cbc18
push 0x4d56d0
call fcn.00401901
mov esi, eax
mov eax, dword [esp + 0x1030]
add esp, 8
mov eax, dword [eax + 4]
test eax, eax
jne 0x419480
mov eax, 0x4ab2e0
push eax
push esi
call fcn.00401901
add esp, 8
mov ecx, esi
push 0xa
call fcn.004012da
mov ecx, dword [esi]
xor edi, edi
mov edx, dword [ecx + 4]
mov cl, byte [edx + esi + 4]
test cl, 6
lea eax, [edx + esi]
jne 0x4194ba
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x4194ba
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x4194db
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x28]
or eax, edi
test edx, edx
jne 0x4194d3
or al, 4
push 0
push eax
call fcn.004476c0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x1010
ret