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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [ebp + 8], ebx
jne 0x108697e
push 0x10087f8
push 0x2c7
push 0x1008794
call fcn.0107b4be
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10869a8
test byte [eax + 0x1c], 1
je 0x10869a8
cmp byte [eax + 0x19], 4
jb 0x10869a8
push 0x10085b8
push 0x27
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
xor eax, eax
mov dword [ebp - 0x14], ebx
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov edi, 0x80070000
cmp byte [ebp + 0xc], bl
je 0x1086aa9
push ebx
lea eax, [ebp - 8]
push eax
push 1
mov esi, 0x1008638
push esi
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
jne 0x1086a2f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10869ed
and eax, 0xffff
or eax, edi
mov dword [ebp - 4], eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x1086b31
test byte [eax + 0x1c], 1
je 0x1086b31
cmp byte [eax + 0x19], 3
jb 0x1086b31
push dword [ebp - 4]
push esi
push 0x10085b8
push 0x28
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
jmp 0x1086b2c
mov eax, dword [ebp - 8]
push dword [ebp + 8]
and dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], 0xc
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1086b00
test bl, 0x10
je 0x1086aae
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call fcn.010862e5
mov dword [ebp - 4], eax
test eax, eax
jge 0x1086aa9
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x1086aa0
test byte [eax + 0x1c], 1
je 0x1086aa0
cmp byte [eax + 0x19], 3
jb 0x1086aa0
push dword [ebp + 8]
push dword [ebp - 4]
push 0x10085b8
push 0x29
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010194be
mov eax, dword [0x111124c]
and dword [ebp - 4], 0
jmp 0x1086b31
test bl, 0x10
jne 0x1086b00
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1086b00
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1086acc
and eax, 0xffff
or eax, edi
mov ecx, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x1086afc
test byte [eax + 0x1c], 1
je 0x1086afc
cmp byte [eax + 0x19], 3
jb 0x1086afc
push ecx
push dword [ebp + 8]
push 0x10085b8
push 0x2a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
and dword [ebp - 4], 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1086b2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1086b2c
test eax, eax
jle 0x1086b29
and eax, 0xffff
or eax, edi
mov dword [ebp - 4], eax
mov eax, dword [0x111124c]
cmp dword [ebp - 8], 0
pop edi
pop esi
pop ebx
je 0x1086b48
lea eax, [ebp - 0x14]
push eax
call fcn.01084341
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x1086b6d
test byte [eax + 0x1c], 1
je 0x1086b6d
cmp byte [eax + 0x19], 4
jb 0x1086b6d
push 0x10085b8
push 0x2b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
mov eax, dword [ebp - 4]
leave
ret 8