Function at 0x10022da
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 eax
mov dword [ebp - 0x260], esi
mov dword [ebp - 0x26c], eax
call ebx
push esi
test eax, eax
jne 0x100241d
xor edi, edi
inc edi
mov dword [ebp - 0x264], edi
call fcn.0100185c
mov dword [ebp - 0x258], eax
cmp eax, 0xffffffff
jne 0x100234e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
call fcn.010014b1
pop ecx
xor eax, eax
cmp byte [0x1005021], al
pop ecx
setne al
jmp 0x1002729
push esi
push 9
call fcn.01001417
pop ecx
pop ecx
xor ebx, ebx
push ebx
lea eax, [ebp - 0x26c]
push eax
push ebx
push ebx
push 2
lea eax, [ebp - 0x264]
push eax
push 0x9c040
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10023e5
cmp byte [0x1005023], bl
je 0x1002392
cmp byte [0x1005021], bl
jne 0x100239a
push 2
call fcn.01001417
pop ecx
cmp byte [0x1005023], bl
jne 0x10023cc
cmp byte [0x1005021], bl
jne 0x10023cc
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 1
jne 0x10023c1
push esi
push 0x1a
call fcn.01001417
jmp 0x10023ca
call edi
push eax
push esi
call fcn.010014b1
pop ecx
pop ecx
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp byte [0x1005021], bl
jmp 0x1002346
cmp byte [0x1005023], bl
jne 0x10023f4
push edi
call fcn.01001417
pop ecx
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add dword [0x1005588], edi
adc dword [0x100558c], ebx
add dword [0x1005db0], edi
adc dword [0x1005db4], ebx
jmp 0x1002727
call ebx
lea edi, [esi + eax*2]
push esi
mov dword [ebp - 0x268], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100232f
push esi
test eax, 0x800
je 0x1002444
push 0xa
jmp 0x1002446
push 0xb
call fcn.01001417
add dword [0x1005588], 1
pop ecx
pop ecx
adc dword [0x100558c], 0
push dword [ebp - 0x26c]
sub edi, esi
sar edi, 1
call ebx
add eax, edi
mov esi, 0x104
cmp eax, esi
jge 0x10025f7
push dword [ebp - 0x26c]
mov dword [ebp - 0x25c], esi
sub dword [ebp - 0x25c], edi
push dword [ebp - 0x25c]
push dword [ebp - 0x268]
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 - 0x258], eax
cmp eax, 0xffffffff
je 0x10025f7
push 0x100115c
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x10025d0
push 0x10011d8
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x10025d0
lea eax, [ebp - 0x228]
push eax
call ebx
add eax, edi
cmp eax, esi
jge 0x10025d0
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x25c]
push dword [ebp - 0x268]
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
push dword [ebp - 0x260]
call fcn.01001814
test al, al
je 0x1002550
cmp byte [0x1005023], 0
jne 0x10025d0
push dword [ebp - 0x268]
push 0x14
call fcn.01001417
pop ecx
pop ecx
jmp 0x10025d0
push dword [ebp - 0x260]
call fcn.0100185c
mov dword [ebp - 0x264], eax
cmp eax, 0xffffffff
jne 0x10025a9
cmp byte [0x1005023], 0
je 0x1002578
cmp byte [0x1005021], 0
jne 0x10025d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.010014b1
cmp byte [0x1005021], 0
pop ecx
pop ecx
jne 0x10025d0
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor al, al
jmp 0x1002729
lea ecx, [ebp - 0x254]
push ecx
push dword [ebp - 0x260]
push eax
call fcn.01001fd6
push dword [ebp - 0x264]
test al, al
je 0x100273a
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10024be
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [0x1005020], 0
je 0x1002727
push 0x10011d4
call ebx
add eax, edi
cmp eax, esi
jge 0x1002727
mov dword [ebp - 0x25c], esi
sub dword [ebp - 0x25c], edi
push 0x10011d4
push dword [ebp - 0x25c]
push dword [ebp - 0x268]
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 - 0x258], eax
cmp eax, 0xffffffff
je 0x1002727
push 0x100115c
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1002700
push 0x10011d8
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1002700
test byte [ebp - 0x254], 0x10
je 0x1002700
push 0x10011d0
call ebx
lea ecx, [ebp - 0x228]
push ecx
mov dword [ebp - 0x264], eax
call ebx
mov ecx, dword [ebp - 0x264]
add ecx, edi
add eax, ecx
cmp eax, esi
jge 0x10026fa
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x25c]
push dword [ebp - 0x268]
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 - 0x26c]
push dword [ebp - 0x260]
call fcn.010022da
test al, al
je 0x1002740
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x100265c
push dword [ebp - 0x258]
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
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
cmp byte [0x1005021], al
jmp 0x1002346