Function at 0x40ae40
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x49c
mov edi, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [ebp - 0x478], ecx
mov dword [esp], edx
mov dword [ebp - 0x488], eax
call edi
mov dword [esp], 0x418ed0
mov dword [ebp - 0x46c], edi
mov esi, eax
call edi
lea esi, [esi + eax + 0x20a]
add esi, esi
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp + 4], ebx
mov edi, eax
mov dword [esp], eax
mov dword [ebp - 0x47c], eax
call dword [sym.imp.ucrtbase.dll_wcscpy]
mov dword [esp + 4], 0x418ad0
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcscat]
mov ecx, 0x5c
mov eax, dword [ebp - 0x46c]
mov word [edi + 2], cx
mov dword [esp], edi
call eax
mov dword [esp], edi
lea ebx, [eax + eax - 2]
lea eax, [edi + ebx]
mov dword [ebp - 0x480], eax
lea eax, [ebp - 0x268]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov dword [ebp - 0x474], eax
sub esp, 8
cmp eax, 0xffffffff
je 0x40af9a
sub esi, ebx
sar esi, 1
mov dword [ebp - 0x484], esi
lea esi, [ebp - 0x23c]
lea esi, [esi]
mov dword [esp], esi
mov eax, dword [ebp - 0x46c]
call eax
mov edi, eax
cmp eax, 0x100
ja 0x40af68
mov edx, dword [ebp - 0x478]
test edx, edx
je 0x40afb8
mov dword [esp + 4], 0x418ad6
mov ebx, dword [sym.imp.ucrtbase.dll_wcscmp]
mov dword [esp], esi
call ebx
test eax, eax
je 0x40af68
mov dword [esp + 4], 0x418ada
mov dword [esp], esi
call ebx
test eax, eax
je 0x40af68
mov eax, esi
call fcn.0040ad00
test eax, eax
jne 0x40b0c0
lea esi, [esi]
lea eax, [ebp - 0x268]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x474]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
jne 0x40af08
mov eax, dword [ebp - 0x474]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
mov eax, dword [ebp - 0x47c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor ebx, ebx
mov eax, 0x2e
mov dword [ebp - 0x470], edi
mov edi, ebx
test ax, ax
je 0x40afe6
mov ebx, dword [edi*4 + 0x418c64]
mov eax, dword [ebp - 0x46c]
mov dword [esp], ebx
call eax
cmp eax, dword [ebp - 0x470]
jb 0x40b008
add edi, 1
cmp edi, 4
je 0x40af68
mov eax, dword [edi*4 + 0x418c64]
movzx eax, word [eax]
test ax, ax
je 0x40afe6
jmp 0x40afcc
mov dword [esp], ebx
mov eax, dword [ebp - 0x46c]
call eax
mov dword [esp + 4], ebx
mov ecx, eax
mov eax, dword [ebp - 0x470]
sub eax, ecx
lea eax, [esi + eax*2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x40afe6
mov dword [esp], ebx
mov eax, dword [ebp - 0x46c]
call eax
sub dword [ebp - 0x470], eax
mov ebx, dword [ebp - 0x470]
mov dword [esp + 4], esi
lea eax, [ebx + ebx]
mov dword [esp + 8], eax
lea eax, [ebp - 0x468]
mov dword [esp], eax
call sub.ucrtbase.dll_memcpy
xor eax, eax
mov word [ebp + ebx*2 - 0x468], ax
lea eax, [ebp - 0x468]
call fcn.0040ad00
test eax, eax
je 0x40afe6
lea eax, [ebp - 0x468]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x488]
mov dword [esp + 8], 0x143
mov dword [esp + 4], 0x1f44
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendDlgItemMessageW]
sub esp, 0x14
jmp 0x40afe6
xor edi, edi
mov eax, 0x2e
mov ebx, edi
mov edi, dword [ebx*4 + 0x418c64]
test ax, ax
je 0x40b14f
cmp ebx, 1
jbe 0x40b16d
mov eax, dword [ebp - 0x484]
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x480]
mov dword [esp + 0x10], 0x4189fa
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x418ae0
mov dword [esp], eax
call fcn.0040a020
mov eax, dword [ebp - 0x47c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
jne 0x40b1c0
add ebx, 1
cmp ebx, 4
je 0x40af68
mov eax, dword [ebx*4 + 0x418c64]
mov edi, dword [ebx*4 + 0x418c64]
movzx eax, word [eax]
test ax, ax
jne 0x40b0d5
mov dword [esp + 4], 0x2e
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
je 0x40b12d
cmp ebx, 1
ja 0x40b0de
mov eax, dword [ebp - 0x484]
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x480]
mov dword [esp + 0x10], 0x418ed0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x418ae0
mov dword [esp], eax
call fcn.0040a020
mov eax, dword [ebp - 0x47c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
jne 0x40b1c0
add ebx, 1
jmp 0x40b139
mov eax, dword [ebp - 0x488]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x143
mov dword [esp + 4], 0x1f44
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendDlgItemMessageW]
sub esp, 0x14
jmp 0x40af68