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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x66c
mov eax, dword [0x470050]
xor eax, esp
mov dword [esp + 0x668], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [esp + 0x468]
mov edi, esi
mov ecx, eax
mov edx, 0x104
sub edi, ecx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x405d02
movzx ecx, word [edi + eax]
test cx, cx
je 0x405d02
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x405ce2
jmp 0x405d06
test edx, edx
jne 0x405d09
sub eax, 2
xor edx, edx
mov word [eax], dx
lea eax, [esp + 0x260]
mov ecx, eax
mov edx, 0x104
sub esi, ecx
mov edi, edi
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x405d40
movzx ecx, word [esi + eax]
test cx, cx
je 0x405d40
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x405d20
jmp 0x405d44
test edx, edx
jne 0x405d47
sub eax, 2
xor edx, edx
mov word [eax], dx
lea eax, [esp + 0x468]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405d56
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x466], 0x5c
lea eax, [esp + eax*2 + 0x466]
jne 0x405d7c
xor ecx, ecx
mov word [eax], cx
lea eax, [esp + 0x260]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405d86
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x25e], 0x5c
lea eax, [esp + eax*2 + 0x25e]
jne 0x405dac
xor edx, edx
mov word [eax], dx
push 0x45be30
lea edi, [esp + 0x46c]
call fcn.00401270
push 0x45bc38
lea edi, [esp + 0x264]
call fcn.00401270
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
je 0x406012
lea eax, [esp + 0x468]
mov esi, edi
mov ecx, eax
mov edx, 0x104
sub esi, ecx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x405e20
movzx ecx, word [esi + eax]
test cx, cx
je 0x405e20
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x405e00
jmp 0x405e24
test edx, edx
jne 0x405e27
sub eax, 2
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edi, dword [esp + 0xc]
xor edx, edx
mov word [eax], dx
mov ecx, 0x45be24
lea eax, [esp + 0x3c]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405e66
test dx, dx
je 0x405e62
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405e66
add eax, 4
add ecx, 4
test dx, dx
jne 0x405e40
xor eax, eax
jmp 0x405e6b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405fec
mov ecx, 0x45be28
lea eax, [esp + 0x3c]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405ea6
test dx, dx
je 0x405ea2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405ea6
add eax, 4
add ecx, 4
test dx, dx
jne 0x405e80
xor eax, eax
jmp 0x405eab
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405fec
mov eax, 0x104
lea ecx, [esp + 0x260]
nop
cmp word [ecx], 0
je 0x405ed0
add ecx, 2
sub eax, 1
jne 0x405ec0
jmp 0x405f23
test eax, eax
je 0x405f23
mov edx, 0x104
sub edx, eax
mov ecx, 0x104
sub ecx, edx
lea eax, [esp + edx*2 + 0x260]
je 0x405f17
lea edi, [esp + 0x3c]
lea esi, [ecx + edx + 0x7ffffefb]
sub edi, eax
test esi, esi
je 0x405f13
movzx edx, word [edi + eax]
test dx, dx
je 0x405f13
mov word [eax], dx
dec ecx
add eax, 2
dec esi
test ecx, ecx
jne 0x405ef8
jmp 0x405f17
test ecx, ecx
jne 0x405f1a
sub eax, 2
mov edi, dword [esp + 0xc]
xor ecx, ecx
mov word [eax], cx
test byte [esp + 0x10], 0x10
je 0x405f80
lea edx, [esp + 0x260]
push edx
call fcn.00405cb0
add esp, 4
test al, al
je 0x40600b
lea eax, [esp + 0x260]
lea esi, [esp + 0x468]
mov ecx, eax
mov edx, 0x104
sub esi, ecx
lea esp, [esp]
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x405fe0
movzx ecx, word [esi + eax]
test cx, cx
je 0x405fe0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x405f60
jmp 0x405fe4
push 0x80
lea eax, [esp + 0x264]
push eax
call ebx
lea ecx, [esp + 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40600b
lea eax, [esp + 0x260]
lea esi, [esp + 0x468]
mov ecx, eax
mov edx, 0x104
sub esi, ecx
jmp 0x405fc0
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x405fe0
movzx ecx, word [esi + eax]
test cx, cx
je 0x405fe0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x405fc0
jmp 0x405fe4
test edx, edx
jne 0x405fe7
sub eax, 2
xor edx, edx
mov word [eax], dx
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405e36
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x406029
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x668]
xor ecx, esp
call fcn.0042c1e9
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x468]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40605a
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x668]
xor ecx, esp
call fcn.0042c1e9
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x468]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [esp + 0x674]
dec eax
pop edi
neg eax
pop esi
sbb eax, eax
pop ebx
xor ecx, esp
inc eax
call fcn.0042c1e9
mov esp, ebp
pop ebp
ret