Function at 0x40234e
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 0x40239f
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 0x4023bd
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4023bd
push 1
pop eax
jmp 0x402603
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4023b5
call fcn.004036f2
test eax, eax
je 0x4023ff
lea eax, [ebp - 0x30c]
push eax
call fcn.0040260e
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 0x402603
cmp byte [0x409544], bl
jne 0x402420
mov edi, 0x409544
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x408644
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 0x40245a
xor edi, edi
jmp 0x402495
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.004020f0
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 0x402601
lea eax, [ebp - 0x104]
test eax, eax
jne 0x4024ba
xor edi, edi
jmp 0x4024ef
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.004020f0
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.0040260e
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 0x408638
push 0x409544
call edi
mov esi, eax
add esp, 0x1c
cmp esi, ebx
jne 0x402546
push 0x408634
push 0x409544
call edi
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
je 0x402601
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 0x4025bc
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 0x4025d9
push esi
lea eax, [ebp - 0x618]
push 0x208
push eax
call edi
add esp, 0xc
jmp 0x40257d
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 0x4025f4
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 0x4023b5
xor eax, eax
lea esp, [ebp - 0x624]
pop edi
pop esi
pop ebx
leave
ret