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

Disassembly:
push 0x3c
mov eax, 0x44f4ee
call fcn.00436706
push str.DownloadFileAndWait__
lea ecx, [ebp - 0x18]
call fcn.00402148
xor esi, esi
push esi
lea eax, [ebp - 0x18]
push eax
push 2
mov dword [ebp - 4], esi
call fcn.0040e1e3
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x18]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025ca
xor eax, eax
cmp dword [0x4804e4], esi
sete al
xor ebx, ebx
inc ebx
push ebx
push ebx
mov dword [ebp - 0x28], eax
call fcn.004075ce
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], esi
xor eax, eax
lea edi, [ebp - 0x40]
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.0042310c
pop ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], ebx
cmp eax, esi
je 0x4108eb
push dword [0x480928]
push eax
call fcn.0040b570
mov edi, eax
jmp 0x4108ed
xor edi, edi
or dword [ebp - 4], 0xffffffff
cmp dword [edi], esi
jne 0x41093e
push str.DownloadFileAndWait__:_queue_is_empty
lea ecx, [ebp - 0x18]
call fcn.00402148
mov dword [ebp - 4], 2
push dword [edi + 0xc]
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.0040e1e3
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x18]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025ca
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp + 0x10]
push edi
mov dword [ecx], eax
call fcn.00410e31
push 4
pop eax
jmp 0x410e2b
push 8
push dword [ebp + 0xc]
push str.https:__
call fcn.00435ad5
add esp, 0xc
neg eax
sbb eax, eax
inc eax
mov dword [edi + 0x14], eax
lea eax, [ebp - 0x48]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040bdd7
mov ecx, dword [ebp + 0x10]
push esi
push 1
mov dword [ecx], eax
call fcn.004075ce
call fcn.004234c0
push eax
lea ecx, [ebp - 0x14]
call fcn.0040f910
push str.IDS_ACTION_CONNECTING
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 3
call fcn.00402148
lea esi, [ebp - 0x14]
lea ecx, [ebp - 0x18]
mov ebx, 0x480438
mov byte [ebp - 4], 4
call fcn.00407ed6
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004025ca
mov edx, esi
call fcn.004075ee
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
test eax, eax
jl 0x410a5d
cmp dword [ebp - 0x10], 2
je 0x4109d8
cmp dword [ebp - 0x10], 1
jne 0x410a57
push str.DownloadFileAndWait:_Last_Bits_job_still_downloading_manifest_or_ARMupdate
lea ecx, [ebp - 0x18]
call fcn.00402148
push 0
lea eax, [ebp - 0x18]
push eax
push 2
mov byte [ebp - 4], 5
call fcn.0040e1e3
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025ca
push 1
push edi
call fcn.0040b6e3
push str.DownloadFileAndWait:_Cancel_Last_BITS_Job
lea ecx, [ebp - 0x18]
call fcn.00402148
push 0
lea eax, [ebp - 0x18]
push eax
push 2
mov byte [ebp - 4], 6
call fcn.0040e1e3
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025ca
mov eax, edi
call fcn.0040bda4
lea eax, [ebp - 0x48]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040bdd7
mov dword [esi], eax
mov eax, dword [esi]
test eax, eax
jge 0x410ab1
cmp eax, 0x80200001
je 0x410ab1
push str.DownloadFileAndWait_isComplete_returns_error
lea ecx, [ebp - 0x18]
call fcn.00402148
mov byte [ebp - 4], 7
push dword [esi]
lea eax, [ebp - 0x18]
push eax
push 1
call fcn.0040e1e3
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025ca
cmp dword [edi + 0x14], 0
je 0x410ab1
mov eax, edi
call fcn.0040bda4
lea eax, [ebp - 0x48]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040bdd7
mov dword [esi], eax
cmp dword [ebp - 0x10], 6
je 0x410e12
push dword [ebp + 0xc]
lea ecx, [ebp - 0x18]
call fcn.00402148
push dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push edi
mov byte [ebp - 4], 8
call fcn.0041070c
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add esp, 0xc
add ecx, 0xfffffff0
mov dword [esi], eax
call fcn.004025ca
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esi], 0
mov dword [ebp - 0x30], eax
jge 0x410b29
push str.downLoadFileSet___failed
lea ecx, [ebp - 0x18]
call fcn.00402148
mov byte [ebp - 4], 9
push dword [esi]
lea eax, [ebp - 0x18]
push eax
push 1
call fcn.0040e1e3
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add esp, 0xc
jmp 0x410dfd
lea eax, [ebp - 0x48]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040bdd7
xor ebx, ebx
mov dword [esi], eax
cmp dword [0x4804f8], ebx
jne 0x410e05
cmp dword [ebp - 0x10], 6
jne 0x410b9c
cmp dword [0x4804e4], ebx
je 0x410b9c
push 1
push 0x5a
call fcn.004075ce
push 0x456d64
lea ecx, [ebp - 0x1c]
call fcn.00402148
lea esi, [ebp - 0x14]
lea ecx, [ebp - 0x1c]
mov ebx, 0x480438
mov byte [ebp - 4], 0xa
call fcn.00407ed6
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025ca
mov edx, esi
call fcn.004075ee
mov esi, dword [ebp + 0x10]
xor ebx, ebx
jmp 0x410ba4
push ebx
push 1
call fcn.004075ce
cmp dword [edi + 0x14], ebx
je 0x410cf9
mov eax, dword [esi]
cmp eax, ebx
jge 0x410d01
cmp eax, 0x801901f8
ja 0x410cf9
cmp dword [ebp - 0x10], 1
jne 0x410cf9
push dword [ebp + 0xc]
lea ecx, [ebp - 0x18]
call fcn.00402148
push str.http:__
push str.https:__
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0xb
call fcn.004083c9
test eax, eax
je 0x410cea
push str.Port_443_Blocked:_HTTPS:___BITS_connection_failed_attempting_HTTP:___connection
lea ecx, [ebp - 0x20]
call fcn.00402148
push ebx
lea eax, [ebp - 0x20]
xor esi, esi
push eax
inc esi
push esi
mov byte [ebp - 4], 0xc
call fcn.0040e1e3
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x20]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025ca
mov dword [0x480a1c], 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 - 0x30], eax
call fcn.004075ce
push str.IDS_ACTION_CONNECTING
lea ecx, [ebp - 0x24]
call fcn.00402148
lea esi, [ebp - 0x14]
lea ecx, [ebp - 0x24]
mov ebx, 0x480438
mov byte [ebp - 4], 0xd
call fcn.00407ed6
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.004025ca
mov edx, esi
call fcn.004075ee
mov eax, edi
call fcn.0040bda4
cmp dword [0x4804f8], 0
jne 0x410d7e
push dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.0041070c
mov esi, dword [ebp + 0x10]
add esp, 0xc
mov dword [esi], eax
test eax, eax
jge 0x410cd8
push str.downLoadFileSet_HTTP:____failed
lea ecx, [ebp - 0x2c]
call fcn.00402148
mov byte [ebp - 4], 0xe
push dword [esi]
lea eax, [ebp - 0x2c]
push eax
push 1
call fcn.0040e1e3
mov ecx, dword [ebp - 0x2c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025ca
jmp 0x410ce8
lea eax, [ebp - 0x48]
push eax
lea ebx, [ebp - 0x10]
mov ecx, edi
call fcn.0040bdd7
mov dword [esi], eax
xor ebx, ebx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004025ca
cmp dword [esi], ebx
jl 0x410d8f
cmp dword [ebp - 0x44], ebx
ja 0x410d2c
cmp dword [ebp - 0x48], 1
ja 0x410d2c
cmp dword [0x4804e4], ebx
je 0x410d34
mov eax, dword [0x4804e8]
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.004075ce
cmp dword [0x4804f8], ebx
jne 0x410e05
cmp dword [ebp - 0x10], 6
je 0x410d5b
cmp dword [edi + 0x14], ebx
jne 0x410d5b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
inc eax
sub eax, dword [ebp - 0x30]
dec eax
cmp eax, dword [ebp + 0x14]
ja 0x410dcd
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x4804f8], ebx
jne 0x410e05
cmp dword [ebp - 0x10], 6
jne 0x410b29
jmp 0x410e12
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004025ca
jmp 0x410e0b
push str.HTTPS_and_HTTP_connection_failed
lea ecx, [ebp - 0x30]
call fcn.00402148
lea eax, [ebp - 0x30]
push eax
mov byte [ebp - 4], 0xf
mov ecx, dword [esi]
push 0x222e0
mov edx, 0x480a54
call fcn.0040c5be
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x30]
add ecx, 0xfffffff0
call fcn.004025ca
mov eax, edi
call fcn.0040bda4
jmp 0x410e05
push str.Network_too_slow_or_no_connection
lea ecx, [ebp - 0x30]
call fcn.00402148
lea eax, [ebp - 0x30]
push eax
push 0x222e0
mov ecx, 0x80200010
mov edx, 0x480a54
mov byte [ebp - 4], 0x10
call fcn.0040c5be
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x30]
add ecx, 0xfffffff0
call fcn.004025ca
cmp dword [ebp - 0x10], 6
je 0x410e12
mov eax, edi
call fcn.0040bda4
mov esi, dword [ebp - 0x10]
push edi
mov dword [edi + 0x38], esi
call fcn.00410e31
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004025ca
mov eax, esi
call fcn.004367de
ret