Function at 0x40c264
Capabilities:
Check for time delay via gettickcount
Get file size
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
lea ebp, [esp - 0x810]
sub esp, 0x890
mov eax, dword [0x4806f0]
xor eax, ebp
mov dword [ebp + 0x80c], eax
mov eax, dword [ebp + 0x81c]
mov edx, dword [ebp + 0x828]
push ebx
push esi
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x820]
mov esi, ecx
mov ecx, dword [ebp + 0x818]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0x824]
mov dword [ebp + 4], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], edx
cmp eax, ebx
je 0x40c752
mov dword [esi + 0x18], ebx
cmp edi, ebx
je 0x40c752
cmp ecx, ebx
je 0x40c2dd
mov eax, ecx
fld dword [eax + 0x780]
fmul qword [0x472f70]
call fcn.004500e0
mov dword [ebp - 0xc], eax
cmp dword [ebp + 0x82c], ebx
mov dword [ebp - 0x14], 0x80004005
mov dword [ebp], ebx
jle 0x40c340
push dword [ebp + 0x830]
mov ecx, esi
push edi
call fcn.0040bfed
cmp eax, ebx
mov dword [ebp - 0x14], eax
jge 0x40c351
mov eax, dword [ebp + 0x82c]
cmp eax, 1
jle 0x40c332
dec eax
cmp dword [ebp], eax
je 0x40c332
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 4]
fld dword [eax + 0x784]
fimul dword [ebp - 0xc]
call fcn.004500e0
mov dword [ebp - 0xc], eax
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, dword [ebp + 0x82c]
jl 0x40c2ef
mov ebx, dword [ebp - 0x14]
mov ecx, esi
call fcn.0040bfd8
mov eax, ebx
jmp 0x40c757
push ebx
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x20000005
push dword [esi]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x30], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40c37d
cmp dword [ebp - 0x30], 4
jne 0x40c3bc
jmp 0x40c3b7
push 7
push str.file:__
push edi
call fcn.004520da
add esp, 0xc
test eax, eax
jne 0x40c3b7
push ebx
push ebx
push 3
push ebx
push 1
push ebx
add edi, 7
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], ebx
jne 0x40c3c3
mov dword [ebp - 0x10], 1
cmp dword [ebp + 0x834], ebx
jne 0x40c343
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0x80]
call fcn.00437f60
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x80]
call fcn.00437e90
cmp byte [eax + 7], 0xff
jne 0x40c3ef
mov eax, dword [eax]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [ebp - 8]
mov edi, eax
call fcn.0042f1e0
cmp edi, ebx
jge 0x40c41c
mov ecx, esi
call fcn.0040bfd8
lea ecx, [ebp - 0x80]
call fcn.00437fa0
mov eax, edi
jmp 0x40c757
cmp dword [ebp + 4], ebx
je 0x40c455
mov edi, dword [ebp - 0x20]
cmp edi, ebx
je 0x40c455
push 0x472f5c
lea ecx, [ebp - 8]
call fcn.0042f200
lea eax, [edi + 0x3c]
cmp byte [eax + 7], 0xff
jne 0x40c440
mov eax, dword [eax]
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp + 4]
push eax
call fcn.004103fa
lea ecx, [ebp - 8]
call fcn.0042f1e0
mov ecx, dword [ebp - 0x2c]
cmp ecx, ebx
je 0x40c470
lea eax, [esi + 4]
cmp byte [eax + 7], 0xff
jne 0x40c467
mov eax, dword [eax]
push dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
or dword [esi + 0x10], 0xffffffff
mov dword [esi + 0x14], 1
mov dword [ebp - 0x24], ebx
mov dword [ebp], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x38], eax
jmp 0x40c6b7
cmp dword [esi + 0x14], ebx
je 0x40c6c5
mov edi, dword [ebp + 4]
cmp edi, ebx
je 0x40c4c8
fld dword [edi + 0x780]
fmul qword [0x472f70]
call fcn.004500e0
mov dword [ebp - 0xc], eax
cmp dword [edi + 0x2c], ebx
je 0x40c4c8
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x40c4c8
cmp dword [eax + 4], ebx
je 0x40c6c2
mov edi, 0x400
push edi
lea eax, [ebp + 0x409]
push ebx
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x28], ebx
mov byte [ebp + 0x408], bl
call fcn.0044f280
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
push edi
lea eax, [ebp + 0x408]
push eax
push dword [esi]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40c581
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x40c6c5
add dword [ebp], eax
mov eax, dword [ebp]
fild dword [ebp]
test eax, eax
jge 0x40c523
fadd dword [0x472f58]
fmul qword [0x472f50]
fstp qword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
mov dword [ebp - 0x1c], eax
fild dword [ebp - 0x1c]
test eax, eax
jge 0x40c545
fadd dword [0x472f58]
fdiv qword [0x472f70]
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
fdivr qword [ebp - 0x50]
call fcn.004500e0
mov ecx, dword [ebp - 0x2c]
mov dword [esi + 0x10], eax
cmp ecx, ebx
je 0x40c56b
push dword [ebp]
mov eax, dword [ecx]
call dword [eax + 8]
push dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
mov eax, dword [edi]
lea ecx, [ebp + 0x408]
push ecx
mov ecx, edi
call dword [eax + 0x10]
jmp 0x40c5b0
mov dword [ebp - 0x34], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
cmp eax, 0x2ee3
jne 0x40c5ad
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x1c], edi
call dword [sym.imp.WININET.dll_InternetGetLastResponseInfoA]
mov edi, dword [ebp - 0x18]
cmp dword [ebp - 0x34], ebx
je 0x40c6b7
inc dword [ebp - 0x24]
cmp dword [ebp + 4], ebx
je 0x40c620
cmp dword [ebp - 0x20], ebx
je 0x40c620
lea ecx, [ebp - 8]
call fcn.0042ef80
push dword [ebp - 0x24]
lea eax, [ebp - 8]
push dword [ebp - 0x14]
push str.actiondownloadfailurevalue_ddownloadattempt_d
push eax
call fcn.0042fd00
mov eax, dword [ebp - 0x20]
add eax, 0x3c
push eax
lea eax, [ebp - 0x48]
push str.packageID
push eax
call fcn.0042fa40
add esp, 0x1c
push eax
lea ecx, [ebp - 8]
call fcn.0042f690
lea ecx, [ebp - 0x48]
call fcn.0042f1e0
mov ecx, dword [ebp + 4]
push ebx
lea eax, [ebp - 8]
push eax
call fcn.004118f7
lea ecx, [ebp - 8]
call fcn.0042f1e0
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp + 0x82c]
jge 0x40c6b4
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 4]
fld dword [eax + 0x784]
fimul dword [ebp - 0xc]
call fcn.004500e0
push dword [esi]
mov dword [ebp - 0xc], eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [esi + 4]
mov dword [esi], ebx
cmp byte [eax + 7], 0xff
jne 0x40c661
mov eax, dword [eax]
push ebx
push 0x200000
push ebx
push ebx
push eax
push dword [0x481e40]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [esi], eax
cmp eax, ebx
je 0x40c5b0
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp], ebx
call dword [eax + 8]
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x80]
call fcn.00437e90
cmp byte [eax + 7], 0xff
jne 0x40c69e
mov eax, dword [eax]
mov edx, dword [edi]
push eax
mov ecx, edi
call dword [edx + 4]
lea ecx, [ebp - 0x40]
mov edi, eax
call fcn.0042f1e0
cmp edi, ebx
jge 0x40c6b7
mov dword [esi + 0x14], ebx
cmp dword [esi + 0x18], ebx
je 0x40c48f
jmp 0x40c6c5
mov dword [esi + 0x14], ebx
cmp dword [ebp + 4], ebx
je 0x40c70f
mov edi, dword [ebp - 0x20]
cmp edi, ebx
je 0x40c70f
cmp dword [esi + 0x18], ebx
je 0x40c6dd
push str.downloadCancel
jmp 0x40c6e7
cmp dword [esi + 0x14], ebx
je 0x40c70f
push str.downloadSuccessful
lea ecx, [ebp - 8]
call fcn.0042f200
lea eax, [edi + 0x3c]
cmp byte [eax + 7], 0xff
jne 0x40c6fa
mov eax, dword [eax]
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp + 4]
push eax
call fcn.004103fa
lea ecx, [ebp - 8]
call fcn.0042f1e0
mov ecx, dword [ebp - 0x2c]
cmp ecx, ebx
je 0x40c726
mov eax, dword [ecx]
cmp dword [esi + 0x18], ebx
je 0x40c720
push ebx
jmp 0x40c723
push dword [esi + 0x14]
call dword [eax + 0xc]
mov edi, 0x80004005
cmp dword [esi + 0x18], ebx
je 0x40c737
mov edi, 0x8000aaa3
jmp 0x40c73e
cmp dword [esi + 0x14], ebx
je 0x40c73e
xor edi, edi
mov ecx, esi
call fcn.0040bfd8
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
call dword [eax + 8]
jmp 0x40c40d
mov eax, 0x80004005
mov ecx, dword [ebp + 0x80c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044f6e0
add ebp, 0x810
leave
ret 0x20