Function at 0x40b390
Capabilities:
Check http status code
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ae971
mov eax, dword fs:[0]
push eax
mov eax, 0x2260
call fcn.0047dba0
mov eax, dword [0x629214]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x2268], ecx
xor edx, edx
mov ecx, eax
mov dword [ebp - 0x2264], 0xffffffff
mov dword [ebp - 0x221c], 7
mov dword [ebp - 0x2220], ebx
mov word [ebp - 0x2230], dx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x40b3f5
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x2230]
call fcn.00406130
mov dword [ebp - 4], ebx
mov dword [ebp - 0x2250], 0x13880
mov byte [ebp - 0x2258], 1
call fcn.0040adc0
push 4
lea ecx, [ebp - 0x2250]
push ecx
push 2
push eax
mov dword [ebp - 0x2260], eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov ecx, esi
lea edi, [ebp - 0x2260]
call fcn.0040ae70
mov esi, eax
mov dword [ebp - 0x225c], esi
mov byte [ebp - 4], 2
cmp dword [ebp - 0x221c], 8
jb 0x40b472
mov edx, dword [ebp - 0x2230]
push edx
call fcn.00478c1a
add esp, 4
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ebx
lea ecx, [ebp - 0x2250]
push ecx
lea edx, [ebp - 0x2254]
push edx
push 0x20000013
xor eax, eax
push esi
mov dword [ebp - 0x221c], 7
mov dword [ebp - 0x2220], ebx
mov word [ebp - 0x2230], ax
mov dword [ebp - 0x2250], 4
call edi
test eax, eax
je 0x40b4f2
mov eax, dword [ebp - 0x2254]
cmp eax, 0xc8
je 0x40b4f2
cmp eax, 0xc9
je 0x40b4f2
cmp eax, 0xca
je 0x40b4f2
cmp eax, 0xcb
je 0x40b4f2
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov eax, dword [ebp - 0x2260]
push eax
call esi
or eax, 0xffffffff
jmp 0x40b688
push ebx
lea ecx, [ebp - 0x2250]
push ecx
lea edx, [ebp - 0x2254]
push edx
push 0x20000005
push esi
mov dword [ebp - 0x2254], ebx
mov dword [ebp - 0x2250], 4
call edi
mov edi, eax
neg edi
sbb edi, edi
and edi, dword [ebp - 0x2254]
mov dword [ebp - 0x2250], ebx
jmp 0x40b530
push 0x10
push 0x6193d4
lea ecx, [ebp - 0x224c]
mov dword [ebp - 0x2254], ebx
mov dword [ebp - 0x2238], 0xf
mov dword [ebp - 0x223c], ebx
mov byte [ebp - 0x224c], bl
call fcn.00402c50
lea eax, [ebp - 0x2254]
push eax
push 0x2000
lea ecx, [ebp - 0x2214]
push ecx
push esi
mov byte [ebp - 4], 3
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
jne 0x40b58f
lea edx, [ebp - 0x224c]
push edx
call fcn.0040b930
add esp, 4
mov byte [ebp - 4], 2
cmp dword [ebp - 0x2238], 0x10
mov esi, eax
jb 0x40b5ad
mov eax, dword [ebp - 0x224c]
push eax
call fcn.00478c1a
add esp, 4
cmp esi, ebx
je 0x40b66a
mov esi, dword [ebp - 0x2254]
cmp esi, ebx
jl 0x40b66a
je 0x40b64f
push esi
lea ecx, [ebp - 0x2214]
push ecx
mov ecx, dword [ebp - 0x2268]
call fcn.00402870
mov eax, dword [ebp - 0x2250]
add eax, esi
mov dword [ebp - 0x2250], eax
cmp edi, 0xffffffff
je 0x40b622
mov ecx, edi
cmp edi, ebx
jne 0x40b5fa
mov ecx, 1
imul eax, eax, 0x64
xor edx, edx
div ecx
lea edx, [ebp - 0x214]
push eax
push str.Downloaded:__d__
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
mov esi, dword [ebp - 0x225c]
add esp, 0xc
jmp 0x40b530
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
push eax
lea eax, [ebp - 0x214]
push str.Downloaded:__dK
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov esi, dword [ebp - 0x225c]
add esp, 0xc
jmp 0x40b530
lea ecx, [ebp - 0x214]
push str.Download_complete.
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 8
mov dword [ebp - 0x2264], ebx
mov edx, dword [ebp - 0x225c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edx
call esi
mov eax, dword [ebp - 0x2260]
push eax
call esi
mov eax, dword [ebp - 0x2264]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00478c25
mov esp, ebp
pop ebp
ret