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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43e968
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x451d80]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
push edi
push str.Download_thread___d__Started_
push edi
mov eax, 1
call fcn.0040a010
mov ecx, dword [esi + 0x4d4]
add esp, 0xc
push esi
lea eax, [esp + 0x24]
push eax
xor ebx, ebx
push ecx
mov dword [esp + 0x2c], ebx
call fcn.0040c6a0
mov eax, dword [esp + 0x20]
cmp eax, ebx
jne 0x409a2d
push str.m_pHttpDownMan__GetHttpBlockDownloader_failed_
push edi
lea eax, [ebx + 4]
call fcn.0040a010
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi + 4]
push eax
call fcn.0040b8d0
mov eax, dword [esi + 0x4c4]
add edi, 0xffffffff
cmp eax, ebx
je 0x409a60
mov ecx, dword [esi + 0x4c8]
sub ecx, eax
mov eax, 0x7fc01ff1
imul ecx
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x409a65
call fcn.004269df
imul edi, edi, 0x2010
add edi, dword [esi + 0x4c4]
cmp dword [esi + 0x4a4], ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x18], ebx
jne 0x409ea3
mov ecx, dword [esi + 0x4d0]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.00411080
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
mov edi, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [ecx + 4]
mov ebx, eax
mov eax, dword [esp + 0x40]
push eax
push edi
push ebx
push str.GetSection_ret_d__start_llu__end_llu
push edx
mov eax, 1
call fcn.0040a010
add esp, 0x1c
cmp ebx, 0x66
je 0x409e82
cmp ebx, 0x65
je 0x409e82
cmp ebx, 0x67
je 0x409e82
cmp ebx, 0x1a
je 0x409e82
mov ebx, dword [esp + 0x3c]
sub ebx, edi
cmp dword [esi + 0x4a4], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x1c], ebx
jne 0x409dc5
mov edi, edi
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 4]
push ebx
push eax
push edi
push str.Begin_DownloadBlock_offset:_lld__datalen:_d_
push edx
mov eax, 1
call fcn.0040a010
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x4c]
add esp, 0x14
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push ecx
push ebx
push edx
push edi
mov dword [esp + 0x38], 0
call fcn.0040bd90
test eax, eax
mov ecx, dword [esp + 0x14]
je 0x409bd8
mov edx, dword [esp + 0x38]
mov dword [ecx + 8], 1
mov ecx, dword [esp + 0x28]
add ecx, 1
push ecx
push eax
mov eax, dword [ebp + 8]
push ebx
push edx
push edi
push str.DownloadBlock__offset:_lld__datalen:_d__failed__ret_d__RetryTime_d
push eax
mov eax, 3
mov dword [esp + 0x44], ecx
call fcn.0040a010
add esp, 0x1c
mov dword [esp + 0x24], 0
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esi + 0x4a4], 0
jne 0x409dc5
mov eax, dword [esp + 0x24]
add eax, 1
cmp eax, 0x32
mov dword [esp + 0x24], eax
jl 0x409ba4
cmp dword [esi + 0x4a4], 0
je 0x409b20
jmp 0x409c19
cmp dword [esp + 0x24], 0
mov dword [ecx + 8], 0
je 0x409bf3
lea edx, [esi + 0x5a8]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [edx + 4]
push ebx
push ecx
push edi
push str.End_DownloadBlock__offset:_lld__datalen:_d___retsuccess__moredata_d
push eax
mov eax, 1
call fcn.0040a010
add esp, 0x18
cmp dword [esi + 0x4a4], 0
jne 0x409dc5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x18]
sub esp, 0x10
mov dword [esp + 0x34], eax
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x50]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov ecx, dword [esi + 0x4d0]
call fcn.004111d0
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [esp + 0x24]
sub eax, ebx
cmp eax, 0x3e8
jbe 0x409cb0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
sub eax, ebx
mov ebx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x44]
push edx
push eax
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [eax + 4]
push ebx
push edi
lea edx, [esi + 0x18]
push edx
push str.m_pIdxFile__WriteSection_file_s__start_llu__end_llu__datalen_d__cost_time:__d_ms
push ecx
mov eax, 3
call fcn.0040a010
add esp, 0x24
jmp 0x409cb4
mov ebx, dword [esp + 0x38]
cmp dword [esp + 0x28], 0
je 0x409d19
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
sub esp, 0x10
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], ebx
mov dword [eax + 8], edx
mov edx, dword [esp + 0x28]
mov dword [eax + 0xc], ecx
mov ecx, dword [esi + 0x4d0]
push edx
call fcn.00411130
cmp dword [esp + 0x28], 5
jne 0x409e32
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 8]
add dword [esi + 0x5ac], 1
push eax
push ebx
push edi
push str.DownloadBlock__offset:_lld__datalen:_d__failed__MD5WRONG
push ecx
mov eax, 3
call fcn.0040a010
add esp, 0x14
xor ebx, ebx
jmp 0x409db4
mov edx, dword [esi + 0x480]
mov eax, dword [edx]
lea edi, [esi + 0x480]
push 0xffffffffffffffff
mov ecx, edi
mov dword [esp + 0x30], vtable.CScopedLock.0
mov dword [esp + 0x34], edi
call eax
mov ecx, dword [esp + 0x1c]
xor ebx, ebx
mov dword [esp + 0x50], ebx
add dword [esi + 0x470], ecx
mov eax, dword [esi + 0x47c]
mov ecx, dword [esi + 0x478]
adc dword [esi + 0x474], ebx
mov edx, dword [esi + 0x474]
cmp edx, eax
jb 0x409d7d
ja 0x409d71
mov edx, dword [esi + 0x470]
cmp edx, ecx
jbe 0x409d7d
mov dword [esi + 0x470], ecx
mov dword [esi + 0x474], eax
mov eax, dword [esi]
mov edx, dword [eax + 0x44]
mov ecx, esi
call edx
cmp dword [0x4561dc], ebx
je 0x409d97
push eax
push 2
push esi
call fcn.00405ee0
mov dword [esp + 0x50], 0xffffffff
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], ebx
cmp dword [esi + 0x4a4], ebx
je 0x409a95
jmp 0x409ea3
cmp dword [esi + 0x4a0], 0
mov eax, str.user_stopped
jne 0x409dd8
mov eax, str.Stop_by_main_thread
push eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [esp + 0x40]
push ebx
push edi
push str.DownloadBlock__offset:_lld__datalen:_d__failed___s__call_ReturnSection
push eax
mov eax, 3
call fcn.0040a010
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
add esp, 8
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0x4d0]
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x28]
push eax
call fcn.00411130
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
push ecx
push edx
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [edx + 4]
push ebx
push edi
lea ecx, [esi + 0x18]
push ecx
push str.WriteSection_file_s__start_llu__end_llu__datalen_d__failed
push eax
mov eax, 4
call fcn.0040a010
add esp, 0x20
mov edi, 9
call fcn.00408680
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 4]
mov dword [eax + 0xc], 1
push str.Download_data_completed
push ecx
mov eax, 1
call fcn.0040a010
add esp, 8
mov eax, 1
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4