Function at 0x40dfc0
Capabilities:
Check if file exists
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x5425a8
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x599980]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00409bd0
add eax, 0x10
add esp, 4
mov dword [esp + 0x2c], eax
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x28], 0
call fcn.0040ea30
mov ecx, dword [esp + 0x2c]
mov edi, dword [ecx - 0xc]
lea eax, [edi - 1]
test eax, eax
jl 0x40e09b
cmp eax, edi
jg 0x40e09b
movzx eax, word [ecx + eax*2]
cmp ax, 0x2f
je 0x40e06b
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
lea esi, [edi + 1]
sub eax, esi
or eax, edx
jge 0x40e050
push esi
lea ecx, [esp + 0x30]
call fcn.0040a180
mov ecx, dword [esp + 0x2c]
mov edx, 0x2f
mov word [ecx + edi*2], dx
test esi, esi
jl 0x40e09b
cmp esi, dword [ecx - 8]
jg 0x40e09b
xor eax, eax
mov dword [ecx - 0xc], esi
mov word [ecx + esi*2], ax
push 0x575fd8
push 0x575fdc
lea ecx, [esp + 0x34]
call fcn.0040ead0
or ebx, 0xffffffff
call fcn.00414031
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e0a5
push 0x80004005
call fcn.0040a200
push 0x80070057
call fcn.0040a200
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov byte [esp + 0x24], 1
lea ebx, [ebx]
mov ebp, dword [esp + 0x2c]
mov ecx, dword [ebp - 0xc]
lea edx, [ecx - 1]
cmp ebx, edx
jge 0x40e1ee
lea eax, [ebx + 1]
test eax, eax
jl 0x40e24c
cmp eax, ecx
jge 0x40e24c
lea eax, [ebp + eax*2]
push 0x2f
push eax
call fcn.0051483f
add esp, 8
test eax, eax
je 0x40e24c
sub eax, ebp
sar eax, 1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e24c
push ebx
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x34]
call fcn.0040ef10
mov byte [esp + 0x24], 2
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x40e17a
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40e168
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40e168
push eax
call fcn.00409bd0
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40e15b
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea edi, [ebp + 0x10]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x14], edi
jmp 0x40e17a
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040a250
mov edi, dword [esp + 0x14]
mov byte [esp + 0x24], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e19f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40e1b2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, ebp
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40e1dc
test dx, dx
je 0x40e1d8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40e1dc
add eax, 4
add ecx, 4
test dx, dx
jne 0x40e1b6
xor eax, eax
jmp 0x40e1e1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
jne 0x40e0c0
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x24], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e20f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x24], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e233
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
lea eax, [edi - 0x10]
mov byte [esp + 0x24], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e26d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x24], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e291
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret