Function at 0x4071c9
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 0x510
mov eax, 0x438b7f
call fcn.0042340f
mov dword [ebp - 0x510], edx
mov dword [ebp - 0x500], ecx
mov dword [ebp - 4], 1
xor ebx, ebx
mov byte [ebp - 0x4e9], bl
mov dword [ebp - 0x4f8], 4
mov dword [ebp - 0x4f4], 0x201c1c18
mov dword [ebp - 0x4f0], 0xcc24f0
lea ecx, [ebp - 0x4f8]
call fcn.00404a30
push eax
lea ecx, [ebp - 0x50c]
call fcn.004024cc
mov byte [ebp - 4], 2
push ebx
push ebx
push ebx
push ebx
push dword [eax]
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [ebp - 0x518], edi
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x50c]
lea ecx, [ecx - 0x10]
call fcn.0040148d
test edi, edi
je 0x407489
push ebx
push SysReAllocString
push ebx
push ebx
push dword [ebp + 8]
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
mov dword [ebp - 0x51c], esi
test esi, esi
je 0x407480
push 0xc8
push ebx
lea eax, [ebp - 0xdc]
push eax
call fcn.00424c80
add esp, 0xc
mov dword [ebp - 0x4e8], 0xc8
push ebx
lea eax, [ebp - 0x4e8]
push eax
lea eax, [ebp - 0xdc]
push eax
push 5
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea eax, [ebp - 0xdc]
push eax
call fcn.0042986a
pop ecx
mov dword [ebp - 0x514], eax
test eax, eax
je 0x407475
push ebx
push 0x80
push 2
push ebx
push ebx
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x504], eax
test eax, eax
je 0x407475
mov byte [ebp - 4], 4
mov dword [ebp - 0x4e4], ebx
mov dword [ebp - 0x4fc], ebx
mov dword [ebp - 0x4e0], ebx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x4e0]
call fcn.00402582
mov byte [ebp - 4], 5
push 0x5c
lea ecx, [ebp - 0x4e0]
call fcn.00404adc
mov ecx, eax
cmp ecx, 0xffffffff
je 0x407376
mov eax, dword [ebp - 0x4e0]
mov eax, dword [eax - 0xc]
sub eax, ecx
dec eax
push eax
lea eax, [ebp - 0x508]
push eax
lea ecx, [ebp - 0x4e0]
call fcn.004023e8
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x4e0]
call fcn.00402868
mov byte [ebp - 4], 7
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x508]
lea ecx, [ecx - 0x10]
call fcn.0040148d
push 0x400
push ebx
lea eax, [ebp - 0x4dc]
push eax
call fcn.00424c80
add esp, 0xc
lea eax, [ebp - 0x4e4]
push eax
push 0x400
lea eax, [ebp - 0x4dc]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
push ebx
lea eax, [ebp - 0x4e4]
push eax
push dword [ebp - 0x4e4]
lea eax, [ebp - 0x4dc]
push eax
push dword [ebp - 0x504]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x4e4]
mov eax, dword [ebp - 0x4fc]
add eax, ecx
mov dword [ebp - 0x4fc], eax
test ecx, ecx
je 0x407428
cmp dword [ebp - 0x500], 0
je 0x407420
push dword [ebp - 0x510]
push eax
push dword [ebp - 0x514]
push ecx
mov ecx, esp
mov dword [ebp - 0x508], esp
lea eax, [ebp - 0x4e0]
push eax
call fcn.00402582
mov byte [ebp - 4], 8
mov byte [ebp - 4], 5
call dword [ebp - 0x500]
add esp, 0x10
mov ecx, dword [ebp - 0x4e4]
test ecx, ecx
jne 0x407376
push dword [ebp - 0x504]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x4e9], 1
mov byte [ebp - 4], 9
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x4e0]
lea ecx, [ecx - 0x10]
call fcn.0040148d
mov dword [ebp - 4], 1
jmp 0x407475
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
jmp 0x407486
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
mov byte [ebp - 4], bl
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.0040148d
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.0040148d
mov al, byte [ebp - 0x4e9]
call fcn.00423361
ret