Function at 0x471cc0
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get file attributes
Move file
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x214]
push ebx
lea ebx, [ebp - 0x110]
mov edi, dword fs:[0x18]
sub esp, 0x234
mov dword [esp + 4], eax
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
sub esp, 8
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
mov ecx, dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
sub esp, 8
mov dword [esp], ebx
mov dword [ebp - 0x224], ecx
call ecx
mov esi, dword [sym.imp.kernel32.dll_CreateDirectoryA]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], str.winetest_dir1
call esi
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x177a
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_create_directory__error__lu_n
call fcn.0045bef0
mov dword [esp + 4], 0
mov dword [esp], str.winetest_dir2
call esi
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x177c
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_create_directory__error__lu_n
call fcn.0045bef0
mov ebx, dword [sym.imp.msvcrt.dll_fopen]
mov dword [esp + 4], 0x59be75
mov dword [esp], str.winetest_file1
call ebx
mov dword [esp + 8], 0xe
mov dword [esp + 0xc], eax
mov esi, eax
mov dword [esp + 4], 1
mov dword [esp], str.winetest_file1
call sub.msvcrt.dll_fwrite
mov dword [esp], esi
mov esi, dword [sym.imp.msvcrt.dll_fclose]
call esi
mov dword [esp + 4], 0x59be75
mov dword [esp], str.winetest_file2
call ebx
mov dword [esp + 8], 0xe
mov dword [esp + 0xc], eax
mov ebx, eax
mov dword [esp + 4], 1
mov dword [esp], str.winetest_file2
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
call esi
mov ebx, dword [sym.imp.kernel32.dll_MoveFileA]
mov dword [esp], str.winetest_file1
mov dword [esp + 4], 0x59be96
call ebx
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1781
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_move_file__error__lu_n
call fcn.0045bef0
mov eax, dword [sym.imp.kernel32.dll_GetFileAttributesA]
mov dword [esp], str.winetest_file1
mov dword [ebp - 0x218], eax
call eax
sub esp, 4
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1783
xor eax, eax
cmp esi, 0xffffffff
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x59bec8
call fcn.0045bef0
mov dword [esp], 0x59be96
mov eax, dword [ebp - 0x218]
call eax
sub esp, 4
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1785
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp + 8], esi
mov dword [esp + 4], 0x59bec8
mov dword [esp], eax
call fcn.0045bef0
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 4], str.winetest_file2
mov dword [esp], 0x59be96
call ebx
sub esp, 8
mov esi, eax
mov eax, 0x1789
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], 0x59b2f2
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x178a
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0xb7
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 4], str.winetest_file4
mov dword [esp], str.winetest_file1
call ebx
sub esp, 8
mov esi, eax
mov eax, 0x178e
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], 0x59b2f2
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x178f
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 2
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 4], str.winetest_dir3
mov dword [esp], str.winetest_dir1
call ebx
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1792
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_move_file__error__lu_n
call fcn.0045bef0
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 4], str.winetest_dir2
mov dword [esp], str.winetest_dir3
call ebx
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1796
xor eax, eax
test esi, esi
sete al
mov dword [esp + 4], 0x59b2f2
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1797
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0xb7
sete al
mov dword [esp], eax
call fcn.0045bef0
mov ecx, dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x10000
mov dword [esp], 0x59be96
mov dword [ebp - 0x21c], ecx
call ecx
sub esp, 0x1c
mov esi, eax
mov eax, 0x179a
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x59bef0
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 4], str.winetest_file1
mov dword [esp], 0x59be96
call ebx
sub esp, 8
mov dword [ebp - 0x220], eax
mov eax, 0x179c
call fcn.0045b740
mov dword [esp + 4], 0x59b2f2
xor eax, eax
mov edx, dword [ebp - 0x220]
test edx, edx
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x179d
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0x20
sete al
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], esi
mov dword [ebp - 0x220], edx
call edx
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x59be96
mov ecx, dword [ebp - 0x21c]
call ecx
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17a1
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x59bef0
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 4], str.winetest_file1
mov dword [esp], 0x59be96
call ebx
sub esp, 8
mov ebx, eax
mov eax, 0x17a3
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.failed_to_move_file__error__lu_n
mov dword [esp + 8], eax
call fcn.0045bef0
mov dword [esp], str.winetest_file1
mov eax, dword [ebp - 0x218]
call eax
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17a5
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x59bec8
call fcn.0045bef0
mov dword [esp], 0x59be96
mov eax, dword [ebp - 0x218]
call eax
sub esp, 4
mov ebx, eax
mov eax, 0x17a7
call fcn.0045b740
xor eax, eax
cmp ebx, 0xffffffff
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], 0x59bec8
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], esi
mov edx, dword [ebp - 0x220]
call edx
mov ebx, dword [sym.imp.kernel32.dll_MoveFileExA]
sub esp, 4
mov dword [esp + 8], 1
mov dword [esp + 4], str.winetest_file2
mov dword [esp], str.winetest_file1
call ebx
sub esp, 0xc
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17ab
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_move_file__error__lu_n
call fcn.0045bef0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 7
mov dword [esp + 4], 0x10000000
mov dword [esp], str.winetest_file1
mov ecx, dword [ebp - 0x21c]
call ecx
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17af
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x59bef0
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], 1
mov dword [esp + 4], str.winetest_file1
mov dword [esp], str.winetest_file2
call ebx
sub esp, 0xc
mov dword [ebp - 0x218], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17b2
xor eax, eax
mov dword [esp + 4], 0x59b2f2
mov edx, dword [ebp - 0x218]
test edx, edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x17b3
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 5
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], esi
mov edx, dword [ebp - 0x220]
call edx
mov dword [edi + 0x34], 0xdeadbeef
sub esp, 4
mov dword [esp + 8], 1
mov dword [esp + 4], str.winetest_dir2
mov dword [esp], str.winetest_file2
call ebx
sub esp, 0xc
mov esi, eax
mov eax, 0x17b8
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], 0x59b2f2
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17b9
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 5
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], 1
mov dword [esp + 4], str.winetest_dir2
mov dword [esp], str.winetest_dir3
call ebx
sub esp, 0xc
mov esi, eax
mov eax, 0x17bd
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], 0x59b2f2
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17be
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 5
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 8], 1
mov dword [esp + 4], str.winetest_file2
mov dword [esp], str.winetest_dir2
call ebx
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17c1
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_move_file__error__lu_n
call fcn.0045bef0
mov esi, dword [sym.imp.kernel32.dll_RemoveDirectoryA]
mov dword [esp], str.winetest_dir3
call esi
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17c4
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_remove_directory__error__lu_n
call fcn.0045bef0
mov dword [esp], str.winetest_file2
call esi
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x17c6
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_remove_directory__error__lu_n
call fcn.0045bef0
mov dword [esp], str.winetest_file1
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov ebx, eax
mov eax, 0x17c8
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.failed_to_delete_file__error__lu_n
mov dword [esp + 8], eax
call fcn.0045bef0
lea eax, [ebp - 0x214]
mov dword [esp], eax
mov ecx, dword [ebp - 0x224]
call ecx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret