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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x27c
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [esp], ebx
and edi, 4
call fcn.00408e4f
push ecx
mov dword [ebp - 0x270], eax
test byte [ebp + 0xc], 8
je 0x4095d7
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, 1
push edx
adc dword [0x41a028], 0
jmp 0x40986c
mov eax, dword [ebp + 0xc]
and eax, 1
mov dword [ebp - 0x26c], eax
je 0x409608
cmp dword [ebp - 0x270], 0
jne 0x4095fe
mov dword [esp + 4], ebx
mov dword [esp], 0x40d5cc
jmp 0x409851
test byte [ebp + 0xc], 2
je 0x4097d3
mov dword [esp + 4], ebx
mov dword [esp], 0x4791e0
call fcn.00408981
push eax
push eax
cmp dword [ebp - 0x26c], 0
je 0x40963b
mov dword [esp + 4], str..
mov dword [esp], 0x4791e0
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x409644
mov dword [esp], ebx
call fcn.0040828c
push esi
cmp word [ebx], 0
jne 0x409654
cmp word [0x4791e0], 0x5c
jne 0x409666
mov dword [esp + 4], 0x40d3a0
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push ecx
push ecx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
lea eax, [ebx + eax*2]
mov dword [ebp - 0x274], eax
lea eax, [ebp - 0x268]
mov dword [esp + 4], eax
mov dword [esp], 0x4791e0
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
push edx
push edx
cmp eax, 0xffffffff
je 0x4097ad
cmp word [ebp - 0x23c], 0x2e
jne 0x4096cb
mov ax, word [ebp - 0x23a]
test ax, ax
je 0x409786
cmp ax, 0x2e
jne 0x4096cb
cmp word [ebp - 0x238], 0
je 0x409786
lea eax, [ebp - 0x23c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x274]
mov dword [esp], eax
call fcn.00408981
push ecx
push ecx
test byte [ebp - 0x268], 0x10
je 0x40970c
mov eax, dword [ebp + 0xc]
not eax
test al, 3
jne 0x409786
mov eax, dword [ebp + 0xc]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00409594
jmp 0x409784
mov dword [esp + 4], ebx
mov dword [esp], str.Delete:_DeleteFile___s__
call fcn.00408dc8
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00408453
push edx
push edx
mov dword [esp + 4], ebx
test eax, eax
jne 0x409778
test edi, edi
je 0x409764
mov dword [esp], str.Delete:_DeleteFile_on_Reboot___s__
call fcn.00408dc8
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff1
call fcn.004079d2
push eax
push eax
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0040954f
jmp 0x409784
mov dword [esp], str.Delete:_DeleteFile_failed___s__
call fcn.00408dc8
inc dword [0x41a028]
jmp 0x409786
mov dword [esp], 0xfffffff2
call fcn.004079d2
push ecx
push ecx
lea eax, [ebp - 0x268]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push edx
push edx
test eax, eax
jne 0x40969d
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
cmp dword [ebp - 0x26c], 0
je 0x40986c
mov eax, dword [ebp - 0x274]
cmp dword [ebp - 0x270], 0
mov word [eax - 2], 0
je 0x4095ee
mov dword [esp], ebx
call fcn.00408e17
push ecx
test eax, eax
je 0x40986c
mov dword [esp], ebx
call fcn.004089b5
push esi
mov dword [esp + 4], ebx
mov dword [esp], str.RMDir:_RemoveDirectory___s__
call fcn.00408dc8
mov eax, edi
mov dword [esp], ebx
or eax, 1
mov dword [esp + 4], eax
call fcn.00408453
push edx
push edx
mov dword [esp + 4], ebx
test eax, eax
jne 0x40985e
test edi, edi
je 0x40984a
mov dword [esp], str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.00408dc8
mov dword [esp + 4], ebx
mov dword [esp], 0xfffffff1
call fcn.004079d2
xor ecx, ecx
push edx
push edx
mov dword [esp + 4], ecx
mov dword [esp], ebx
call fcn.0040954f
jmp 0x40986a
mov dword [esp], str.RMDir:_RemoveDirectory_failed___s__
call fcn.00408dc8
inc dword [0x41a028]
jmp 0x40986c
mov dword [esp], 0xffffffe5
call fcn.004079d2
push eax
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8