Function at 0x1021811
Capabilities:
Enumerate files on windows
Enumerate files recursively
Get common file path
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1a94
call fcn.01023ee0
mov eax, dword [0x1028058]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov dword [ebp - 0x1a78], eax
mov esi, 0x104
push esi
lea eax, [ebp - 0x414]
push eax
push ebx
mov dword [ebp - 0x1a94], ebx
call edi
test eax, eax
je 0x102185d
cmp eax, esi
jb 0x10218b4
xor eax, eax
push ebx
mov word [ebp - 0x414], ax
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.0101fdd2
test eax, eax
jl 0x10218b4
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push esi
lea eax, [ebp - 0x414]
push eax
push ebx
call edi
test eax, eax
je 0x10218b4
cmp eax, esi
jae 0x10218b4
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x824]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1021c5b
push dword [ebp - 0x1a78]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x1021c4e
lea eax, [ebp - 0x1a74]
push eax
push 0x1002518
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
xor edi, edi
mov dword [ebp - 0x1a84], eax
cmp eax, 0xffffffff
je 0x1021b57
lea eax, [ebp - 0x1a7c]
push eax
push 0x1002964
push 1
push edi
push 0x1002974
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x1021b4b
mov eax, dword [ebp - 0x1a7c]
mov ecx, dword [eax]
lea edx, [ebp - 0x1a88]
push edx
push 0x100292c
push eax
call dword [ecx]
test eax, eax
jl 0x1021b3f
mov eax, dword [ebp - 0x1a88]
mov ecx, dword [eax]
push edi
lea edx, [ebp - 0x1a48]
push edx
push eax
call dword [ecx + 0x14]
test eax, eax
jl 0x1021b18
mov eax, dword [ebp - 0x1a7c]
mov ecx, dword [eax]
push edi
push edi
push esi
lea edx, [ebp - 0x20c]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x1021a2c
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x10219b3
cmp word [ebp - 0x414], di
je 0x1021a2c
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x1021a2c
mov eax, dword [ebp - 0x1a7c]
mov ecx, dword [eax]
push 0x800
lea edx, [ebp - 0x1824]
push edx
push eax
call dword [ecx + 0x28]
test eax, eax
jl 0x1021a2c
lea eax, [ebp - 0x1824]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
cmp word [ebp - 0x1824], di
je 0x1021a15
push 0x1002508
lea eax, [ebp - 0x1824]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpICW]
test eax, eax
je 0x1021a15
push 0x10024f8
lea eax, [ebp - 0x1824]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpICW]
test eax, eax
jne 0x1021b18
lea eax, [ebp - 0x1a48]
push eax
push dword [ebp - 0x1a78]
call fcn.01020fa3
jmp 0x1021b18
mov eax, dword [ebp - 0x1a7c]
mov ecx, dword [eax]
lea edx, [ebp - 0x1a80]
push edx
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x1021b18
push dword [ebp - 0x1a80]
push 0x1001f28
call fcn.0102102f
test eax, eax
je 0x1021a6d
lea eax, [ebp - 0x1a48]
push eax
push dword [ebp - 0x1a78]
call fcn.01020fa3
push dword [ebp - 0x1a80]
push 0x1001f88
call fcn.0102102f
test eax, eax
je 0x1021b0c
lea eax, [ebp - 0x1a8c]
push eax
push 0x20019
push edi
push 0x1001d20
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1021b0c
lea eax, [ebp - 0x1a90]
push eax
lea eax, [ebp - 0x61c]
push eax
push edi
push edi
push dword [ebp - 0x1a8c]
mov dword [ebp - 0x1a90], 0x208
call fcn.01020b90
test eax, eax
jne 0x1021b00
cmp ax, word [ebp - 0x61c]
je 0x1021aee
lea eax, [ebp - 0x61c]
push eax
push 0x1001c64
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x1021b00
lea eax, [ebp - 0x1a48]
push eax
push dword [ebp - 0x1a78]
call fcn.01020fa3
push dword [ebp - 0x1a8c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x1a80]
call dword [sym.imp.SHELL32.dll_ILFree]
lea eax, [ebp - 0x1a74]
push eax
push dword [ebp - 0x1a84]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1021942
mov eax, dword [ebp - 0x1a88]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x1a7c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x1a84]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 0x10], 1
jne 0x1021c4e
push dword [ebp - 0x1a78]
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0101fdd2
push 0x10024f0
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.010214df
test eax, eax
jl 0x1021c4e
push edi
push edi
push 1
lea eax, [ebp - 0x1a74]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov edi, eax
cmp edi, 0xffffffff
je 0x1021c4e
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push 0x10024ec
lea eax, [ebp - 0x1a48]
push eax
call ebx
test eax, eax
je 0x1021c31
push 0x10024e4
lea eax, [ebp - 0x1a48]
push eax
call ebx
test eax, eax
je 0x1021c31
push dword [ebp - 0x1a78]
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0101fdd2
push 0x10024e0
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.010214df
test eax, eax
jl 0x1021c31
lea eax, [ebp - 0x1a48]
push eax
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.010214df
test eax, eax
jl 0x1021c31
push 1
push dword [ebp - 0x1a94]
lea eax, [ebp - 0x20c]
push eax
call fcn.01021811
lea eax, [ebp - 0x1a74]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1021bb8
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01023ead
leave
ret 0xc