Function at 0x12f81320
Capabilities:
Check if file exists
Copy file
Create directory
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x414
push ebx
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
je 0x12f8167a
mov esi, dword [esp + 0x42c]
cmp esi, ebp
je 0x12f8167a
push ebp
push ebp
push ebp
push ebp
lea ecx, [esp + 0x20]
push ebp
push ecx
push eax
mov dword [esp + 0x2c], ebp
call fcn.13001cd0
mov eax, dword [esp + 0x2c]
add esp, 0x1c
cmp eax, 0xffffffff
je 0x12f8136b
test al, 0x10
je 0x12f81392
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebp
mov dword [0x131c8c28], eax
je 0x12f8168c
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x414
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
xor edi, edi
call ebx
cmp eax, 0xffffffff
je 0x12f813b1
test al, 0x10
jne 0x12f813b1
test al, 1
mov edi, 1
je 0x12f813b1
mov ebp, edi
mov cl, byte [esp + 0x430]
test cl, 1
je 0x12f813d8
test edi, edi
je 0x12f813d8
pop edi
pop esi
pop ebp
mov dword [0x131c8c28], 0x50
xor eax, eax
pop ebx
add esp, 0x414
ret
test cl, 2
je 0x12f813f8
test ebp, ebp
je 0x12f813f8
pop edi
pop esi
pop ebp
mov dword [0x131c8c28], 5
xor eax, eax
pop ebx
add esp, 0x414
ret
cmp eax, 0xffffffff
je 0x12f8146d
test al, 0x10
je 0x12f81443
push 0
push 0x12f847b0
push 0x20
push esi
call fcn.12f83440
add esp, 0x10
push esi
call ebx
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x12f8146d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x131c8c28], eax
je 0x12f8146d
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x12f8146d
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call edi
test eax, eax
jne 0x12f8146d
push esi
call ebx
cmp eax, 0xffffffff
je 0x12f8146d
test al, 0x10
jne 0x12f8146d
test al, 1
je 0x12f8146d
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call edi
mov edx, dword [esp + 0x428]
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0
push esi
push edx
mov dword [0x131c8c28], 0
call ebx
mov ebp, eax
xor edi, edi
cmp ebp, edi
jne 0x12f8162c
test byte [esp + 0x430], 4
jne 0x12f815ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x12f815ec
mov word [esp + 0x14], di
mov ecx, 0x103
xor eax, eax
lea edi, [esp + 0x16]
rep stosd dword es:[edi], eax
push 0x5c
push esi
stosw word es:[edi], ax
call fcn.12f5c8b4
add esp, 8
test eax, eax
je 0x12f814fa
sub eax, esi
sar eax, 1
mov edi, eax
cmp edi, 0x208
jae 0x12f814fa
push edi
lea eax, [esp + 0x18]
push esi
push eax
call fcn.12f5c4ab
add esp, 0xc
mov word [esp + edi*2 + 0x14], 0
lea ecx, [esp + 0x14]
mov edi, 0x57
test ecx, ecx
jne 0x12f81518
mov ebp, dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
mov dword [0x131c8c28], edi
call ebp
jmp 0x12f81553
push 0
push 0
push 0
push 0
lea edx, [esp + 0x20]
push 0
lea eax, [esp + 0x28]
push edx
push eax
mov dword [esp + 0x2c], 0
call fcn.13001cd0
mov eax, dword [esp + 0x2c]
add esp, 0x1c
cmp eax, 0xffffffff
je 0x12f8154d
test al, 0x10
jne 0x12f81616
mov ebp, dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [esp + 0x14]
test ecx, ecx
jne 0x12f81578
push edi
mov dword [0x131c8c28], edi
call ebp
mov ecx, dword [esp + 0x428]
push 0
push esi
push ecx
call ebx
mov ebp, eax
jmp 0x12f81616
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x12f815a7
test al, 0x10
jne 0x12f815db
lea eax, [esp + 0x14]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea edx, [esp + 0x14]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x12f815db
lea eax, [esp + 0x14]
push eax
call fcn.12f829e0
add esp, 4
test eax, eax
jne 0x12f815db
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x131c8c28], eax
je 0x12f815db
push eax
call ebp
mov ecx, dword [esp + 0x428]
push 0
push esi
push ecx
call ebx
mov ebp, eax
jmp 0x12f81616
test byte [esp + 0x430], 8
je 0x12f81616
call fcn.13001fb0
mov eax, dword [0x131ca938]
cmp eax, edi
jne 0x12f81639
mov dword [0x131c8c28], 0x7f
push 0x7f
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x131c8c28], eax
je 0x12f8162c
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x414
ret
mov edx, dword [esp + 0x428]
push edi
push edi
push 0x240
push esi
push edi
push edx
push edi
push edi
call eax
test eax, eax
jne 0x12f81664
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
mov dword [0x131c8c28], eax
je 0x12f81616
push eax
jmp 0x12f81610
mov dword [0x131c8c28], edi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x414
ret
mov edi, 0x57
push edi
mov dword [0x131c8c28], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x414
ret