Function at 0x4018a0
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bfd51
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x4f6414]
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 ebx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x230], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4018ec
mov eax, 1
jmp 0x401c6f
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4018e2
call fcn.00401490
mov ecx, eax
test ecx, ecx
jne 0x40190c
push 0x80004005
call fcn.00401330
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401921
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x401923
call edx
add eax, 0x10
mov dword [ebp - 0x234], eax
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.00465ca0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov edx, eax
test edx, edx
jne 0x40196c
xor ecx, ecx
jmp 0x401980
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401971
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x234]
call fcn.00403290
call fcn.00401490
mov ecx, eax
test ecx, ecx
jne 0x4019a2
push 0x80004005
call fcn.00401330
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4019b7
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4019b9
call edx
add eax, 0x10
mov dword [ebp - 0x23c], eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x228]
xorps xmm0, xmm0
mov dword [ebp - 0x228], 0
push eax
movq qword [ebp - 0x224], xmm0
mov dword [ebp - 0x21c], 0
call dword [sym.imp.ole32.dll_CoCreateGuid]
lea eax, [ebp - 0x220]
push eax
movzx eax, word [ebp - 0x222]
push eax
movzx eax, word [ebp - 0x224]
push eax
push dword [ebp - 0x228]
lea eax, [ebp - 0x23c]
push 0x4e8860
push eax
call fcn.00403600
add esp, 0x18
call fcn.00401490
mov ecx, eax
test ecx, ecx
jne 0x401a38
push 0x80004005
call fcn.00401330
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401a4d
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x401a4f
call edx
add eax, 0x10
mov dword [ebp - 0x238], eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x238]
mov edi, dword [ebp - 0x23c]
mov ebx, dword [ebp - 0x234]
push edi
push ebx
push str._s._s.del
push eax
call fcn.00403600
mov esi, dword [ebp - 0x238]
lea eax, [ebp - 0x218]
add esp, 0x10
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 1
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x230]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x22c], eax
test eax, eax
jne 0x401b33
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x11
jne 0x401b33
mov eax, dword [ebp - 0x230]
push edi
movzx eax, word [eax]
push eax
lea eax, [ebp - 0x238]
push str._c:_s.del
push eax
call fcn.00403600
mov esi, dword [ebp - 0x238]
add esp, 0x10
push 1
push esi
push dword [ebp - 0x230]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x401b33
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401b19
test al, 1
jne 0x401b19
or eax, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
push 0x4e88a4
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004040f0
add esp, 0x10
cmp dword [ebp - 0x22c], 0
lea eax, [ebp - 0x218]
push 4
cmove eax, dword [ebp - 0x230]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x230], eax
add esi, 0xfffffff0
mov byte [ebp - 4], 1
or ecx, 0xffffffff
lock xadd dword [esi + 0xc], ecx
dec ecx
mov edx, dword [sym.imp.KERNEL32.dll_HeapFree]
test ecx, ecx
jg 0x401bc5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x22c], ebx
mov ebx, dword [ebp - 0x234]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401bb9
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x22c], edi
mov edi, dword [ebp - 0x23c]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x401bb1
push 0
push dword [ecx + 4]
call edx
jmp 0x401bbf
call dword [ebp - 0x22c]
jmp 0x401bbf
call dword [ebp - 0x22c]
mov edx, dword [sym.imp.KERNEL32.dll_HeapFree]
or esi, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x401c28
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x22c], ebx
mov ebx, dword [ebp - 0x234]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401c22
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x22c], ebx
mov ebx, dword [ebp - 0x234]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x401c1a
push 0
push dword [ecx + 4]
call edx
jmp 0x401c28
call dword [ebp - 0x22c]
jmp 0x401c28
call dword [ebp - 0x22c]
mov dword [ebp - 4], 0xffffffff
add ebx, 0xfffffff0
lock xadd dword [ebx + 0xc], esi
dec esi
test esi, esi
jg 0x401c69
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401c67
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x401c67
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x401c69
call edx
mov eax, dword [ebp - 0x230]
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.004640c2
mov esp, ebp
pop ebp
ret