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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41d491
mov eax, dword fs:[0]
push eax
sub esp, 0x898
mov eax, dword [0x4263d0]
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 - 0x88c], esi
mov dword [ebp - 0x870], esi
cmp dword [edi + 0x14], 8
jb 0x40fc79
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40fc89
test al, 0x10
jne 0x40fcbf
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40fc93
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40fcbf
push eax
mov dword [esi + 0x10], eax
mov ecx, esi
mov dword [esi + 0x14], 7
push 0x41e948
mov word [esi], ax
call fcn.00409fa0
jmp 0x41001c
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 0x40fd40
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 0x40fd10
add esi, 0xfffffffe
mov eax, 0x2d
mov word [esi], ax
jmp 0x40fd60
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 0x40fd40
xor eax, eax
mov dword [ebp - 0x878], 0
mov word [ebp - 0x888], ax
lea eax, [ebp - 0x12]
mov dword [ebp - 0x874], 7
cmp esi, eax
je 0x40fd95
sub eax, esi
lea ecx, [ebp - 0x888]
sar eax, 1
push eax
push esi
call fcn.00409fa0
push 8
push 0x41eb7c
push 0
lea ecx, [ebp - 0x888]
mov byte [ebp - 4], 2
call fcn.00410d90
xor ecx, ecx
movups xmm0, xmmword [eax]
movq xmm1, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edx, dword [ebp - 0x840]
movq qword [ebp - 0x894], xmm1
movups xmmword [ebp - 0x8a4], xmm0
cmp edx, 8
jb 0x40fe2a
mov ecx, dword [ebp - 0x854]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 3
cmp edx, 0x1000
jb 0x40fe11
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ffa9
push edx
push ecx
call fcn.0041b3bf
movups xmm0, xmmword [ebp - 0x8a4]
add esp, 8
movq xmm1, qword [ebp - 0x894]
mov edx, dword [ebp - 0x874]
movq qword [ebp - 0x844], xmm1
mov byte [ebp - 4], 1
movups xmmword [ebp - 0x854], xmm0
cmp edx, 8
jb 0x40fe85
mov ecx, dword [ebp - 0x888]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 5
cmp edx, 0x1000
jb 0x40fe77
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ffa9
push edx
push ecx
call fcn.0041b3bf
add esp, 8
mov byte [ebp - 4], 1
push 0x800
lea eax, [ebp - 0x83c]
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 0x40feb9
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]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40fef0
sub ecx, edx
lea eax, [ebp - 0x83c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x888]
call fcn.00409fa0
mov edx, dword [ebp - 0x858]
cmp edx, 8
jb 0x40ff56
mov ecx, dword [ebp - 0x86c]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 6
cmp edx, 0x1000
jb 0x40ff48
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ffa9
push edx
push ecx
call fcn.0041b3bf
add esp, 8
mov byte [ebp - 4], 1
movups xmm1, xmmword [ebp - 0x888]
movzx eax, byte [ebp + 0x10]
lea ecx, [ebp - 0x86c]
movq xmm0, qword [ebp - 0x878]
inc eax
add dword [ebp - 0x870], eax
cmp dword [ebp - 0x874], 8
movd eax, xmm1
movups xmmword [ebp - 0x86c], xmm1
cmovae ecx, eax
movq qword [ebp - 0x85c], xmm0
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ffaf
mov eax, dword [ebp - 0x870]
jmp 0x40fd00
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov esi, dword [ebp - 0x88c]
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 eax, dword [ebp - 0x858]
mov dword [ebp - 4], 9
cmp eax, 8
jb 0x41001c
inc eax
lea ecx, [ebp - 0x86c]
push eax
push dword [ebp - 0x86c]
call fcn.0040a160
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.0041b330
mov esp, ebp
pop ebp
ret