Function at 0x4366a3
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, 0x680
mov eax, dword [0x4540d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
or dword [ebp - 0x670], 0xffffffff
push ebx
and eax, 1
xor ecx, ecx
push esi
push edi
xor edi, edi
cmp al, 1
mov eax, dword [ebp + 0xc]
sete cl
mov ebx, dword [ebp + 8]
and eax, 2
mov esi, 0x208
push esi
push edi
mov dword [ebp - 0x66c], ebx
mov dword [ebp - 0x67c], ecx
xor ecx, ecx
cmp al, 2
mov eax, dword [ebp + 0xc]
sete cl
and eax, 4
mov dword [ebp - 0x668], edi
mov dword [ebp - 0x680], ecx
xor ecx, ecx
cmp al, 4
sete cl
lea eax, [ebp - 0x414]
push eax
mov dword [ebp - 0x674], ecx
call fcn.00427e30
push esi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.00427e30
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x678], eax
mov ebx, 0xffff
mov esi, 0x80070000
cmp eax, 0xffffffff
jne 0x43677b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x436758
push 3
pop eax
test eax, eax
jle 0x436760
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
jns 0x43677b
push edi
push 0xd0
push str.dirutil.cpp
call fcn.0043294e
jmp 0x436aef
test byte [ebp - 0x678], 0x10
je 0x436ad5
test byte [ebp - 0x678], 1
je 0x4367c7
push pe_nt_image_headers32
push dword [ebp - 0x66c]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x4367c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4367b4
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x4367bf
mov edi, 0x80004005
push edi
push 0xd9
jmp 0x43676c
xor eax, eax
cmp dword [ebp - 0x67c], eax
jne 0x4367dd
cmp dword [ebp - 0x680], eax
je 0x4369ea
cmp dword [ebp - 0x674], eax
je 0x43681f
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x43681f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x436809
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436814
mov edi, 0x80004005
push edi
push 0xe4
jmp 0x43676c
lea eax, [ebp - 0x668]
push eax
push 0x447840
push dword [ebp - 0x66c]
call fcn.0043201f
mov edi, eax
test edi, edi
js 0x436aef
lea eax, [ebp - 0x664]
push eax
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x670], eax
cmp eax, 0xffffffff
jne 0x436882
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x43686c
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436877
mov edi, 0x80004005
push edi
push 0xef
jmp 0x43676c
push 0x2e
pop eax
cmp ax, word [ebp - 0x638]
jne 0x4368b8
xor eax, eax
cmp ax, word [ebp - 0x636]
je 0x4369bc
push 0x2e
pop eax
cmp ax, word [ebp - 0x636]
jne 0x4368b8
xor eax, eax
cmp ax, word [ebp - 0x634]
je 0x4369bc
xor eax, eax
mov word [ebp - 0x432], ax
lea eax, [ebp - 0x668]
push eax
lea eax, [ebp - 0x638]
push eax
push dword [ebp - 0x66c]
call fcn.0043201f
mov edi, eax
test edi, edi
js 0x436ada
xor edi, edi
cmp dword [ebp - 0x680], edi
je 0x436920
test byte [ebp - 0x664], 0x10
je 0x436920
lea eax, [ebp - 0x668]
push eax
call fcn.00431e29
mov edi, eax
test edi, edi
js 0x436ada
push dword [ebp + 0xc]
push dword [ebp - 0x668]
call fcn.004366a3
jmp 0x4369bc
cmp dword [ebp - 0x67c], edi
je 0x4369bc
test byte [ebp - 0x664], 7
je 0x43694e
push pe_nt_image_headers32
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x436a52
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4369bc
cmp dword [ebp - 0x674], edi
je 0x436a94
lea eax, [ebp - 0x20c]
push eax
push edi
push 0x451278
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x436a73
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 1
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x668]
call edi
push 4
push 0
test eax, eax
je 0x4369b4
lea eax, [ebp - 0x20c]
push eax
jmp 0x4369ba
push dword [ebp - 0x668]
call edi
lea eax, [ebp - 0x664]
push eax
push dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x436882
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x12
jne 0x436ab5
xor edi, edi
push dword [ebp - 0x66c]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x436ada
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x436a0c
and eax, ebx
or eax, esi
mov edi, eax
cmp edi, 0x80070020
jne 0x436a35
cmp dword [ebp - 0x674], 0
je 0x436a3d
push 4
push 0
push dword [ebp - 0x66c]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x436a3d
xor edi, edi
test edi, edi
jns 0x436ada
push edi
push 0x149
push str.dirutil.cpp
call fcn.0043294e
jmp 0x436ada
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x436a60
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436a6b
mov edi, 0x80004005
push edi
push 0x113
jmp 0x436a43
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x436a81
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436a8c
mov edi, 0x80004005
push edi
push 0x11d
jmp 0x436a43
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x436aa2
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436aad
mov edi, 0x80004005
push edi
push 0x12d
jmp 0x436a43
call edi
test eax, eax
jle 0x436abf
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436aca
mov edi, 0x80004005
push edi
push 0x13a
jmp 0x436a43
mov edi, 0x8000ffff
cmp dword [ebp - 0x670], 0xffffffff
je 0x436aef
push dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x668], 0
je 0x436b03
push dword [ebp - 0x668]
call fcn.004301e8
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00427eaa
leave
ret 8