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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x30a]
mov word [ebp - 0x30c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov esi, 0x104
lea eax, [ebp - 0x30c]
push esi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x403263
push esi
lea eax, [ebp - 0x30c]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
cmp dword [ebp + 0xc], ebx
je 0x403281
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x403281
push 1
pop eax
jmp 0x4034c7
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403279
call fcn.004053a1
test eax, eax
je 0x4032c3
lea eax, [ebp - 0x30c]
push eax
call fcn.004034d2
pop ecx
lea eax, [ebp - 0x30c]
push 4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
neg eax
sbb eax, eax
neg eax
jmp 0x4034c7
cmp byte [0x41e5b0], bl
jne 0x4032e4
mov edi, 0x41e5b0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x41c814
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x103]
mov byte [ebp - 0x104], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x40f]
mov byte [ebp - 0x410], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x30c]
test eax, eax
jne 0x40331e
xor edi, edi
jmp 0x403359
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and al, 0xfc
call fcn.00402d10
mov edi, esp
push ebx
push ebx
push esi
push edi
lea eax, [ebp - 0x30c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
mov byte [edi], bl
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, 0x104
lea eax, [ebp - 0x104]
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x4034c5
lea eax, [ebp - 0x104]
test eax, eax
jne 0x40337e
xor edi, edi
jmp 0x4033b3
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.00402d10
mov edi, esp
push esi
push edi
lea eax, [ebp - 0x104]
push 0xffffffffffffffff
push eax
push ebx
push ebx
mov word [edi], bx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push edi
call fcn.004034d2
lea eax, [ebp - 0x104]
push eax
push str.NUL_s_n
lea eax, [ebp - 0x410]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
push 0x41c808
push 0x41e5b0
call edi
mov esi, eax
add esp, 0x1c
cmp esi, ebx
jne 0x40340a
push 0x41c804
push 0x41e5b0
call edi
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
je 0x4034c5
push esi
call dword [sym.imp.MSVCRT.dll_rewind]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x617]
mov byte [ebp - 0x618], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.MSVCRT.dll_fgets]
push esi
lea eax, [ebp - 0x618]
push 0x208
push eax
call edi
add esp, 0x10
test eax, eax
je 0x403480
lea eax, [ebp - 0x618]
push eax
call dword [sym.imp.MSVCRT.dll__strlwr]
lea eax, [ebp - 0x618]
mov dword [esp], str._rename_
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
pop ecx
test eax, eax
pop ecx
jne 0x40349d
push esi
lea eax, [ebp - 0x618]
push 0x208
push eax
call edi
add esp, 0xc
jmp 0x403441
mov edi, dword [sym.imp.MSVCRT.dll_fputs]
push esi
push str._rename__n
call edi
lea eax, [ebp - 0x410]
push esi
push eax
call edi
add esp, 0x10
jmp 0x4034b8
push 2
push ebx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
lea eax, [ebp - 0x410]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fputs]
add esp, 0x14
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
jmp 0x403279
xor eax, eax
lea esp, [ebp - 0x624]
pop edi
pop esi
pop ebx
leave
ret