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

Disassembly:
push 0x10c
mov eax, 0x561e7e
call fcn.00531cbc
mov ebx, ecx
and dword [ebp - 4], 0
xor esi, esi
lea ecx, [ebp - 0x90]
and dword [ebp - 0x94], esi
call fcn.00403876
push 2
pop eax
lea edx, [ebp + 8]
mov byte [ebp - 4], al
lea ecx, [ebp - 0x118]
call fcn.00403534
mov edi, eax
lea eax, [ebp - 0x90]
mov byte [ebp - 4], 3
cmp eax, edi
je 0x403f2e
push 0xffffffffffffffff
push esi
push edi
mov ecx, eax
call fcn.004031e2
lea eax, [edi + 0x18]
lea ecx, [ebp - 0x78]
cmp ecx, eax
je 0x403f42
push 0xffffffffffffffff
push 0
push eax
call fcn.004031e2
lea eax, [edi + 0x30]
lea ecx, [ebp - 0x60]
cmp ecx, eax
je 0x403f56
push 0xffffffffffffffff
push 0
push eax
call fcn.004031e2
lea eax, [edi + 0x48]
lea ecx, [ebp - 0x48]
cmp ecx, eax
je 0x403f6a
push 0xffffffffffffffff
push 0
push eax
call fcn.004031e2
add edi, 0x60
lea eax, [ebp - 0x30]
cmp eax, edi
je 0x403f80
push 0xffffffffffffffff
push 0
push edi
mov ecx, eax
call fcn.004031e2
push 2
pop eax
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], al
call fcn.004038b3
xor edi, edi
push edi
push edi
push edi
push edi
push str.Downloader
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
test ecx, ecx
jne 0x403fb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4041a2
cmp dword [ebp - 0x34], 8
lea eax, [ebp - 0x48]
push edi
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 0x403fa8
cmp dword [ebp - 0x64], 8
lea eax, [ebp - 0x78]
push edi
cmovae eax, dword [ebp - 0x78]
push edi
push edi
push edi
push eax
push str.HEAD
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
test edi, edi
je 0x404198
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, 1
jne 0x4041a0
xor esi, esi
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x404198
push esi
lea eax, [ebp - 0x94]
push eax
push esi
push esi
push 0x16
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x404192
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.00418fad
pop ecx
mov ecx, dword [ebp - 0x94]
mov esi, eax
shr ecx, 1
push ecx
push 0
push esi
mov dword [ebp - 0x9c], esi
call fcn.00532330
add esp, 0xc
lea eax, [ebp - 0x94]
push 0
push eax
push esi
push 0
push 0x16
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x40418b
and dword [ebp - 0x14], 0
lea ecx, [ebp - 0x14]
push esi
call fcn.004050b7
mov byte [ebp - 4], 4
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.004050b7
mov byte [ebp - 4], 5
mov esi, dword [ebp - 0x14]
cmp dword [esi - 8], 0
jl 0x404175
push dword [ebp - 0x18]
push esi
call fcn.005301e4
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x404175
sub ecx, esi
sar ecx, 1
cmp ecx, 0xffffffff
jle 0x404175
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.00404cd1
push eax
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00404d2a
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 5
call fcn.00404d7c
mov eax, dword [ebx]
cmp dword [eax - 8], 0
jl 0x40414a
push 0x5a7780
push eax
call fcn.005301e4
pop ecx
pop ecx
test eax, eax
je 0x40414a
sub eax, dword [ebx]
sar eax, 1
cmp eax, 0xffffffff
jne 0x40414f
mov eax, dword [ebx]
mov eax, dword [eax - 8]
push eax
lea eax, [ebp - 0x98]
mov ecx, ebx
push eax
call fcn.00404c28
push eax
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.00404d2a
lea ecx, [ebp - 0x98]
call fcn.00404d7c
lea ecx, [ebp - 0x18]
call fcn.00404d7c
lea ecx, [ebp - 0x14]
call fcn.00404d7c
mov esi, dword [ebp - 0x9c]
push esi
call fcn.00418fa8
pop ecx
xor edi, edi
mov esi, edi
jmp 0x4041a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor edi, edi
lea ecx, [ebp - 0x90]
call fcn.004038b3
push edi
push 1
lea ecx, [ebp + 8]
call fcn.004034f0
push edi
push 1
lea ecx, [ebp + 0x20]
call fcn.004034f0
mov eax, esi
call fcn.00531c6b
ret