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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b7341
mov eax, dword fs:[0]
push eax
mov eax, 0x2268
call fcn.0047e4b0
mov eax, dword [0x4e0214]
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 - 0x2270], ecx
xor edx, edx
mov ecx, eax
mov dword [ebp - 0x2260], 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 0x40aef5
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x2230]
call fcn.00403870
mov dword [ebp - 4], ebx
mov dword [ebp - 0x2250], 0x13880
mov byte [ebp - 0x2264], 1
call fcn.0040a7a0
push 4
lea ecx, [ebp - 0x2250]
push ecx
push 2
push eax
mov dword [ebp - 0x226c], eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov ecx, esi
lea edi, [ebp - 0x226c]
call fcn.0040a850
mov esi, eax
mov dword [ebp - 0x2268], esi
mov byte [ebp - 4], 2
cmp dword [ebp - 0x221c], 8
jb 0x40af72
mov edx, dword [ebp - 0x2230]
push edx
call fcn.004790ec
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 0x40aff2
mov eax, dword [ebp - 0x2254]
cmp eax, 0xc8
je 0x40aff2
cmp eax, 0xc9
je 0x40aff2
cmp eax, 0xca
je 0x40aff2
cmp eax, 0xcb
je 0x40aff2
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov eax, dword [ebp - 0x226c]
push eax
call esi
or eax, 0xffffffff
jmp 0x40b2a9
push ebx
lea ecx, [ebp - 0x2254]
push ecx
lea edx, [ebp - 0x2250]
push edx
push 0x20000005
push esi
mov dword [ebp - 0x2250], ebx
mov dword [ebp - 0x2254], 4
call edi
neg eax
sbb edi, edi
and edi, dword [ebp - 0x2250]
lea esi, [ebp - 0x226c]
mov dword [ebp - 0x2274], edi
mov dword [ebp - 0x2250], ebx
call fcn.0040a700
test eax, eax
je 0x40b07e
call fcn.0044bc92
test byte [0x4e4944], 1
mov dword [ebp - 0x2250], eax
jne 0x40b06b
or dword [0x4e4944], 1
call section..text
push 0x4b86a0
call fcn.004793ba
add esp, 4
push str.gzip_init.
push ebx
mov esi, 0x4e4928
call fcn.00401150
add esp, 8
mov dword [ebp - 0x2258], ebx
jmp 0x40b090
push 0x10
push 0x4d03a8
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.00403f80
lea eax, [ebp - 0x2254]
push eax
push 0x2000
lea ecx, [ebp - 0x2214]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x2268]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
jne 0x40b0f5
lea eax, [ebp - 0x224c]
push eax
call fcn.0040b760
add esp, 4
mov byte [ebp - 4], 2
cmp dword [ebp - 0x2238], 0x10
mov esi, eax
jb 0x40b113
mov ecx, dword [ebp - 0x224c]
push ecx
call fcn.004790ec
add esp, 4
cmp esi, ebx
je 0x40b278
mov eax, dword [ebp - 0x2254]
cmp eax, ebx
jl 0x40b278
je 0x40b25d
mov ecx, dword [ebp - 0x2250]
add dword [ebp - 0x2258], eax
cmp ecx, ebx
je 0x40b1e5
lea edx, [ebp - 0x225c]
push edx
lea edx, [ebp - 0x2254]
push edx
push eax
lea eax, [ebp - 0x2214]
push eax
push ecx
mov dword [ebp - 0x2254], ebx
mov dword [ebp - 0x225c], ebx
call fcn.0044d759
add esp, 0x14
test byte [0x4e4944], 1
mov edi, eax
jne 0x40b192
or dword [0x4e4944], 1
call section..text
push 0x4b86a0
call fcn.004793ba
add esp, 4
mov ecx, dword [ebp - 0x225c]
push ecx
push edi
push str.gzip_update__d___d_bytes
push ebx
mov esi, 0x4e4928
call fcn.00401150
add esp, 0x10
cmp edi, ebx
jl 0x40b278
mov edx, dword [ebp - 0x225c]
mov eax, dword [ebp - 0x2254]
mov ecx, dword [ebp - 0x2270]
push edx
push eax
call fcn.0040b550
mov ecx, dword [ebp - 0x2254]
push ecx
call fcn.0047aba7
mov edi, dword [ebp - 0x2274]
add esp, 4
jmp 0x40b1f8
mov ecx, dword [ebp - 0x2270]
push eax
lea edx, [ebp - 0x2214]
push edx
call fcn.0040b550
cmp edi, 0xffffffff
je 0x40b230
mov ecx, edi
cmp edi, ebx
jne 0x40b208
mov ecx, 1
mov eax, dword [ebp - 0x2258]
imul eax, eax, 0x64
xor edx, edx
div ecx
push eax
lea eax, [ebp - 0x214]
push str.Downloaded:__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x40b090
mov eax, dword [ebp - 0x2258]
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
push eax
lea ecx, [ebp - 0x214]
push str.Downloaded:__dK
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x40b090
lea edx, [ebp - 0x214]
push str.Download_complete.
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 8
mov dword [ebp - 0x2260], ebx
mov eax, dword [ebp - 0x2250]
cmp eax, ebx
je 0x40b28b
push eax
call fcn.0044bcca
add esp, 4
mov eax, dword [ebp - 0x2268]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push eax
call esi
mov ecx, dword [ebp - 0x226c]
push ecx
call esi
mov eax, dword [ebp - 0x2260]
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.004790f7
mov esp, ebp
pop ebp
ret