Function at 0x405c81
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x474
mov eax, dword [0x49c00c]
xor eax, ebp
mov dword [ebp - 4], eax
or dword [ebp - 0x468], 0xffffffff
lea eax, [ebp - 0x460]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
push 0x250
push edi
push eax
mov dword [ebp - 0x464], edi
call fcn.00447480
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x210]
push 0x20a
push edi
and esi, 1
push eax
mov dword [ebp - 0x474], esi
call fcn.00447480
add esp, 0x18
mov dword [ebp - 0x470], edi
mov dword [ebp - 0x46c], edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x405d61
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x405d0b
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x405d14
mov esi, 0x80004005
jmp 0x405d2b
mov eax, 0x80070003
cmp esi, eax
je 0x405d25
cmp esi, 0x80070002
jne 0x405d27
mov esi, edi
test esi, esi
jns 0x405d5a
push esi
push 0xbd
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutildirutil.cpp
push edi
call fcn.00401225
push ebx
push str.Failed_to_get_attributes_for_path:__ls
push esi
push 0xe
push 5
push 0xbd
push edi
call fcn.00401228
add esp, 0x1c
jmp 0x4062b6
mov esi, eax
jmp 0x4062b6
test al, 0x10
je 0x406275
test al, 1
je 0x405dda
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x405dda
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x405d94
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x405d9d
mov esi, 0x80004005
jmp 0x405db4
mov eax, 0x80070003
cmp esi, eax
je 0x405dae
cmp esi, 0x80070002
jne 0x405db0
mov esi, edi
test esi, esi
jns 0x405d5a
push esi
push 0xc8
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutildirutil.cpp
push edi
call fcn.00401225
push ebx
push str.Failed_to_remove_read_only_attribute_from_path:__ls
push esi
push 0xe
push 5
push 0xc8
jmp 0x405d4c
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutildirutil.cpp
test esi, esi
jne 0x405ded
test byte [ebp + 0xc], 2
je 0x40615c
test byte [ebp + 0xc], 4
je 0x405e28
push 0
lea eax, [ebp - 0x470]
push eax
call fcn.00404dd8
mov esi, eax
test esi, esi
jns 0x405e28
push str.Failed_to_get_temp_directory.
push esi
push 0xe
push 5
push 0xd4
push str.d:_awixwix_srclibsdutilwixtoolset.dutildirutil.cpp
call fcn.00401228
add esp, 0x18
jmp 0x4062b6
lea eax, [ebp - 0x464]
push eax
push 0x470444
push ebx
call fcn.00403db5
mov esi, eax
test esi, esi
jns 0x405e5a
push ebx
push str.Failed_to_concat_wild_cards_to_string:__ls
push esi
push 0xe
push 5
push 0xd9
push str.d:_awixwix_srclibsdutilwixtoolset.dutildirutil.cpp
jmp 0x405d4d
lea eax, [ebp - 0x460]
push eax
push dword [ebp - 0x464]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x468], eax
cmp eax, 0xffffffff
jne 0x405ebc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x405e8f
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x405e96
mov esi, 0x80004005
push esi
push 0xde
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutildirutil.cpp
push edi
call fcn.00401225
push ebx
push str.failed_to_get_first_file_in_directory:__ls
push esi
push 0xe
push 5
push 0xde
jmp 0x405d4c
push 0x2e
pop edx
cmp dx, word [ebp - 0x434]
jne 0x405eed
xor ecx, ecx
cmp cx, word [ebp - 0x432]
je 0x4060b7
cmp dx, word [ebp - 0x432]
jne 0x405eed
cmp cx, word [ebp - 0x430]
je 0x4060b7
push 0xa00
push 0
push 0
push 0x104
lea eax, [ebp - 0x434]
push eax
push 0x105
lea eax, [ebp - 0x210]
push eax
call fcn.00402476
mov esi, eax
test esi, esi
js 0x40625b
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x210]
push eax
push ebx
call fcn.00403db5
mov esi, eax
test esi, esi
js 0x406239
test byte [ebp + 0xc], 2
je 0x405fa4
test byte [ebp - 0x460], 0x10
je 0x405fa4
lea eax, [ebp - 0x464]
push eax
call fcn.00403cfd
mov esi, eax
test esi, esi
js 0x4060d8
push dword [ebp + 0xc]
push dword [ebp - 0x464]
call fcn.00405c81
test eax, eax
jns 0x4060b1
cmp eax, 0x80070003
je 0x4060b1
push dword [ebp - 0x464]
push str.Failed_to_delete_subdirectory__continuing:__ls
push eax
push 0xe
push 5
push 0xfb
push edi
call fcn.00401228
add esp, 0x1c
jmp 0x4060b1
cmp dword [ebp - 0x474], 0
je 0x4060b1
test byte [ebp - 0x460], 7
je 0x40600b
push 0x80
push dword [ebp - 0x464]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x40600b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x405fe6
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x4060f2
cmp esi, 0x80070003
je 0x405ffc
cmp esi, 0x80070002
jne 0x405ffe
xor esi, esi
test esi, esi
js 0x4060f7
jmp 0x4060b1
push dword [ebp - 0x464]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4060b1
test byte [ebp + 0xc], 4
je 0x40607a
lea eax, [ebp - 0x46c]
push eax
push 0
push 0x470598
push dword [ebp - 0x470]
call fcn.00404b8a
mov esi, eax
test esi, esi
js 0x40611a
push 1
push dword [ebp - 0x46c]
push dword [ebp - 0x464]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 4
push 0
test eax, eax
je 0x406072
push dword [ebp - 0x46c]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x4060b1
push dword [ebp - 0x464]
jmp 0x40606a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x406091
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x40612e
cmp esi, 0x80070003
je 0x4060a7
cmp esi, 0x80070002
jne 0x4060a9
xor esi, esi
test esi, esi
js 0x406133
mov eax, dword [ebp - 0x468]
lea ecx, [ebp - 0x460]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40614d
mov eax, dword [ebp - 0x468]
jmp 0x405ebc
push dword [ebp - 0x464]
push str.Failed_to_ensure_path_is_backslash_terminated:__ls
push esi
push 0xe
push 5
push 0xf3
jmp 0x40629b
mov esi, 0x80004005
push esi
mov ebx, 0x106
push ebx
push edi
call fcn.00401225
push dword [ebp - 0x464]
push str.Failed_to_remove_attributes_from_file:__ls
push esi
push 0xe
push 5
push ebx
jmp 0x40629b
push str.Failed_to_get_temp_file_to_move_to.
push esi
push 0xe
push 5
push 0x110
jmp 0x40626a
mov esi, 0x80004005
push esi
mov ebx, 0x11f
push ebx
push edi
call fcn.00401225
push dword [ebp - 0x464]
push str.Failed_to_delete_file:__ls
jmp 0x40610f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x4061fd
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4062a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x406182
movzx esi, si
or esi, 0x80070000
cmp esi, 0x80070020
jne 0x4061a1
test byte [ebp + 0xc], 4
je 0x4061d5
push 4
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4061d5
xor esi, esi
mov eax, 0x80070003
cmp esi, eax
je 0x4061f6
cmp esi, 0x80070002
je 0x4061f6
cmp esi, 0x80070091
jne 0x4061cd
cmp dword [ebp - 0x474], 0
jne 0x4061d5
test byte [ebp + 0xc], 2
je 0x4062a4
test esi, esi
jns 0x4062a4
push esi
push 0x144
push edi
call fcn.00401225
push ebx
push str.Failed_to_remove_directory:__ls
push esi
push 0xe
push 5
push 0x144
jmp 0x40629b
mov esi, eax
jmp 0x4062a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x406214
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40621b
mov esi, 0x80004005
push esi
push 0x12c
push edi
call fcn.00401225
push ebx
push str.Failed_while_looping_through_files_in_directory:__ls
push esi
push 0xe
push 5
push 0x12c
jmp 0x40629b
push ebx
lea eax, [ebp - 0x210]
push eax
push str.Failed_to_concat_filename__ls_to_directory:__ls
push esi
push 0xe
push 5
push 0xee
push edi
call fcn.00401228
add esp, 0x20
jmp 0x4062a4
push str.Failed_to_ensure_file_name_was_null_terminated.
push esi
push 0xe
push 5
push 0xeb
push edi
call fcn.00401228
add esp, 0x18
jmp 0x4062a4
mov esi, 0x8000ffff
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutildirutil.cpp
push esi
push 0x149
push edi
call fcn.00401225
push ebx
push str.Directory_delete_cannot_delete_file:__ls
push esi
push 0xe
push 5
push 0x149
push edi
call fcn.00401228
add esp, 0x1c
mov eax, dword [ebp - 0x468]
cmp eax, 0xffffffff
je 0x4062b6
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x464], 0
je 0x4062ca
push dword [ebp - 0x464]
call fcn.0040367f
cmp dword [ebp - 0x470], 0
je 0x4062de
push dword [ebp - 0x470]
call fcn.0040367f
cmp dword [ebp - 0x46c], 0
je 0x4062f2
push dword [ebp - 0x46c]
call fcn.0040367f
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00446806
leave
ret 8