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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454735
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x46c018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov edx, edi
mov dword [ebp - 0x28], 0
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea ecx, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40f5c0
sub edx, ecx
lea ecx, [ebp - 0x28]
sar edx, 1
push edx
push edi
call fcn.004029b0
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f670
test al, 0x10
je 0x40f65c
test al, 2
je 0x40f61a
push 0x90
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x40f61a
push str.CreateDeepDirectory__failed_to_SetFileAttributes.
push 0x46cca0
call fcn.00415520
add esp, 8
mov esi, 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40f7e1
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40f7d7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f7ff
jmp 0x40f7d7
mov edx, 1
mov ecx, edi
call fcn.0040f8b0
test eax, eax
jne 0x40f670
xor esi, esi
jmp 0x40f61f
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40f61a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40f61a
cmp dword [ebp - 0x14], 8
lea esi, [ebp - 0x28]
cmovae esi, dword [ebp - 0x28]
call fcn.00402c30
mov ecx, eax
test ecx, ecx
je 0x40f804
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
push esi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0040e500
test al, al
jne 0x40f6e9
test esi, esi
jne 0x40f6c8
xor ecx, ecx
jmp 0x40f6df
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f6d0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.0040e740
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x2c]
push 0x5c
push esi
call fcn.0042e970
add esp, 8
or ebx, 0xffffffff
test eax, eax
je 0x40f744
sub eax, esi
sar eax, 1
cmp eax, ebx
je 0x40f744
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040e170
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.0040e2f0
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f74c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40f74c
lea ecx, [ebp - 0x2c]
call fcn.0040f100
mov esi, dword [ebp - 0x2c]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f754
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.004029b0
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40f786
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x18], 0
jne 0x40f793
xor esi, esi
jmp 0x40f61f
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
call fcn.0040f570
test eax, eax
jne 0x40f7ae
xor esi, esi
jmp 0x40f61f
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40f61a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40f61a
xor esi, esi
jmp 0x40f61f
push edx
push ecx
call fcn.0042cd10
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042cd02
mov esp, ebp
pop ebp
ret
call fcn.0043182f
push 0x80004005
call fcn.0040f2e0
int3