Function at 0x40f1d0
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48b498
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x4c4754]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40f249
mov edx, dword [ebp + 8]
push edx
call fcn.0040f560
add esp, 4
test eax, eax
je 0x40f249
cmp dword [ebp - 0x10], 1
jl 0x40f23f
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + eax*2 - 2]
cmp edx, 0x5c
jne 0x40f23f
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov word [ecx + eax*2 - 2], 0
mov eax, 1
jmp 0x40f3b3
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40f28d
mov ecx, dword [ebp + 8]
movzx edx, word [ecx]
test edx, edx
je 0x40f28d
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 2]
cmp ecx, 0x3a
jne 0x40f28d
mov edx, dword [ebp + 8]
movzx eax, word [edx + 4]
cmp eax, 0x5c
jne 0x40f28d
mov ecx, dword [ebp + 8]
mov word [ecx + 4], 0
jmp 0x40f30a
mov edx, dword [ebp + 8]
movzx eax, word [edx]
cmp eax, 0x5c
jne 0x40f2fb
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 2]
cmp edx, 0x5c
jne 0x40f2fb
mov eax, dword [ebp + 8]
add eax, 2
mov dword [ebp - 0x18], eax
jmp 0x40f2b8
mov ecx, dword [ebp - 0x18]
add ecx, 2
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
movzx eax, word [edx]
test eax, eax
je 0x40f2cf
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx]
cmp edx, 0x5c
je 0x40f2cf
jmp 0x40f2af
jmp 0x40f2da
mov eax, dword [ebp - 0x18]
add eax, 2
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx]
test edx, edx
je 0x40f2f1
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x40f2f1
jmp 0x40f2d1
mov edx, dword [ebp - 0x18]
mov word [edx], 0
jmp 0x40f30a
push 0x49101c
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str._rf
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [ebp - 0x14]
call fcn.0040f3d0
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40f36a
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40f36a
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.0040f500
mov eax, dword [ebp - 0x1c]
jmp 0x40f3b3
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 1
jl 0x40f39a
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
movzx eax, word [edx + ecx*2 - 2]
cmp eax, 0x5c
jne 0x40f39a
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
mov word [edx + ecx*2 - 2], 0
mov dword [ebp - 0x20], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.0040f500
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret