Function at 0x413f58
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x29c
mov ebx, eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
cmp dword [esp + 0x2b0], 0
je 0x41401a
mov dword [esp + 0x40], 0xffffffff
mov edx, 0x416f0a
mov eax, dword [esp + 0x2b0]
call fcn.00408a30
mov edi, eax
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.lua54.dll_wchar_toutf8
mov esi, eax
mov ebp, eax
mov al, byte [ebp]
test al, al
je 0x41400a
inc ebp
cmp al, 0x5c
je 0x413fb9
cmp al, 0x2f
jne 0x413fa9
mov al, byte [ebp]
mov byte [esp + 0x1c], al
mov byte [ebp], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.0040d134
test eax, eax
jns 0x414001
mov dword [esp + 4], esi
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.00415010
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.0041490c
mov al, byte [esp + 0x1c]
mov byte [ebp], al
jmp 0x413fa9
mov dword [esp], edi
call sub.msvcrt.dll_free
mov dword [esp], esi
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.0040fa60
mov edx, 0x416f0c
call fcn.00408a30
mov dword [esp + 0x20], eax
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push ecx
push ecx
mov ebp, eax
mov esi, 1
cmp eax, 0xffffffff
je 0x4141a4
cmp word [esp + 0x6c], 0x2e
jne 0x41407b
mov ax, word [esp + 0x6e]
cmp ax, 0x2e
je 0x41417f
test ax, ax
je 0x41417f
lea edx, [esp + 0x6c]
mov eax, dword [esp + 0x28]
call fcn.00408a30
mov dword [esp + 0x1c], eax
xor edi, edi
cmp dword [esp + 0x2b0], 0
je 0x4140aa
lea edx, [esp + 0x6c]
mov eax, dword [esp + 0x2b0]
call fcn.00408a30
mov edi, eax
test byte [esp + 0x40], 0x10
je 0x4140d4
mov eax, edi
test edi, edi
jne 0x4140bb
lea eax, [esp + 0x6c]
mov dword [esp], eax
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
mov eax, ebx
call fcn.00413f58
and esi, eax
jmp 0x41416b
mov dword [esp + 0x3c], 0xffffffff
cmp dword [esp + 0x5c], 0
je 0x4140f6
cmp dword [esp + 0x60], 0
je 0x4140f6
mov eax, edi
test edi, edi
jne 0x41410f
lea eax, [esp + 0x6c]
jmp 0x41410f
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
lea eax, [esp + 0x6c]
mov dword [esp], eax
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x4140ea
jmp 0x41416b
lea edx, [esp + 0x3c]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.lua54.dll_wchar_toutf8
mov dword [esp + 0x24], eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.00415010
xor edx, edx
test eax, eax
jne 0x414152
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.00414d08
xor edx, edx
test eax, eax
sete dl
and esi, edx
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.0041490c
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [esp], edi
call sub.msvcrt.dll_free
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push edx
push edx
test eax, eax
jne 0x41405b
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
push eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, esi
add esp, 0x29c
pop ebx
pop esi
pop edi
pop ebp
ret