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

Disassembly:
sub esp, 0x124
push ebx
push ebp
push esi
mov esi, dword [esp + 0x134]
test esi, esi
push edi
je 0x590c2799
mov ebp, dword [esp + 0x13c]
test ebp, ebp
je 0x590c2799
push 0x5c
push esi
call fcn.59083600
mov edx, eax
add esp, 8
test edx, edx
je 0x590c2799
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
inc edx
push edx
push ebp
stosb byte es:[edi], al
push 0x59178af8
lea eax, [esp + 0x3c]
push 0x103
push eax
call fcn.59125ffb
lea ecx, [esp + 0x44]
add esp, 0x14
xor ebx, ebx
mov ebp, 0x57
test ecx, ecx
jne 0x590c259e
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebp
mov dword [0x591a1b30], ebp
call edi
xor eax, eax
jmp 0x590c25f4
push 0
push 0
push 0
push 0
lea edx, [esp + 0x20]
push 0
lea eax, [esp + 0x44]
push edx
push eax
mov dword [esp + 0x2c], 0
call fcn.5910bfe0
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x2c]
add esp, 0x1c
test ecx, ecx
je 0x590c25d0
mov ebx, eax
cmp eax, 0xffffffff
je 0x590c25ec
test al, 0x10
je 0x590c25ec
mov eax, 1
test al, bl
je 0x590c25ee
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, eax
jmp 0x590c25fa
xor eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
xor ecx, ecx
test eax, eax
je 0x590c2646
mov al, byte [esp + 0x140]
test al, 1
je 0x590c2623
push 0xb7
mov dword [0x591a1b30], 0xb7
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x124
ret
test ecx, ecx
je 0x590c2646
test al, 2
je 0x590c2646
push 5
mov dword [0x591a1b30], 5
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x124
ret
lea edx, [esp + 0x30]
test edx, edx
jne 0x590c2664
push ebp
mov dword [0x591a1b30], ebp
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x124
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [esp + 0x30]
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp eax, 0xffffffff
je 0x590c2697
test al, 0x10
jne 0x590c26dc
lea ecx, [esp + 0x30]
push 0x80
push ecx
call ebp
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x30]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x590c26dc
lea ecx, [esp + 0x30]
push ecx
call fcn.590bf000
add esp, 4
test eax, eax
jne 0x590c26dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x591a1b30], eax
je 0x590c27ab
push eax
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x124
ret
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x18]
mov edx, dword [esp + 0x140]
rep stosd dword es:[edi], eax
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x30]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x14], 3
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x14]
push ecx
push 0x590c1400
push 0x10
push esi
mov dword [esp + 0x2c], 1
mov dword [esp + 0x30], esi
call fcn.590bf8b0
mov ecx, dword [esp + 0x2c]
add esp, 0x10
xor eax, eax
test ecx, ecx
je 0x590c27ad
push eax
push 0x590c0c00
push 0x20
push esi
call fcn.590bf8b0
add esp, 0x10
push esi
call ebx
and al, 0xfe
push eax
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov esi, eax
test esi, esi
jne 0x590c278c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x591a1b30], eax
je 0x590c278c
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret
mov ebp, 0x57
push ebp
mov dword [0x591a1b30], ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret