Function at 0x40b650
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 0x446788
mov eax, dword fs:[0]
push eax
sub esp, 0x4cc
mov eax, dword [0x45e080]
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 [0x46043c]
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 0x40b6f1
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 0x40b730
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor bl, bl
mov ecx, dword [ebp + 0x1c]
cmp ecx, 7
jbe 0x40b95a
mov edx, dword [ebp + 8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40b950
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b978
jmp 0x40b950
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.004281d0
add esp, 4
lea eax, [ebp + 8]
lea ecx, [ebp - 0x4d0]
push 0x20
push eax
call fcn.0040ca50
push 2
sub esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00409ae0
call fcn.00424b60
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 0x40b7cc
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
xor bl, bl
jmp 0x40b8d5
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 0x40b88f
nop
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40b88f
push 0
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x4d0]
call fcn.0040cb70
add ebx, dword [ebp - 0x414]
mov eax, ebx
shr eax, 0x1f
push 0
movd xmm1, ebx
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x457be0]
mov eax, dword [ebp - 0x418]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x457be0]
divsd xmm1, xmm0
mulsd xmm1, qword [0x457b80]
cvttsd2si eax, xmm1
push eax
push 0x402
push dword [0x46043c]
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 0x40b7f0
lea ecx, [ebp - 0x4cc]
call fcn.0040d380
test eax, eax
jne 0x40b8c7
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.0040b280
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.0040c6e0
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.00425d27
add esp, 4
jmp 0x40b6f3
push ecx
push edx
call fcn.004264e6
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.004264a8
mov esp, ebp
pop ebp
ret
call fcn.0042b25f
int3