Function at 0x40a17c
Capabilities:
Check if file exists
Delete file
Delete registry key
Get common file path
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x65c
mov eax, dword [0x41e004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
call fcn.0040a067
push 2
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
js 0x40a421
push esi
push edi
push dword [0x403c28]
lea ecx, [ebp - 0x620]
mov dword [ebp - 0x620], ebx
call fcn.0040c7c9
mov esi, dword [ebp - 0x620]
test esi, esi
je 0x40a1d5
push ebx
mov edx, 0xffefffff
jmp 0x40a1e2
call fcn.004097e8
push 0x100000
or edx, 0xffffffff
call fcn.00409698
xor ecx, ecx
call fcn.00408b15
push 0x10
pop ecx
call fcn.00408b15
push esi
push 2
lea eax, [ebp - 0x414]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
xor edi, edi
inc edi
test eax, eax
je 0x40a297
call fcn.0040b22d
test al, al
jne 0x40a23d
push 0x401d58
push SysReAllocStringLen
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
push edi
push esi
push 3
pop edx
lea ecx, [ebp - 0x414]
call fcn.0040954a
jmp 0x40a297
push ecx
push dword [0x4025c0]
lea eax, [ebp - 0x414]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x20c]
call fcn.0040d512
push ecx
lea ecx, [ebp - 0x20c]
call fcn.0040d0d4
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40a297
push 0x80
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call fcn.00409c39
test esi, esi
jne 0x40a368
push ebx
push 2
pop esi
push esi
lea edx, [ebp - 0x624]
mov dword [ebp - 0x624], 0x10
mov ecx, esi
mov dword [ebp - 0x620], 0x19
call fcn.004098f7
push 0x17
pop ebx
push edi
push 3
lea edx, [ebp - 0x628]
mov dword [ebp - 0x628], esi
mov ecx, esi
mov dword [ebp - 0x624], ebx
mov dword [ebp - 0x620], 6
call fcn.004098f7
push edi
push edi
push 4
lea edx, [ebp - 0x620]
mov dword [ebp - 0x620], ebx
pop ecx
call fcn.004098f7
mov esi, 0x402e24
lea edi, [ebp - 0x638]
push 0
push 1
lea edx, [ebp - 0x638]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00409962
mov esi, 0x402e04
lea edi, [ebp - 0x65c]
lea edx, [ebp - 0x65c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, 0x402e44
lea edi, [ebp - 0x64c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
inc edi
push edi
push 2
call fcn.00409962
push 2
pop ecx
call fcn.004099af
mov ecx, ebx
call fcn.004099af
xor ebx, ebx
push 0x402390
push ebx
push 0x1a
pop esi
push esi
push 0xffff
call dword [sym.imp.USER32.dll_PostMessageW]
call fcn.0040b22d
test al, al
je 0x40a3ba
push edi
push edi
lea ecx, [ebp - 0x63c]
mov dword [ebp - 0x63c], esi
mov dword [ebp - 0x638], edi
mov dword [ebp - 0x634], edi
mov dword [ebp - 0x630], 0x401f38
mov dword [ebp - 0x62c], ebx
call fcn.0040df35
call fcn.0040886d
call fcn.0040894a
lea eax, [ebp - 0x624]
push eax
push ebx
push edi
call dword [sym.imp.iertutil.dll_Ordinal_281]
test eax, eax
jne 0x40a3e9
mov eax, dword [ebp - 0x624]
and eax, edi
or eax, ebx
je 0x40a3e9
push ebx
push edi
push ebx
push ebx
push edi
call dword [sym.imp.iertutil.dll_Ordinal_282]
push ecx
push ecx
lea ecx, [ebp - 0x61c]
call fcn.0040b515
pop edi
pop esi
test al, al
je 0x40a407
lea ecx, [ebp - 0x61c]
call fcn.00409fb1
mov ecx, 0x4029d8
call fcn.00409dbf
mov ecx, 0x402618
call fcn.00409dbf
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0041ce8b
mov esp, ebp
pop ebp
ret