Function at 0x40d848
Capabilities:
Check for time delay via gettickcount
Delete file
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x4f54]
mov eax, 0x4fd4
call fcn.0041d7b0
mov eax, dword [0x450970]
xor eax, ebp
mov dword [ebp + 0x4f50], eax
mov eax, dword [ebp + 0x4f60]
push ebx
mov ebx, dword [ebp + 0x4f5c]
push esi
mov esi, dword [ebp + 0x4f64]
push edi
mov edi, dword [ebp + 0x4f6c]
push esi
push dword [ebp + 0x4f68]
mov dword [ebp - 0x64], eax
push str.file_size:__d__handle__p
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x60], edi
call fcn.0040b684
push 0x43c484
push edi
call fcn.00421948
add esp, 0x14
mov dword [ebp - 0x5c], eax
test eax, eax
jne 0x40d8dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.opening_the_destination_file__S_failed_with_error_code__d
call fcn.0040b625
add esp, 0xc
push esi
call dword [0x463848]
push dword [ebp - 0x64]
call dword [0x463848]
xor al, al
jmp 0x40db17
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edi, edi
mov byte [ebp - 0x51], 1
call esi
and dword [ebp - 0x58], edi
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x4f68]
cmp edi, eax
jae 0x40dadb
sub eax, edi
mov ecx, 0x4000
cmp eax, ecx
jle 0x40d90c
mov eax, ecx
lea ecx, [ebp - 0x6c]
push ecx
push eax
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x68]
call dword [0x463850]
push dword [ebp - 0x5c]
test eax, eax
setne byte [ebp - 0x51]
cmp byte [ebp - 0x51], 0
je 0x40da64
push dword [ebp - 0x6c]
add edi, dword [ebp - 0x6c]
lea eax, [ebp - 0x50]
push 1
push eax
call fcn.00422463
add esp, 0x10
cmp eax, dword [ebp - 0x6c]
jne 0x40da9b
test ebx, ebx
je 0x40d8f1
call esi
mov ecx, dword [ebp - 0x58]
add ecx, 0x1f4
cmp ecx, eax
jae 0x40d8f1
lea eax, [ebp + 0x4780]
push eax
push 0x4e28
call fcn.0040373f
mov eax, edi
pop ecx
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
pop ecx
test eax, eax
jge 0x40d986
fadd qword [0x43c408]
mov eax, dword [ebp + 0x4f68]
fstp qword [ebp - 0x74]
fild dword [ebp + 0x4f68]
test eax, eax
jge 0x40d99f
fadd qword [0x43c408]
fstp qword [ebp - 0x80]
call esi
sub eax, dword [ebp - 0x78]
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
test eax, eax
jge 0x40d9b7
fadd qword [0x43c408]
fdivr qword [ebp - 0x74]
sub esp, 0x20
lea eax, [ebp + 0x4780]
fstp qword [esp + 0x18]
fld qword [ebp - 0x74]
fmul qword [0x43c400]
fdiv qword [ebp - 0x80]
fstp qword [esp + 0x10]
fld qword [ebp - 0x80]
fld qword [0x43c3f8]
fmul st(1), st(0)
fxch st(1)
fstp qword [esp + 8]
fmul qword [ebp - 0x74]
fstp qword [esp]
push eax
lea eax, [ebp + 0x3fb0]
push eax
call fcn.0040b3b0
add esp, 0x28
lea eax, [ebp + 0x3fb0]
push eax
push 0x3ea
push ebx
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
call esi
mov dword [ebp - 0x58], eax
mov eax, edi
mov dword [ebp - 0x70], eax
fild dword [ebp - 0x70]
push 0
test eax, eax
jge 0x40da2a
fadd dword [0x43c3f0]
mov eax, dword [ebp + 0x4f68]
fild dword [ebp + 0x4f68]
test eax, eax
jge 0x40da40
fadd dword [0x43c3f0]
fdivp st(1)
fmul qword [0x43c400]
call fcn.00421fe6
push eax
push 0x402
push 0x3e9
push ebx
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
jmp 0x40d8f1
call fcn.0041f6b2
pop ecx
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x68]
call dword [0x463848]
push dword [ebp - 0x64]
call dword [0x463848]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InternetReadFile_failed_with_error_code__d
call fcn.0040b625
pop ecx
xor al, al
jmp 0x40db16
push dword [ebp - 0x5c]
call fcn.0041f6b2
pop ecx
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x68]
call dword [0x463848]
push dword [ebp - 0x64]
call dword [0x463848]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x60]
push str.writing_the_destination_file__S_failed_with_error_code__d
call fcn.0040b625
add esp, 0xc
jmp 0x40d8d6
push dword [ebp - 0x5c]
call fcn.0041f6b2
pop ecx
push dword [ebp - 0x68]
call dword [0x463848]
push dword [ebp - 0x64]
call dword [0x463848]
cmp byte [ebp - 0x51], 0
jne 0x40db0a
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40d8d6
push str.download_successful
call fcn.0040b684
mov al, 1
pop ecx
mov ecx, dword [ebp + 0x4f50]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d798
add ebp, 0x4f54
leave
ret