Function at 0x100765b
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get common file path
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x880
mov eax, dword [0x100bffc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x14]
and dword [edi], 0
mov ebx, 0x104
push ebx
lea ecx, [ebp - 0x414]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ecx
push eax
mov dword [ebp - 0x880], eax
mov dword [ebp - 0x870], 0x80004005
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x10076a9
cmp eax, ebx
jb 0x10076b1
and word [ebp - 0x414], 0
lea eax, [ebp - 0x61c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x10078a6
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x1007899
xor esi, esi
cmp dword [ebp + 0x10], esi
mov eax, 0x1003498
jne 0x10076e7
mov eax, 0x1003168
lea ecx, [ebp - 0x86c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x878], eax
jne 0x1007723
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jb 0x1007899
cmp eax, 3
ja 0x1007899
mov dword [ebp - 0x870], esi
jmp 0x1007899
lea eax, [ebp - 0x874]
push eax
push 0x1003a7c
push 1
push esi
push 0x1003a8c
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, esi
mov dword [ebp - 0x870], eax
jl 0x100788d
mov eax, dword [ebp - 0x874]
mov ecx, dword [eax]
lea edx, [ebp - 0x87c]
push edx
push 0x1003a9c
push eax
call dword [ecx]
cmp eax, esi
mov dword [ebp - 0x870], eax
jl 0x1007881
mov esi, dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test byte [ebp - 0x86c], 0x10
lea eax, [ebp - 0x840]
je 0x10077d3
push 0x1003494
push eax
call esi
test eax, eax
je 0x100784c
push 0x100348c
lea eax, [ebp - 0x840]
push eax
call esi
test eax, eax
je 0x100784c
cmp dword [ebp + 0x10], 0
je 0x100784c
push edi
push dword [ebp + 0x10]
lea eax, [ebp - 0x840]
push dword [ebp - 0x880]
push eax
call fcn.0100765b
mov dword [ebp - 0x870], eax
jmp 0x100784c
push 0x1001678
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpICW]
test eax, eax
jne 0x100784c
mov eax, dword [ebp - 0x87c]
mov ecx, dword [eax]
push 0
lea edx, [ebp - 0x840]
push edx
push eax
call dword [ecx + 0x14]
test eax, eax
jl 0x100784c
mov eax, dword [ebp - 0x874]
mov ecx, dword [eax]
push 0
push 0
push ebx
lea edx, [ebp - 0x20c]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x100784c
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x880]
call esi
test eax, eax
je 0x1007846
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call esi
test eax, eax
jne 0x100784c
mov dword [edi], 1
cmp dword [ebp - 0x870], 0
jl 0x1007875
cmp dword [edi], 0
jne 0x1007875
lea eax, [ebp - 0x86c]
push eax
push dword [ebp - 0x878]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1007776
mov eax, dword [ebp - 0x87c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x874]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x878]
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x870]
pop edi
pop esi
pop ebx
call fcn.01009336
leave
ret 0x10