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

Disassembly:
push ebp
sub esp, 0x804
lea ebp, [esp - 4]
mov eax, dword [0x4c1c50]
xor eax, ebp
mov dword [ebp + 0x804], eax
push pe_nt_image_headers32
mov eax, 0x495315
call fcn.00470906
mov eax, dword [ebp + 0x810]
mov edi, dword [ebp + 0x81c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x814]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x818]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x820]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x824]
push eax
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x44]
xor ebx, ebx
push eax
mov esi, ecx
mov dword [ebp - 0x20], ebx
call fcn.0042b05f
pop ecx
pop ecx
mov dword [ebp - 0x30], eax
push edi
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], ebx
call fcn.0044e280
push eax
lea eax, [ebp - 0x8c]
push str.Download__:_strURL_
push eax
mov byte [ebp - 4], 1
call fcn.0044eb90
push 0x4a2710
push eax
lea eax, [ebp - 0x94]
push eax
mov byte [ebp - 4], 2
call fcn.0044eb40
push dword [ebp - 0x30]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.0044eaf0
push 0x4a2580
push eax
lea eax, [ebp - 0x70]
push eax
mov byte [ebp - 4], 4
call fcn.0044eb40
push eax
mov byte [ebp - 4], 5
call fcn.00404620
add esp, 0x34
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 4
call fcn.0044e260
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 3
call fcn.0044e260
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 2
call fcn.0044e260
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 1
call fcn.0044e260
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], bl
call fcn.0044e260
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.0044e260
cmp dword [ebp - 0x2c], ebx
jne 0x416b46
push 0x4a09d4
jmp 0x4173a3
mov dword [esi + 0x18], ebx
cmp edi, ebx
je 0x41739e
mov dword [ebp - 0x24], 0xbb8
cmp dword [ebp - 0x10], ebx
je 0x416b74
mov eax, dword [ebp - 0x10]
fld dword [eax + 0xb48]
fmul qword [0x4a2708]
call fcn.004742e0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], 0x80004005
mov dword [ebp - 0x14], ebx
cmp dword [ebp - 0x50], ebx
jle 0x416bd7
push dword [ebp + 0x828]
mov ecx, esi
push edi
call fcn.00416712
mov dword [ebp - 0x1c], eax
cmp eax, ebx
jge 0x416c23
mov eax, dword [ebp - 0x50]
cmp eax, 1
jle 0x416bcc
dec eax
cmp dword [ebp - 0x14], eax
je 0x416bcc
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x10], ebx
je 0x416bcc
mov eax, dword [ebp - 0x10]
fld dword [eax + 0xb4c]
fimul dword [ebp - 0x24]
call fcn.004742e0
mov dword [ebp - 0x24], eax
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x50]
jl 0x416b83
lea ecx, [ebp - 0x44]
call fcn.0044e010
push dword [ebp - 0x14]
lea eax, [ebp - 0x44]
push 0x4a2704
push eax
mov dword [ebp - 4], 6
call fcn.0044ee50
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
mov ecx, 0x4c33b0
call fcn.0044e7c0
mov ecx, esi
call fcn.0041640a
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.0044e260
mov eax, dword [ebp - 0x1c]
jmp 0x4173b2
push ebx
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x34]
push eax
push 0x20000005
push dword [esi]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x74], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x416c4f
cmp dword [ebp - 0x74], 4
jne 0x416c8e
jmp 0x416c89
push 7
push str.file:__
push edi
call fcn.004741a1
add esp, 0xc
test eax, eax
jne 0x416c89
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 - 0x34], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x34], ebx
jne 0x416c95
mov dword [ebp - 0x34], 1
cmp dword [ebp + 0x82c], ebx
je 0x416cab
mov ecx, esi
call fcn.0041640a
xor eax, eax
jmp 0x4173b2
lea edi, [esi + 4]
push edi
lea ecx, [ebp - 0xec]
call fcn.004573e0
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0xec]
mov dword [ebp - 4], 7
call fcn.004572e0
cmp byte [eax + 7], 0xff
mov byte [ebp - 4], 8
jne 0x416cdc
mov eax, dword [eax]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 7
call fcn.0044e260
cmp dword [ebp - 0x1c], ebx
jge 0x416dbe
lea ecx, [ebp - 0x7c]
call fcn.0044e010
cmp byte [0x4c33b7], 0xff
mov eax, 0x3e8
mov ebx, 0x4c33b0
mov byte [ebp - 4], 9
mov dword [ebp - 0x30], eax
mov edi, ebx
jne 0x416d27
mov edi, dword [0x4c33b0]
push 0x3000
lea ecx, [ebp - 0x30]
push ecx
push eax
lea ecx, [ebp - 0x7c]
call fcn.0044ec10
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_UrlEscapeA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x7c]
call fcn.0044eca0
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x68]
push 0x4a2700
push eax
call fcn.0044eb90
push str.____zz
push eax
lea eax, [ebp - 0x70]
push eax
mov byte [ebp - 4], 0xa
call fcn.0044eb40
add esp, 0x18
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xb
call fcn.0044e310
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 0xa
call fcn.0044e260
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 9
call fcn.0044e260
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 7
call fcn.0044e260
mov ecx, esi
call fcn.0041640a
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xec]
call fcn.004572b0
jmp 0x416c1b
cmp dword [ebp - 0x10], ebx
je 0x416e00
cmp dword [ebp - 0x28], ebx
je 0x416e00
push str.downloadStart
lea ecx, [ebp - 0x58]
call fcn.0044e280
mov eax, dword [ebp - 0x28]
add eax, 0x3c
cmp byte [eax + 7], 0xff
mov byte [ebp - 4], 0xc
jne 0x416de7
mov eax, dword [eax]
lea ecx, [ebp - 0x58]
push ecx
mov ecx, dword [ebp - 0x10]
push eax
call fcn.0042bc0e
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 7
call fcn.0044e260
cmp dword [ebp - 0x48], ebx
je 0x416e1b
cmp byte [edi + 7], 0xff
mov eax, edi
jne 0x416e0f
mov eax, dword [edi]
push dword [ebp - 0x34]
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
or dword [esi + 0x10], 0xffffffff
mov dword [esi + 0x14], 1
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x9c], eax
jmp 0x4172af
mov edi, str.BreakDownload
cmp dword [esi + 0x14], ebx
je 0x4172ee
cmp dword [ebp - 0x10], ebx
je 0x416e7f
mov eax, dword [ebp - 0x10]
fld dword [eax + 0xb48]
fmul qword [0x4a2708]
call fcn.004742e0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x34], ebx
je 0x416e7f
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x416e7f
cmp dword [eax + 4], ebx
je 0x4172cb
push 0x400
lea eax, [ebp + 0x401]
push ebx
push eax
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x5c], ebx
mov byte [ebp + 0x400], bl
call fcn.00470280
add esp, 0xc
push 0x4a26b4
lea ecx, [ebp - 0x68]
call fcn.0044e280
push 0x4a26b4
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0xd
call fcn.0044e280
push edi
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 0xe
call fcn.0044e280
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 0xf
call fcn.0040e532
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 0x11
call fcn.0044e260
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0x12
call fcn.0044e260
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 0x13
call fcn.0044e260
lea ecx, [ebp - 0x58]
call fcn.0044e010
cmp dword [ebp - 0x14], 0x800
mov byte [ebp - 4], 0x14
jb 0x416fd4
push edi
lea ecx, [ebp - 0x3c]
call fcn.0044e280
or dword [ebp - 0x20], 1
lea eax, [ebp - 0x3c]
push eax
mov ecx, 0x4c3ee8
mov byte [ebp - 4], 0x15
call fcn.0040df2e
mov ecx, eax
call fcn.0040d9ba
test eax, eax
je 0x416f96
push edi
lea ecx, [ebp - 0x70]
call fcn.0044e280
or dword [ebp - 0x20], 2
lea eax, [ebp - 0x70]
push eax
mov ecx, 0x4c3ee8
mov dword [ebp - 4], 0x16
call fcn.0040df2e
mov ecx, eax
call fcn.00413696
mov byte [ebp - 0x15], 1
cmp eax, 0x4a09d4
je 0x416f99
mov byte [ebp - 0x15], bl
test byte [ebp - 0x20], 2
mov dword [ebp - 4], 0x15
je 0x416fb2
and dword [ebp - 0x20], 0xfffffffd
lea ecx, [ebp - 0x70]
call fcn.0044e260
test byte [ebp - 0x20], 1
mov dword [ebp - 4], 0x14
je 0x416fcb
and dword [ebp - 0x20], 0xfffffffe
lea ecx, [ebp - 0x3c]
call fcn.0044e260
cmp byte [ebp - 0x15], bl
jne 0x4172d0
lea eax, [ebp - 0x5c]
push eax
mov edi, 0x400
push edi
lea eax, [ebp + 0x400]
push eax
push dword [esi]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x417066
mov eax, dword [ebp - 0x5c]
cmp eax, ebx
je 0x4172d3
add dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x9c]
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
jns 0x417019
fadd dword [0x4a26b0]
fdiv qword [0x4a2708]
mov eax, dword [ebp - 0x14]
fstp dword [ebp - 0x4c]
fild dword [ebp - 0x14]
test eax, eax
jns 0x417032
fadd dword [0x4a26b0]
fmul qword [0x4a26a8]
fdiv dword [ebp - 0x4c]
call fcn.004742e0
mov ecx, dword [ebp - 0x48]
mov dword [esi + 0x10], eax
cmp ecx, ebx
je 0x417052
push dword [ebp - 0x14]
mov eax, dword [ecx]
call dword [eax + 8]
push dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx]
lea edx, [ebp + 0x400]
push edx
call dword [eax + 0x10]
jmp 0x417092
mov dword [ebp - 0x30], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x60], eax
cmp eax, 0x2ee3
jne 0x417092
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp]
push eax
lea eax, [ebp - 0x60]
push eax
mov dword [ebp - 0x4c], edi
call dword [sym.imp.WININET.dll_InternetGetLastResponseInfoA]
cmp dword [ebp - 0x30], ebx
je 0x417294
mov edi, dword [ebp - 0x10]
inc dword [ebp - 0x1c]
cmp edi, ebx
je 0x41712c
cmp dword [ebp - 0x28], ebx
je 0x41712c
lea ecx, [ebp - 0x84]
call fcn.0044e010
push dword [ebp - 0x1c]
lea eax, [ebp - 0x84]
push dword [ebp - 0x60]
mov byte [ebp - 4], 0x17
push str.actiondownloadfailurevalue_ddownloadattempt_d
push eax
call fcn.0044ee50
mov eax, dword [ebp - 0x28]
add eax, 0x3c
push eax
lea eax, [ebp - 0xb4]
push str.packageID
push eax
call fcn.0044eb90
add esp, 0x1c
push eax
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 0x18
call fcn.0044e7c0
lea ecx, [ebp - 0xb4]
mov byte [ebp - 4], 0x17
call fcn.0044e260
mov eax, dword [edi]
push ebx
lea ecx, [ebp - 0x84]
push ecx
mov ecx, edi
call dword [eax + 0x10]
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 0x14
call fcn.0044e260
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x50]
jge 0x4172ba
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, ebx
je 0x417156
fld dword [edi + 0xb4c]
fimul dword [ebp - 0x24]
call fcn.004742e0
mov dword [ebp - 0x24], eax
push dword [esi]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [esi + 4]
mov dword [esi], ebx
cmp byte [eax + 7], 0xff
jne 0x41716b
mov eax, dword [eax]
push ebx
push 0x200000
push ebx
push ebx
push eax
push dword [0x4c33a8]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [esi], eax
cmp eax, ebx
je 0x417092
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx]
mov dword [ebp - 0x14], ebx
call dword [eax + 8]
lea eax, [ebp - 0xac]
push eax
lea ecx, [ebp - 0xec]
call fcn.004572e0
cmp byte [eax + 7], 0xff
mov byte [ebp - 4], 0x19
jne 0x4171b3
mov eax, dword [eax]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [ebp - 0xac]
mov edi, eax
mov byte [ebp - 4], 0x14
call fcn.0044e260
cmp edi, ebx
jge 0x417294
lea ecx, [ebp - 0x44]
call fcn.0044e010
cmp byte [0x4c33b7], 0xff
mov byte [ebp - 4], 0x1a
mov dword [ebp - 0x98], 0x3e8
mov edi, 0x4c33b0
jne 0x4171ff
mov edi, dword [0x4c33b0]
push 0x3000
lea eax, [ebp - 0x98]
push eax
push 0x3e8
lea ecx, [ebp - 0x44]
call fcn.0044ec10
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_UrlEscapeA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x44]
call fcn.0044eca0
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0xa4]
push 0x4a2664
push eax
call fcn.0044eb90
push str.____zz
push eax
lea eax, [ebp - 0xbc]
push eax
mov byte [ebp - 4], 0x1b
call fcn.0044eb40
add esp, 0x18
push eax
mov ecx, 0x4c33b0
mov byte [ebp - 4], 0x1c
call fcn.0044e310
lea ecx, [ebp - 0xbc]
mov byte [ebp - 4], 0x1b
call fcn.0044e260
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 0x1a
call fcn.0044e260
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0x14
call fcn.0044e260
mov dword [esi + 0x14], ebx
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0x13
call fcn.0044e260
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 7
call fcn.0040da55
cmp dword [esi + 0x18], ebx
je 0x416e3d
jmp 0x4172ee
push 0x4a2660
mov ecx, 0x4c33b0
call fcn.0044e6e0
jmp 0x417291
mov dword [esi + 0x14], ebx
jmp 0x4172ee
mov dword [esi + 0x14], ebx
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0x13
call fcn.0044e260
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 7
call fcn.0040da55
cmp dword [ebp - 0x10], ebx
je 0x41734d
cmp dword [ebp - 0x28], ebx
je 0x41734d
cmp dword [esi + 0x18], ebx
je 0x417310
push str.downloadCancel
lea ecx, [ebp - 0x3c]
call fcn.0044e280
mov byte [ebp - 4], 0x1d
jmp 0x417326
cmp dword [esi + 0x14], ebx
je 0x41734d
push str.downloadSuccessful
lea ecx, [ebp - 0x3c]
call fcn.0044e280
mov byte [ebp - 4], 0x1e
mov eax, dword [ebp - 0x28]
add eax, 0x3c
cmp byte [eax + 7], 0xff
jne 0x417334
mov eax, dword [eax]
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0x10]
push eax
call fcn.0042bc0e
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
call fcn.0044e260
mov ecx, dword [ebp - 0x48]
cmp ecx, ebx
je 0x417364
mov eax, dword [ecx]
cmp dword [esi + 0x18], ebx
je 0x41735e
push ebx
jmp 0x417361
push dword [esi + 0x14]
call dword [eax + 0xc]
mov edi, 0x80004005
cmp dword [esi + 0x18], ebx
je 0x417375
mov edi, 0x8000aaa3
jmp 0x41737c
cmp dword [esi + 0x14], ebx
je 0x41737c
xor edi, edi
mov ecx, esi
call fcn.0041640a
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx]
call dword [eax + 8]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xec]
call fcn.004572b0
mov eax, edi
jmp 0x4173b2
push 0x4a2638
mov ecx, 0x4c33b0
call fcn.0044e3b0
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x804]
xor ecx, ebp
call fcn.00470483
add ebp, 0x808
leave
ret 0x20