Function at 0x4b3170
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x48], ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x4b31b5
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4b31b5
push 0x80
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4b33b1
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
push 0
push 0
push 3
push 0
push 1
push SysReAllocStringLen
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x4b32dd
push 0
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 0x1c]
add edx, 1
push edx
call fcn.004feb13
add esp, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x4b32d3
mov dword [ebp - 0x24], 0
push 0
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4b32c1
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x1c]
jne 0x4b32c1
push 0x53f5a4
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x48]
call fcn.004b3880
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4b32c1
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0x10]
jne 0x4b32c1
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00501b2b
add esp, 0xc
test eax, eax
jne 0x4b32c1
mov dword [ebp - 0x14], 1
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.005002ea
add esp, 4
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], 0
jne 0x4b33a5
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4b330e
push 0x80
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0xc], 0
je 0x4b331a
cmp dword [ebp - 0x10], 0
ja 0x4b3339
mov dword [ebp - 0x10], 0
push 0x53f5ac
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x48]
call fcn.004b3880
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4b33a3
cmp dword [ebp - 0x10], 0
jbe 0x4b33a3
push 0
push 0
push 2
push 0
push 1
push 0x40000000
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
je 0x4b33a3
mov dword [ebp - 0x2c], 0
push 0
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b3399
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x10]
jne 0x4b3399
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4b33ac
mov dword [ebp - 4], 1
jmp 0x4b347b
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4b33f2
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4b33e6
push 0x80
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x34], 0
push 0x53f5b4
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x48]
call fcn.004b3880
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4b347b
cmp dword [ebp - 0x34], 0
jbe 0x4b347b
push 0
push 0
push 2
push 0
push 1
push 0x40000000
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0xffffffff
je 0x4b347b
mov dword [ebp - 0x3c], 0
push 0
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b3471
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x34]
jne 0x4b3471
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 0xc