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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e214
mov eax, dword fs:[0]
push eax
sub esp, 0x2a0
mov eax, dword [0x4251d4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
push eax
call fcn.00405400
add esp, 4
movzx ecx, al
cmp ecx, 1
jne 0x405094
mov dword [ebp - 0x10], 1
push 0
push 0
lea ecx, [ebp - 0x30]
call fcn.004077c0
mov edx, dword [0x41ff6c]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x30]
call fcn.00407220
mov dword [ebp - 4], 0
push str..
call fcn.00411130
add esp, 4
mov dword [ebp - 0x1f4], eax
mov ecx, dword [ebp - 0x1f4]
push ecx
push str..
lea ecx, [ebp - 0x30]
call fcn.004070e0
cmp dword [ebp - 0x18], 0x10
jb 0x4050f4
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x290], edx
jmp 0x4050fd
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x290], eax
lea ecx, [ebp - 0x174]
push ecx
mov edx, dword [ebp - 0x290]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x178], eax
cmp dword [ebp - 0x178], 0xffffffff
jne 0x405147
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x17c], eax
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.004077c0
mov eax, dword [ebp - 0x17c]
jmp 0x4053e5
cmp dword [ebp - 0x34], 0
je 0x4052ca
mov ecx, dword [ebp - 0x174]
and ecx, 0x10
je 0x4052ae
push 0x41fb04
lea edx, [ebp - 0x148]
push edx
call fcn.004117f0
add esp, 8
test eax, eax
je 0x4052ae
push 0x41fb08
lea eax, [ebp - 0x148]
push eax
call fcn.004117f0
add esp, 8
test eax, eax
je 0x4052ae
lea ecx, [ebp - 0x204]
push ecx
lea ecx, [ebp - 0x30]
call fcn.004074e0
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x1fc], edx
mov dword [ebp - 0x1f8], eax
lea ecx, [ebp - 0x214]
push ecx
lea ecx, [ebp - 0x30]
call fcn.004074a0
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x20c], edx
mov dword [ebp - 0x208], eax
mov ecx, dword [ebp - 0x1f8]
push ecx
mov edx, dword [ebp - 0x1fc]
push edx
mov eax, dword [ebp - 0x208]
push eax
mov ecx, dword [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x21c]
push edx
lea ecx, [ebp - 0x30]
call fcn.00407350
push 0x41f450
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x198]
push ecx
call fcn.0040a870
add esp, 0xc
mov dword [ebp - 0x294], eax
mov edx, dword [ebp - 0x294]
mov dword [ebp - 0x298], edx
mov byte [ebp - 4], 1
lea eax, [ebp - 0x148]
push eax
mov ecx, dword [ebp - 0x298]
push ecx
lea edx, [ebp - 0x1b4]
push edx
call fcn.0040a870
add esp, 0xc
mov dword [ebp - 0x29c], eax
mov eax, dword [ebp - 0x29c]
mov dword [ebp - 0x224], eax
mov byte [ebp - 4], 2
mov ecx, dword [0x41ff6c]
push ecx
push 0
mov edx, dword [ebp - 0x224]
push edx
lea ecx, [ebp - 0x30]
call fcn.00407220
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x1b4]
call fcn.004077c0
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x198]
call fcn.004077c0
lea eax, [ebp - 0x30]
push eax
call fcn.00405040
add esp, 4
lea ecx, [ebp - 0x174]
push ecx
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [ebp - 0x34], eax
jmp 0x405147
mov eax, dword [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x18], 0x10
jb 0x4052ee
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x2a0], eax
jmp 0x4052fa
mov ecx, dword [ebp + 8]
add ecx, 4
mov dword [ebp - 0x2a0], ecx
mov edx, dword [ebp - 0x2a0]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 1
jne 0x405362
mov eax, dword [ebp + 8]
push eax
push str.__del_dir_:
lea ecx, [ebp - 0x1d0]
push ecx
call fcn.0040a7c0
add esp, 0xc
mov dword [ebp - 0x2a4], eax
mov edx, dword [ebp - 0x2a4]
mov dword [ebp - 0x2a8], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x2a8]
push eax
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x1d0]
call fcn.004077c0
jmp 0x4053c3
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x18], 0x10
jb 0x405379
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x2ac], eax
jmp 0x405385
mov ecx, dword [ebp + 8]
add ecx, 4
mov dword [ebp - 0x2ac], ecx
mov edx, dword [ebp - 0x2ac]
push edx
lea ecx, [ebp - 0x1ec]
call fcn.00406560
mov byte [ebp - 4], 4
lea eax, [ebp - 0x1ec]
push eax
call fcn.004058e0
add esp, 4
movzx ecx, al
mov dword [ebp - 0x10], ecx
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x1ec]
call fcn.004077c0
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x1f0], edx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.004077c0
mov eax, dword [ebp - 0x1f0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00411116
mov esp, ebp
pop ebp
ret