Function at 0x406682
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.004061ed
mov dword [ebp - 0xc], eax
test bl, 8
je 0x4066c0
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x426a68], eax
jmp 0x40689f
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
push esi
je 0x4066db
test eax, eax
je 0x40681f
test bl, 2
je 0x40681f
push edi
mov esi, 0x423398
push esi
call fcn.00405e4c
cmp dword [ebp + 8], 0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x4066fd
push str..
push esi
call ebx
jmp 0x406703
push edi
call fcn.004061c6
cmp byte [edi], 0
jne 0x406711
cmp byte [0x423398], 0x5c
jne 0x406719
push 0x408544
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]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x406815
lea esi, [ebp - 0x120]
push 0x3f
mov eax, esi
push eax
call fcn.00405b81
cmp byte [eax], 0
je 0x40675c
cmp byte [ebp - 0x1c], 0
je 0x40675c
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x406776
mov al, byte [esi + 1]
test al, al
je 0x4067f4
cmp al, 0x2e
jne 0x406776
cmp byte [esi + 2], 0
je 0x4067f4
push esi
push ebx
call fcn.00405e4c
test byte [ebp - 0x14c], 0x10
je 0x40679b
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4067f4
push dword [ebp + 0xc]
push edi
call fcn.00406682
jmp 0x4067f4
push edi
push str.Delete:_DeleteFile___s__
call fcn.0040608a
pop ecx
pop ecx
push dword [ebp - 4]
push edi
call fcn.00406151
push edi
test eax, eax
jne 0x4067ed
cmp dword [ebp - 4], eax
je 0x4067d9
push str.Delete:_DeleteFile_on_Reboot___s__
call fcn.0040608a
pop ecx
pop ecx
push edi
push 0xfffffffffffffff1
call fcn.00404e2f
push 0
push edi
call fcn.0040664f
jmp 0x4067f4
push str.Delete:_DeleteFile_failed___s__
call fcn.0040608a
inc dword [0x426a68]
pop ecx
pop ecx
jmp 0x4067f4
push 0xfffffffffffffff2
call fcn.00404e2f
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40673e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x40681f
mov byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x40689e
push edi
cmp dword [ebp - 0xc], esi
jne 0x406833
push str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x406888
call fcn.004060ba
test eax, eax
je 0x40689e
push edi
call fcn.00406199
push edi
push str.RMDir:_RemoveDirectory___s__
call fcn.0040608a
mov eax, dword [ebp - 4]
pop ecx
pop ecx
or eax, 1
push eax
push edi
call fcn.00406151
push edi
test eax, eax
jne 0x406897
cmp dword [ebp - 4], esi
je 0x406883
push str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.0040608a
pop ecx
pop ecx
push edi
push 0xfffffffffffffff1
call fcn.00404e2f
push esi
push edi
call fcn.0040664f
jmp 0x40689e
push str.RMDir:_RemoveDirectory_failed___s__
call fcn.0040608a
inc dword [0x426a68]
pop ecx
pop ecx
jmp 0x40689e
push 0xffffffffffffffe5
call fcn.00404e2f
pop esi
pop edi
pop ebx
leave
ret 8