Function at 0x4088d4
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
push ebx
push esi
push edi
xor edi, edi
push 0x206
lea eax, [ebp - 0x216]
push edi
push eax
mov word [ebp - 0x218], di
call fcn.00406260
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
mov ebx, 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, ebx
jae 0x408919
cmp eax, edi
ja 0x40892e
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x40897f
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x408a05
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x40894d
sub eax, edx
sar eax, 1
lea esi, [ebp + eax*2 - 0x21a]
lea eax, [ebp - 0x218]
push eax
mov word [esi], di
call fcn.00408505
test al, al
pop ecx
mov word [esi], 0x5c
jne 0x408a05
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [eax - 1]
cmp ecx, 0x102
ja 0x4089b4
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0040802d
pop ecx
pop ecx
mov word [eax], di
jmp 0x408a05
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x401834
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x10]
push eax
movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
lea eax, [ebp - 0x10]
je 0x4089dc
push ebx
push eax
jmp 0x4089f6
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 1
je 0x408a05
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push 0x40182c
lea eax, [ebp - 0x218]
push eax
call fcn.0040808a
add esp, 0xc
xor esi, esi
push 0x208
lea eax, [ebp - 0x422]
push esi
push eax
mov word [ebp - 0x424], si
call fcn.00406260
add esp, 0xc
lea eax, [ebp - 0x424]
push eax
push esi
push 0x401824
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
mov esi, dword [ebp + 8]
je 0x408a7c
push ebx
push esi
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
cmp eax, 0x105
ja 0x408a7c
test eax, eax
je 0x408a7c
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x408a7c
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x408ac1
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x424]
push eax
push eax
call fcn.00408890
push ebx
lea eax, [ebp - 0x218]
push eax
push esi
call fcn.0040808a
add esp, 0x14
lea eax, [ebp - 0x424]
push eax
push esi
call edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x408ac1
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
jmp 0x408aec
push 0x401848
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp eax, 1
je 0x408adb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov al, cl
pop edi
pop esi
pop ebx
leave
ret