Function at 0x405760
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 0x4057bf
push 0x104
push esi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
cmp dword [ebp + 0xc], 0
je 0x4057da
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x405a2b
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405a2b
call fcn.00404c30
test eax, eax
je 0x405823
lea eax, [ebp - 0x414]
push eax
call fcn.004055c0
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 0x405a34
cmp byte [0x420f98], 0
jne 0x40584c
push 0x104
push 0x420f98
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push 0x420f98
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 0x40589c
xor eax, eax
jmp 0x4058b8
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 0x405a32
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x4058ef
xor eax, eax
jmp 0x405909
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.004055c0
lea edx, [ebp - 0x108]
push edx
push str.NUL_s_n
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.00409287
push 0x41a668
push 0x420f98
call fcn.00408520
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x405960
push 0x41a664
push 0x420f98
call fcn.00408520
mov esi, eax
add esp, 8
test esi, esi
je 0x405a32
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 0x4059dd
lea esp, [esp]
lea eax, [ebp - 0x61c]
push eax
call fcn.00416fb4
lea ecx, [ebp - 0x61c]
push str._rename_
push ecx
call fcn.004094f0
add esp, 0xc
test eax, eax
jne 0x405a08
push esi
lea edx, [ebp - 0x61c]
push 0x208
push edx
call fcn.0040a059
add esp, 0xc
test eax, eax
jne 0x4059a0
push esi
push str._rename__n
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 0x405a34
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 0x405a34
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