Function at 0x411552
Capabilities:
Check for time delay via gettickcount

Disassembly:
push 0x44
mov eax, 0x45749e
call fcn.0043dd63
push str.DownloadFileAndWait__
lea ecx, [ebp - 0x1c]
call fcn.0040215a
xor esi, esi
push esi
lea eax, [ebp - 0x1c]
push eax
push 2
mov dword [ebp - 4], esi
call fcn.0040ece1
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025dc
xor eax, eax
cmp dword [0x48e50c], esi
sete al
xor ebx, ebx
inc ebx
push ebx
push ebx
mov dword [ebp - 0x2c], eax
call fcn.00407a9a
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
xor eax, eax
lea edi, [ebp - 0x48]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x3c
stosd dword es:[edi], eax
mov dword [ebp - 0x10], esi
call fcn.0042a60a
pop ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], ebx
cmp eax, esi
je 0x4115dd
push dword [0x48e95c]
push eax
call fcn.0040c202
mov edi, eax
mov dword [ebp - 0x14], edi
jmp 0x4115e2
mov dword [ebp - 0x14], esi
mov edi, esi
or dword [ebp - 4], 0xffffffff
cmp dword [edi], esi
jne 0x411633
push str.DownloadFileAndWait__:_queue_is_empty
lea ecx, [ebp - 0x1c]
call fcn.0040215a
mov dword [ebp - 4], 2
push dword [edi + 0xc]
lea eax, [ebp - 0x1c]
push eax
push ebx
call fcn.0040ece1
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025dc
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp + 0x10]
push edi
mov dword [ecx], eax
call fcn.00411b44
push 4
pop eax
jmp 0x411b3e
push 8
push dword [ebp + 0xc]
push str.https:__
call fcn.0043cfc5
add esp, 0xc
neg eax
sbb eax, eax
inc eax
mov dword [edi + 0x14], eax
lea eax, [ebp - 0x50]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040c9ad
mov ecx, dword [ebp + 0x10]
push esi
push 1
mov dword [ecx], eax
call fcn.00407a9a
call fcn.0042a9e0
push eax
lea ecx, [ebp - 0x18]
call fcn.00410472
push str.IDS_ACTION_CONNECTING
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 3
call fcn.0040215a
lea esi, [ebp - 0x18]
lea edi, [ebp - 0x1c]
mov ebx, 0x48e460
mov byte [ebp - 4], 4
call fcn.0040853c
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025dc
mov edx, esi
call fcn.00407aba
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
test eax, eax
jl 0x411760
cmp dword [ebp - 0x10], 2
je 0x4116d1
cmp dword [ebp - 0x10], 1
jne 0x411755
push str.DownloadFileAndWait:_Last_Bits_job_still_downloading_manifest_or_ARMupdate
lea ecx, [ebp - 0x1c]
call fcn.0040215a
push 0
lea eax, [ebp - 0x1c]
push eax
push 2
mov byte [ebp - 4], 5
call fcn.0040ece1
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025dc
mov edi, dword [ebp - 0x14]
push 1
push edi
call fcn.0040c375
push str.DownloadFileAndWait:_Cancel_Last_BITS_Job
lea ecx, [ebp - 0x1c]
call fcn.0040215a
push 0
lea eax, [ebp - 0x1c]
push eax
push 2
mov byte [ebp - 4], 6
call fcn.0040ece1
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025dc
mov eax, edi
call fcn.0040c97a
lea eax, [ebp - 0x50]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040c9ad
mov dword [esi], eax
jmp 0x411758
mov edi, dword [ebp - 0x14]
mov eax, dword [esi]
test eax, eax
jl 0x411763
jmp 0x4117b7
mov edi, dword [ebp - 0x14]
cmp eax, 0x80200001
je 0x4117b7
push str.DownloadFileAndWait_isComplete_returns_error
lea ecx, [ebp - 0x1c]
call fcn.0040215a
mov byte [ebp - 4], 7
push dword [esi]
lea eax, [ebp - 0x1c]
push eax
push 1
call fcn.0040ece1
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025dc
cmp dword [edi + 0x14], 0
je 0x4117b7
mov eax, edi
call fcn.0040c97a
lea eax, [ebp - 0x50]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040c9ad
mov dword [esi], eax
cmp dword [ebp - 0x10], 6
je 0x411b25
push dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
call fcn.0040215a
push dword [ebp - 0x2c]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
push edi
mov byte [ebp - 4], 8
call fcn.004113fc
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
add ecx, 0xfffffff0
mov dword [esi], eax
call fcn.004025dc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esi], 0
mov dword [ebp - 0x34], eax
jge 0x41182f
push str.downLoadFileSet___failed
lea ecx, [ebp - 0x1c]
call fcn.0040215a
mov byte [ebp - 4], 9
push dword [esi]
lea eax, [ebp - 0x1c]
push eax
push 1
call fcn.0040ece1
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
jmp 0x411b10
lea eax, [ebp - 0x50]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040c9ad
xor ebx, ebx
mov dword [esi], eax
cmp dword [0x48e520], ebx
jne 0x411b18
cmp dword [ebp - 0x10], 6
jne 0x4118a5
cmp dword [0x48e50c], ebx
je 0x4118a5
push 1
push 0x5a
call fcn.00407a9a
push 0x45fd04
lea ecx, [ebp - 0x20]
call fcn.0040215a
lea esi, [ebp - 0x18]
lea edi, [ebp - 0x20]
mov ebx, 0x48e460
mov byte [ebp - 4], 0xa
call fcn.0040853c
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004025dc
mov edx, esi
call fcn.00407aba
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp + 0x10]
xor ebx, ebx
jmp 0x4118ad
push ebx
push 1
call fcn.00407a9a
cmp dword [edi + 0x14], ebx
je 0x411a09
mov eax, dword [esi]
cmp eax, ebx
jge 0x411a11
cmp eax, 0x801901f8
ja 0x411a09
cmp dword [ebp - 0x10], 1
jne 0x411a09
push dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
call fcn.0040215a
push str.http:__
push str.https:__
lea eax, [ebp - 0x1c]
push eax
mov byte [ebp - 4], 0xb
call fcn.00408aeb
test eax, eax
je 0x4119fa
push str.Port_443_Blocked:_HTTPS:___BITS_connection_failed_attempting_HTTP:___connection
lea ecx, [ebp - 0x24]
call fcn.0040215a
push ebx
lea eax, [ebp - 0x24]
xor esi, esi
push eax
inc esi
push esi
mov byte [ebp - 4], 0xc
call fcn.0040ece1
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x24]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025dc
mov dword [0x48ea84], esi
mov dword [edi + 0x14], ebx
mov dword [edi + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebx
push esi
mov dword [ebp - 0x34], eax
call fcn.00407a9a
push str.IDS_ACTION_CONNECTING
lea ecx, [ebp - 0x28]
call fcn.0040215a
lea esi, [ebp - 0x18]
lea edi, [ebp - 0x28]
mov ebx, 0x48e460
mov byte [ebp - 4], 0xd
call fcn.0040853c
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004025dc
mov edx, esi
call fcn.00407aba
mov eax, dword [ebp - 0x14]
call fcn.0040c97a
cmp dword [0x48e520], 0
jne 0x411a8e
push dword [ebp - 0x2c]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
call fcn.004113fc
mov esi, dword [ebp + 0x10]
add esp, 0xc
mov dword [esi], eax
test eax, eax
jge 0x4119e4
push str.downLoadFileSet_HTTP:____failed
lea ecx, [ebp - 0x30]
call fcn.0040215a
mov byte [ebp - 4], 0xe
push dword [esi]
lea eax, [ebp - 0x30]
push eax
push 1
call fcn.0040ece1
mov ecx, dword [ebp - 0x30]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025dc
jmp 0x4119f5
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x50]
push eax
lea ebx, [ebp - 0x10]
call fcn.0040c9ad
mov dword [esi], eax
mov edi, dword [ebp - 0x14]
xor ebx, ebx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025dc
cmp dword [esi], ebx
jl 0x411aa2
cmp dword [ebp - 0x4c], ebx
ja 0x411a3c
cmp dword [ebp - 0x50], 1
ja 0x411a3c
cmp dword [0x48e50c], ebx
je 0x411a44
mov eax, dword [0x48e510]
neg eax
sbb eax, eax
and eax, 0x384
add eax, 0x64
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push 1
call fcn.00407a9a
cmp dword [0x48e520], ebx
jne 0x411b18
cmp dword [ebp - 0x10], 6
je 0x411a6b
cmp dword [edi + 0x14], ebx
jne 0x411a6b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
inc eax
sub eax, dword [ebp - 0x34]
dec eax
cmp eax, dword [ebp + 0x14]
ja 0x411ae0
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x48e520], ebx
jne 0x411b18
cmp dword [ebp - 0x10], 6
jne 0x41182f
jmp 0x411b25
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025dc
mov edi, dword [ebp - 0x14]
jmp 0x411b1e
push str.HTTPS_and_HTTP_connection_failed
lea ecx, [ebp - 0x34]
call fcn.0040215a
lea eax, [ebp - 0x34]
push eax
mov byte [ebp - 4], 0xf
mov ecx, dword [esi]
push 0x222e0
mov edx, 0x48eabc
call fcn.0040d106
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x34]
add ecx, 0xfffffff0
call fcn.004025dc
mov eax, edi
call fcn.0040c97a
jmp 0x411b18
push str.Network_too_slow_or_no_connection
lea ecx, [ebp - 0x34]
call fcn.0040215a
lea eax, [ebp - 0x34]
push eax
push 0x222e0
mov ecx, 0x80200010
mov edx, 0x48eabc
mov byte [ebp - 4], 0x10
call fcn.0040d106
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x34]
add ecx, 0xfffffff0
call fcn.004025dc
cmp dword [ebp - 0x10], 6
je 0x411b25
mov eax, edi
call fcn.0040c97a
mov esi, dword [ebp - 0x10]
push edi
mov dword [edi + 0x38], esi
call fcn.00411b44
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004025dc
mov eax, esi
call fcn.0043de3b
ret