Function at 0x590bd460
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 0x590bd6e9
mov ebp, dword [esp + 0x13c]
test ebp, ebp
je 0x590bd6e9
push 0x5c
push esi
call fcn.5907e890
mov edx, eax
add esp, 8
test edx, edx
je 0x590bd6e9
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 0x59171af8
lea eax, [esp + 0x3c]
push 0x103
push eax
call fcn.59120f4b
lea ecx, [esp + 0x44]
add esp, 0x14
xor ebx, ebx
mov ebp, 0x57
test ecx, ecx
jne 0x590bd4ee
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebp
mov dword [0x5919987c], ebp
call edi
xor eax, eax
jmp 0x590bd544
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.59106f30
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x2c]
add esp, 0x1c
test ecx, ecx
je 0x590bd520
mov ebx, eax
cmp eax, 0xffffffff
je 0x590bd53c
test al, 0x10
je 0x590bd53c
mov eax, 1
test al, bl
je 0x590bd53e
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, eax
jmp 0x590bd54a
xor eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
xor ecx, ecx
test eax, eax
je 0x590bd596
mov al, byte [esp + 0x140]
test al, 1
je 0x590bd573
push 0xb7
mov dword [0x5919987c], 0xb7
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x124
ret
test ecx, ecx
je 0x590bd596
test al, 2
je 0x590bd596
push 5
mov dword [0x5919987c], 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 0x590bd5b4
push ebp
mov dword [0x5919987c], 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 0x590bd5e7
test al, 0x10
jne 0x590bd62c
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 0x590bd62c
lea ecx, [esp + 0x30]
push ecx
call fcn.590b9fb0
add esp, 4
test eax, eax
jne 0x590bd62c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x5919987c], eax
je 0x590bd6fb
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 0x590bc350
push 0x10
push esi
mov dword [esp + 0x2c], 1
mov dword [esp + 0x30], esi
call fcn.590ba860
mov ecx, dword [esp + 0x2c]
add esp, 0x10
xor eax, eax
test ecx, ecx
je 0x590bd6fd
push eax
push 0x590bbb50
push 0x20
push esi
call fcn.590ba860
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 0x590bd6dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x5919987c], eax
je 0x590bd6dc
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 [0x5919987c], ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret