Function at 0x408b50
Capabilities:
Check if file exists
Delete file
Get common file path
Move file
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa50
mov eax, dword [0x5293c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 0xa4c], esi
mov eax, dword [edi + 0x524]
lea ebx, [edi + 0x524]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0xa48], edi
mov dword [ebp - 0xa50], ebx
cmp eax, ecx
je 0x408ba0
push ebx
push ecx
push eax
call fcn.00403430
mov eax, dword [ebx]
add esp, 0xc
mov dword [ebx + 4], eax
push esi
mov ecx, edi
call fcn.00408f30
mov esi, dword [ebx]
cmp esi, dword [edi + 0x528]
je 0x408dec
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
nop dword [eax]
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x408bca
mov eax, dword [esi]
push eax
lea eax, [ebp - 0xa44]
push eax
call fcn.00401950
add esp, 8
lea eax, [ebp - 0xa44]
cmp dword [ebp - 0xa30], 7
cmova eax, dword [ebp - 0xa44]
push eax
call edi
test eax, eax
je 0x408d8f
cmp dword [ebp - 0xa30], 7
lea ebx, [ebp - 0xa44]
cmova ebx, dword [ebp - 0xa44]
push ebx
call edi
test eax, eax
je 0x408d8f
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x408d8f
push 0x208
push eax
lea eax, [ebp - 0xa2c]
push eax
call fcn.004b7c40
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004b7c40
add esp, 0x18
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004b7c40
push 0x208
lea eax, [ebp - 0x824]
push 0
push eax
call fcn.004b7c40
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004c525e
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.004b815d
add esp, 0x2c
test eax, eax
jne 0x408cc3
lea eax, [ebp - 0x20c]
push 0x2f
push eax
call fcn.004b815d
add esp, 8
test eax, eax
je 0x408cdb
add eax, 2
push eax
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.004c525e
add esp, 0xc
xor edi, edi
nop dword [eax]
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004b7c40
add esp, 0xc
lea eax, [ebp - 0xa2c]
test edi, edi
jne 0x408d1e
push eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push 0x4e1ef8
push eax
call fcn.00408650
add esp, 0x10
jmp 0x408d3b
push edi
push eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push str._s_s.del_d
push eax
call fcn.00408650
add esp, 0x14
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408d68
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x408d68
cmp edi, 0xa
jge 0x408d89
inc edi
jmp 0x408ce0
lea eax, [ebp - 0x20c]
push eax
push ebx
call fcn.004c618e
add esp, 8
lea eax, [ebp - 0x20c]
push 5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp - 0xa30]
cmp ecx, 7
jbe 0x408dcf
mov edx, dword [ebp - 0xa44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x408dc5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408e83
push ecx
push edx
call fcn.004b5d1e
add esp, 8
mov eax, dword [ebp - 0xa48]
add esi, 0x18
cmp esi, dword [eax + 0x528]
jne 0x408bc0
mov ebx, dword [ebp - 0xa50]
mov edi, eax
push dword [ebp - 0xa4c]
mov ecx, edi
call fcn.00408f30
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
cmp eax, ecx
je 0x408e12
push ebx
push ecx
push eax
call fcn.00403430
mov eax, dword [ebx]
add esp, 0xc
mov dword [ebx + 4], eax
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.004b7c40
add esp, 0xc
lea eax, [ebp - 0x61c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x61c]
push eax
call esi
mov ebx, dword [ebp - 0xa4c]
mov ecx, edi
push ebx
call fcn.00408f30
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x61c]
push eax
call esi
push ebx
mov ecx, edi
call fcn.00408f30
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b5d2c
mov esp, ebp
pop ebp
ret 4
call fcn.004ba13f
int3