Function at 0x472600
Capabilities:
Create directory
Delete directory
Delete file
Get common file path
Get file attributes
Read file on windows
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x340]
push ebx
lea ebx, [ebp - 0x23c]
sub esp, 0x44c
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 eax, dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
sub esp, 8
mov dword [esp], ebx
mov dword [ebp - 0x438], eax
call eax
mov edi, dword [sym.imp.kernel32.dll_CreateDirectoryA]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], str.winetest_dir1
call edi
sub esp, 8
mov esi, eax
call fcn.0057d110
mov ebx, dword fs:[0x18]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x172f
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
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 edi
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1731
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_create_directory__error__lu_n
call fcn.0045bef0
mov esi, dword [sym.imp.msvcrt.dll_fopen]
mov dword [esp + 4], 0x59be75
mov dword [esp], str.winetest_file1
call esi
mov dword [esp + 8], 0xe
mov dword [esp + 0xc], eax
mov edi, eax
mov dword [esp + 4], 1
mov dword [esp], str.winetest_file1
call sub.msvcrt.dll_fwrite
mov dword [esp], edi
mov edi, dword [sym.imp.msvcrt.dll_fclose]
call edi
mov dword [esp + 4], 0x59be75
mov dword [esp], str.winetest_file2
call esi
mov dword [esp + 8], 0xe
mov dword [esp + 0xc], eax
mov esi, eax
mov dword [esp + 4], 1
mov dword [esp], str.winetest_file2
call sub.msvcrt.dll_fwrite
mov dword [esp], esi
call edi
mov eax, dword [sym.imp.kernel32.dll_CreateHardLinkA]
mov dword [esp], 0x59be96
mov dword [esp + 8], 0
mov dword [esp + 4], str.winetest_file1
mov dword [ebp - 0x430], eax
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0x1736
call fcn.0045b740
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
call fcn.0045bef0
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], 1
mov dword [esp], 0x59be96
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov edi, eax
mov dword [ebp - 0x434], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1739
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x408]
mov dword [esp + 0x10], 9
mov dword [esp + 8], eax
lea eax, [ebp - 0x424]
mov dword [esp + 0xc], 0xc8
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
sub esp, 0x14
mov ebx, eax
mov eax, 0x173c
call fcn.0045b740
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], 0x59bf37
lea ebx, [ebp - 0x404]
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov esi, dword [ebp - 0x408]
mov dword [eax + 4], 0x173d
mov eax, ebx
shr eax, 0x10
je 0x472fb0
shr esi, 1
mov dword [esp], ebx
mov edi, 0x599fac
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x4728c3
mov edx, esi
mov eax, ebx
call fcn.0045b2d0
mov edi, eax
mov ecx, dword [sym.imp.msvcrt.dll_wcslen]
mov dword [esp], str.winetest_file3
mov dword [ebp - 0x43c], ecx
call ecx
mov esi, dword [ebp - 0x408]
mov dword [ebp - 0x42c], eax
mov dword [esp], str.winetest_file3
mov ecx, dword [ebp - 0x43c]
and esi, 0xfffffffe
call ecx
mov edx, dword [ebp - 0x42c]
mov dword [esp + 4], str.winetest_file3
add eax, eax
sub esi, eax
mov dword [esp + 8], edx
add ebx, esi
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_wcsncmp]
mov dword [esp + 8], edi
lea edi, [ebp - 0x41c]
test eax, eax
mov dword [esp + 4], 0x59bf68
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x428]
mov dword [esp + 4], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x14
mov eax, dword [ebp - 0x434]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1742
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
call fcn.0045bef0
mov eax, 0x1743
call fcn.0045b740
mov eax, edi
mov ebx, dword [ebp - 0x428]
shr eax, 0x10
je 0x472f90
mov dword [esp + 4], ebx
mov esi, 0x599fac
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrA]
sub esp, 8
test eax, eax
jne 0x472ab0
cmp ebx, 0xffffffff
je 0x472ff0
mov byte [ebp - 0x138], 0x22
lea ecx, [ebx - 1]
test ebx, ebx
jle 0x472a70
mov dword [ebp - 0x42c], ecx
lea edx, [ebp - 0x137]
mov esi, edi
jmp 0x472a40
cmp al, 9
je 0x472f60
cmp al, 0xa
jne 0x472f1f
movzx eax, word [0x59f142]
add edx, 2
mov word [edx - 2], ax
nop
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x42c]
sub eax, 1
test ecx, ecx
jle 0x472a80
lea ecx, [ebp - 0x15]
cmp ecx, edx
jb 0x472a80
mov dword [ebp - 0x42c], eax
movzx eax, byte [esi]
add esi, 1
cmp al, 0xd
je 0x472f00
jle 0x472a00
cmp al, 0x22
je 0x472f78
cmp al, 0x5c
jne 0x472f13
movzx eax, word [0x59f14a]
add edx, 2
mov word [edx - 2], ax
jmp 0x472a20
mov eax, ecx
lea edx, [ebp - 0x137]
lea esi, [esi]
nop
mov byte [edx], 0x22
test eax, eax
jle 0x472fe0
movzx eax, word [0x59f14c]
mov byte [edx + 3], 0x2e
mov word [edx + 1], ax
lea eax, [edx + 4]
mov byte [eax], 0
lea eax, [ebp - 0x138]
mov dword [esp], eax
call fcn.0057e390
mov esi, eax
mov eax, dword [ebp - 0x428]
mov dword [esp], edi
mov dword [esp + 4], str.winetest_file1
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcmp
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.got_file_contents__s_n
sete al
movzx eax, al
mov dword [esp], eax
mov esi, dword fs:[0x18]
call fcn.0045bef0
mov eax, dword [ebp - 0x434]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ebx, dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov dword [esp], 0x59be96
call ebx
sub esp, 4
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1748
mov eax, dword [esi + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_delete_file__error__lu_n
call fcn.0045bef0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], str.winetest_file1
mov dword [esp], str.winetest_file2
mov eax, dword [ebp - 0x430]
call eax
sub esp, 0xc
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x174c
xor eax, eax
test edi, edi
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], 0x174d
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0xb7
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], str.winetest_file1
mov dword [esp], str.WineTest_File1
mov eax, dword [ebp - 0x430]
call eax
sub esp, 0xc
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1751
xor eax, eax
test edi, edi
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], 0x1752
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0xb7
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], str.winetest_dir1
mov dword [esp], 0x59be96
mov eax, dword [ebp - 0x430]
call eax
sub esp, 0xc
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1756
xor eax, eax
test edi, edi
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], 0x1757
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 5
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], str.winetest_dir1
mov dword [esp], str.winetest_dir2
mov eax, dword [ebp - 0x430]
call eax
sub esp, 0xc
mov edi, eax
mov eax, 0x175b
call fcn.0045b740
xor eax, eax
test edi, edi
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], 0x175c
mov edx, dword [esi + 0x34]
mov eax, 1
cmp edx, 5
je 0x472d4a
xor eax, eax
cmp edx, 0xb7
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], 0x5995e7
mov esi, dword fs:[0x18]
call fcn.0045bef0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], str.winetest_file1
mov dword [esp], str.winetest_dir1
mov eax, dword [ebp - 0x430]
call eax
sub esp, 0xc
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1761
xor eax, eax
test edi, edi
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], 0x1762
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x5995e7
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0xb7
sete al
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [sym.imp.kernel32.dll_RemoveDirectoryA]
mov dword [esp], str.winetest_dir1
mov dword [ebp - 0x42c], edx
call edx
sub esp, 4
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1765
mov eax, dword [esi + 0x34]
mov dword [esp], edi
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_dir2
mov edx, dword [ebp - 0x42c]
call edx
sub esp, 4
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1767
mov eax, dword [esi + 0x34]
mov dword [esp], edi
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 ebx
sub esp, 4
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1769
mov eax, dword [esi + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_delete_file__error__lu_n
call fcn.0045bef0
mov dword [esp], str.winetest_file2
call ebx
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x176b
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_delete_file__error__lu_n
call fcn.0045bef0
lea eax, [ebp - 0x340]
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
call eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, word [0x59f144]
add edx, 2
mov word [edx - 2], ax
jmp 0x472a20
lea ebx, [eax - 0x20]
cmp bl, 0x5e
jbe 0x472fd0
movzx ebx, word [0x59f150]
movzx ecx, word [0x59f13c]
add edx, 4
mov word [edx - 4], bx
mov ebx, eax
and eax, 0xf
shr bl, 4
movzx ebx, bl
mov cl, byte [ebx + 0x59dacc]
mov ebx, ecx
mov bh, byte [eax + 0x59dacc]
mov word [edx - 2], bx
jmp 0x472a20
movzx eax, word [0x59f146]
add edx, 2
mov word [edx - 2], ax
jmp 0x472a20
movzx eax, word [0x59f148]
add edx, 2
mov word [edx - 2], ax
jmp 0x472a20
movzx eax, di
mov dword [esp], 0x597e04
mov dword [esp + 4], eax
call fcn.0045b760
mov esi, eax
jmp 0x472ab0
movzx eax, bx
mov dword [esp], 0x597e04
mov dword [esp + 4], eax
call fcn.0045b760
mov edi, eax
jmp 0x4728c3
mov byte [edx], al
add edx, 1
jmp 0x472a20
lea eax, [edx + 1]
jmp 0x472a9d
cmp byte [ebp - 0x41c], 0
je 0x473018
lea esi, [esi]
mov ecx, eax
lea eax, [eax + 1]
cmp byte [edi + ecx + 1], 0
jne 0x473000
mov byte [ebp - 0x138], 0x22
jmp 0x4729ed
movzx eax, word [0x59f14e]
mov word [ebp - 0x138], ax
lea eax, [ebp - 0x136]
jmp 0x472a9d