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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
push dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call edi
test eax, eax
jne 0x10020ea
push dword [ebp + 8]
xor esi, esi
inc esi
mov dword [ebp + 0xc], esi
call fcn.010016fc
mov edi, eax
cmp edi, 0xffffffff
jne 0x100203f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
call fcn.0100141f
pop ecx
pop ecx
jmp 0x100237c
push dword [ebp + 8]
push 9
call fcn.01001396
pop ecx
pop ecx
xor ebx, ebx
push ebx
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push 2
lea eax, [ebp + 0xc]
push eax
push 0x9c040
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10020b7
cmp byte [0x1004024], bl
je 0x100207a
cmp byte [0x1004021], bl
jne 0x1002082
push 2
call fcn.01001396
pop ecx
cmp byte [0x1004024], bl
jne 0x10020a3
cmp byte [0x1004021], bl
jne 0x10020a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
call fcn.0100141f
pop ecx
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp byte [0x1004021], bl
jmp 0x1002384
cmp byte [0x1004024], bl
jne 0x10020c6
push esi
call fcn.01001396
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add dword [0x1004248], esi
adc dword [0x100424c], ebx
add dword [0x1004a70], esi
adc dword [0x1004a74], ebx
jmp 0x1002364
mov ebx, dword [ebp + 8]
push ebx
call edi
lea esi, [ebx + eax*2]
push ebx
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x100210f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
jmp 0x1002033
test ah, 8
push ebx
je 0x1002119
push 0xa
jmp 0x100211b
push 0xb
call fcn.01001396
add dword [0x1004248], 1
pop ecx
pop ecx
adc dword [0x100424c], 0
push dword [ebp + 0xc]
sub esi, ebx
sar esi, 1
call edi
add eax, esi
mov ebx, 0x104
cmp eax, ebx
jge 0x100227c
push dword [ebp + 0xc]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x25c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x100227c
push 0x100112c
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x100225b
push 0x1001190
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x100225b
lea eax, [ebp - 0x230]
push eax
call edi
add eax, esi
cmp eax, ebx
jge 0x100225b
lea eax, [ebp - 0x230]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp + 8]
call fcn.010016ce
test al, al
je 0x10021ea
cmp byte [0x1004024], 0
jne 0x100225b
push dword [ebp - 8]
push 0x14
call fcn.01001396
pop ecx
pop ecx
jmp 0x100225b
push dword [ebp + 8]
call fcn.010016fc
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x100223a
cmp byte [0x1004024], 0
je 0x100220c
cmp byte [0x1004021], 0
jne 0x100225b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x230]
push eax
call fcn.0100141f
cmp byte [0x1004021], 0
pop ecx
pop ecx
jne 0x100225b
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor al, al
jmp 0x1002366
lea ecx, [ebp - 0x25c]
push ecx
push dword [ebp + 8]
push eax
call fcn.01001d28
test al, al
push dword [ebp - 0xc]
je 0x100236d
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1002170
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [0x1004020], 0
je 0x1002364
push 0x100118c
call edi
add eax, esi
cmp eax, ebx
jge 0x1002364
push 0x100118c
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x25c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x1002364
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push 0x100112c
lea eax, [ebp - 0x230]
push eax
call ebx
test eax, eax
je 0x1002343
push 0x1001190
lea eax, [ebp - 0x230]
push eax
call ebx
test eax, eax
je 0x1002343
test byte [ebp - 0x25c], 0x10
je 0x1002343
push 0x1001188
call edi
mov ebx, eax
lea eax, [ebp - 0x230]
push eax
call edi
mov ecx, esi
add ecx, ebx
add eax, ecx
cmp eax, 0x104
jge 0x1002343
lea eax, [ebp - 0x230]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x1001188
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01001ff5
test al, al
je 0x1002373
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10022c4
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
cmp byte [0x1004021], al
setne al
jmp 0x1002366