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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x631690
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x717f80]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
cmp dword [edi + 4], 0x62cb09e3
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], eax
je 0x518c19
xor al, al
jmp 0x518dde
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jg 0x518c34
jl 0x518c29
mov ebx, dword [ebp + 8]
test ebx, ebx
jae 0x518c37
xorps xmm0, xmm0
movlpd qword [ebp + 8], xmm0
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
cmp byte [0x7da4a5], 0
je 0x518c65
cmp byte [edi + 0x94], 0
jne 0x518c65
cmp dword [edi + 0x74], 0
jl 0x518c65
jg 0x518c57
cmp dword [edi + 0x70], 0
jbe 0x518c65
push ecx
push ebx
push str.consumeProgress
mov ecx, eax
call fcn.004b2d20
mov al, byte [edi + 0x94]
mov byte [ebp - 0x15], 0
mov dl, al
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x16], dl
test al, al
jne 0x518d2c
cmp dword [edi + 0x74], 0
mov ecx, dword [edi + 0x70]
mov byte [ebp - 0x16], dl
jl 0x518d2c
jg 0x518c9d
test ecx, ecx
je 0x518d2c
push dword [edi + 0x74]
mov esi, dword [edi + 0x7c]
mov eax, dword [edi + 0x78]
push ecx
push esi
push eax
mov ecx, edi
call fcn.005192a0
mov ecx, dword [edi + 0x78]
add ecx, ebx
mov dword [ebp - 0x1c], eax
mov al, byte [edi + 0x94]
adc esi, dword [ebp + 0xc]
mov dl, al
mov dword [edi + 0x78], ecx
mov dword [edi + 0x7c], esi
mov byte [ebp - 0x16], dl
cmp esi, dword [edi + 0x74]
jl 0x518d2c
jg 0x518cd8
cmp ecx, dword [edi + 0x70]
jbe 0x518d2c
cmp byte [0x7da4a5], 0
mov byte [ebp - 0x16], al
je 0x518d20
mov ebx, dword [ebp - 0x20]
mov ecx, ebx
push str.Amount_consumed_is_greater_than_the_total.
mov eax, dword [ebx]
call dword [eax + 0x14]
push dword [edi + 0x7c]
mov ecx, ebx
push dword [edi + 0x78]
push str.m_consumed64
call fcn.004b2d20
push dword [edi + 0x74]
mov ecx, ebx
push dword [edi + 0x70]
push str.m_totalAmount64
call fcn.004b2d20
mov dl, byte [edi + 0x94]
mov byte [ebp - 0x16], dl
mov eax, dword [edi + 0x70]
mov ecx, dword [edi + 0x74]
mov dword [edi + 0x78], eax
mov dword [edi + 0x7c], ecx
xor esi, esi
test dl, dl
jne 0x518d56
mov ecx, dword [edi + 0x74]
mov eax, dword [edi + 0x70]
test ecx, ecx
jl 0x518d56
jg 0x518d42
test eax, eax
je 0x518d56
push ecx
push eax
push dword [edi + 0x7c]
mov ecx, edi
push dword [edi + 0x78]
call fcn.005192a0
mov dl, byte [ebp - 0x16]
mov esi, eax
cmp dword [edi + 0x64], 0
je 0x518ddb
test dl, dl
jne 0x518dfc
cmp esi, dword [ebp - 0x1c]
jbe 0x518dfc
cmp esi, dword [edi + 0x60]
jbe 0x518dfc
call sub.KERNEL32.dll_GetTickCount
cmp byte [edi + 0x96], 0
mov dword [edi + 0x6c], eax
je 0x518d8f
cmp esi, dword [edi + 0x8c]
je 0x518dd1
mov dword [edi + 0x60], esi
cmp byte [0x7da4a5], 0
je 0x518da9
mov ecx, dword [ebp - 0x20]
push esi
push str.percentDoneCB
call fcn.004b2d90
mov ecx, dword [edi + 0x64]
mov dword [ebp - 4], 0
cmp dword [ecx + 8], 0x77109acd
jne 0x518dd1
mov eax, dword [ecx]
lea edx, [ebp - 0x15]
push edx
push esi
call dword [eax + 8]
jmp 0x518dd1
cmp byte [ebp - 0x15], 0
je 0x518ddb
mov byte [edi + 0x69], 1
mov al, byte [edi + 0x69]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00622073
mov esp, ebp
pop ebp
ret 0xc
cmp byte [edi + 0x95], 0
jne 0x518ddb
cmp dword [edi + 0x88], 0
je 0x518ddb
call sub.KERNEL32.dll_GetTickCount
mov edx, eax
mov esi, 0x12c
mov eax, dword [edi + 0x88]
mov ecx, edx
sub ecx, dword [edi + 0x6c]
test eax, eax
cmove eax, esi
cmp ecx, eax
jbe 0x518ddb
mov ecx, dword [edi + 0x64]
mov dword [edi + 0x90], edx
mov dword [edi + 0x6c], edx
mov dword [ebp - 4], 2
cmp dword [ecx + 8], 0x77109acd
jne 0x518dd1
mov eax, dword [ecx]
lea edx, [ebp - 0x15]
push edx
call dword [eax + 0xc]
jmp 0x518dd1