Function at 0x408850
Capabilities:
Check for time delay via gettickcount
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43ea86
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x451d80]
xor eax, esp
mov dword [esp + 0x98], eax
push ebx
push esi
push edi
mov eax, dword [0x451d80]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
xor edi, edi
push 0x50
lea eax, [esp + 0x58]
mov ebx, ecx
push edi
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
call fcn.0042a080
mov esi, 1
add esp, 0xc
cmp dword [ebx + 0x46c], esi
je 0x4088df
cmp dword [ebx + 0x4a8], edi
jne 0x4088e7
cmp dword [0x4561dc], edi
mov dword [ebx + 0x46c], esi
je 0x4088df
push esi
push esi
push ebx
call fcn.00405ee0
cmp dword [ebx + 0x4a8], edi
je 0x4088ee
mov eax, str.Main_Thread_Resumed_
jmp 0x4088f3
mov eax, str.Main_Thread_Started_
push eax
mov eax, esi
push edi
mov esi, ebx
call fcn.0040a010
add esp, 8
xor eax, eax
mov ecx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
call fcn.00408e90
mov edi, eax
test edi, edi
jne 0x408925
mov dword [esp + 0x14], 1
jmp 0x408c22
cmp dword [ebx + 0x4a0], 0
jne 0x408918
lea ecx, [esp + 0x4c]
push ecx
push edi
mov ecx, ebx
call fcn.00408ff0
test eax, eax
je 0x408918
mov esi, dword [edi]
test esi, esi
je 0x408952
call fcn.0040dde0
mov byte [edi + 4], 0
mov byte [edi + 5], 1
cmp dword [ebx + 0x4a0], 0
jne 0x408918
lea ecx, [esp + 0x4c]
mov edx, ebx
call fcn.00409450
test eax, eax
je 0x408918
mov eax, 2
cmp dword [ebx + 0x46c], eax
je 0x40898f
cmp dword [0x4561dc], 0
mov dword [ebx + 0x46c], eax
je 0x40898f
push eax
push 1
push ebx
call fcn.00405ee0
cmp dword [ebx + 0x4a0], 0
jne 0x408918
mov eax, ebx
call fcn.00409710
test eax, eax
je 0x408918
mov dword [ebx + 0x4a8], 0
mov ecx, dword [ebx + 0x4b4]
test ecx, ecx
jne 0x4089bf
xor eax, eax
jmp 0x4089ca
mov eax, dword [ebx + 0x4b8]
sub eax, ecx
sar eax, 2
push eax
mov dword [esp + 0x14], eax
push str.Monitor_all_download_threads_count:_d__...
push 0
mov eax, 1
mov esi, ebx
call fcn.0040a010
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebx + 0x4a0], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], 0
jne 0x408ae0
mov edi, ebx
call fcn.00409f80
test eax, eax
jne 0x408ace
mov esi, ebx
call fcn.00409ec0
test eax, eax
jne 0x408a82
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, eax
sub edx, dword [esp + 0x28]
mov eax, 0x10624dd3
mul edx
mov edi, edx
shr edi, 6
cmp edi, dword [esp + 0x20]
jbe 0x408a5f
mov eax, dword [esp + 0x10]
push edi
push eax
push str.Monitor_all_download_threads_count:_d____d_seconds_...
push 0
xor eax, eax
call fcn.0040a010
add esp, 0x10
mov dword [esp + 0x20], edi
mov eax, dword [ebx + 0x4d0]
cmp dword [eax + 0xf8], 0
jne 0x408aae
cmp dword [eax + 0x98], 0
jne 0x408aae
cmp dword [ebx + 0x4a0], 0
je 0x408a04
jmp 0x408ace
mov ecx, dword [esp + 0x10]
push ecx
push str.Download_failed__Stopping_Download_threads_count:_d_
push 0
mov eax, 4
mov esi, ebx
call fcn.0040a010
mov eax, 1
add esp, 0xc
mov dword [ebx + 0x4a4], eax
mov dword [esp + 0x1c], eax
jmp 0x408ace
push str.Disk_Error
push 0
mov eax, 4
mov esi, ebx
call fcn.0040a010
add esp, 8
mov dword [ebx + 0x4a4], 1
cmp dword [ebx + 0x4a0], 0
jne 0x408ae0
cmp dword [ebx + 0x4a4], 0
je 0x408aec
mov edx, dword [ebx + 0x4d4]
push edx
call fcn.0040ca20
mov eax, dword [esp + 0x10]
push eax
push str.wait_all_download_threads_count:_d__quit_...
push 0
mov eax, 1
mov esi, ebx
call fcn.0040a010
mov eax, dword [ebx + 0x4b4]
lea edi, [ebx + 0x4b0]
add esp, 0xc
test eax, eax
je 0x408b21
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x408b26
call fcn.004269df
mov eax, dword [edi + 4]
mov edx, dword [esp + 0x10]
push 0xffffffffffffffff
push 1
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
mov esi, ebx
je 0x408b5b
push eax
mov eax, dword [esp + 0x14]
push eax
push str.WaitForMultipleObjects_count:_d__failed__ret_d
push 0
mov eax, 4
call fcn.0040a010
add esp, 0x10
jmp 0x408b74
mov ecx, dword [esp + 0x10]
push ecx
push str.WaitForMultipleObjects_count:_d__success
push 0
mov eax, 1
call fcn.0040a010
add esp, 0xc
mov esi, dword [esp + 0x10]
add esi, 0xffffffff
js 0x408baa
lea ecx, [ecx]
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x408b93
mov eax, dword [edi + 8]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x408b98
call fcn.004269df
mov edx, dword [edi + 4]
mov eax, dword [edx + esi*4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esi, 1
jns 0x408b80
mov ebx, dword [edi + 8]
cmp dword [edi + 4], ebx
jbe 0x408bb7
call fcn.004269df
mov esi, dword [edi + 4]
cmp esi, dword [edi + 8]
jbe 0x408bc4
call fcn.004269df
push ebx
push edi
push esi
push edi
lea ecx, [esp + 0x4c]
push ecx
mov ebx, edi
call fcn.0040a480
mov esi, dword [esp + 0x18]
mov ecx, dword [esi + 0x4d0]
call fcn.0040fd40
mov eax, dword [esi + 0x4d0]
cmp dword [eax + 0xf8], 0
jne 0x408bfb
cmp dword [eax + 0x98], 0
je 0x408c0f
mov edi, 0xb
call fcn.00408680
mov dword [esp + 0x14], 1
jmp 0x408c20
call fcn.00411460
test eax, eax
je 0x408c20
mov dword [esp + 0x24], 1
mov ebx, esi
cmp dword [ebx + 0x46c], 3
je 0x408c93
mov edx, dword [ebx + 0x4d8]
mov eax, dword [edx]
lea esi, [ebx + 0x4d8]
mov edi, vtable.CScopedLock.0
push 0xffffffffffffffff
mov ecx, esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], esi
call eax
mov dword [esp + 0xb8], 0
mov ecx, dword [ebx + 0x4d0]
test ecx, ecx
je 0x408c73
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [ebx + 0x4d0], 0
mov dword [esp + 0xb8], 0xffffffff
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
mov dword [esp + 0x34], edi
call eax
mov dword [esp + 0x38], 0
mov eax, dword [ebx + 0x4d4]
test eax, eax
je 0x408d5e
mov ecx, dword [0x4561dc]
push eax
add ecx, 0x88
push ecx
call fcn.0040ce20
mov edx, dword [ebx + 0x4d8]
mov eax, dword [edx]
lea edi, [ebx + 0x4d8]
push 0xffffffffffffffff
mov ecx, edi
mov dword [esp + 0x30], vtable.CScopedLock.0
mov dword [esp + 0x34], edi
call eax
mov dword [esp + 0xb8], 1
mov ecx, dword [ebx + 0x4d4]
push ecx
call fcn.0040c8a0
mov esi, dword [ebx + 0x4d4]
test esi, esi
je 0x408d36
xor eax, eax
lea edi, [esi + 0xc]
mov dword [esi + 8], eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
mov ecx, dword [eax]
push eax
push edi
push ecx
push edi
lea edx, [esp + 0x54]
push edx
call fcn.0040d470
mov eax, dword [edi + 4]
push eax
call fcn.00419273
xor eax, eax
add esp, 4
push esi
mov dword [edi + 4], eax
mov dword [edi + 8], eax
call fcn.00419273
mov edi, dword [esp + 0x34]
add esp, 4
xor esi, esi
mov dword [esp + 0xb8], 0xffffffff
mov dword [ebx + 0x4d4], esi
mov eax, dword [edi]
mov edx, dword [eax + 8]
mov ecx, edi
mov dword [esp + 0x2c], vtable.CScopedLock.0
call edx
mov dword [esp + 0x30], esi
cmp dword [esp + 0x24], 0
jne 0x408de3
cmp dword [esp + 0x14], 0
je 0x408d79
cmp dword [ebx + 0x4a0], 0
je 0x408e57
cmp dword [ebx + 0x4a0], 0
jne 0x408e5b
cmp dword [esp + 0x1c], 0
je 0x408e5b
mov eax, dword [ebx + 0x440]
push eax
push str.Download_failed__need_retry__waiting__d_ms...
push 0
mov eax, 4
mov esi, ebx
call fcn.0040a010
mov eax, 0x51eb851f
mul dword [ebx + 0x440]
mov esi, edx
add esp, 0xc
shr esi, 5
js 0x408901
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebx + 0x4a0], 0
jne 0x408901
sub esi, 1
jns 0x408dc4
jmp 0x408901
cmp dword [0x4561dc], 0
je 0x408df9
push 0x2710
push 2
push ebx
call fcn.00405ee0
mov eax, 6
cmp dword [ebx + 0x46c], eax
je 0x408e27
cmp dword [ebx + 0x4a8], 0
jne 0x408e27
cmp dword [0x4561dc], 0
mov dword [ebx + 0x46c], eax
je 0x408e3a
push eax
push 1
push ebx
call fcn.00405ee0
cmp dword [0x4561dc], 0
je 0x408e3a
push 0
push 3
push ebx
call fcn.00405ee0
push str.Download_Completed___
push 0
mov eax, 1
mov esi, ebx
call fcn.0040a010
add esp, 8
mov eax, 1
jmp 0x408e66
xor eax, eax
jmp 0x408e66
xor eax, eax
cmp dword [ebx + 0x4a0], eax
sete al
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.0042655f
mov esp, ebp
pop ebp
ret