Function at 0x40bc30
Capabilities:
Create http request
Get http content length
Read data from internet
Receive data
Reference http user-agent string
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447358
mov eax, dword fs:[0]
push eax
sub esp, 0x4cc
mov eax, dword [0x45f080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0
push 0
push 0x402
mov dword [ebp - 4], 0
push dword [0x46143c]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0
push 1
push str.Mozilla_5.0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
test edi, edi
je 0x40bcd1
push 4
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x41c], 0x1388
push eax
push 2
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 0
push 0x80000000
push 0
push 0
push esi
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
test esi, esi
jne 0x40bd10
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor bl, bl
mov ecx, dword [ebp + 0x1c]
cmp ecx, 7
jbe 0x40bf3a
mov edx, dword [ebp + 8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40bf30
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bf58
jmp 0x40bf30
xor ebx, ebx
mov dword [ebp - 0x420], 4
push ebx
lea eax, [ebp - 0x420]
mov dword [ebp - 0x418], ebx
push eax
lea eax, [ebp - 0x418]
push eax
push 0x20000005
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
push 0xb0
lea eax, [ebp - 0x4d0]
push ebx
push eax
call fcn.00428d50
add esp, 4
lea eax, [ebp + 8]
lea ecx, [ebp - 0x4d0]
push 0x20
push eax
call fcn.0040d030
push 2
sub esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00409ef0
call fcn.004256e0
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x4d0]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x4c4], 6
je 0x40bdac
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
xor bl, bl
jmp 0x40beb5
lea eax, [ebp - 0x414]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40be6f
nop
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40be6f
push 0
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x4d0]
call fcn.0040d150
add ebx, dword [ebp - 0x414]
mov eax, ebx
shr eax, 0x1f
push 0
movd xmm1, ebx
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x458dd0]
mov eax, dword [ebp - 0x418]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x458dd0]
divsd xmm1, xmm0
mulsd xmm1, qword [0x458d70]
cvttsd2si eax, xmm1
push eax
push 0x402
push dword [0x46143c]
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [ebp - 0x414]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40bdd0
lea ecx, [ebp - 0x4cc]
call fcn.0040d960
test eax, eax
jne 0x40bea7
mov eax, dword [ebp - 0x4d0]
lea ecx, [ebp - 0x4d0]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.0040b860
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov bl, 1
mov eax, dword [ebp - 0x4d0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x4d0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x4d4], eax
lea ecx, [ebp - 0x4cc]
call fcn.0040ccc0
mov eax, dword [ebp - 0x4d0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x4d0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x4d4], eax
lea eax, [ebp - 0x468]
mov byte [ebp - 4], 3
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004268a9
add esp, 4
jmp 0x40bcd3
push ecx
push edx
call fcn.00427068
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042702a
mov esp, ebp
pop ebp
ret
call fcn.0042bddf
int3