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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x17c
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [esp], ebx
call fcn.0040795d
mov dword [ebp - 0x15c], eax
push ecx
test esi, 8
je 0x407dfd
mov esi, dword [0x425c50]
mov dword [esp], ebx
call sub.KERNEL32.dll_DeleteFileA
test eax, eax
sete al
movzx eax, al
push edx
lea esi, [eax + esi]
mov dword [0x425c50], esi
jmp 0x408067
mov eax, esi
and eax, 1
mov dword [ebp - 0x164], eax
je 0x407e23
cmp dword [ebp - 0x15c], 0
je 0x40804d
test esi, 2
je 0x407ff8
mov dword [esp + 4], ebx
mov dword [esp], 0x4253b8
call fcn.0040752a
cmp dword [ebp - 0x164], 0
push edi
push edi
je 0x407e56
mov dword [esp + 4], str..
mov dword [esp], 0x4253b8
call fcn.00407496
push ecx
push ecx
jmp 0x407e5f
mov dword [esp], ebx
call fcn.004074ae
push edx
cmp byte [ebx], 0
jne 0x407e6d
cmp byte [0x4253b8], 0x5c
jne 0x407e7f
mov dword [esp + 4], 0x40b3e5
mov dword [esp], ebx
call fcn.00407496
push eax
push eax
mov dword [esp], ebx
call fcn.004074a2
lea edx, [ebp - 0x158]
push edi
lea eax, [ebx + eax]
mov dword [ebp - 0x160], eax
mov dword [esp + 4], edx
mov dword [esp], 0x4253b8
mov dword [ebp - 0x170], edx
call sub.KERNEL32.dll_FindFirstFileA
mov edi, eax
cmp eax, 0xffffffff
push ecx
push ecx
je 0x407fd8
mov eax, esi
and eax, 4
mov dword [ebp - 0x168], eax
mov eax, esi
and eax, 3
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x12c]
mov dword [esp + 4], 0x3f
mov dword [esp], eax
call fcn.0040732c
push edx
push edx
cmp byte [eax], 0
je 0x407ef7
mov dl, byte [ebp - 0x28]
lea eax, [ebp - 0x28]
test dl, dl
jne 0x407f03
mov dl, byte [ebp - 0x12c]
lea eax, [ebp - 0x12c]
cmp dl, 0x2e
jne 0x407f22
mov dl, byte [eax + 1]
test dl, dl
je 0x407fb3
cmp dl, 0x2e
jne 0x407f22
cmp byte [eax + 2], 0
je 0x407fb3
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call fcn.0040752a
test byte [ebp - 0x158], 0x10
push eax
push eax
je 0x407f56
cmp dword [ebp - 0x16c], 3
jne 0x407fb3
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00407daf
jmp 0x407fb1
mov dword [esp], ebx
call fcn.00407a6d
push ecx
mov dword [esp], ebx
call sub.KERNEL32.dll_DeleteFileA
test eax, eax
push edx
jne 0x407fa1
cmp dword [ebp - 0x168], 0
je 0x407f99
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff1
call fcn.00404690
push eax
push eax
mov dword [esp], ebx
mov dword [esp + 4], 0
call fcn.00407b08
jmp 0x407fb1
inc dword [0x425c50]
jmp 0x407fb3
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff2
call fcn.00404690
push ecx
push ecx
lea eax, [ebp - 0x158]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.KERNEL32.dll_FindNextFileA
test eax, eax
push edx
push edx
jne 0x407ed0
mov dword [esp], edi
call sub.KERNEL32.dll_FindClose
push edi
cmp dword [ebp - 0x164], 0
je 0x408067
mov eax, dword [ebp - 0x160]
mov byte [eax - 1], 0
cmp dword [ebp - 0x15c], 0
je 0x40804d
mov dword [esp], ebx
call fcn.004072f6
test eax, eax
push ecx
je 0x408067
mov dword [esp], ebx
call fcn.004074e6
push edx
mov dword [esp], ebx
call fcn.00407a6d
push eax
mov dword [esp], ebx
call sub.KERNEL32.dll_RemoveDirectoryA
test eax, eax
push edi
jne 0x408055
and esi, 4
je 0x40804d
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff1
call fcn.00404690
push esi
push esi
mov dword [esp], ebx
mov dword [esp + 4], 0
call fcn.00407b08
jmp 0x408065
inc dword [0x425c50]
jmp 0x408067
mov dword [esp + 4], ebx
mov dword [esp], 0xffffffe5
call fcn.00404690
push ecx
push ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8