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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
mov eax, dword [0x43637c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [ebp - 0x270], eax
push edi
lea eax, [ebp - 0x290]
push eax
mov dword [ebp - 0x26c], ecx
mov dword [ebp - 0x264], ebx
mov byte [ebp - 0x259], 0
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x290]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x40567a
mov eax, dword [ebp - 0x280]
mov dword [ebp - 0x278], eax
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 0x274], eax
mov eax, ebx
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x40560c
sub eax, ecx
sar eax, 1
lea esi, [eax + 3]
xor ecx, ecx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00411d83
mov edi, eax
pop ecx
mov dword [ebp - 0x268], edi
test edi, edi
je 0x40567a
push ebx
push esi
push edi
call fcn.0041373a
add esp, 0xc
push 0x42f990
push esi
push edi
call fcn.004136bd
add esp, 0xc
lea eax, [ebp - 0x258]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x260], eax
cmp eax, 0xffffffff
jne 0x40568d
push edi
call fcn.00412f89
pop ecx
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412c50
leave
ret 0x18
mov ebx, 0x989680
mov ecx, 0x42f998
lea eax, [ebp - 0x22c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4056c3
test dx, dx
je 0x4056bf
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4056c3
add eax, 4
add ecx, 4
test dx, dx
jne 0x40569d
xor eax, eax
jmp 0x4056c8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405905
mov ecx, 0x42f99c
lea eax, [ebp - 0x22c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405701
test dx, dx
je 0x4056fd
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405701
add eax, 4
add ecx, 4
test dx, dx
jne 0x4056db
xor eax, eax
jmp 0x405706
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405905
test byte [ebp - 0x258], 0x10
je 0x4057e7
mov eax, dword [ebp - 0x264]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x405724
sub eax, edx
sar eax, 1
mov ecx, eax
lea eax, [ebp - 0x22c]
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x40573d
sub eax, edx
sar eax, 1
lea esi, [eax + ecx + 2]
xor ecx, ecx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00411d83
mov edi, eax
pop ecx
test edi, edi
je 0x40594c
push dword [ebp - 0x264]
push esi
push edi
call fcn.0041373a
add esp, 0xc
push 0x42f6f4
push esi
push edi
call fcn.004136bd
add esp, 0xc
lea eax, [ebp - 0x22c]
push eax
push esi
push edi
call fcn.004136bd
mov ecx, dword [ebp - 0x26c]
add esp, 0xc
lea eax, [ebp - 0x25a]
push eax
push dword [ebp + 0x18]
mov byte [ebp - 0x25a], 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.00405591
test al, al
je 0x4058d3
cmp byte [ebp - 0x25a], 0
je 0x4058d3
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x4058cf
mov eax, dword [ebp - 0x244]
mov edi, dword [ebp - 0x278]
mov ecx, dword [ebp - 0x240]
mov esi, dword [ebp - 0x274]
push 0
push ebx
push dword [ebp + 0x10]
sub edi, eax
push dword [ebp + 0xc]
sbb esi, ecx
call fcn.00423a70
cmp esi, edx
jb 0x4058e3
ja 0x405823
cmp edi, eax
jbe 0x4058e3
push 0
push ebx
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.00423a70
cmp esi, edx
ja 0x4058e3
jb 0x405843
cmp edi, eax
jae 0x4058e3
mov eax, dword [ebp - 0x264]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40584c
sub eax, edx
sar eax, 1
mov ecx, eax
lea eax, [ebp - 0x22c]
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x405865
sub eax, edx
sar eax, 1
lea esi, [eax + ecx + 2]
xor ecx, ecx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00411d83
mov edi, eax
pop ecx
test edi, edi
je 0x40594c
push dword [ebp - 0x264]
push esi
push edi
call fcn.0041373a
add esp, 0xc
push 0x42f6f4
push esi
push edi
call fcn.004136bd
add esp, 0xc
lea eax, [ebp - 0x22c]
push eax
push esi
push edi
call fcn.004136bd
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4058da
mov byte [ebp - 0x259], 1
push edi
call fcn.00412f89
pop ecx
jmp 0x4058ea
mov byte [ebp - 0x259], 1
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov edi, dword [ebp - 0x268]
jmp 0x405918
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405692
push edi
call fcn.00412f89
pop ecx
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [ebp - 0x259], 0
mov ecx, dword [ebp - 0x270]
sete al
mov byte [ecx], al
mov al, 1
jmp 0x40567c
push dword [ebp - 0x268]
call fcn.00412f89
pop ecx
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x40567a