Function at 0x436cb2
Capabilities:
Check if file exists
Delete directory
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x680
mov eax, dword [0x456130]
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.004284d0
push esi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.004284d0
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 0x436d8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x436d67
push 3
pop eax
test eax, eax
jle 0x436d6f
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
jns 0x436d8a
push edi
push 0xd0
push str.dirutil.cpp
call fcn.00432f06
jmp 0x4370fe
test byte [ebp - 0x678], 0x10
je 0x4370e4
test byte [ebp - 0x678], 1
je 0x436dd6
push 0x80
push dword [ebp - 0x66c]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x436dd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x436dc3
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436dce
mov edi, 0x80004005
push edi
push 0xd9
jmp 0x436d7b
xor eax, eax
cmp dword [ebp - 0x67c], eax
jne 0x436dec
cmp dword [ebp - 0x680], eax
je 0x436ff9
cmp dword [ebp - 0x674], eax
je 0x436e2e
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x436e2e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x436e18
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436e23
mov edi, 0x80004005
push edi
push 0xe4
jmp 0x436d7b
lea eax, [ebp - 0x668]
push eax
push 0x448b30
push dword [ebp - 0x66c]
call fcn.004325d7
mov edi, eax
test edi, edi
js 0x4370fe
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 0x436e91
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x436e7b
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x436e86
mov edi, 0x80004005
push edi
push 0xef
jmp 0x436d7b
push 0x2e
pop eax
cmp ax, word [ebp - 0x638]
jne 0x436ec7
xor eax, eax
cmp ax, word [ebp - 0x636]
je 0x436fcb
push 0x2e
pop eax
cmp ax, word [ebp - 0x636]
jne 0x436ec7
xor eax, eax
cmp ax, word [ebp - 0x634]
je 0x436fcb
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.004325d7
mov edi, eax
test edi, edi
js 0x4370e9
xor edi, edi
cmp dword [ebp - 0x680], edi
je 0x436f2f
test byte [ebp - 0x664], 0x10
je 0x436f2f
lea eax, [ebp - 0x668]
push eax
call fcn.004323e1
mov edi, eax
test edi, edi
js 0x4370e9
push dword [ebp + 0xc]
push dword [ebp - 0x668]
call fcn.00436cb2
jmp 0x436fcb
cmp dword [ebp - 0x67c], edi
je 0x436fcb
test byte [ebp - 0x664], 7
je 0x436f5d
push 0x80
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x437061
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x436fcb
cmp dword [ebp - 0x674], edi
je 0x4370a3
lea eax, [ebp - 0x20c]
push eax
push edi
push 0x4525e8
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x437082
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 0x436fc3
lea eax, [ebp - 0x20c]
push eax
jmp 0x436fc9
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 0x436e91
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x12
jne 0x4370c4
xor edi, edi
push dword [ebp - 0x66c]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4370e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x43701b
and eax, ebx
or eax, esi
mov edi, eax
cmp edi, 0x80070020
jne 0x437044
cmp dword [ebp - 0x674], 0
je 0x43704c
push 4
push 0
push dword [ebp - 0x66c]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x43704c
xor edi, edi
test edi, edi
jns 0x4370e9
push edi
push 0x149
push str.dirutil.cpp
call fcn.00432f06
jmp 0x4370e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x43706f
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x43707a
mov edi, 0x80004005
push edi
push 0x113
jmp 0x437052
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x437090
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x43709b
mov edi, 0x80004005
push edi
push 0x11d
jmp 0x437052
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x4370b1
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x4370bc
mov edi, 0x80004005
push edi
push 0x12d
jmp 0x437052
call edi
test eax, eax
jle 0x4370ce
and eax, ebx
or eax, esi
mov edi, eax
test edi, edi
js 0x4370d9
mov edi, 0x80004005
push edi
push 0x13a
jmp 0x437052
mov edi, 0x8000ffff
cmp dword [ebp - 0x670], 0xffffffff
je 0x4370fe
push dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x668], 0
je 0x437112
push dword [ebp - 0x668]
call fcn.00430887
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042854a
leave
ret 8