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

Disassembly:
sub esp, 0x450
push ebx
mov ebx, dword [esp + 0x458]
push ebp
push esi
push edi
push ebx
lea eax, [esp + 0x158]
mov esi, ecx
push eax
mov dword [esp + 0x18], esi
call fcn.00406140
push ebx
lea ecx, [esp + 0x360]
push ecx
mov ecx, esi
call fcn.004060d0
lea eax, [esp + 0x154]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406450
sub eax, edx
cmp byte [esp + eax + 0x154], 0x5c
je 0x406482
lea edi, [esp + 0x154]
dec edi
jmp 0x406470
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406470
mov dx, word [0x424ed8]
mov word [edi], dx
mov ebp, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea eax, [esp + 0x14]
push eax
push ebx
call ebp
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4065b2
jmp 0x4064a0
mov edi, 0x424ff8
lea esi, [esp + 0x40]
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406597
mov edi, 0x424ff4
lea esi, [esp + 0x40]
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406597
test byte [esp + 0x14], 0x10
jne 0x406597
mov edi, 0x425964
lea esi, [esp + 0x35c]
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40653b
xor eax, eax
jmp 0x406500
mov cl, byte [esp + eax + 0x154]
mov byte [esp + eax + 0x258], cl
inc eax
test cl, cl
jne 0x406500
lea eax, [esp + 0x40]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406520
lea edi, [esp + 0x258]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406531
jmp 0x406579
xor eax, eax
lea ecx, [ecx]
mov cl, byte [esp + eax + 0x154]
mov byte [esp + eax + 0x258], cl
inc eax
test cl, cl
jne 0x406540
lea eax, [esp + 0x35c]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406560
lea edi, [esp + 0x258]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406571
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x258]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x14]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4064a0
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x464]
lea edx, [esp + 0x14]
push edx
push eax
call ebp
mov ebp, eax
cmp ebp, 0xffffffff
je 0x406696
mov ebx, dword [esp + 0x468]
jmp 0x4065e0
mov edi, 0x424ff8
lea esi, [esp + 0x40]
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40667b
mov edi, 0x424ff4
lea esi, [esp + 0x40]
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40667b
test byte [esp + 0x14], 0x10
je 0x40667b
test bl, bl
je 0x40667b
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x154]
mov byte [esp + eax + 0x258], cl
inc eax
test cl, cl
jne 0x406620
lea eax, [esp + 0x40]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406640
lea edi, [esp + 0x258]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406651
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
lea ecx, [esp + 0x25c]
push ecx
mov ecx, dword [esp + 0x18]
call fcn.00406410
lea edx, [esp + 0x14]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4065e0
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x450
ret 8