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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x16c
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [esp], ebx
and edi, 4
call fcn.00408d3f
push ecx
mov dword [ebp - 0x160], eax
test byte [ebp + 0xc], 8
je 0x4094b7
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp eax, 1
push edx
adc dword [0x419028], 0
jmp 0x409767
mov eax, dword [ebp + 0xc]
and eax, 1
mov dword [ebp - 0x15c], eax
je 0x4094e8
cmp dword [ebp - 0x160], 0
jne 0x4094de
mov dword [esp + 4], ebx
mov dword [esp], str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x40974c
test byte [ebp + 0xc], 2
je 0x4096ce
mov dword [esp + 4], ebx
mov dword [esp], 0x452ca0
call fcn.00408823
push eax
push eax
cmp dword [ebp - 0x15c], 0
je 0x40951b
mov dword [esp + 4], str..
mov dword [esp], 0x452ca0
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
jmp 0x409524
mov dword [esp], ebx
call fcn.00408151
push eax
cmp byte [ebx], 0
jne 0x409532
cmp byte [0x452ca0], 0x5c
jne 0x409544
mov dword [esp + 4], 0x40cb40
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ecx
add eax, ebx
mov dword [ebp - 0x164], eax
lea eax, [ebp - 0x158]
mov dword [esp + 4], eax
mov dword [esp], 0x452ca0
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push esi
push esi
mov esi, eax
cmp eax, 0xffffffff
je 0x4096aa
lea eax, [ebp - 0x12c]
mov dword [esp + 4], 0x3f
mov dword [esp], eax
call fcn.00408127
push edx
push edx
cmp byte [eax], 0
jne 0x4095a5
mov dl, byte [ebp - 0x12c]
lea eax, [ebp - 0x12c]
jmp 0x4095af
mov dl, byte [ebp - 0x28]
test dl, dl
je 0x409597
lea eax, [ebp - 0x28]
cmp dl, 0x2e
jne 0x4095ce
mov dl, byte [eax + 1]
test dl, dl
je 0x409683
cmp dl, 0x2e
jne 0x4095ce
cmp byte [eax + 2], 0
je 0x409683
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x164]
mov dword [esp], eax
call fcn.00408823
push ecx
push ecx
test byte [ebp - 0x158], 0x10
je 0x409609
mov eax, dword [ebp + 0xc]
not eax
test al, 3
jne 0x409683
mov eax, dword [ebp + 0xc]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00409474
jmp 0x409681
mov dword [esp + 4], ebx
mov dword [esp], str.Delete:_DeleteFile___s__
call fcn.00408cbc
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00408300
push edx
push edx
mov dword [esp + 4], ebx
test eax, eax
jne 0x409675
test edi, edi
je 0x409661
mov dword [esp], str.Delete:_DeleteFile_on_Reboot___s__
call fcn.00408cbc
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff1
call fcn.004078a1
push eax
push eax
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0040942f
jmp 0x409681
mov dword [esp], str.Delete:_DeleteFile_failed___s__
call fcn.00408cbc
inc dword [0x419028]
jmp 0x409683
mov dword [esp], 0xfffffff2
call fcn.004078a1
push ecx
push ecx
lea eax, [ebp - 0x158]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
push edx
push edx
test eax, eax
jne 0x40957a
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
cmp dword [ebp - 0x15c], 0
je 0x409767
mov eax, dword [ebp - 0x164]
cmp dword [ebp - 0x160], 0
mov byte [eax - 1], 0
je 0x4094ce
mov dword [esp], ebx
call fcn.00408d07
push ecx
test eax, eax
je 0x409767
mov dword [esp], ebx
call fcn.00408857
push esi
mov dword [esp + 4], ebx
mov dword [esp], str.RMDir:_RemoveDirectory___s__
call fcn.00408cbc
mov eax, edi
mov dword [esp], ebx
or eax, 1
mov dword [esp + 4], eax
call fcn.00408300
push edx
push edx
mov dword [esp + 4], ebx
test eax, eax
jne 0x409759
test edi, edi
je 0x409745
mov dword [esp], str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.00408cbc
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff1
call fcn.004078a1
xor ecx, ecx
push edx
push edx
mov dword [esp + 4], ecx
mov dword [esp], ebx
call fcn.0040942f
jmp 0x409765
mov dword [esp], str.RMDir:_RemoveDirectory_failed___s__
call fcn.00408cbc
inc dword [0x419028]
jmp 0x409767
mov dword [esp], 0xffffffe5
call fcn.004078a1
push eax
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8