Function at 0x40f100
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41d151
mov eax, dword fs:[0]
push eax
sub esp, 0x8a0
mov eax, dword [0x4263c8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov eax, edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x894], esi
mov dword [ebp - 0x88c], edi
cmp dword [edi + 0x14], 8
jb 0x40f149
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f159
test al, 0x10
jne 0x40f18f
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40f163
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40f18f
push eax
mov dword [esi + 0x10], eax
mov ecx, esi
mov dword [esi + 0x14], 7
push 0x41e698
mov word [esi], ax
call fcn.00409e00
jmp 0x40f54f
xor eax, eax
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x858], 7
mov word [ebp - 0x86c], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x844], eax
mov dword [ebp - 0x840], 7
mov word [ebp - 0x854], ax
mov byte [ebp - 4], 1
mov dword [ebp - 0x870], eax
lea esi, [ebp - 0x12]
mov ecx, eax
test eax, eax
jns 0x40f210
neg ecx
nop dword [eax + eax]
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x40f1e0
add esi, 0xfffffffe
mov eax, 0x2d
mov word [esi], ax
jmp 0x40f230
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x40f210
xor eax, eax
xor ecx, ecx
mov word [ebp - 0x888], ax
mov edx, 7
lea eax, [ebp - 0x12]
mov dword [ebp - 0x878], ecx
mov dword [ebp - 0x874], edx
cmp esi, eax
je 0x40f270
sub eax, esi
lea ecx, [ebp - 0x888]
sar eax, 1
push eax
push esi
call fcn.00409e00
mov edx, dword [ebp - 0x874]
mov ecx, dword [ebp - 0x878]
mov eax, edx
mov byte [ebp - 4], 2
sub eax, ecx
cmp eax, 8
jb 0x40f310
cmp edx, 8
lea edi, [ebp - 0x888]
lea eax, [ecx + 8]
cmovae edi, dword [ebp - 0x888]
add ecx, ecx
mov dword [ebp - 0x878], eax
cmp edi, 0x41e864
jae 0x40f2c6
lea eax, [ecx + edi]
cmp eax, str.Resource
jb 0x40f2c6
cmp edi, str.Resource
ja 0x40f2ba
xor esi, esi
jmp 0x40f2cb
mov esi, edi
sub esi, str.Resource
sar esi, 1
jmp 0x40f2cb
mov esi, 8
lea eax, [ecx + 2]
push eax
lea eax, [edi + 0x10]
push edi
push eax
call sub.VCRUNTIME140.dll_memmove
add esi, esi
push esi
push str.Resource
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, 0x10
sub eax, esi
push eax
lea eax, [esi + 0x41e864]
push eax
lea eax, [esi + edi]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov edi, dword [ebp - 0x88c]
lea eax, [ebp - 0x888]
add esp, 0x24
jmp 0x40f333
push 8
push str.Resource
push 0
mov byte [ebp - 0x890], 0
lea ecx, [ebp - 0x888]
push dword [ebp - 0x890]
push 8
call fcn.0040d6f0
movups xmm0, xmmword [eax]
xor ecx, ecx
movups xmmword [ebp - 0x8ac], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
movq qword [ebp - 0x89c], xmm0
mov word [eax], cx
lea ecx, [ebp - 0x854]
mov byte [ebp - 4], 3
call fcn.00409bc0
movups xmm0, xmmword [ebp - 0x8ac]
inc dword [ebp - 0x870]
movups xmmword [ebp - 0x854], xmm0
movq xmm0, qword [ebp - 0x89c]
movq qword [ebp - 0x844], xmm0
mov edx, dword [ebp - 0x874]
mov byte [ebp - 4], 5
cmp edx, 8
jb 0x40f3d4
mov ecx, dword [ebp - 0x888]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40f3ca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f53f
push edx
push ecx
call fcn.0041ae54
add esp, 8
push 0x800
lea eax, [ebp - 0x83c]
mov byte [ebp - 4], 1
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x854]
cmp dword [ebp - 0x840], 8
mov ecx, edi
cmovae eax, dword [ebp - 0x854]
cmp dword [edi + 0x14], 8
jb 0x40f40c
mov ecx, dword [edi]
push eax
push ecx
lea eax, [ebp - 0x83c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
xor eax, eax
mov dword [ebp - 0x878], 0
lea ecx, [ebp - 0x83c]
mov dword [ebp - 0x874], 7
mov word [ebp - 0x888], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f441
sub ecx, edx
lea eax, [ebp - 0x83c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x888]
call fcn.00409e00
lea ecx, [ebp - 0x86c]
mov byte [ebp - 4], 6
call fcn.00409bc0
movups xmm1, xmmword [ebp - 0x888]
movq xmm0, qword [ebp - 0x878]
movups xmmword [ebp - 0x86c], xmm1
movq qword [ebp - 0x85c], xmm0
cmp dword [ebp - 0x874], 8
lea ecx, [ebp - 0x86c]
movd eax, xmm1
mov byte [ebp - 4], 1
cmovae ecx, eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40f4be
mov eax, dword [ebp - 0x870]
jmp 0x40f1d0
mov esi, dword [ebp - 0x894]
movups xmm0, xmmword [ebp - 0x854]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x844]
movq qword [esi + 0x10], xmm0
xor eax, eax
mov dword [ebp - 0x844], 0
mov dword [ebp - 0x840], 7
mov word [ebp - 0x854], ax
mov edx, dword [ebp - 0x858]
mov dword [ebp - 4], 9
cmp edx, 8
jb 0x40f54f
mov ecx, dword [ebp - 0x86c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40f545
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f545
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0041ae54
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041adc0
mov esp, ebp
pop ebp
ret