Function at 0x10012160
Capabilities:
Check if file exists
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101105d6
mov eax, dword fs:[0]
push eax
sub esp, 0x674
mov eax, dword [0x1015e404]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
test edi, edi
jne 0x1001219c
xor eax, eax
jmp 0x100124aa
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10012195
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100121b0
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jbe 0x10012195
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 0x674], 1
push 0
push eax
call fcn.100dd9d0
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.100dd9d0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x420]
add esp, 0x18
push edi
push eax
call ebx
push str..
lea eax, [ebp - 0x420]
push eax
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp eax, 0xffffffff
je 0x10012232
test al, 1
je 0x10012232
and eax, 0xfffffffe
push eax
push edi
call esi
lea eax, [ebp - 0x670]
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x680], eax
cmp eax, 0xffffffff
je 0x1001249b
lea ecx, [ebp - 0x670]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x1001248f
nop dword [eax + eax]
test byte [ebp - 0x670], 0x10
je 0x100122f4
cmp word [ebp - 0x644], 0x2e
jne 0x100122a7
mov ax, word [ebp - 0x642]
test ax, ax
je 0x10012474
cmp ax, 0x2e
jne 0x100122a7
cmp word [ebp - 0x640], 0
je 0x10012474
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100dd9d0
add esp, 0xc
lea eax, [ebp - 0x218]
push edi
push eax
call ebx
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x218]
push eax
call ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x218]
push eax
call fcn.10012160
add esp, 8
and dword [ebp - 0x674], eax
jmp 0x10012474
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100dd9d0
add esp, 0xc
lea eax, [ebp - 0x218]
push edi
push eax
call ebx
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x218]
push eax
call ebx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10012347
test al, 1
je 0x10012347
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10012474
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10012474
push 0x80
lea eax, [ebp - 0x218]
push eax
call esi
test eax, eax
je 0x10012398
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10012474
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100123c5
test al, 0x10
je 0x100123c5
lea eax, [ebp - 0x218]
push eax
call fcn.10014720
add esp, 4
test eax, eax
jne 0x10012474
cmp dword [ebp + 0xc], 0
je 0x10012474
lea ecx, [ebp - 0x67c]
call fcn.100020c0
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x678]
call fcn.100024e0
lea eax, [ebp - 0x67c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x678]
push eax
call fcn.10011d40
mov edx, dword [ebp - 0x678]
add esp, 8
mov esi, eax
mov byte [ebp - 4], 0
add edx, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x10012431
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 4
test esi, esi
mov esi, dword [ebp - 0x67c]
push 0
je 0x10012442
push esi
jmp 0x10012449
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1001246e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x670]
push eax
push dword [ebp - 0x680]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10012270
push dword [ebp - 0x680]
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
call fcn.10014720
add esp, 4
and eax, dword [ebp - 0x674]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10067a9c
mov esp, ebp
pop ebp
ret