Function at 0x4059a7
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.00405cba
test bl, 8
mov dword [ebp - 0xc], eax
je 0x4059e6
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x4308c8], eax
jmp 0x405bc5
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405a00
test eax, eax
je 0x405b47
test bl, 2
je 0x405b47
mov esi, 0x42c0a0
push edi
push esi
call fcn.0040613c
cmp dword [ebp + 8], 0
je 0x405a1f
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405a25
push edi
call fcn.00405c13
cmp byte [edi], 0
jne 0x405a33
cmp byte [0x42c0a0], 0x5c
jne 0x405a3e
push 0x40a28c
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x14c]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x405b3d
lea eax, [ebp - 0x120]
push 0x3f
push eax
lea esi, [ebp - 0x120]
call fcn.00405bf7
cmp byte [eax], 0
je 0x405a84
cmp byte [ebp - 0x1c], 0
je 0x405a84
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x405a9e
mov al, byte [esi + 1]
test al, al
je 0x405b1c
cmp al, 0x2e
jne 0x405a9e
cmp byte [esi + 2], 0
je 0x405b1c
push esi
push ebx
call fcn.0040613c
test byte [ebp - 0x14c], 0x10
je 0x405ac3
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405b1c
push dword [ebp + 0xc]
push edi
call fcn.004059a7
jmp 0x405b1c
push edi
push str.Delete:_DeleteFile___s__
call fcn.004065bf
pop ecx
pop ecx
push dword [ebp - 4]
push edi
call fcn.0040595f
test eax, eax
push edi
jne 0x405b15
cmp dword [ebp - 4], eax
je 0x405b01
push str.Delete:_DeleteFile_on_Reboot___s__
call fcn.004065bf
pop ecx
pop ecx
push edi
push 0xfffffffffffffff1
call fcn.0040539d
push 0
push edi
call fcn.00405ff0
jmp 0x405b1c
push str.Delete:_DeleteFile_failed___s__
call fcn.004065bf
inc dword [0x4308c8]
pop ecx
pop ecx
jmp 0x405b1c
push 0xfffffffffffffff2
call fcn.0040539d
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405a62
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405b47
and byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405bc5
cmp dword [ebp - 0xc], esi
push edi
jne 0x405b68
push str.RMDir:_RemoveDirectory_invalid_input___s__
call fcn.004065bf
inc dword [0x4308c8]
pop ecx
pop ecx
jmp 0x405bc5
call fcn.004065ed
test eax, eax
je 0x405bc5
push edi
call fcn.00405bcc
push edi
push str.RMDir:_RemoveDirectory___s__
call fcn.004065bf
mov eax, dword [ebp - 4]
pop ecx
pop ecx
or al, 1
push eax
push edi
call fcn.0040595f
test eax, eax
push edi
jne 0x405bbe
cmp dword [ebp - 4], esi
je 0x405bb7
push str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.004065bf
pop ecx
pop ecx
push edi
push 0xfffffffffffffff1
call fcn.0040539d
push esi
push edi
call fcn.00405ff0
jmp 0x405bc5
push str.RMDir:_RemoveDirectory_failed___s__
jmp 0x405b59
push 0xffffffffffffffe5
call fcn.0040539d
pop edi
pop esi
pop ebx
leave
ret 8