Function at 0x405200
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 [0x41d174]
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.004068d0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x414]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x40525f
push 0x104
push esi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
cmp dword [ebp + 0xc], 0
je 0x40527a
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4054cb
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4054cb
call fcn.004046d0
test eax, eax
je 0x4052c3
lea eax, [ebp - 0x414]
push eax
call fcn.00405060
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 0x4054d4
cmp byte [0x41ea30], 0
jne 0x4052ec
push 0x104
push 0x41ea30
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push 0x41ea30
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push 0x103
lea edx, [ebp - 0x107]
push 0
push edx
mov byte [ebp - 0x108], 0
call fcn.004068d0
push 0x103
lea eax, [ebp - 0x20b]
push 0
push eax
mov byte [ebp - 0x20c], 0
call fcn.004068d0
add esp, 0x18
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40533c
xor eax, eax
jmp 0x405358
lea esi, [eax + eax]
mov eax, esi
call fcn.00406950
mov eax, esp
push 3
push esi
lea edx, [ebp - 0x414]
push edx
push eax
call fcn.00402650
push 0x104
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x4054d2
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x40538f
xor eax, eax
jmp 0x4053a9
lea eax, [esi + esi]
call fcn.00406950
mov eax, esp
push 3
push esi
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.00401470
push eax
call fcn.00405060
lea edx, [ebp - 0x108]
push edx
push str.NUL_s_n
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.00408107
push 0x4183d8
push 0x41ea30
call fcn.00409372
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x405400
push 0x4183d4
push 0x41ea30
call fcn.00409372
mov esi, eax
add esp, 8
test esi, esi
je 0x4054d2
push esi
call fcn.004091f8
push 0x207
lea ecx, [ebp - 0x61b]
push 0
push ecx
mov byte [ebp - 0x61c], 0
call fcn.004068d0
push esi
lea edx, [ebp - 0x61c]
push 0x208
push edx
call fcn.004090c0
add esp, 0x1c
test eax, eax
je 0x40547d
lea esp, [esp]
lea eax, [ebp - 0x61c]
push eax
call fcn.00415550
lea ecx, [ebp - 0x61c]
push str._rename_
push ecx
call fcn.00408370
add esp, 0xc
test eax, eax
jne 0x4054a8
push esi
lea edx, [ebp - 0x61c]
push 0x208
push edx
call fcn.004090c0
add esp, 0xc
test eax, eax
jne 0x405440
push esi
push str._rename__n
call fcn.00408fba
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00408fba
add esp, 0x10
push esi
call fcn.004089c9
add esp, 4
mov eax, 1
jmp 0x4054d4
push 2
push 0
push esi
call fcn.00408cc0
lea ecx, [ebp - 0x20c]
push esi
push ecx
call fcn.00408fba
add esp, 0x14
push esi
call fcn.004089c9
add esp, 4
mov eax, 1
jmp 0x4054d4
xor eax, eax
lea esp, [ebp - 0x620]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004068b9
mov esp, ebp
pop ebp
ret