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

Disassembly:
sub esp, 0x228
push ebx
push ebp
push esi
mov esi, dword [esp + 0x238]
test esi, esi
push edi
je 0x590cbff9
mov ebp, dword [esp + 0x240]
test ebp, ebp
je 0x590cbff9
push 0x5c
push esi
call fcn.5908bb00
mov edx, eax
add esp, 8
test edx, edx
je 0x590cbff9
mov ecx, 0x81
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 0x591878fc
lea eax, [esp + 0x3c]
push 0x207
push eax
call fcn.5908986e
lea ecx, [esp + 0x44]
add esp, 0x14
xor ebx, ebx
mov ebp, 0x57
test ecx, ecx
jne 0x590cbdfe
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebp
mov dword [0x591b30f0], ebp
call edi
xor eax, eax
jmp 0x590cbe54
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.59118c10
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x2c]
add esp, 0x1c
test ecx, ecx
je 0x590cbe30
mov ebx, eax
cmp eax, 0xffffffff
je 0x590cbe4c
test al, 0x10
je 0x590cbe4c
mov eax, 1
test al, bl
je 0x590cbe4e
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, eax
jmp 0x590cbe5a
xor eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
xor ecx, ecx
test eax, eax
je 0x590cbea6
mov al, byte [esp + 0x244]
test al, 1
je 0x590cbe83
push 0xb7
mov dword [0x591b30f0], 0xb7
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x228
ret
test ecx, ecx
je 0x590cbea6
test al, 2
je 0x590cbea6
push 5
mov dword [0x591b30f0], 5
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x228
ret
lea edx, [esp + 0x30]
test edx, edx
jne 0x590cbec4
push ebp
mov dword [0x591b30f0], ebp
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x228
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 0x590cbef7
test al, 0x10
jne 0x590cbf3c
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 0x590cbf3c
lea ecx, [esp + 0x30]
push ecx
call fcn.590c80e0
add esp, 4
test eax, eax
jne 0x590cbf3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x591b30f0], eax
je 0x590cc00b
push eax
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x228
ret
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x18]
mov edx, dword [esp + 0x244]
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 0x590cac60
push 0x10
push esi
mov dword [esp + 0x2c], 1
mov dword [esp + 0x30], esi
call fcn.590c8990
mov ecx, dword [esp + 0x2c]
add esp, 0x10
xor eax, eax
test ecx, ecx
je 0x590cc00d
push eax
push 0x590c9f70
push 0x20
push esi
call fcn.590c8990
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 0x590cbfec
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x591b30f0], eax
je 0x590cbfec
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret
mov ebp, 0x57
push ebp
mov dword [0x591b30f0], ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret