Function at 0x4021a0
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x660
lea eax, [esp + 0x458]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x674]
push 0x104
push edi
mov esi, ecx
push eax
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
lea ecx, [esp + 0x468]
push 0x404030
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [esi + 0x10]
push 0
inc edx
push edi
mov dword [esi + 0x10], edx
mov edx, dword [esi]
push 2
mov ecx, esi
call dword [edx + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x468]
push eax
push ecx
call ebx
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40234a
test byte [esp + 0x10], 0x10
je 0x402274
cmp word [esp + 0x3c], 0x2e
jne 0x40222f
mov ax, word [esp + 0x3e]
cmp ax, 0x2e
je 0x402274
test ax, ax
je 0x402274
mov edx, dword [esi]
lea eax, [esp + 0x10]
push eax
push edi
mov ecx, esi
call dword [edx + 0x18]
test al, al
je 0x402265
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x260]
push ecx
push edi
push edx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [esp + 0x260]
mov ecx, esi
push eax
call fcn.004021a0
jmp 0x402274
mov edx, dword [esi]
push str.skipping_directory
push edi
push 2
mov ecx, esi
call dword [edx + 8]
mov eax, dword [esi + 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x402298
lea ecx, [esp + 0x10]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402210
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esi + 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4023fb
lea ecx, [esp + 0x10]
lea edx, [esp + 0x468]
push ecx
push edx
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4023d4
test byte [esp + 0x10], 0x10
jne 0x402392
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0x10]
inc eax
push ecx
mov dword [esi + 0xc], eax
mov eax, dword [esi]
push edi
mov ecx, esi
call dword [eax + 0x1c]
test al, al
je 0x402392
push 0x104
lea edx, [esp + 0x264]
push edi
push edx
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x260]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [esi]
lea eax, [esp + 0x260]
push eax
mov ecx, esi
call dword [edx + 0xc]
test al, al
je 0x40237f
lea ecx, [esp + 0x3c]
lea ebp, [esi + 8]
push ecx
mov ecx, ebp
call sub.MFC42u.DLL_CString::operator
mov edx, dword [esi]
push ebp
mov ecx, esi
call dword [edx + 0x10]
jmp 0x402392
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esi]
push edi
push eax
push 2
mov ecx, esi
mov dword [esi + 4], eax
call dword [edx + 4]
cmp eax, 1
jbe 0x40229f
cmp eax, 2
jne 0x40241a
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x660
ret 4
mov eax, dword [esi]
lea ecx, [esp + 0x260]
push 0
push ecx
push 4
mov ecx, esi
call dword [eax + 8]
mov edx, dword [esi + 0x14]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4023b6
lea eax, [esp + 0x10]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4022cd
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [esi]
push edi
mov ecx, esi
call dword [edx + 0x20]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x660
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esi]
push edi
push eax
push 3
mov ecx, esi
mov dword [esi + 4], eax
call dword [edx + 4]
pop edi
cmp eax, 2
pop esi
pop ebp
setbe al
pop ebx
add esp, 0x660
ret 4
mov eax, dword [esi]
push 0
push 0x404034
push 3
mov ecx, esi
call dword [eax + 8]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x660
ret 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x660
ret 4