Function at 0x40db80
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x42b48c]
push ebx
mov ebx, dword [ebp + 8]
xor eax, ebp
push esi
push edi
mov dword [esp + 0x264], eax
mov byte [esp + 0x158], 0
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x159]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
mov dword [esp + 0x14], ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x40dbf8
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.00415d1a
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call esi
test eax, eax
je 0x40ddcb
push ebx
call esi
cmp eax, 0xff
jbe 0x40dc32
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.00415d1a
mov esp, ebp
pop ebp
ret
push 0x103
lea eax, [esp + 0x15c]
push ebx
push eax
call fcn.00416230
add esp, 0xc
lea ecx, [esp + 0x158]
push ecx
call esi
lea edx, [esp + 0x158]
push 0x5c
push edx
lea edi, [esp + eax + 0x160]
call fcn.00417430
add esp, 8
cmp eax, edi
je 0x40dc88
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40dc77
mov ax, word [0x424408]
mov word [edi], ax
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40dc90
mov ecx, dword [0x42498c]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x15c]
push eax
mov dword [edi], ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x40ddcb
mov ebx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
push 0x103
push ecx
lea edx, [esp + 0x160]
push edx
call fcn.00416230
add esp, 0xc
lea eax, [esp + 0x44]
push eax
call esi
lea ecx, [esp + 0x158]
push ecx
mov edi, eax
call esi
add edi, eax
cmp edi, 0x103
ja 0x40dd4f
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40dd02
mov dx, word [0x424408]
lea eax, [esp + 0x44]
mov word [edi], dx
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40dd20
lea edi, [esp + 0x158]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40dd31
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]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
test byte [esp + 0x18], 0x10
je 0x40dd7c
cmp byte [esp + 0x44], 0x2e
je 0x40dda1
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40dda1
push ebx
push eax
lea eax, [esp + 0x160]
push eax
call fcn.0040db80
add esp, 0xc
test eax, eax
je 0x40ddcb
jmp 0x40dda1
push 0x80
lea ecx, [esp + 0x15c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test ebx, ebx
jne 0x40dda1
lea edx, [esp + 0x158]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40dcc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
push edi
je 0x40dde2
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.00415d1a
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40ddcb
mov esi, dword [esp + 0x10]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ecx, dword [esp + 0x264]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415d1a
mov esp, ebp
pop ebp
ret