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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x27c
mov eax, dword [0x406274]
xor eax, esp
mov dword [esp + 0x278], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, edx
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x28], ecx
push edi
mov ecx, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], eax
mov edi, eax
call fcn.0040334b
mov ebx, eax
push 0x3f
push ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x4034f9
push 0x2a
push ebx
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
test eax, eax
jne 0x4034f9
push esi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40342a
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, dword [ebp + 8]
mov edx, eax
cmp edx, 2
je 0x40340c
cmp edx, 3
jne 0x403413
mov eax, ebx
and eax, 0x10
jne 0x403423
push dword [esp + 0xc]
mov ecx, ebx
call fcn.00401c7c
jmp 0x403885
xor edi, edi
jmp 0x403688
push dword [esp + 0x24]
mov ebx, dword [ebp + 8]
and esi, 0x10
mov edi, dword [esp + 0x2c]
mov ecx, edi
push ebx
push esi
push dword [esp + 0x38]
push dword [esp + 0x1c]
call dword [0x4071e4]
call edi
mov edi, eax
test edi, edi
jne 0x403885
mov ecx, ebx
and ecx, 0x10
je 0x403885
test esi, esi
je 0x403688
mov esi, dword [esp + 0xc]
mov ecx, esi
mov dword [esp + 0x10], edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x403476
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 3]
mov edx, edi
lea ecx, [esp + 0x10]
call fcn.00401c50
test al, al
je 0x403710
push esi
mov esi, dword [esp + 0x14]
push edi
push esi
call dword [sym.imp.msvcrt.dll_wcscpy_s]
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x18]
jne 0x4034b0
sub ecx, edx
sar ecx, 1
cmp word [esi + ecx*2 - 2], 0x5c
jne 0x4034d0
push 0x4015d8
jmp 0x4034d5
push 0x4015dc
push edi
push esi
call dword [sym.imp.msvcrt.dll_wcscat_s]
mov ecx, dword [esp + 0x38]
add esp, 0xc
mov edx, esi
push dword [esp + 0x24]
push dword [esp + 0x2c]
push ebx
call fcn.00403377
jmp 0x403885
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindFirstFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x403537
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, dword [ebp + 8]
cmp eax, 2
je 0x403521
cmp eax, 3
jne 0x403528
mov ecx, ebx
and ecx, 0x10
jne 0x403530
push esi
mov edx, eax
jmp 0x403417
xor edi, edi
jmp 0x403680
mov ebx, dword [ebp + 8]
mov ecx, 0x4015e4
lea eax, [esp + 0x5c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403569
test dx, dx
je 0x403565
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403569
add eax, 4
add ecx, 4
test dx, dx
jne 0x403543
xor eax, eax
jmp 0x40356e
sbb eax, eax
or eax, 1
test eax, eax
je 0x403652
mov ecx, 0x4015e8
lea eax, [esp + 0x5c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4035a7
test dx, dx
je 0x4035a1
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4035a7
add eax, 4
add ecx, 4
test dx, dx
jne 0x40357f
xor ecx, ecx
mov eax, ecx
jmp 0x4035ae
sbb eax, eax
or eax, 1
xor ecx, ecx
test eax, eax
je 0x403652
mov dword [esp + 0x10], ecx
xor edi, edi
lea ecx, [esp + 0x5c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4035c3
mov edi, dword [esp + 0x20]
sub ecx, edx
sar ecx, 1
sub edi, esi
sar edi, 1
lea esi, [ecx + 1]
add esi, edi
lea ecx, [esp + 0x10]
mov edx, esi
mov dword [esp + 0x18], esi
call fcn.00401c50
test al, al
je 0x403706
push edi
push dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
lea eax, [esp + 0x6c]
push eax
mov eax, dword [esp + 0x2c]
sub eax, edi
push eax
lea eax, [esi + edi*2]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
mov eax, dword [esp + 0x4c]
add esp, 0x1c
mov edi, dword [esp + 0x28]
and eax, 0x10
mov ecx, edi
push dword [esp + 0x24]
push ebx
push eax
push dword [esp + 0x38]
push esi
call dword [0x4071e4]
call edi
push esi
mov edi, eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
test edi, edi
jne 0x403669
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindNextFileW]
test eax, eax
jne 0x40353a
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
mov ecx, ebx
and ecx, 0x10
test edi, edi
jne 0x403883
test ecx, ecx
je 0x403883
xor eax, eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0xc]
sar eax, 1
mov dword [esp + 0x1c], eax
lea esi, [eax + 2]
mov edx, esi
call fcn.00401c50
test al, al
je 0x403710
push dword [esp + 0x1c]
push dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
mov eax, dword [esp + 0x2c]
push 0x4015d8
push 2
lea eax, [esi + eax*2]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
add esp, 0x1c
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindFirstFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x403718
push esi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
mov ecx, ebx
call fcn.00401c7c
mov esi, eax
jmp 0x4038a9
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
push 8
pop eax
jmp 0x403885
mov ecx, 0x4015e4
lea eax, [esp + 0x5c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403749
test dx, dx
je 0x403743
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403749
add eax, 4
add ecx, 4
test dx, dx
jne 0x403721
xor esi, esi
mov eax, esi
jmp 0x403750
sbb eax, eax
or eax, 1
xor esi, esi
test eax, eax
je 0x403857
mov ecx, 0x4015e8
lea eax, [esp + 0x5c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403787
test dx, dx
je 0x403783
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403787
add eax, 4
add ecx, 4
test dx, dx
jne 0x403761
mov eax, esi
jmp 0x40378c
sbb eax, eax
or eax, 1
test eax, eax
je 0x403857
test byte [esp + 0x30], 0x10
je 0x403857
lea ecx, [esp + 0x5c]
mov dword [esp + 0x10], esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4037aa
sub ecx, edx
mov edx, dword [esp + 0x20]
sar ecx, 1
xor edi, edi
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, di
jne 0x4037c2
sub edx, esi
mov esi, dword [esp + 0x1c]
sar edx, 1
lea eax, [esi + ecx]
lea edi, [edx + 2]
add edi, eax
lea ecx, [esp + 0x10]
mov edx, edi
call fcn.00401c50
test al, al
je 0x40389c
push esi
push dword [esp + 0x10]
mov esi, dword [esp + 0x18]
push edi
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x6c]
push eax
mov eax, edi
sub eax, ecx
push eax
lea eax, [esi + ecx*2]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
push 0x401110
push edi
push esi
call dword [sym.imp.msvcrt.dll_wcscat_s]
push dword [esp + 0x48]
push edi
push esi
call dword [sym.imp.msvcrt.dll_wcscat_s]
mov ecx, dword [esp + 0x60]
add esp, 0x34
mov edx, esi
push dword [esp + 0x24]
push dword [esp + 0x2c]
push ebx
call fcn.00403377
push esi
mov edi, eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
test edi, edi
jne 0x40386e
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindNextFileW]
test eax, eax
jne 0x403718
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, edi
mov ecx, dword [esp + 0x284]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00405760
mov esp, ebp
pop ebp
ret 0xc
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
push 8
pop esi
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, esi
jmp 0x403885