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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x61c
mov eax, dword [0x41f19c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x412]
push ecx
mov word [ebp - 0x414], ax
call fcn.004072b0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x414]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x40577f
push 0x104
push esi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
cmp dword [ebp + 0xc], 0
je 0x40579a
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4059eb
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4059eb
call fcn.00404bf0
test eax, eax
je 0x4057e3
lea eax, [ebp - 0x414]
push eax
call fcn.00405580
add esp, 4
push 4
push 0
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
neg eax
sbb eax, eax
neg eax
jmp 0x4059f4
cmp byte [0x420fa8], 0
jne 0x40580c
push 0x104
push 0x420fa8
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x41a674
push 0x420fa8
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push 0x103
lea edx, [ebp - 0x107]
push 0
push edx
mov byte [ebp - 0x108], 0
call fcn.004072b0
push 0x103
lea eax, [ebp - 0x20b]
push 0
push eax
mov byte [ebp - 0x20c], 0
call fcn.004072b0
add esp, 0x18
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40585c
xor eax, eax
jmp 0x405878
lea esi, [eax + eax]
mov eax, esi
call fcn.00407330
mov eax, esp
push 3
push esi
lea edx, [ebp - 0x414]
push edx
push eax
call fcn.00402680
push 0x104
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x4059f2
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x4058af
xor eax, eax
jmp 0x4058c9
lea eax, [esi + esi]
call fcn.00407330
mov eax, esp
push 3
push esi
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.00401470
push eax
call fcn.00405580
lea edx, [ebp - 0x108]
push edx
push 0x41a684
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.00409287
push 0x41a670
push 0x420fa8
call fcn.00408520
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x405920
push 0x41a66c
push 0x420fa8
call fcn.00408520
mov esi, eax
add esp, 8
test esi, esi
je 0x4059f2
push esi
call fcn.0040a191
push 0x207
lea ecx, [ebp - 0x61b]
push 0
push ecx
mov byte [ebp - 0x61c], 0
call fcn.004072b0
push esi
lea edx, [ebp - 0x61c]
push 0x208
push edx
call fcn.0040a059
add esp, 0x1c
test eax, eax
je 0x40599d
lea esp, [esp]
lea eax, [ebp - 0x61c]
push eax
call fcn.00416fa4
lea ecx, [ebp - 0x61c]
push 0x41a660
push ecx
call fcn.004094f0
add esp, 0xc
test eax, eax
jne 0x4059c8
push esi
lea edx, [ebp - 0x61c]
push 0x208
push edx
call fcn.0040a059
add esp, 0xc
test eax, eax
jne 0x405960
push esi
push 0x41a654
call fcn.0040835e
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0040835e
add esp, 0x10
push esi
call fcn.004082ea
add esp, 4
mov eax, 1
jmp 0x4059f4
push 2
push 0
push esi
call fcn.00409d5f
lea ecx, [ebp - 0x20c]
push esi
push ecx
call fcn.0040835e
add esp, 0x14
push esi
call fcn.004082ea
add esp, 4
mov eax, 1
jmp 0x4059f4
xor eax, eax
lea esp, [ebp - 0x620]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407299
mov esp, ebp
pop ebp
ret