Function at 0x40cb31
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively

Disassembly:
push 0x2d4
mov eax, 0x42da2d
call fcn.0042c599
mov edi, edx
mov dword [ebp - 0x2e0], edi
mov ebx, ecx
mov eax, dword [ebp + 8]
xor esi, esi
and dword [ebp - 0x38], esi
mov dword [ebp - 0x2d8], eax
xor eax, eax
mov dword [ebp - 0x2dc], esi
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
and dword [ebp - 4], eax
lea ecx, [ebp - 0x68]
push 0x401c48
mov edx, ebx
call fcn.0040f694
pop ecx
push edi
mov edx, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.0040f6dc
pop ecx
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 2
call fcn.0040e6ce
push esi
push 1
lea ecx, [ebp - 0x30]
call fcn.0040e4cd
push esi
push 1
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 0
call fcn.0040e4cd
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x40cbc4
lea eax, [ebp - 0x48]
lea ecx, [ebp - 0x2d4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40cc96
mov esi, dword [ebp - 0x2d8]
test byte [ebp - 0x2d4], 0x10
jne 0x40cc71
and dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x2a8]
push eax
call fcn.0040e64a
push 0x401c48
mov edx, ebx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x84]
call fcn.0040f694
pop ecx
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
push ecx
mov edx, eax
lea ecx, [ebp - 0x68]
call fcn.0040f6dc
pop ecx
push eax
mov ecx, esi
mov byte [ebp - 4], 5
call fcn.0040df47
push 0
push 1
lea ecx, [ebp - 0x68]
call fcn.0040e4cd
push 0
push 1
lea ecx, [ebp - 0x84]
call fcn.0040e4cd
push 0
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.0040e4cd
lea eax, [ebp - 0x2d4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40cbe3
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x2dc]
jmp 0x40ccc4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40ccc4
cmp eax, 3
je 0x40ccc4
cmp eax, 0x35
je 0x40ccc4
test eax, eax
jg 0x40ccb3
mov esi, eax
jmp 0x40ccbc
movzx esi, ax
or esi, 0x80070000
test esi, esi
js 0x40ce47
push 0x401c4c
mov edx, ebx
lea ecx, [ebp - 0x84]
call fcn.0040f694
pop ecx
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 6
call fcn.0040e6ce
push 0
push 1
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 0
call fcn.0040e4cd
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x40cd07
lea eax, [ebp - 0x48]
lea ecx, [ebp - 0x2d4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40ce21
lea eax, [ebp - 0x2a8]
push 0x401c54
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x40cdf9
lea eax, [ebp - 0x2a8]
push 0x401c58
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x40cdf9
test byte [ebp - 0x2d4], 0x10
je 0x40cdf9
and dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x2a8]
push eax
call fcn.0040e64a
push 0x401c48
mov edx, ebx
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x68]
call fcn.0040f694
pop ecx
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
push ecx
mov edx, eax
lea ecx, [ebp - 0x84]
call fcn.0040f6dc
pop ecx
mov edx, dword [ebp - 0x2e0]
mov ecx, eax
push 1
push dword [ebp - 0x2d8]
mov byte [ebp - 4], 9
call fcn.0040cb31
push 0
push 1
lea ecx, [ebp - 0x84]
mov esi, eax
call fcn.0040e4cd
push 0
push 1
lea ecx, [ebp - 0x68]
call fcn.0040e4cd
push 0
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.0040e4cd
test esi, esi
js 0x40ce0f
lea eax, [ebp - 0x2d4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40cd20
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jmp 0x40ce34
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40ce47
cmp eax, 3
je 0x40ce47
cmp eax, 0x35
je 0x40ce47
test eax, eax
jg 0x40ce3e
mov esi, eax
jmp 0x40ce47
movzx esi, ax
or esi, 0x80070000
push 0
push 1
lea ecx, [ebp - 0x4c]
call fcn.0040e4cd
mov eax, esi
call fcn.0042c548
ret 8