Function at 0x406947
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 edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.004064dc
test bl, 8
mov dword [ebp - 0xc], eax
je 0x406985
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x4480a8], eax
jmp 0x406b64
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
push esi
je 0x4069a0
test eax, eax
je 0x406ae4
test bl, 2
je 0x406ae4
push edi
mov esi, 0x43cb68
push esi
call fcn.00405fd3
cmp dword [ebp + 8], 0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x4069c2
push str..
push esi
call ebx
jmp 0x4069c8
push edi
call fcn.004064b5
cmp byte [edi], 0
jne 0x4069d6
cmp byte [0x43cb68], 0x5c
jne 0x4069de
push 0x40854c
push edi
call ebx
push edi
call dword [sym.imp.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 0x406ada
lea esi, [ebp - 0x120]
push 0x3f
mov eax, esi
push eax
call fcn.00405bca
cmp byte [eax], 0
je 0x406a21
cmp byte [ebp - 0x1c], 0
je 0x406a21
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x406a3b
mov al, byte [esi + 1]
test al, al
je 0x406ab9
cmp al, 0x2e
jne 0x406a3b
cmp byte [esi + 2], 0
je 0x406ab9
push esi
push ebx
call fcn.00405fd3
test byte [ebp - 0x14c], 0x10
je 0x406a60
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x406ab9
push dword [ebp + 0xc]
push edi
call fcn.00406947
jmp 0x406ab9
push edi
push str.Delete:_DeleteFile___s__
call fcn.004062ae
pop ecx
pop ecx
push dword [ebp - 4]
push edi
call fcn.00406440
test eax, eax
push edi
jne 0x406ab2
cmp dword [ebp - 4], eax
je 0x406a9e
push str.Delete:_DeleteFile_on_Reboot___s__
call fcn.004062ae
pop ecx
pop ecx
push edi
push 0xfffffffffffffff1
call fcn.00404dbf
push 0
push edi
call fcn.0040691b
jmp 0x406ab9
push str.Delete:_DeleteFile_failed___s__
call fcn.004062ae
inc dword [0x4480a8]
pop ecx
pop ecx
jmp 0x406ab9
push 0xfffffffffffffff2
call fcn.00404dbf
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x406a03
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x406ae4
mov byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x406b63
cmp dword [ebp - 0xc], esi
push edi
jne 0x406af8
push str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x406b4d
call fcn.004062de
test eax, eax
je 0x406b63
push edi
call fcn.00406488
push edi
push str.RMDir:_RemoveDirectory___s__
call fcn.004062ae
mov eax, dword [ebp - 4]
pop ecx
pop ecx
or eax, 1
push eax
push edi
call fcn.00406440
test eax, eax
push edi
jne 0x406b5c
cmp dword [ebp - 4], esi
je 0x406b48
push str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.004062ae
pop ecx
pop ecx
push edi
push 0xfffffffffffffff1
call fcn.00404dbf
push esi
push edi
call fcn.0040691b
jmp 0x406b63
push str.RMDir:_RemoveDirectory_failed___s__
call fcn.004062ae
inc dword [0x4480a8]
pop ecx
pop ecx
jmp 0x406b63
push 0xffffffffffffffe5
call fcn.00404dbf
pop esi
pop edi
pop ebx
leave
ret 8