Function at 0x570fc0
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push 0x104
mov eax, 0x58aef0
call fcn.00531c83
mov ebx, ecx
and dword [ebp - 4], 0
xor edi, edi
lea ecx, [ebp - 0x90]
and dword [ebp - 0x94], edi
call fcn.0040491d
push 2
pop eax
lea edx, [ebp + 8]
mov byte [ebp - 4], al
lea ecx, [ebp - 0x110]
call fcn.00404604
mov esi, eax
lea ecx, [ebp - 0x90]
push esi
call fcn.00402048
lea ecx, [esi + 0x18]
push ecx
lea ecx, [ebp - 0x78]
call fcn.00402048
lea ecx, [esi + 0x30]
push ecx
lea ecx, [ebp - 0x60]
call fcn.00402048
lea eax, [esi + 0x48]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402048
lea eax, [esi + 0x60]
push eax
lea ecx, [ebp - 0x30]
call fcn.00402048
lea ecx, [ebp - 0x110]
call fcn.0040495a
xor esi, esi
push esi
push esi
push esi
push esi
push str.Downloader
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
test ecx, ecx
jne 0x571069
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x571249
cmp dword [ebp - 0x34], 8
lea eax, [ebp - 0x48]
push esi
cmovae eax, dword [ebp - 0x48]
push 0x50
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
test ecx, ecx
je 0x57105c
cmp dword [ebp - 0x64], 8
lea eax, [ebp - 0x78]
push esi
cmovae eax, dword [ebp - 0x78]
push esi
push esi
push esi
push eax
push str.HEAD
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x57123f
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, 1
jne 0x571247
xor edi, edi
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x57123f
push edi
lea eax, [ebp - 0x94]
push eax
push edi
push edi
push 0x16
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x571239
mov eax, dword [ebp - 0x94]
xor ecx, ecx
push 2
shr eax, 1
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041559f
mov ecx, dword [ebp - 0x94]
mov edi, eax
shr ecx, 1
push ecx
push 0
push edi
call fcn.0054ae60
add esp, 0x10
lea eax, [ebp - 0x94]
push 0
push eax
push edi
push 0
push 0x16
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x571232
and dword [ebp - 0x14], 0
lea ecx, [ebp - 0x14]
push edi
call fcn.004030cb
mov byte [ebp - 4], 3
lea eax, [ebp + 0x20]
and dword [ebp - 0x18], 0
lea ecx, [ebp - 0x18]
cmp dword [ebp + 0x34], 8
cmovae eax, dword [ebp + 0x20]
push eax
call fcn.004030cb
mov byte [ebp - 4], 4
mov esi, dword [ebp - 0x14]
cmp dword [esi - 8], 0
jl 0x571222
push dword [ebp - 0x18]
push esi
call fcn.0054a0a1
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x571222
sub ecx, esi
sar ecx, 1
cmp ecx, 0xffffffff
jle 0x571222
mov eax, dword [esi - 8]
sub eax, dword [ebp + 0x30]
sub eax, ecx
lea ecx, [ebp - 0x14]
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.00404cd8
push eax
mov ecx, ebx
mov byte [ebp - 4], 5
call fcn.00404d31
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 4
call fcn.00402d98
mov eax, dword [ebx]
cmp dword [eax - 8], 0
jl 0x5711f7
push 0x5c3060
push eax
call fcn.0054a0a1
pop ecx
pop ecx
test eax, eax
je 0x5711f7
sub eax, dword [ebx]
sar eax, 1
cmp eax, 0xffffffff
jne 0x5711fc
mov eax, dword [ebx]
mov eax, dword [eax - 8]
push eax
lea eax, [ebp - 0x98]
mov ecx, ebx
push eax
call fcn.00404c2f
push eax
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00404d31
lea ecx, [ebp - 0x98]
call fcn.00402d98
lea ecx, [ebp - 0x18]
call fcn.00402d98
lea ecx, [ebp - 0x14]
call fcn.00402d98
push edi
call fcn.004155a8
pop ecx
xor esi, esi
mov edi, esi
jmp 0x571249
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor esi, esi
lea ecx, [ebp - 0x90]
call fcn.0040495a
push esi
push 1
lea ecx, [ebp + 8]
call fcn.00403a16
push esi
push 1
lea ecx, [ebp + 0x20]
call fcn.00403a16
mov eax, edi
call fcn.00531c2d
ret