Function at 0x40a1ca
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.00423c10
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 0x40a20c
cmp eax, esi
jb 0x40a266
xor eax, eax
lea ecx, [ebp - 0x214]
push ebx
mov edx, esi
mov word [ebp - 0x41c], ax
call fcn.00408495
test eax, eax
js 0x40a266
lea ecx, [ebp - 0x214]
call fcn.0040e551
push esi
lea eax, [ebp - 0x41c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x40a266
cmp eax, esi
jae 0x40a266
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.0040ea93
lea eax, [ebp - 0x82c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x40a6d7
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x40a6ca
lea eax, [ebp - 0x1a7c]
push eax
push 0x40250c
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x1a8c], eax
cmp eax, 0xffffffff
je 0x40a5d5
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 0x40a5c9
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 0x40a2fb
mov ecx, 4
int 0x29
test eax, eax
js 0x40a59b
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 0x40a32e
mov ecx, 4
int 0x29
test eax, eax
js 0x40a55d
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 0x40a368
mov ecx, 4
int 0x29
test eax, eax
js 0x40a43b
lea eax, [ebp - 0x214]
push eax
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x40a3ac
cmp word [ebp - 0x41c], 0
je 0x40a43b
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x40a43b
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 0x40a3da
mov ecx, 4
int 0x29
test eax, eax
js 0x40a43b
lea eax, [ebp - 0x182c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
cmp word [ebp - 0x182c], 0
je 0x40a425
push 0x402518
lea eax, [ebp - 0x182c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpICW]
test eax, eax
je 0x40a425
push 0x402528
lea eax, [ebp - 0x182c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpICW]
test eax, eax
jne 0x40a55d
mov ecx, dword [ebp - 0x1a84]
lea edx, [ebp - 0x1a50]
call fcn.0040a0c4
jmp 0x40a55d
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 0x40a464
mov ecx, 4
int 0x29
test eax, eax
js 0x40a55d
mov esi, dword [ebp - 0x1a88]
push 0x402d78
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
test eax, eax
je 0x40a48c
mov edx, eax
mov ecx, esi
call fcn.0040a143
jmp 0x40a48e
xor eax, eax
mov esi, dword [ebp - 0x1a84]
test eax, eax
je 0x40a4a5
lea edx, [ebp - 0x1a50]
mov ecx, esi
call fcn.0040a0c4
mov edi, dword [ebp - 0x1a88]
push 0x402dd8
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
test eax, eax
je 0x40a4c5
mov edx, eax
mov ecx, edi
call fcn.0040a143
jmp 0x40a4c7
xor eax, eax
test eax, eax
je 0x40a551
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 0x40a551
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.00409a47
test eax, eax
jne 0x40a545
cmp ax, word [ebp - 0x624]
je 0x40a538
lea eax, [ebp - 0x624]
push eax
push 0x402f5c
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x40a545
lea edx, [ebp - 0x1a50]
mov ecx, esi
call fcn.0040a0c4
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 0x40a303
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 0x40a59b
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 0x40a5be
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 0x40a6ca
push edi
mov edx, esi
lea ecx, [ebp - 0x214]
call fcn.00408495
push 0x402538
mov edx, esi
lea ecx, [ebp - 0x214]
call fcn.004096ea
test eax, eax
js 0x40a6ca
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 0x40a6ca
push 0x402540
lea eax, [ebp - 0x1a50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40a6ad
push 0x402544
lea eax, [ebp - 0x1a50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40a6ad
push edi
mov edx, 0x104
lea ecx, [ebp - 0x214]
call fcn.00408495
push 0x40254c
mov edx, 0x104
lea ecx, [ebp - 0x214]
call fcn.004096ea
test eax, eax
js 0x40a6ad
lea eax, [ebp - 0x1a50]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x214]
call fcn.004096ea
test eax, eax
js 0x40a6ad
push 1
mov edx, ebx
lea ecx, [ebp - 0x214]
call fcn.0040a1ca
lea eax, [ebp - 0x1a7c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40a62d
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.00423360
mov esp, ebp
pop ebp
ret 4