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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa98
mov eax, dword [0x420040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x830
xor esi, esi
lea eax, [ebp - 0x834]
push esi
push eax
call fcn.00407b00
mov edx, dword [ebp + 8]
add esp, 0xc
movzx ecx, word [edx]
test cx, cx
je 0x401d95
xor eax, eax
nop word [eax + eax]
inc esi
mov word [ebp + eax - 0x834], cx
lea eax, [esi + esi]
movzx ecx, word [eax + edx]
test cx, cx
jne 0x401d80
lea edi, [ebp - 0x834]
cmp word [edi + esi*2 - 2], 0x5c
lea edi, [edi + esi*2]
je 0x401dca
inc esi
mov eax, 0x5c
mov word [edi], ax
lea eax, [esi + esi]
cmp eax, 0x830
jae 0x402059
lea edi, [ebp - 0x834]
add edi, eax
xor eax, eax
mov word [edi], ax
mov dword [ebp - 0xa88], esi
call fcn.00402cf0
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xa98], eax
test ebx, ebx
je 0x401e00
lea ecx, [eax + 0xc1]
push ecx
lea eax, [ebp - 0x834]
push eax
call fcn.00402bf0
add esp, 8
test eax, eax
jne 0x402048
inc esi
mov eax, 0x2a
mov word [edi], ax
mov dword [ebp - 0xa90], esi
lea eax, [esi + esi]
cmp eax, 0x830
jae 0x402059
lea ecx, [ebp - 0x834]
add eax, ecx
xor ecx, ecx
mov dword [ebp - 0xa94], eax
mov word [eax], cx
lea eax, [ebp - 0xa84]
push eax
lea eax, [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xa8c], eax
cmp eax, 0xffffffff
jne 0x401e7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x401f10
push eax
lea eax, [ebp - 0x834]
push eax
push str.____FindFirstFileW__ws__call_error__code:__d_n
call fcn.00405140
add esp, 0xc
jmp 0x401f10
mov esi, dword [ebp - 0xa8c]
test byte [ebp - 0xa84], 0x10
je 0x401ef4
cmp word [ebp - 0xa58], 0x2e
jne 0x401eb0
mov ax, word [ebp - 0xa56]
test ax, ax
je 0x401ef4
cmp ax, 0x2e
jne 0x401eb0
cmp word [ebp - 0xa54], 0
je 0x401ef4
mov eax, dword [ebp - 0xa88]
lea ecx, [ebp - 0xa58]
add eax, eax
mov edx, ecx
sub eax, edx
lea edx, [ebp - 0x834]
add edx, eax
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x401ed0
push edi
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 0x834]
push eax
call fcn.00401d40
add esp, 0xc
lea eax, [ebp - 0xa84]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x401e81
mov esi, dword [ebp - 0xa90]
mov eax, dword [ebp - 0xa94]
inc esi
mov edx, dword [ebp - 0xa98]
xor ecx, ecx
mov dword [eax - 2], 0x2e002a
mov eax, dword [edx + 0x2d0]
mov al, byte [eax]
nop
cbw
lea ecx, [ecx + 1]
mov word [ebp + esi*2 - 0x834], ax
inc esi
mov eax, dword [edx + 0x2d0]
mov al, byte [ecx + eax]
test al, al
jne 0x401f30
add esi, esi
cmp esi, 0x830
jae 0x402059
xor eax, eax
mov word [ebp + esi - 0x834], ax
lea eax, [ebp - 0xa84]
push eax
lea eax, [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401fb3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x402048
push eax
lea eax, [ebp - 0x834]
push eax
push str.____FindFirstFileW__ws__call_error__code:__d_n
call fcn.00405140
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406952
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xa88]
lea ecx, [ebp - 0xa58]
mov ebx, dword [ebp + 0x10]
lea esi, [ebp - 0x834]
add eax, eax
sub eax, ecx
add esi, eax
nop
lea eax, [ebp - 0xa58]
push eax
push str.Find_file:__ws_n
call fcn.00405140
add esp, 8
lea eax, [ebp - 0xa58]
nop word [eax + eax]
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [esi + eax - 2], cx
test cx, cx
jne 0x401ff0
lea eax, [ebp - 0x834]
push eax
push str.File_fullname:__ws_n
call fcn.00405140
add esp, 8
cmp dword [ebp - 0xa68], 0
jne 0x402026
cmp dword [ebp - 0xa64], 0
je 0x402036
lea eax, [ebp - 0x834]
push ebx
push eax
call fcn.00402060
add esp, 8
lea eax, [ebp - 0xa84]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x401fd0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406952
mov esp, ebp
pop ebp
ret
call fcn.00406876
int3