Function at 0x41653b
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
mov eax, dword [0x56afe8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
lea ebx, [edi + 4]
push ebx
call fcn.0041454f
pop ecx
test eax, eax
js 0x4167db
push esi
lea ecx, [edi + 8]
call fcn.004132f5
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x10], eax
mov ecx, dword [ebx]
test ecx, ecx
je 0x4167ec
mov eax, dword [ecx]
push 0xffffffffffffffff
push ecx
call dword [eax + 0x4c]
mov ecx, dword [ebx]
test ecx, ecx
je 0x4167ec
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x50]
cmp dword [ebp + 0xc], 0
je 0x4165d9
push 0x52991c
lea ecx, [ebp - 0x418]
call fcn.00413061
lea eax, [ebp - 0x418]
mov ecx, edi
push eax
call fcn.004178c6
mov ecx, dword [ebp - 0x418]
mov edi, eax
test ecx, ecx
je 0x4167cc
call fcn.0041873f
jmp 0x4167cc
and dword [ebp - 0x418], 0
mov eax, dword [esi]
test eax, eax
je 0x4165ea
mov eax, dword [eax]
jmp 0x4165ec
xor eax, eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x416639
push esi
lea ecx, [ebp - 0x434]
call fcn.00413099
mov ecx, dword [ebx]
mov esi, eax
test ecx, ecx
je 0x4167ec
mov eax, dword [ecx]
lea edx, [ebp - 0x418]
push edx
sub esp, 0x10
mov edi, esp
push ecx
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 dword [eax + 0x30]
mov edi, eax
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
jmp 0x4167bd
mov edi, 0x80004005
call fcn.00416d4d
mov ecx, eax
mov dword [ebp - 0x420], ecx
test ecx, ecx
je 0x4167bd
mov eax, dword [esi]
test eax, eax
je 0x41665d
mov edx, dword [eax]
jmp 0x41665f
xor edx, edx
mov eax, dword [ecx]
push edx
push 0
push ecx
call dword [eax + 0x10]
mov dword [ebp - 0x41c], eax
test eax, eax
jle 0x4167bd
push eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x424], eax
pop ecx
test eax, eax
je 0x4167bd
push dword [ebp - 0x41c]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [esi]
add esp, 0xc
test eax, eax
je 0x4166a6
mov edx, dword [eax]
jmp 0x4166a8
xor edx, edx
push dword [ebp - 0x41c]
mov ecx, dword [ebp - 0x420]
mov esi, dword [ebp - 0x424]
push esi
push edx
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x14]
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call sub.msvcrt.dll_memset
mov ecx, dword [0x5697b0]
add esp, 0xc
lea eax, [ecx + 1]
mov dword [0x5697b0], eax
lea eax, [ebp - 0x20c]
push eax
push ecx
push 0x52995c
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x20c]
push 0x529964
push eax
call sub.msvcrt.dll__wfopen
mov dword [ebp - 0x420], eax
pop ecx
pop ecx
test eax, eax
je 0x4167b6
push eax
push 1
push dword [ebp - 0x41c]
push esi
call fcn.00512fd0
push dword [ebp - 0x420]
call sub.msvcrt.dll_fclose
add esp, 0x14
lea eax, [ebp - 0x20c]
lea ecx, [ebp - 0x434]
push eax
call fcn.004130e5
mov ecx, dword [ebx]
mov esi, eax
test ecx, ecx
je 0x4167ec
mov eax, dword [ecx]
lea edx, [ebp - 0x418]
push edx
sub esp, 0x10
mov edi, esp
push ecx
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 dword [eax + 0x30]
mov edi, eax
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [ebp - 0x424]
push esi
call sub.msvcrt.dll_free
pop ecx
cmp word [ebp - 0x418], 0
jne 0x4167cc
mov edi, 0x80004005
test edi, edi
jns 0x4167d9
push 0
mov ecx, ebx
call fcn.0041329b
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00522d04
leave
ret 8
push 0x80004003
call fcn.004ea790
int3