Function at 0x40a1da
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, 0x1a98
call fcn.00423cf0
mov eax, dword [0x424004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov esi, 0x104
lea eax, [ebp - 0x41c]
push esi
mov ebx, edx
mov edi, ecx
push eax
push ebx
mov dword [ebp - 0x1a84], edi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x40a21c
cmp eax, esi
jb 0x40a276
xor eax, eax
lea ecx, [ebp - 0x214]
push ebx
mov edx, esi
mov word [ebp - 0x41c], ax
call fcn.004084a5
test eax, eax
js 0x40a276
lea ecx, [ebp - 0x214]
call fcn.0040e561
push esi
lea eax, [ebp - 0x41c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x40a276
cmp eax, esi
jae 0x40a276
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push ecx
push eax
lea eax, [ebp - 0x214]
mov edx, esi
push eax
lea ecx, [ebp - 0x41c]
call fcn.0040eaa3
lea eax, [ebp - 0x82c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x40a6e7
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x40a6da
lea eax, [ebp - 0x1a7c]
push eax
push 0x40250c
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x1a8c], eax
cmp eax, 0xffffffff
je 0x40a5e5
lea eax, [ebp - 0x1a80]
push eax
push 0x4033d0
push 1
push 0
push 0x4012a4
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40a5d9
mov eax, dword [ebp - 0x1a80]
lea ecx, [ebp - 0x1a90]
mov edi, esp
push ecx
push 0x4012e4
mov esi, dword [eax]
push eax
mov ecx, dword [esi]
call dword [0x4255c0]
call dword [esi]
cmp edi, esp
je 0x40a30b
mov ecx, 4
int 0x29
test eax, eax
js 0x40a5ab
mov eax, dword [ebp - 0x1a90]
lea ecx, [ebp - 0x1a50]
mov edi, esp
push 0
push ecx
mov esi, dword [eax]
push eax
mov ecx, dword [esi + 0x14]
call dword [0x4255c0]
call dword [esi + 0x14]
cmp edi, esp
je 0x40a33e
mov ecx, 4
int 0x29
test eax, eax
js 0x40a56d
mov eax, dword [ebp - 0x1a80]
lea ecx, [ebp - 0x214]
mov edi, esp
push 0
push 0
mov esi, dword [eax]
push 0x104
push ecx
push eax
mov ecx, dword [esi + 0xc]
call dword [0x4255c0]
call dword [esi + 0xc]
cmp edi, esp
je 0x40a378
mov ecx, 4
int 0x29
test eax, eax
js 0x40a44b
lea eax, [ebp - 0x214]
push eax
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x40a3bc
cmp word [ebp - 0x41c], 0
je 0x40a44b
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x40a44b
mov eax, dword [ebp - 0x1a80]
lea ecx, [ebp - 0x182c]
mov edi, esp
push 0x800
push ecx
mov esi, dword [eax]
push eax
mov ecx, dword [esi + 0x28]
call dword [0x4255c0]
call dword [esi + 0x28]
cmp edi, esp
je 0x40a3ea
mov ecx, 4
int 0x29
test eax, eax
js 0x40a44b
lea eax, [ebp - 0x182c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
cmp word [ebp - 0x182c], 0
je 0x40a435
push 0x402518
lea eax, [ebp - 0x182c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpICW]
test eax, eax
je 0x40a435
push 0x402528
lea eax, [ebp - 0x182c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpICW]
test eax, eax
jne 0x40a56d
mov ecx, dword [ebp - 0x1a84]
lea edx, [ebp - 0x1a50]
call fcn.0040a0d4
jmp 0x40a56d
mov eax, dword [ebp - 0x1a80]
lea ecx, [ebp - 0x1a88]
mov edi, esp
push ecx
push eax
mov esi, dword [eax]
mov ecx, dword [esi + 0x10]
call dword [0x4255c0]
call dword [esi + 0x10]
cmp edi, esp
je 0x40a474
mov ecx, 4
int 0x29
test eax, eax
js 0x40a56d
mov esi, dword [ebp - 0x1a88]
push 0x402d78
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
test eax, eax
je 0x40a49c
mov edx, eax
mov ecx, esi
call fcn.0040a153
jmp 0x40a49e
xor eax, eax
mov esi, dword [ebp - 0x1a84]
test eax, eax
je 0x40a4b5
lea edx, [ebp - 0x1a50]
mov ecx, esi
call fcn.0040a0d4
mov edi, dword [ebp - 0x1a88]
push 0x402dd8
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
test eax, eax
je 0x40a4d5
mov edx, eax
mov ecx, edi
call fcn.0040a153
jmp 0x40a4d7
xor eax, eax
test eax, eax
je 0x40a561
lea eax, [ebp - 0x1a94]
push eax
push 0x20019
push 0
push 0x402978
push reloc.SHLWAPI.dll_ParseURLW
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a561
lea eax, [ebp - 0x1a98]
mov dword [ebp - 0x1a98], 0x208
push eax
lea eax, [ebp - 0x624]
push eax
push ecx
mov ecx, dword [ebp - 0x1a94]
call fcn.00409a57
test eax, eax
jne 0x40a555
cmp ax, word [ebp - 0x624]
je 0x40a548
lea eax, [ebp - 0x624]
push eax
push 0x402f5c
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x40a555
lea edx, [ebp - 0x1a50]
mov ecx, esi
call fcn.0040a0d4
push dword [ebp - 0x1a94]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x1a88]
call dword [sym.imp.SHELL32.dll_ILFree]
lea eax, [ebp - 0x1a7c]
push eax
push dword [ebp - 0x1a8c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40a313
mov eax, dword [ebp - 0x1a90]
mov edi, esp
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x4255c0]
call esi
cmp edi, esp
je 0x40a5ab
mov ecx, 4
int 0x29
mov eax, dword [ebp - 0x1a80]
mov edi, esp
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x4255c0]
call esi
cmp edi, esp
je 0x40a5ce
mov ecx, 4
int 0x29
mov edi, dword [ebp - 0x1a84]
mov esi, 0x104
push dword [ebp - 0x1a8c]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 1
jne 0x40a6da
push edi
mov edx, esi
lea ecx, [ebp - 0x214]
call fcn.004084a5
push 0x402538
mov edx, esi
lea ecx, [ebp - 0x214]
call fcn.004096fa
test eax, eax
js 0x40a6da
xor ecx, ecx
lea eax, [ebp - 0x1a7c]
push ecx
push ecx
push 1
push eax
push ecx
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a6da
push 0x402540
lea eax, [ebp - 0x1a50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40a6bd
push 0x402544
lea eax, [ebp - 0x1a50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40a6bd
push edi
mov edx, 0x104
lea ecx, [ebp - 0x214]
call fcn.004084a5
push 0x40254c
mov edx, 0x104
lea ecx, [ebp - 0x214]
call fcn.004096fa
test eax, eax
js 0x40a6bd
lea eax, [ebp - 0x1a50]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x214]
call fcn.004096fa
test eax, eax
js 0x40a6bd
push 1
mov edx, ebx
lea ecx, [ebp - 0x214]
call fcn.0040a1da
lea eax, [ebp - 0x1a7c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40a63d
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x82c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00423440
mov esp, ebp
pop ebp
ret 4