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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x684
mov eax, dword [0x412054]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, edx
mov ebx, ecx
mov dword [ebp - 0x684], eax
push esi
push edi
test eax, eax
je 0x40da2b
lea eax, [ebp - 0x678]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
test ebx, ebx
je 0x40da2b
xor esi, esi
mov dword [ebp - 0x67c], esi
cmp edi, 0xffffffff
je 0x40d89a
lea eax, [ebp - 0x64c]
push 0x2e
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
test byte [ebp - 0x678], 0x10
pop ecx
pop ecx
jne 0x40d87d
test eax, eax
je 0x40d7cf
mov edx, 0x4074fc
mov ecx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x40d788
test si, si
je 0x40d782
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x40d788
add ecx, 4
add edx, 4
test si, si
jne 0x40d760
xor esi, esi
mov ecx, esi
jmp 0x40d78f
sbb ecx, ecx
or ecx, 1
xor esi, esi
test ecx, ecx
je 0x40d87d
mov ecx, 0x407508
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d7c2
test dx, dx
je 0x40d7be
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d7c2
add eax, 4
add ecx, 4
test dx, dx
jne 0x40d79c
mov eax, esi
jmp 0x40d7c7
sbb eax, eax
or eax, 1
test eax, eax
je 0x40d87d
push ebx
mov edx, 0x106
lea ecx, [ebp - 0x218]
call fcn.00409190
lea eax, [ebp - 0x218]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
xor ecx, ecx
mov edx, 0x106
mov word [eax + 2], cx
lea eax, [ebp - 0x64c]
push eax
lea ecx, [ebp - 0x218]
call fcn.0040bcac
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40d817
sub ecx, edx
sar ecx, 1
push 2
pop edx
lea eax, [ecx + 1]
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00410315
pop ecx
mov ecx, eax
lea edx, [ebp - 0x218]
mov dword [ebp - 0x680], ecx
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 0x67c]
jne 0x40d84f
sub edx, esi
lea eax, [ebp - 0x218]
sar edx, 1
push eax
inc edx
call fcn.00409190
lea eax, [ebp - 0x680]
push eax
call fcn.0040efdd
xor esi, esi
lea eax, [ebp - 0x678]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40d737
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
mov edx, 0x106
lea ecx, [ebp - 0x428]
call fcn.00409190
lea eax, [ebp - 0x428]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
xor ecx, ecx
mov edx, 0x106
mov word [eax + 2], cx
lea ecx, [ebp - 0x428]
push 0x407514
call fcn.0040bcac
lea eax, [ebp - 0x678]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40da2b
mov edi, dword [ebp - 0x684]
test byte [ebp - 0x678], 0x10
je 0x40da0e
mov ecx, 0x407518
lea eax, [ebp - 0x64c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d93a
test dx, dx
je 0x40d936
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d93a
add eax, 4
add ecx, 4
test dx, dx
jne 0x40d914
xor eax, eax
jmp 0x40d93f
sbb eax, eax
or eax, 1
test eax, eax
je 0x40da0e
mov ecx, 0x40751c
lea eax, [ebp - 0x64c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d978
test dx, dx
je 0x40d974
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d978
add eax, 4
add ecx, 4
test dx, dx
jne 0x40d952
xor eax, eax
jmp 0x40d97d
sbb eax, eax
or eax, 1
test eax, eax
je 0x40da0e
lea eax, [ebp - 0x428]
mov edx, 0x106
push eax
lea ecx, [ebp - 0x218]
call fcn.00409190
lea eax, [ebp - 0x218]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
xor ecx, ecx
mov edx, 0x106
mov word [eax + 2], cx
lea eax, [ebp - 0x64c]
push eax
lea ecx, [ebp - 0x218]
call fcn.0040bcac
push 0x401280
mov edx, 0x106
lea ecx, [ebp - 0x218]
call fcn.0040bcac
push 0x5c
push ebx
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
push 2
pop ecx
add eax, ecx
mov edx, 0x106
push eax
lea ecx, [ebp - 0x218]
call fcn.0040bcac
lea edx, [edi - 1]
lea ecx, [ebp - 0x218]
call fcn.0040d6e4
lea eax, [ebp - 0x678]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40d8fc
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410620
leave
ret