Function at 0x1029cea
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 0x1029d10
push 0x10046e0
push 0x2c7
push 0x100467c
call fcn.01028938
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1029d3a
test byte [eax + 0x1c], 1
je 0x1029d3a
cmp byte [eax + 0x19], 4
jb 0x1029d3a
push 0x1004460
push 0x27
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01005393
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 0x1029e3b
push ebx
lea eax, [ebp - 8]
push eax
push 1
mov esi, 0x10044e0
push esi
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
jne 0x1029dc1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1029d7f
and eax, 0xffff
or eax, edi
mov dword [ebp - 4], eax
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1029ec3
test byte [eax + 0x1c], 1
je 0x1029ec3
cmp byte [eax + 0x19], 3
jb 0x1029ec3
push dword [ebp - 4]
push esi
push 0x1004460
push 0x28
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01007e21
jmp 0x1029ebe
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 0x1029e92
test bl, 0x10
je 0x1029e40
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call fcn.01029487
mov dword [ebp - 4], eax
test eax, eax
jge 0x1029e3b
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1029e32
test byte [eax + 0x1c], 1
je 0x1029e32
cmp byte [eax + 0x19], 3
jb 0x1029e32
push dword [ebp + 8]
push dword [ebp - 4]
push 0x1004460
push 0x29
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010053e5
mov eax, dword [0x1032370]
and dword [ebp - 4], 0
jmp 0x1029ec3
test bl, 0x10
jne 0x1029e92
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1029e92
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1029e5e
and eax, 0xffff
or eax, edi
mov ecx, eax
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1029e8e
test byte [eax + 0x1c], 1
je 0x1029e8e
cmp byte [eax + 0x19], 3
jb 0x1029e8e
push ecx
push dword [ebp + 8]
push 0x1004460
push 0x2a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01007e21
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 0x1029ebe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1029ebe
test eax, eax
jle 0x1029ebb
and eax, 0xffff
or eax, edi
mov dword [ebp - 4], eax
mov eax, dword [0x1032370]
cmp dword [ebp - 8], 0
pop edi
pop esi
pop ebx
je 0x1029eda
lea eax, [ebp - 0x14]
push eax
call fcn.0102c111
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1029eff
test byte [eax + 0x1c], 1
je 0x1029eff
cmp byte [eax + 0x19], 4
jb 0x1029eff
push 0x1004460
push 0x2b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01005393
mov eax, dword [ebp - 4]
leave
ret 8