Function at 0x10031f5
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, 0x274
mov eax, dword [0x100725c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
and dword [ebp - 0x258], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x14]
push esi
mov dword [ebp - 0x270], ebx
mov dword [ebp - 0x260], esi
mov dword [ebp - 0x274], edi
mov dword [ebp - 0x268], eax
call fcn.0100318b
push eax
mov dword [ebp - 0x26c], eax
call fcn.010031c2
test eax, eax
jne 0x100335c
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x100328f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x100326e
cmp eax, 3
jne 0x1003274
test byte [ebp + 0x10], 0x10
jne 0x1003283
push esi
push eax
push dword [ebp + 0x10]
call fcn.01001b8a
jmp 0x100372f
and dword [ebp - 0x258], 0
jmp 0x10034ff
push dword [ebp - 0x268]
and eax, 0x10
push dword [ebp + 0x10]
mov dword [ebp - 0x264], eax
push eax
push ebx
push esi
call edi
mov dword [ebp - 0x258], eax
test eax, eax
jne 0x100372f
test byte [ebp + 0x10], 0x10
je 0x100372f
cmp dword [ebp - 0x264], eax
je 0x10034ff
and dword [ebp - 0x258], eax
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10032d5
sub eax, edx
sar eax, 1
lea edi, [eax + 3]
push edi
lea eax, [ebp - 0x258]
push eax
call fcn.01001b4d
test al, al
jne 0x10032ff
push 8
pop eax
jmp 0x100372f
push esi
mov esi, dword [ebp - 0x258]
push edi
push esi
call sub.msvcrt.dll_wcscpy_s
mov eax, esi
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1003315
sub eax, edx
sar eax, 1
cmp word [esi + eax*2 - 2], 0x5c
jne 0x1003332
push 0x10016b0
jmp 0x1003337
push 0x10016a8
push edi
push esi
call sub.msvcrt.dll_wcscat_s
add esp, 0xc
push dword [ebp - 0x268]
push dword [ebp - 0x274]
push dword [ebp + 0x10]
push esi
push ebx
call fcn.010031f5
jmp 0x100372f
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
jne 0x100339f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1003389
cmp eax, 3
jne 0x1003274
test byte [ebp + 0x10], 0x10
je 0x1003274
and dword [ebp - 0x258], 0
jmp 0x10034f5
mov ecx, 0x10016a4
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10033d0
test dx, dx
je 0x10033cc
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10033d0
add eax, 4
add ecx, 4
test dx, dx
jne 0x10033aa
xor eax, eax
jmp 0x10033d5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10034c1
mov ecx, 0x100169c
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100340e
test dx, dx
je 0x100340a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100340e
add eax, 4
add ecx, 4
test dx, dx
jne 0x10033e8
xor eax, eax
jmp 0x1003413
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10034c1
and dword [ebp - 0x258], 0
lea eax, [ebp - 0x228]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100342b
mov esi, dword [ebp - 0x26c]
sub esi, dword [ebp - 0x260]
sub eax, edx
sar eax, 1
sar esi, 1
lea edi, [esi + eax + 1]
push edi
lea eax, [ebp - 0x258]
push eax
call fcn.01001b4d
test al, al
je 0x1003593
mov ebx, dword [ebp - 0x258]
push esi
push dword [ebp - 0x260]
push edi
push ebx
call sub.msvcrt.dll_wcsncpy_s
lea eax, [ebp - 0x228]
push eax
sub edi, esi
lea eax, [ebx + esi*2]
push edi
push eax
call sub.msvcrt.dll_wcscpy_s
mov eax, dword [ebp - 0x254]
add esp, 0x1c
push dword [ebp - 0x268]
and eax, 0x10
push dword [ebp + 0x10]
push eax
push dword [ebp - 0x270]
push ebx
call dword [ebp - 0x274]
push ebx
mov dword [ebp - 0x258], eax
call dword [sym.imp.msvcrt.dll_free]
cmp dword [ebp - 0x258], 0
pop ecx
jne 0x10034dc
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x100339f
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x258], 0
jne 0x1003729
test byte [ebp + 0x10], 0x10
je 0x1003729
mov ebx, dword [ebp - 0x26c]
sub ebx, dword [ebp - 0x260]
and dword [ebp - 0x264], 0
sar ebx, 1
lea esi, [ebx + 2]
push esi
lea eax, [ebp - 0x264]
push eax
call fcn.01001b4d
test al, al
je 0x10032f7
mov edi, dword [ebp - 0x264]
push ebx
push dword [ebp - 0x260]
push esi
push edi
call sub.msvcrt.dll_wcsncpy_s
push 0x10016b0
sub esi, ebx
lea eax, [edi + ebx*2]
push esi
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0x1c
lea eax, [ebp - 0x254]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
jne 0x10035a4
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 0x10]
call fcn.01001b8a
mov esi, eax
push dword [ebp - 0x264]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, esi
jmp 0x100372f
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x10032f7
push 4
mov ecx, 0x10016a4
lea eax, [ebp - 0x228]
pop esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10035d6
test dx, dx
je 0x10035d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10035d6
add eax, esi
add ecx, esi
test dx, dx
jne 0x10035b2
xor eax, eax
jmp 0x10035db
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10036ec
mov ecx, 0x100169c
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1003612
test dx, dx
je 0x100360e
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1003612
add eax, esi
add ecx, esi
test dx, dx
jne 0x10035ee
xor eax, eax
jmp 0x1003617
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10036ec
test byte [ebp - 0x254], 0x10
je 0x10036ec
and dword [ebp - 0x258], 0
lea eax, [ebp - 0x228]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100363c
sub eax, edx
sar eax, 1
mov ecx, eax
mov eax, dword [ebp - 0x26c]
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x1003655
sub eax, edx
sar eax, 1
add eax, ebx
lea edi, [eax + ecx + 2]
push edi
lea eax, [ebp - 0x258]
push eax
call fcn.01001b4d
test al, al
je 0x1003740
mov esi, dword [ebp - 0x258]
push ebx
push dword [ebp - 0x260]
push edi
push esi
call sub.msvcrt.dll_wcsncpy_s
lea eax, [ebp - 0x228]
push eax
mov eax, edi
sub eax, ebx
push eax
lea eax, [esi + ebx*2]
push eax
call sub.msvcrt.dll_wcscpy_s
push 0x1001640
push edi
push esi
call sub.msvcrt.dll_wcscat_s
push dword [ebp - 0x26c]
push edi
push esi
call sub.msvcrt.dll_wcscat_s
add esp, 0x34
push dword [ebp - 0x268]
push dword [ebp - 0x274]
push dword [ebp + 0x10]
push esi
push dword [ebp - 0x270]
call fcn.010031f5
push esi
mov dword [ebp - 0x258], eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0x258], 0
jne 0x1003710
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10035a4
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x264]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010054a3
leave
ret 0x14
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
push 8
pop esi
jmp 0x100357f