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

Disassembly:
push 0x104
mov eax, 0x58ce61
call fcn.00532017
mov ebx, ecx
and dword [ebp - 4], 0
xor edi, edi
lea ecx, [ebp - 0x90]
and dword [ebp - 0x94], edi
call fcn.0040493d
push 2
pop eax
lea edx, [ebp + 8]
mov byte [ebp - 4], al
lea ecx, [ebp - 0x110]
call fcn.00404624
mov esi, eax
lea ecx, [ebp - 0x90]
push esi
call fcn.00402068
lea ecx, [esi + 0x18]
push ecx
lea ecx, [ebp - 0x78]
call fcn.00402068
lea ecx, [esi + 0x30]
push ecx
lea ecx, [ebp - 0x60]
call fcn.00402068
lea eax, [esi + 0x48]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402068
lea eax, [esi + 0x60]
push eax
lea ecx, [ebp - 0x30]
call fcn.00402068
lea ecx, [ebp - 0x110]
call fcn.0040497a
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 0x5716b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x571897
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 0x5716aa
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 0x57188d
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 0x571895
xor edi, edi
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x57188d
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 0x571887
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.00415936
mov ecx, dword [ebp - 0x94]
mov edi, eax
shr ecx, 1
push ecx
push 0
push edi
call fcn.0054b1f0
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 0x571880
and dword [ebp - 0x14], 0
lea ecx, [ebp - 0x14]
push edi
call fcn.004030eb
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.004030eb
mov byte [ebp - 4], 4
mov esi, dword [ebp - 0x14]
cmp dword [esi - 8], 0
jl 0x571870
push dword [ebp - 0x18]
push esi
call fcn.0054a431
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x571870
sub ecx, esi
sar ecx, 1
cmp ecx, 0xffffffff
jle 0x571870
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.00404cf8
push eax
mov ecx, ebx
mov byte [ebp - 4], 5
call fcn.00404d51
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 4
call fcn.00402db8
mov eax, dword [ebx]
cmp dword [eax - 8], 0
jl 0x571845
push 0x5c5330
push eax
call fcn.0054a431
pop ecx
pop ecx
test eax, eax
je 0x571845
sub eax, dword [ebx]
sar eax, 1
cmp eax, 0xffffffff
jne 0x57184a
mov eax, dword [ebx]
mov eax, dword [eax - 8]
push eax
lea eax, [ebp - 0x98]
mov ecx, ebx
push eax
call fcn.00404c4f
push eax
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00404d51
lea ecx, [ebp - 0x98]
call fcn.00402db8
lea ecx, [ebp - 0x18]
call fcn.00402db8
lea ecx, [ebp - 0x14]
call fcn.00402db8
push edi
call fcn.0041593f
pop ecx
xor esi, esi
mov edi, esi
jmp 0x571897
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor esi, esi
lea ecx, [ebp - 0x90]
call fcn.0040497a
push esi
push 1
lea ecx, [ebp + 8]
call fcn.00403a36
push esi
push 1
lea ecx, [ebp + 0x20]
call fcn.00403a36
mov eax, edi
call fcn.00531fc1
ret