Function at 0x405820
Capabilities:
Delete directory
Set file attributes

Disassembly:
mov eax, 0x1c5c
call fcn.004213b0
mov eax, dword [0x4668f4]
xor eax, esp
push esi
mov esi, dword [esp + 0x1c64]
test esi, esi
mov dword [esp + 0x1c5c], eax
mov eax, dword [esp + 0x1c68]
mov dword [esp + 4], eax
je 0x405abd
cmp byte [esi], 0
je 0x405abd
push edi
push esi
lea ecx, [esp + 0x264]
push str._s
push ecx
call fcn.004217f1
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
add esp, 0xc
push 0x200
lea edx, [esp + 0x464]
push edx
push 0xffffffffffffffff
lea eax, [esp + 0x26c]
push eax
push 0
push 0xfde9
call edi
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x464]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x4058f5
push 0x200
lea eax, [esp + 0x864]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call edi
lea ecx, [esp + 0x860]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x1c58]
xor ecx, esp
call fcn.004205fd
add esp, 0x1c5c
ret
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ecx]
lea edx, [esp + 0x44]
push 0x44c720
push edx
call fcn.004223f6
add esp, 8
test eax, eax
je 0x4059dd
lea eax, [esp + 0x44]
push 0x44c718
push eax
call fcn.004223f6
add esp, 8
test eax, eax
je 0x4059dd
push 0x200
lea ecx, [esp + 0x86c]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.004057c0
lea eax, [esp + 0x874]
push eax
push esi
lea ecx, [esp + 0x27c]
push 0x44c45c
push ecx
call fcn.004217f1
add esp, 0x1c
push 0x200
lea edx, [esp + 0x46c]
push edx
push 0xffffffffffffffff
lea eax, [esp + 0x274]
push eax
push 0
push 0xfde9
call edi
mov ebx, dword [esp + 0x18]
and ebx, 0xfffffff8
push ebx
lea ecx, [esp + 0x46c]
push ecx
call ebp
test bl, 0x10
mov ebx, dword [esp + 0x10]
je 0x4059b5
lea edx, [esp + 0x268]
push ebx
push edx
call fcn.00405820
add esp, 8
lea eax, [esp + 0x268]
push ebx
push eax
call fcn.00422370
add esp, 8
test eax, eax
je 0x4059cf
cmp byte [ebx], 0
jne 0x4059dd
lea ecx, [esp + 0x468]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405900
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x200
lea eax, [esp + 0xc6c]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call edi
lea ecx, [esp + 0xc68]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push 0
push 0x400
lea edx, [esp + 0x1470]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x400
lea eax, [esp + 0x106c]
push eax
lea ecx, [esp + 0x1470]
push ecx
call fcn.004057c0
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
call fcn.0040f290
push eax
mov eax, dword [0x467980]
push edi
lea edx, [esp + 0x1074]
push edx
push esi
push str.End_of_RemoveAllFile:_path___s___s__error_code:__d__error:__s
push 0xa8a
push str..Utility.cpp
push 3
push str.Utility::RemoveAllFile
push eax
call fcn.0040ebc0
add esp, 0x2c
pop ebp
pop ebx
pop edi
mov al, 1
pop esi
mov ecx, dword [esp + 0x1c58]
xor ecx, esp
call fcn.004205fd
add esp, 0x1c5c
ret
mov ecx, dword [esp + 0x1c5c]
pop esi
xor ecx, esp
xor al, al
call fcn.004205fd
add esp, 0x1c5c
ret