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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x67c
mov eax, dword [0x46a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
or dword [ebp - 0x66c], 0xffffffff
and eax, 1
mov dword [ebp - 0x678], eax
mov eax, dword [ebp + 0xc]
shr eax, 1
and eax, 1
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x674], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
shr eax, 2
mov edi, 0x208
and eax, 1
mov dword [ebp - 0x670], ebx
xor esi, esi
mov dword [ebp - 0x67c], eax
and dword [ebp - 0x668], esi
lea eax, [ebp - 0x414]
push edi
push esi
push eax
call fcn.0042f8e0
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0042f8e0
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403d85
call edi
mov esi, eax
cmp esi, 2
jne 0x403d5f
push 3
pop esi
test esi, esi
jle 0x403d6e
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x403d85
push esi
push 0xc8
push str.dirutil.cpp
call fcn.00403821
jmp 0x4040ec
test bl, 0x10
je 0x4040d5
test bl, 1
je 0x403dca
push 0x80
push dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x403dca
call edi
mov esi, eax
test esi, esi
jle 0x403dbb
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403dc2
mov esi, 0x80004005
push esi
push 0xd1
jmp 0x403d76
cmp dword [ebp - 0x678], 0
jne 0x403de0
cmp dword [ebp - 0x674], 0
je 0x404058
mov ebx, dword [ebp - 0x67c]
test ebx, ebx
je 0x403e25
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x403e25
call edi
mov esi, eax
test esi, esi
jle 0x403e13
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403e1a
mov esi, 0x80004005
push esi
push 0xdc
jmp 0x403d76
lea eax, [ebp - 0x668]
push eax
push 0x44b840
push dword [ebp - 0x670]
call fcn.00402d58
mov esi, eax
test esi, esi
js 0x4040ec
lea eax, [ebp - 0x664]
push eax
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x66c], eax
cmp eax, 0xffffffff
jne 0x403e89
call edi
mov esi, eax
test esi, esi
jle 0x403e77
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403e7e
mov esi, 0x80004005
push esi
push 0xe7
jmp 0x403d76
push 0x2e
pop edx
cmp dx, word [ebp - 0x638]
jne 0x403eba
xor ecx, ecx
cmp cx, word [ebp - 0x636]
je 0x403fbd
cmp dx, word [ebp - 0x636]
jne 0x403eba
cmp cx, word [ebp - 0x634]
je 0x403fbd
xor eax, eax
mov word [ebp - 0x432], ax
lea eax, [ebp - 0x668]
push eax
lea eax, [ebp - 0x638]
push eax
push dword [ebp - 0x670]
call fcn.00402d58
mov esi, eax
test esi, esi
js 0x4040da
cmp dword [ebp - 0x674], 0
mov al, byte [ebp - 0x664]
je 0x403f22
test al, 0x10
je 0x403f22
lea eax, [ebp - 0x668]
push eax
call fcn.00402b0c
mov esi, eax
test esi, esi
js 0x4040da
push dword [ebp + 0xc]
push dword [ebp - 0x668]
call fcn.00403cc4
jmp 0x403fb7
cmp dword [ebp - 0x678], 0
je 0x403fb7
test al, 7
je 0x403f4c
push 0x80
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x403fda
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x403fb7
test ebx, ebx
je 0x40402b
lea eax, [ebp - 0x20c]
push eax
push 0
push 0x44b848
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x404009
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x20c]
push 1
push eax
push dword [ebp - 0x668]
call esi
push 4
push 0
test eax, eax
je 0x403faf
lea eax, [ebp - 0x20c]
push eax
jmp 0x403fb5
push dword [ebp - 0x668]
call esi
mov eax, dword [ebp - 0x66c]
lea ecx, [ebp - 0x664]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40404d
mov eax, dword [ebp - 0x66c]
jmp 0x403e89
call edi
mov esi, eax
test esi, esi
jle 0x403fed
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403ff4
mov esi, 0x80004005
push esi
push 0x10b
push str.dirutil.cpp
call fcn.00403821
jmp 0x4040da
call edi
mov esi, eax
test esi, esi
jle 0x40401c
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x404023
mov esi, 0x80004005
push esi
push 0x115
jmp 0x403ffa
call edi
mov esi, eax
test esi, esi
jle 0x40403e
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x404045
mov esi, 0x80004005
push esi
push 0x125
jmp 0x403ffa
call edi
cmp eax, 0x12
jne 0x4040b0
xor esi, esi
jmp 0x40405e
mov ebx, dword [ebp - 0x67c]
push dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4040da
call edi
mov esi, eax
test esi, esi
jle 0x40407f
movzx esi, si
or esi, 0x80070000
cmp esi, 0x80070020
jne 0x4040a1
test ebx, ebx
je 0x4040a5
push 4
push 0
push dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4040a5
xor esi, esi
test esi, esi
jns 0x4040da
push esi
push 0x141
jmp 0x403ffa
call edi
mov esi, eax
test esi, esi
jle 0x4040c3
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4040ca
mov esi, 0x80004005
push esi
push 0x132
jmp 0x403ffa
mov esi, 0x8000ffff
mov eax, dword [ebp - 0x66c]
cmp eax, 0xffffffff
je 0x4040ec
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x668], 0
je 0x404100
push dword [ebp - 0x668]
call fcn.00445636
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042e06f
mov esp, ebp
pop ebp
ret 8