Function at 0x1027cbd
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x1054254]
xor eax, ebp
mov dword [ebp - 4], eax
or dword [ebp - 0x264], 0xffffffff
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
push edi
mov dword [ebp - 0x260], esi
mov dword [ebp - 0x258], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, edi
jne 0x1027d06
mov dword [ebp - 0x258], 0x57
jmp 0x1027de7
cmp dword [ebp + 0xc], 1
jne 0x1027d21
push esi
call fcn.01027a25
test eax, eax
je 0x1027d21
mov dword [ebp - 0x258], edi
jmp 0x1027de7
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x1027d26
sub eax, edx
sar eax, 1
mov edi, eax
lea esi, [edi + 3]
push ebx
mov ebx, dword [sym.imp.msvcrt.dll_malloc]
lea eax, [esi + esi]
push eax
call ebx
mov dword [esp], 0x100707c
push dword [ebp - 0x260]
mov dword [ebp - 0x25c], eax
push esi
push eax
call fcn.0101436f
test eax, eax
jge 0x1027d89
mov ecx, 0xffff
mov esi, eax
and esi, ecx
mov edx, esi
jle 0x1027d79
and edx, ecx
or edx, 0x80070000
cmp edx, eax
jne 0x1027f33
mov dword [ebp - 0x258], esi
jmp 0x1027dd0
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push eax
mov dword [ebp - 0x264], eax
call fcn.0100d382
test al, al
jne 0x1027e0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x258], eax
cmp eax, 2
jne 0x1027dd0
and dword [ebp - 0x258], 0
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp dword [ebp - 0x25c], 0
pop ebx
je 0x1027de7
push dword [ebp - 0x25c]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push 0
lea eax, [ebp - 0x264]
push eax
call fcn.01025242
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x258]
pop edi
xor ecx, ebp
pop esi
call fcn.0102ea9b
leave
ret 8
mov ecx, 0x1007078
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1027e3c
test dx, dx
je 0x1027e38
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1027e3c
add eax, 4
add ecx, 4
test dx, dx
jne 0x1027e16
xor eax, eax
jmp 0x1027e41
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1027f13
mov ecx, 0x1004064
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1027e7a
test dx, dx
je 0x1027e76
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1027e7a
add eax, 4
add ecx, 4
test dx, dx
jne 0x1027e54
xor eax, eax
jmp 0x1027e7f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1027f13
lea eax, [ebp - 0x228]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1027e90
sub eax, edx
sar eax, 1
lea eax, [eax + edi + 2]
cmp esi, eax
jae 0x1027ecb
cmp dword [ebp - 0x25c], 0
mov esi, eax
je 0x1027ebe
push dword [ebp - 0x25c]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
lea eax, [esi + esi]
push eax
call ebx
pop ecx
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x260]
push esi
push dword [ebp - 0x25c]
call fcn.0101436f
test eax, eax
jl 0x1027d64
test byte [ebp - 0x254], 0x10
je 0x1027f07
mov eax, dword [ebp + 0xc]
inc eax
push eax
push dword [ebp - 0x25c]
call fcn.01027cbd
jmp 0x1027f13
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1027e0b
jmp 0x1027dc4
mov dword [ebp - 0x258], eax
jmp 0x1027dd0