Function at 0x1001b81
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x26c
mov eax, dword [0x1005008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov esi, dword [ebp + 8]
push edi
push esi
mov dword [ebp - 0x260], esi
mov dword [ebp - 0x268], eax
call ebx
lea edi, [esi + eax*2]
push esi
mov dword [ebp - 0x264], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1001bfa
cmp byte [0x1005023], 0
je 0x1001bdb
cmp byte [0x1005021], 0
jne 0x1001c0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
call fcn.010014b1
cmp byte [0x1005021], 0
pop ecx
pop ecx
jne 0x1001c0f
xor al, al
jmp 0x1001e3d
push esi
test eax, 0x800
je 0x1001c06
push 6
jmp 0x1001c08
push 7
call fcn.01001417
pop ecx
pop ecx
add dword [0x1005588], 1
push dword [ebp - 0x268]
adc dword [0x100558c], 0
sub edi, esi
sar edi, 1
call ebx
add eax, edi
mov esi, 0x104
cmp eax, esi
jge 0x1001d0b
push dword [ebp - 0x268]
mov dword [ebp - 0x258], esi
sub dword [ebp - 0x258], edi
push dword [ebp - 0x258]
push dword [ebp - 0x264]
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
je 0x1001d0b
push 0x10011d8
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1001ce8
push 0x100115c
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1001ce8
lea eax, [ebp - 0x228]
push eax
call ebx
add eax, edi
cmp eax, esi
jge 0x1001ce8
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x258]
push dword [ebp - 0x264]
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x260]
call fcn.0100194c
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1001c80
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [0x1005020], 0
je 0x1001e3b
push 0x10011d4
call ebx
add eax, edi
cmp eax, esi
jge 0x1001e3b
mov dword [ebp - 0x258], esi
sub dword [ebp - 0x258], edi
push 0x10011d4
push dword [ebp - 0x258]
push dword [ebp - 0x264]
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
je 0x1001e3b
push 0x100115c
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1001e14
push 0x10011d8
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1001e14
test byte [ebp - 0x254], 0x10
je 0x1001e14
push 0x10011d0
call ebx
lea ecx, [ebp - 0x228]
push ecx
mov dword [ebp - 0x26c], eax
call ebx
mov ecx, dword [ebp - 0x26c]
add ecx, edi
add eax, ecx
cmp eax, esi
jge 0x1001e0e
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x258]
push dword [ebp - 0x264]
call sub.msvcrt.dll_wcscpy_s
push 0x10011d0
push esi
push dword [ebp - 0x260]
call sub.msvcrt.dll_wcscat_s
add esp, 0x18
push dword [ebp - 0x268]
push dword [ebp - 0x260]
call fcn.01001b81
test al, al
je 0x1001e4e
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1001d70
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010036a9
leave
ret 8
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
cmp byte [0x1005021], al
setne al
jmp 0x1001e3d