Function at 0x40d370
Capabilities:
Check for time delay via gettickcount
Check if file exists
Delete file
Get common file path
Get program files directory
Get startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f980c
mov eax, dword fs:[0]
push eax
mov eax, 0x10d8
call fcn.004d2490
mov eax, dword [0x53f084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bl, dl
mov edi, ecx
mov dword [ebp - 0x10e0], edi
test edi, edi
je 0x40d8a4
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x40d8a4
push 0x208
lea eax, [ebp - 0xa38]
push 0
push eax
call fcn.004d43f0
push 0x208
lea eax, [ebp - 0xc40]
push 0
push eax
call fcn.004d43f0
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.004d43f0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004d43f0
add esp, 0x30
test bl, bl
je 0x40d845
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0xa38]
push 0
push 0x26
push eax
push 0
call esi
push 0
push 0x24
lea eax, [ebp - 0xc40]
push eax
push 0
call esi
push 0
push 8
lea eax, [ebp - 0x628]
push eax
push 0
call esi
push 0
push 0x1a
lea eax, [ebp - 0x218]
push eax
push 0
call esi
lea eax, [ebp - 0x218]
xor bl, bl
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
movzx ebx, bl
mov ecx, 1
lea eax, [ebp - 0x218]
cmovne ebx, ecx
lea ecx, [ebp - 0x10a8]
push eax
call fcn.00403fd0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x10a8]
push dword [ebp - 0x10e0]
cmp dword [ebp - 0x1094], 8
mov edx, dword [ebp - 0x1098]
cmovae ecx, dword [ebp - 0x10a8]
push 1
push str.SMDB
push ecx
call fcn.0040dd70
add esp, 0x10
lea ecx, [ebp - 0x10a8]
push eax
push 0
lea eax, [ebp - 0x1080]
push eax
call fcn.00403ed0
push eax
lea ecx, [ebp - 0x10a8]
call fcn.00403f90
lea ecx, [ebp - 0x1080]
call fcn.00405080
cmp dword [ebp - 0x1094], 8
lea eax, [ebp - 0x10a8]
mov esi, dword [sym.imp.SHLWAPI.dll_StrCpyW]
cmovae eax, dword [ebp - 0x10a8]
push eax
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x628]
push eax
lea ecx, [ebp - 0x1068]
call fcn.00403fd0
xor eax, eax
mov dword [ebp - 0x10b0], 0
mov dword [ebp - 0x10ac], 7
mov word [ebp - 0x10c0], ax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1068]
cmp dword [ebp - 0x1054], 8
mov edx, dword [ebp - 0x1058]
cmovae ecx, dword [ebp - 0x1068]
push 1
push str.SMDB
push eax
call fcn.0040dea0
add esp, 0xc
lea ecx, [ebp - 0x1068]
inc eax
push eax
push str.SMDB
call fcn.0040dd00
inc eax
lea ecx, [ebp - 0x1068]
push eax
push str.SMDB
call fcn.0040dd00
push eax
push 0
lea eax, [ebp - 0x1080]
push eax
lea ecx, [ebp - 0x1068]
call fcn.00403ed0
push eax
lea ecx, [ebp - 0x1068]
call fcn.00403f90
lea ecx, [ebp - 0x1080]
call fcn.00405080
push 0x208
lea eax, [ebp - 0x830]
push 0
push eax
call fcn.004d43f0
add esp, 0xc
lea eax, [ebp - 0x1068]
cmp dword [ebp - 0x1054], 8
cmovae eax, dword [ebp - 0x1068]
push eax
lea eax, [ebp - 0x830]
push eax
call esi
test bl, bl
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
jne 0x40d6d8
lea eax, [ebp - 0x830]
push eax
push edi
call ebx
test eax, eax
jne 0x40d6d8
lea eax, [ebp - 0x10dc]
mov dword [ebp - 0x1078], 0x4df0c730
push eax
lea eax, [ebp - 0x1090]
mov dword [ebp - 0x1074], 0x4ae3df9d
push eax
push 3
xor esi, esi
mov dword [ebp - 0x1070], 0x6baa5391
push esi
lea eax, [ebp - 0x1078]
mov dword [ebp - 0x106c], 0x5a79e982
push eax
mov dword [ebp - 0x1090], 0x8be2d872
mov dword [ebp - 0x108c], 0x4d4786aa
mov dword [ebp - 0x1088], 0xcc3276b7
mov dword [ebp - 0x1084], 0x18700ca4
mov dword [ebp - 0x10dc], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x40d6d8
mov ecx, dword [ebp - 0x10dc]
test ecx, ecx
je 0x40d6d8
lea edx, [ebp - 0x10e4]
mov dword [ebp - 0x10e4], esi
mov eax, dword [ecx]
push edx
push 1
push edi
push ecx
call dword [eax + 0x28]
test eax, eax
jne 0x40d6c4
mov ecx, dword [ebp - 0x10e4]
test ecx, ecx
je 0x40d6c4
lea esi, [eax + 1]
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [ebp - 0x10dc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test esi, esi
jne 0x40d883
push 0x208
lea eax, [ebp - 0xe48]
push 0
push eax
call fcn.004d43f0
mov edi, dword [ebp - 0x1058]
lea ecx, [ebp - 0x1068]
add esp, 0xc
mov edx, edi
cmp dword [ebp - 0x1054], 8
cmovae ecx, dword [ebp - 0x1068]
push dword [ebp - 0x10e0]
push 1
push str.SMDB
push ecx
call fcn.0040dd70
add esp, 0x10
lea ecx, [edi - 1]
mov esi, eax
lea eax, [ebp - 0x1080]
push ecx
lea ecx, [esi + 1]
push ecx
push eax
lea ecx, [ebp - 0x1068]
call fcn.00403ed0
push eax
lea ecx, [ebp - 0x10c0]
call fcn.00403f90
lea ecx, [ebp - 0x1080]
call fcn.00405080
push esi
push 0
lea eax, [ebp - 0x1080]
push eax
lea ecx, [ebp - 0x1068]
call fcn.00403ed0
push eax
lea ecx, [ebp - 0x1068]
call fcn.00403f90
lea ecx, [ebp - 0x1080]
call fcn.00405080
cmp dword [ebp - 0x1054], 8
lea eax, [ebp - 0x1068]
mov esi, dword [sym.imp.SHLWAPI.dll_StrCpyW]
cmovae eax, dword [ebp - 0x1068]
push eax
lea eax, [ebp - 0xe48]
push eax
call esi
push 0x208
lea eax, [ebp - 0x1050]
push 0
push eax
call fcn.004d43f0
add esp, 0xc
lea eax, [ebp - 0x10c0]
cmp dword [ebp - 0x10ac], 8
cmovae eax, dword [ebp - 0x10c0]
push eax
lea eax, [ebp - 0x1050]
push eax
call esi
mov edi, dword [ebp - 0x10e0]
lea eax, [ebp - 0xa38]
push eax
push edi
call ebx
test eax, eax
jne 0x40d883
lea eax, [ebp - 0xc40]
push eax
push edi
call ebx
test eax, eax
jne 0x40d883
lea eax, [ebp - 0xe48]
push eax
push edi
call ebx
test eax, eax
je 0x40d81d
lea eax, [ebp - 0x1050]
push eax
push edi
call ebx
test eax, eax
je 0x40d883
lea ecx, [ebp - 0x10c0]
call fcn.00405080
lea ecx, [ebp - 0x1068]
call fcn.00405080
lea ecx, [ebp - 0x10a8]
mov dword [ebp - 4], 0xffffffff
call fcn.00405080
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004d43f0
mov eax, edi
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d860
sub eax, edx
sar eax, 1
cmp eax, 3
jbe 0x40d8ab
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
push 0x513f10
jmp 0x40d8b8
lea ecx, [ebp - 0x10c0]
call fcn.00405080
lea ecx, [ebp - 0x1068]
call fcn.00405080
lea ecx, [ebp - 0x10a8]
call fcn.00405080
xor al, al
jmp 0x40d9c9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
push str._s_d.tmp
push 0xffffffffffffffff
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.0040d2a0
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x420]
add esp, 0x18
push eax
call esi
push 0
push 0x4000080
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40d8a4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x420]
push eax
call esi
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x10d8]
call fcn.00403fd0
push 0
push str.SMDB
lea ecx, [ebp - 0x10d8]
mov dword [ebp - 4], 3
call fcn.0040dd00
push dword [ebp - 0x10c8]
xor ecx, ecx
cmp eax, 0xffffffff
cmovne ecx, eax
lea eax, [ebp - 0x1080]
push ecx
push eax
lea ecx, [ebp - 0x10d8]
call fcn.00403ed0
push eax
lea ecx, [ebp - 0x10d8]
call fcn.00403f90
lea ecx, [ebp - 0x1080]
call fcn.00405080
cmp dword [ebp - 0x10c4], 8
lea eax, [ebp - 0x10d8]
cmovae eax, dword [ebp - 0x10d8]
push eax
push str.LocalVirtualStore
lea eax, [ebp - 0x218]
push eax
push str._s_s_s
push 0xffffffffffffffff
push 0x104
push eax
call fcn.0040d2a0
add esp, 0x1c
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
lea ecx, [ebp - 0x10d8]
sete bl
call fcn.00405080
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d170a
mov esp, ebp
pop ebp
ret