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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57dbbd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push esi
push edi
push ecx
mov edx, ecx
mov ecx, esp
call fcn.00410c40
lea ecx, [ebp - 0x10]
call fcn.0040f6a0
push 1
push 0xa
mov dword [ebp - 4], 0
call fcn.00563978
lea esi, [eax + 8]
mov dword [ebp - 0x14], esi
push 1
push 0xa
call fcn.00563978
add esp, 0x14
lea edi, [eax + 8]
mov dword [ebp - 0x28], edi
push 4
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], 0
call fcn.0040b9a0
mov eax, dword [eax]
mov ecx, 0x5c9a14
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40ff5e
test dx, dx
je 0x40ff5a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40ff5e
add eax, 4
add ecx, 4
test dx, dx
jne 0x40ff38
xor ebx, ebx
jmp 0x40ff63
sbb ebx, ebx
or ebx, 1
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ff82
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor ecx, ecx
mov eax, 4
test ebx, ebx
mov ebx, dword [ebp - 0x10]
cmovne eax, ecx
xor edx, edx
mov dword [ebp - 0x18], eax
mov ecx, eax
mov dword [ebp - 0x20], edx
mov eax, edx
mov dword [ebp - 0x24], eax
test ecx, ecx
js 0x40ffdc
cmp ecx, dword [ebx - 0xc]
jg 0x40ffdc
lea eax, [ebx + ecx*2]
push 0x5c3350
push eax
call fcn.0055a5ce
mov ebx, dword [ebp - 0x10]
add esp, 8
test eax, eax
jne 0x40ffc6
or eax, 0xffffffff
jmp 0x40ffca
sub eax, ebx
sar eax, 1
mov edx, dword [ebp - 0x1c]
lea ecx, [eax + 1]
inc edx
mov dword [ebp - 0x1c], edx
cmp eax, 0xffffffff
jne 0x40ff98
mov eax, dword [ebp - 0x24]
test eax, eax
js 0x4100f8
mov eax, dword [ebp - 0x18]
test eax, eax
js 0x41008d
cmp eax, dword [ebx - 0xc]
jg 0x41008d
lea eax, [ebx + eax*2]
push 0x5c3350
push eax
call fcn.0055a5ce
mov ebx, dword [ebp - 0x10]
add esp, 8
test eax, eax
jne 0x410015
or eax, 0xffffffff
jmp 0x410019
sub eax, ebx
sar eax, 1
lea ecx, [eax + 1]
mov dword [ebp - 0x18], ecx
cmp eax, 0xffffffff
je 0x410092
push ecx
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040b9a0
mov ebx, dword [eax]
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410040
sub ecx, edx
sar ecx, 1
push ecx
lea ecx, [ebp - 0x14]
call fcn.004106a0
mov esi, dword [ebp - 0x14]
mov eax, dword [esi - 8]
lea eax, [eax*2 + 2]
push eax
push ebx
push esi
call fcn.0055acc0
mov edx, dword [ebp - 0x24]
add esp, 0xc
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4100c7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4100c7
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x410097
sub eax, edx
lea ecx, [ebp - 0x14]
sar eax, 1
push eax
call fcn.004106a0
mov esi, dword [ebp - 0x14]
mov eax, dword [esi - 8]
lea eax, [eax*2 + 2]
push eax
push ebx
push esi
call fcn.0055acc0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4100e0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4100ec
sub dword [ebp - 0x20], 1
mov ebx, dword [ebp - 0x10]
jmp 0x40ffde
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x18], 0
jmp 0x4100ff
mov dword [ebp - 0x18], 1
test edi, edi
je 0x410112
add edi, 0xfffffff8
push edi
call fcn.0055de73
mov ebx, dword [ebp - 0x10]
add esp, 4
test esi, esi
je 0x410125
add esi, 0xfffffff8
push esi
call fcn.0055de73
mov ebx, dword [ebp - 0x10]
add esp, 4
add ebx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x41013d
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret