Function at 0x40f287
Capabilities:
Create directory
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x42e070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x428], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x424], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp + 0x14]
push esi
push edi
mov dword [ebp - 0x420], eax
lea edi, [ebp - 0x438]
xor eax, eax
mov dword [ebp - 0x418], ecx
stosd dword es:[edi], eax
mov esi, ecx
mov dword [ebp - 0x41c], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x41c]
push eax
or edi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.0040e2c6
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x41c], esi
je 0x40f43b
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x40f332
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f572
lea eax, [ebp - 0x20c]
push eax
xor eax, eax
push eax
push 0x426350
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x40f36a
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f572
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40f393
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f572
lea eax, [ebp - 0x438]
push eax
call fcn.0040f0da
test eax, eax
jne 0x40f3bb
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f572
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40f3f7
push dword [ebp - 0x434]
call dword [sym.imp.KERNEL32.dll_LocalFree]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f572
lea ecx, [ebp - 0x20c]
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40f402
sub ecx, edx
sar ecx, 1
cmp word [ebp + ecx*2 - 0x20e], 0x5c
je 0x40f469
push 0xffffffffffffffff
push 0x425774
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0041675b
add esp, 0x10
mov esi, eax
jmp 0x40f461
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x40f469
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f572
xor edx, edx
mov ebx, edx
cmp edi, 0xffffffff
jne 0x40f532
push dword [ebp - 0x424]
lea eax, [ebp - 0x20c]
push ebx
push dword [ebp - 0x428]
push eax
lea eax, [ebp - 0x418]
push str._s_s_05d._s
push eax
call fcn.0040e3cc
mov esi, eax
add esp, 0x18
test esi, esi
js 0x40f572
xor eax, eax
push eax
push 0x80
push 1
push eax
push 1
push 0x40000000
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40f4f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
cmp esi, 0x80070050
jne 0x40f4ef
xor edx, edx
mov esi, edx
jmp 0x40f523
test esi, esi
js 0x40f572
jmp 0x40f521
push 4
xor eax, eax
push eax
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp dword [ebp - 0x41c], 0
je 0x40f521
push 4
xor eax, eax
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor edx, edx
inc ebx
cmp ebx, 0x3e8
jl 0x40f46d
jmp 0x40f534
xor edx, edx
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x40f540
mov dword [eax], edi
mov ecx, dword [ebp - 0x42c]
test ecx, ecx
je 0x40f55e
mov eax, dword [ebp - 0x418]
mov dword [ecx], eax
mov eax, dword [ebp - 0x420]
mov dword [ebp - 0x418], edx
test esi, esi
js 0x40f566
test eax, eax
jne 0x40f572
cmp edi, 0xffffffff
je 0x40f572
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x418], 0
je 0x40f586
push dword [ebp - 0x418]
call fcn.0040e741
push dword [ebp - 0x434]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004119c3
mov esp, ebp
pop ebp
ret 0x10